diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 000000000000..827166823d73 --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,101 @@ +# Code - OSS Development Container + +This repository includes configuration for a development container for working with Code - OSS in a local container or using [GitHub Codespaces](https://github.com/features/codespaces). + +> **Tip:** The default VNC password is `vscode`. The VNC server runs on port `5901` and a web client is available on port `6080`. + +## Quick start - local + +1. Install Docker Desktop or Docker for Linux on your local machine. (See [docs](https://aka.ms/vscode-remote/containers/getting-started) for additional details.) + +2. **Important**: Docker needs at least **4 Cores and 6 GB of RAM (8 GB recommended)** to run a full build. If you are on macOS, or are using the old Hyper-V engine for Windows, update these values for Docker Desktop by right-clicking on the Docker status bar item and going to **Preferences/Settings > Resources > Advanced**. + + > **Note:** The [Resource Monitor](https://marketplace.visualstudio.com/items?itemName=mutantdino.resourcemonitor) extension is included in the container so you can keep an eye on CPU/Memory in the status bar. + +3. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the [Remote - Containers](https://aka.ms/vscode-remote/download/containers) extension. + + ![Image of Remote - Containers extension](https://microsoft.github.io/vscode-remote-release/images/remote-containers-extn.png) + + > **Note:** The Remote - Containers extension requires the Visual Studio Code distribution of Code - OSS. See the [FAQ](https://aka.ms/vscode-remote/faq/license) for details. + +4. Press Ctrl/Cmd + Shift + P or F1 and select **Remote-Containers: Clone Repository in Container Volume...**. + + > **Tip:** While you can use your local source tree instead, operations like `yarn install` can be slow on macOS or when using the Hyper-V engine on Windows. We recommend the "clone repository in container" approach instead since it uses "named volume" rather than the local filesystem. + +5. Type `https://github.com/microsoft/vscode` (or a branch or PR URL) in the input box and press Enter. + +6. After the container is running, open a web browser and go to [http://localhost:6080](http://localhost:6080), or use a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) to connect to `localhost:5901` and enter `vscode` as the password. + +Anything you start in VS Code, or the integrated terminal, will appear here. + +Next: **[Try it out!](#try-it)** + +## Quick start - GitHub Codespaces + +1. From the [microsoft/vscode GitHub repository](https://github.com/microsoft/vscode), click on the **Code** dropdown, select **Open with Codespaces**, and then click on **New codespace**. If prompted, select the **Standard** machine size (which is also the default). + + > **Note:** You will not see these options within GitHub if you are not in the Codespaces beta. + +2. After the codespace is up and running in your browser, press Ctrl/Cmd + Shift + P or F1 and select **Ports: Focus on Ports View**. + +3. You should see **VNC web client (6080)** under in the list of ports. Select the line and click on the globe icon to open it in a browser tab. + + > **Tip:** If you do not see the port, Ctrl/Cmd + Shift + P or F1, select **Forward a Port** and enter port `6080`. + +4. In the new tab, you should see noVNC. Click **Connect** and enter `vscode` as the password. + +Anything you start in VS Code, or the integrated terminal, will appear here. + +Next: **[Try it out!](#try-it)** + +### Using VS Code with GitHub Codespaces + +You may see improved VNC responsiveness when accessing a codespace from VS Code client since you can use a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/). Here's how to do it. + +1. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the the [GitHub Codespaces extension](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces). + + > **Note:** The GitHub Codespaces extension requires the Visual Studio Code distribution of Code - OSS. + +2. After the VS Code is up and running, press Ctrl/Cmd + Shift + P or F1, choose **Codespaces: Create New Codespace**, and use the following settings: + - `microsoft/vscode` for the repository. + - Select any branch (e.g. **main**) - you select a different one later. + - Choose **Standard** (4-core, 8GB) as the size. + +4. After you have connected to the codespace, you can use a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) to connect to `localhost:5901` and enter `vscode` as the password. + + > **Tip:** You may also need change your VNC client's **Picture Quaility** setting to **High** to get a full color desktop. + +5. Anything you start in VS Code, or the integrated terminal, will appear here. + +Next: **[Try it out!](#try-it)** + +## Try it! + +This container uses the [Fluxbox](http://fluxbox.org/) window manager to keep things lean. **Right-click on the desktop** to see menu options. It works with GNOME and GTK applications, so other tools can be installed if needed. + +> **Note:** You can also set the resolution from the command line by typing `set-resolution`. + +To start working with Code - OSS, follow these steps: + +1. In your local VS Code client, open a terminal (Ctrl/Cmd + Shift + \`) and type the following commands: + + ```bash + yarn install + bash scripts/code.sh + ``` + +2. After the build is complete, open a web browser or a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) to connect to the desktop environment as described in the quick start and enter `vscode` as the password. + +3. You should now see Code - OSS! + +Next, let's try debugging. + +1. Shut down Code - OSS by clicking the box in the upper right corner of the Code - OSS window through your browser or VNC viewer. + +2. Go to your local VS Code client, and use the **Run / Debug** view to launch the **VS Code** configuration. (Typically the default, so you can likely just press F5). + + > **Note:** If launching times out, you can increase the value of `timeout` in the "VS Code", "Attach Main Process", "Attach Extension Host", and "Attach to Shared Process" configurations in [launch.json](../.vscode/launch.json). However, running `scripts/code.sh` first will set up Electron which will usually solve timeout issues. + +3. After a bit, Code - OSS will appear with the debugger attached! + +Enjoy! diff --git a/lib/vscode/.devcontainer/cache/.gitignore b/.devcontainer/cache/.gitignore similarity index 100% rename from lib/vscode/.devcontainer/cache/.gitignore rename to .devcontainer/cache/.gitignore diff --git a/lib/vscode/.devcontainer/cache/before-cache.sh b/.devcontainer/cache/before-cache.sh similarity index 100% rename from lib/vscode/.devcontainer/cache/before-cache.sh rename to .devcontainer/cache/before-cache.sh diff --git a/lib/vscode/.devcontainer/cache/build-cache-image.sh b/.devcontainer/cache/build-cache-image.sh similarity index 100% rename from lib/vscode/.devcontainer/cache/build-cache-image.sh rename to .devcontainer/cache/build-cache-image.sh diff --git a/lib/vscode/.devcontainer/cache/cache-diff.sh b/.devcontainer/cache/cache-diff.sh similarity index 100% rename from lib/vscode/.devcontainer/cache/cache-diff.sh rename to .devcontainer/cache/cache-diff.sh diff --git a/lib/vscode/.devcontainer/cache/cache.Dockerfile b/.devcontainer/cache/cache.Dockerfile similarity index 100% rename from lib/vscode/.devcontainer/cache/cache.Dockerfile rename to .devcontainer/cache/cache.Dockerfile diff --git a/lib/vscode/.devcontainer/cache/restore-diff.sh b/.devcontainer/cache/restore-diff.sh similarity index 100% rename from lib/vscode/.devcontainer/cache/restore-diff.sh rename to .devcontainer/cache/restore-diff.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000000..d66344eccf65 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,36 @@ +{ + "name": "Code - OSS", + + // Image contents: https://github.com/microsoft/vscode-dev-containers/blob/master/repository-containers/images/github.com/microsoft/vscode/.devcontainer/base.Dockerfile + "image": "mcr.microsoft.com/vscode/devcontainers/repos/microsoft/vscode:branch-main", + "overrideCommand": false, + "runArgs": [ "--init", "--security-opt", "seccomp=unconfined"], + + "settings": { + "resmon.show.battery": false, + "resmon.show.cpufreq": false + }, + + // noVNC, VNC + "forwardPorts": [6080, 5901], + "portsAttributes": { + "6080": { + "label": "VNC web client (noVNC)", + "onAutoForward": "silent" + }, + "5901": { + "label": "VNC TCP port", + "onAutoForward": "silent" + } + }, + + "extensions": [ + "dbaeumer.vscode-eslint", + "mutantdino.resourcemonitor" + ], + + // Optionally loads a cached yarn install for the repo + "postCreateCommand": ".devcontainer/cache/restore-diff.sh", + + "remoteUser": "node" +} diff --git a/lib/vscode/.devcontainer/prepare.sh b/.devcontainer/prepare.sh similarity index 100% rename from lib/vscode/.devcontainer/prepare.sh rename to .devcontainer/prepare.sh diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 9bcce7a80897..000000000000 --- a/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -** -!release-packages -!ci diff --git a/.editorconfig b/.editorconfig index 65705d954568..e7e99b5bcb52 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,6 +1,15 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file root = true +# Tab indentation [*] -indent_style = space +indent_style = tab trim_trailing_whitespace = true + +# The indent size used in the `package.json` file cannot be changed +# https://github.com/npm/npm/pull/3180#issuecomment-16336516 +[{*.yml,*.yaml,package.json}] +indent_style = space indent_size = 2 diff --git a/lib/vscode/.eslintignore b/.eslintignore similarity index 80% rename from lib/vscode/.eslintignore rename to .eslintignore index b67a816156a4..8b93a4199e5d 100644 --- a/lib/vscode/.eslintignore +++ b/.eslintignore @@ -16,7 +16,3 @@ **/extensions/markdown-language-features/notebook-out/** **/extensions/typescript-basics/test/colorize-fixtures/** **/extensions/**/dist/** -# These are code-server code symlinks. -src/vs/base/node/proxy_agent.ts -src/vs/ipc.d.ts -src/vs/server/common/util.ts diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000000000000..a54964c17b67 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,1035 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "plugins": [ + "@typescript-eslint", + "jsdoc" + ], + "rules": { + "constructor-super": "warn", + "curly": "warn", + "eqeqeq": "warn", + "no-buffer-constructor": "warn", + "no-caller": "warn", + "no-debugger": "warn", + "no-duplicate-case": "warn", + "no-duplicate-imports": "warn", + "no-eval": "warn", + "no-extra-semi": "warn", + "no-new-wrappers": "warn", + "no-redeclare": "off", + "no-sparse-arrays": "warn", + "no-throw-literal": "warn", + "no-unsafe-finally": "warn", + "no-unused-labels": "warn", + "no-restricted-globals": [ + "warn", + "name", + "length", + "event", + "closed", + "external", + "status", + "origin", + "orientation", + "context" + ], // non-complete list of globals that are easy to access unintentionally + "no-var": "warn", + "jsdoc/no-types": "warn", + "semi": "off", + "@typescript-eslint/semi": "warn", + "@typescript-eslint/naming-convention": [ + "warn", + { + "selector": "class", + "format": [ + "PascalCase" + ] + } + ], + "code-no-unused-expressions": [ + "warn", + { + "allowTernary": true + } + ], + "code-translation-remind": "warn", + "code-no-nls-in-standalone-editor": "warn", + "code-no-standalone-editor": "warn", + "code-no-unexternalized-strings": "warn", + "code-layering": [ + "warn", + { + "common": [], + "node": [ + "common" + ], + "browser": [ + "common" + ], + "electron-sandbox": [ + "common", + "browser" + ], + "electron-browser": [ + "common", + "browser", + "node", + "electron-sandbox" + ], + "electron-main": [ + "common", + "node" + ] + } + ], + "code-import-patterns": [ + "warn", + // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // !!! Do not relax these rules !!! + // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + { + "target": "**/vs/base/common/**", + "restrictions": [ + "vs/nls", + "**/vs/base/common/**" + ] + }, + { + "target": "**/vs/base/test/common/**", + "restrictions": [ + "assert", + "sinon", + "vs/nls", + "**/vs/base/common/**", + "**/vs/base/test/common/**" + ] + }, + { + "target": "**/vs/base/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser}/**" + ] + }, + { + "target": "**/vs/base/electron-sandbox/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser,electron-sandbox}/**" + ] + }, + { + "target": "**/vs/base/node/**", + "restrictions": [ + "vs/nls", + "**/vs/base/{common,node}/**", + "*" // node modules + ] + }, + { + // vs/base/test/browser contains tests for vs/base/browser + "target": "**/vs/base/test/browser/**", + "restrictions": [ + "assert", + "sinon", + "vs/nls", + "**/vs/base/{common,browser}/**", + "**/vs/base/test/{common,browser}/**" + ] + }, + { + "target": "**/vs/base/parts/*/common/**", + "restrictions": [ + "vs/nls", + "**/vs/base/common/**", + "**/vs/base/parts/*/common/**" + ] + }, + { + "target": "**/vs/base/parts/*/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser}/**", + "**/vs/base/parts/*/{common,browser}/**" + ] + }, + { + "target": "**/vs/base/parts/*/node/**", + "restrictions": [ + "vs/nls", + "**/vs/base/{common,node}/**", + "**/vs/base/parts/*/{common,node}/**", + "*" // node modules + ] + }, + { + "target": "**/vs/base/parts/*/electron-sandbox/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser,electron-sandbox}/**", + "**/vs/base/parts/*/{common,browser,electron-sandbox}/**" + ] + }, + { + "target": "**/vs/base/parts/*/electron-browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/base/parts/*/{common,browser,node,electron-sandbox,electron-browser}/**", + "*" // node modules + ] + }, + { + "target": "**/vs/base/parts/*/electron-main/**", + "restrictions": [ + "vs/nls", + "**/vs/base/{common,node,electron-main}/**", + "**/vs/base/parts/*/{common,node,electron-main}/**", + "*" // node modules + ] + }, + { + "target": "**/vs/platform/*/common/**", + "restrictions": [ + "vs/nls", + "**/vs/base/common/**", + "**/vs/base/parts/*/common/**", + "**/vs/platform/*/common/**" + ] + }, + { + "target": "**/vs/platform/*/test/common/**", + "restrictions": [ + "assert", + "sinon", + "vs/nls", + "**/vs/base/common/**", + "**/vs/base/parts/*/common/**", + "**/vs/base/test/common/**", + "**/vs/platform/*/common/**", + "**/vs/platform/*/test/common/**" + ] + }, + { + "target": "**/vs/platform/*/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser}/**", + "**/vs/base/parts/*/{common,browser}/**", + "**/vs/platform/*/{common,browser}/**" + ] + }, + { + "target": "**/vs/platform/*/node/**", + "restrictions": [ + "vs/nls", + "**/vs/base/{common,node}/**", + "**/vs/base/parts/*/{common,node}/**", + "**/vs/platform/*/{common,node}/**", + "*" // node modules + ] + }, + { + "target": "**/vs/platform/*/electron-sandbox/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser,electron-sandbox}/**", + "**/vs/base/parts/*/{common,browser,electron-sandbox}/**", + "**/vs/platform/*/{common,browser,electron-sandbox}/**" + ] + }, + { + "target": "**/vs/platform/*/electron-browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/base/parts/*/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/platform/*/{common,browser,node,electron-sandbox,electron-browser}/**", + "*" // node modules + ] + }, + { + "target": "**/vs/platform/*/electron-main/**", + "restrictions": [ + "vs/nls", + "**/vs/base/{common,node,electron-main}/**", + "**/vs/base/parts/*/{common,node,electron-main}/**", + "**/vs/platform/*/{common,node,electron-main}/**", + "*" // node modules + ] + }, + { + "target": "**/vs/platform/*/test/browser/**", + "restrictions": [ + "assert", + "sinon", + "vs/nls", + "**/vs/base/{common,browser}/**", + "**/vs/base/parts/*/{common,browser}/**", + "**/vs/platform/*/{common,browser}/**", + "**/vs/platform/*/test/{common,browser}/**" + ] + }, + { + "target": "**/vs/editor/common/**", + "restrictions": [ + "vs/nls", + "**/vs/base/common/**", + "**/vs/base/worker/**", + "**/vs/platform/*/common/**", + "**/vs/editor/common/**" + ] + }, + { + "target": "**/vs/editor/test/common/**", + "restrictions": [ + "assert", + "sinon", + "vs/nls", + "**/vs/base/common/**", + "**/vs/platform/*/common/**", + "**/vs/platform/*/test/common/**", + "**/vs/editor/common/**", + "**/vs/editor/test/common/**" + ] + }, + { + "target": "**/vs/editor/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser}/**", + "**/vs/platform/*/{common,browser}/**", + "**/vs/editor/{common,browser}/**" + ] + }, + { + "target": "**/vs/editor/test/browser/**", + "restrictions": [ + "assert", + "sinon", + "vs/nls", + "**/vs/base/{common,browser}/**", + "**/vs/platform/*/{common,browser}/**", + "**/vs/platform/*/test/{common,browser}/**", + "**/vs/editor/{common,browser}/**", + "**/vs/editor/test/{common,browser}/**" + ] + }, + { + "target": "**/vs/editor/standalone/common/**", + "restrictions": [ + "vs/nls", + "**/vs/base/common/**", + "**/vs/platform/*/common/**", + "**/vs/editor/common/**", + "**/vs/editor/standalone/common/**" + ] + }, + { + "target": "**/vs/editor/standalone/test/common/**", + "restrictions": [ + "assert", + "sinon", + "vs/nls", + "**/vs/base/common/**", + "**/vs/platform/*/common/**", + "**/vs/platform/*/test/common/**", + "**/vs/editor/common/**", + "**/vs/editor/test/common/**" + ] + }, + { + "target": "**/vs/editor/standalone/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser}/**", + "**/vs/base/parts/*/{common,browser}/**", + "**/vs/platform/*/{common,browser}/**", + "**/vs/editor/{common,browser}/**", + "**/vs/editor/contrib/**", + "**/vs/editor/standalone/{common,browser}/**" + ] + }, + { + "target": "**/vs/editor/standalone/test/browser/**", + "restrictions": [ + "assert", + "sinon", + "vs/nls", + "**/vs/base/{common,browser}/**", + "**/vs/platform/*/{common,browser}/**", + "**/vs/platform/*/test/{common,browser}/**", + "**/vs/editor/{common,browser}/**", + "**/vs/editor/standalone/{common,browser}/**", + "**/vs/editor/test/{common,browser}/**" + ] + }, + { + "target": "**/vs/editor/contrib/*/test/**", + "restrictions": [ + "assert", + "sinon", + "vs/nls", + "**/vs/base/{common,browser}/**", + "**/vs/base/test/{common,browser}/**", + "**/vs/base/parts/*/{common,browser}/**", + "**/vs/platform/*/{common,browser}/**", + "**/vs/platform/*/test/{common,browser}/**", + "**/vs/editor/{common,browser}/**", + "**/vs/editor/test/{common,browser}/**", + "**/vs/editor/contrib/**" + ] + }, + { + "target": "**/vs/editor/contrib/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser}/**", + "**/vs/base/parts/*/{common,browser}/**", + "**/vs/platform/{common,browser}/**", + "**/vs/platform/*/{common,browser}/**", + "**/vs/editor/{common,browser}/**", + "**/vs/editor/contrib/**" + ] + }, + { + "target": "**/vs/workbench/common/**", + "restrictions": [ + "vs/nls", + "**/vs/base/common/**", + "**/vs/base/parts/*/common/**", + "**/vs/platform/*/common/**", + "**/vs/editor/common/**", + "**/vs/editor/contrib/*/common/**", + "**/vs/workbench/common/**", + "**/vs/workbench/services/*/common/**", + "assert" + ] + }, + { + "target": "**/vs/workbench/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser}/**", + "**/vs/base/parts/*/{common,browser}/**", + "**/vs/platform/*/{common,browser}/**", + "**/vs/editor/{common,browser}/**", + "**/vs/editor/contrib/**", // editor/contrib is equivalent to /browser/ by convention + "**/vs/workbench/workbench.web.api", + "**/vs/workbench/{common,browser}/**", + "**/vs/workbench/services/*/{common,browser}/**", + "assert" + ] + }, + { + "target": "**/vs/workbench/api/common/**", + "restrictions": [ + "vscode", + "vs/nls", + "**/vs/base/common/**", + "**/vs/platform/*/common/**", + "**/vs/editor/common/**", + "**/vs/editor/contrib/*/common/**", + "**/vs/workbench/api/common/**", + "**/vs/workbench/common/**", + "**/vs/workbench/services/*/common/**", + "**/vs/workbench/contrib/*/common/**" + ] + }, + { + "target": "**/vs/workbench/api/worker/**", + "restrictions": [ + "vscode", + "vs/nls", + "**/vs/**/{common,worker}/**" + ] + }, + { + "target": "**/vs/workbench/electron-sandbox/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser,electron-sandbox}/**", + "**/vs/base/parts/*/{common,browser,electron-sandbox}/**", + "**/vs/platform/*/{common,browser,electron-sandbox}/**", + "**/vs/editor/{common,browser,electron-sandbox}/**", + "**/vs/editor/contrib/**", // editor/contrib is equivalent to /browser/ by convention + "**/vs/workbench/{common,browser,electron-sandbox}/**", + "**/vs/workbench/api/{common,browser,electron-sandbox}/**", + "**/vs/workbench/services/*/{common,browser,electron-sandbox}/**" + ] + }, + { + "target": "**/vs/workbench/electron-browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/base/parts/*/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/platform/*/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/editor/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/editor/contrib/**", // editor/contrib is equivalent to /browser/ by convention + "**/vs/workbench/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/workbench/api/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/workbench/services/*/{common,browser,node,electron-sandbox,electron-browser}/**", + "*" // node modules + ] + }, + { + "target": "**/vs/workbench/services/**/test/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**", + "**/vs/platform/**", + "**/vs/editor/**", + "**/vs/workbench/{common,browser,node,electron-sandbox,electron-browser}/**", + "vs/workbench/contrib/files/browser/editors/fileEditorInput", + "**/vs/workbench/services/**", + "**/vs/workbench/test/**", + "*" // node modules + ] + }, + { + "target": "**/vs/workbench/services/**/common/**", + "restrictions": [ + "vs/nls", + "**/vs/base/**/common/**", + "**/vs/platform/**/common/**", + "**/vs/editor/common/**", + "**/vs/workbench/workbench.web.api", + "**/vs/workbench/common/**", + "**/vs/workbench/services/**/common/**", + "**/vs/workbench/api/**/common/**", + "vscode-textmate", + "vscode-oniguruma", + "iconv-lite-umd", + "tas-client-umd", + "jschardet" + ] + }, + { + "target": "**/vs/workbench/services/**/worker/**", + "restrictions": [ + "vs/nls", + "**/vs/base/**/common/**", + "**/vs/platform/**/common/**", + "**/vs/editor/common/**", + "**/vs/workbench/**/common/**", + "**/vs/workbench/**/worker/**", + "**/vs/workbench/services/**/common/**", + "vscode" + ] + }, + { + "target": "**/vs/workbench/services/**/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**/{common,browser,worker}/**", + "**/vs/platform/**/{common,browser}/**", + "**/vs/editor/{common,browser}/**", + "**/vs/workbench/workbench.web.api", + "**/vs/workbench/{common,browser}/**", + "**/vs/workbench/api/{common,browser}/**", + "**/vs/workbench/services/**/{common,browser}/**", + "vscode-textmate", + "vscode-oniguruma", + "iconv-lite-umd", + "jschardet" + ] + }, + { + "target": "**/vs/workbench/services/**/node/**", + "restrictions": [ + "vs/nls", + "**/vs/base/**/{common,node}/**", + "**/vs/platform/**/{common,node}/**", + "**/vs/editor/{common,node}/**", + "**/vs/workbench/{common,node}/**", + "**/vs/workbench/api/{common,node}/**", + "**/vs/workbench/services/**/{common,node}/**", + "*" // node modules + ] + }, + { + "target": "**/vs/workbench/services/**/electron-sandbox/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**/{common,browser,worker,electron-sandbox}/**", + "**/vs/platform/**/{common,browser,electron-sandbox}/**", + "**/vs/editor/**", + "**/vs/workbench/{common,browser,electron-sandbox}/**", + "**/vs/workbench/api/{common,browser,electron-sandbox}/**", + "**/vs/workbench/services/**/{common,browser,electron-sandbox}/**", + "vscode-textmate", + "vscode-oniguruma", + "iconv-lite-umd", + "jschardet" + ] + }, + { + "target": "**/vs/workbench/services/**/electron-browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**/{common,browser,worker,node,electron-sandbox,electron-browser}/**", + "**/vs/platform/**/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/editor/**", + "**/vs/workbench/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/workbench/api/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/workbench/services/**/{common,browser,node,electron-sandbox,electron-browser}/**", + "*" // node modules + ] + }, + { + "target": "**/vs/workbench/contrib/**/test/**", + "restrictions": [ + "assert", + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**", + "**/vs/platform/**", + "**/vs/editor/**", + "**/vs/workbench/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/workbench/services/**", + "**/vs/workbench/contrib/**", + "**/vs/workbench/test/**", + "*" + ] + }, + { + "target": "**/vs/workbench/contrib/terminal/browser/**", + "restrictions": [ + // xterm and its addons are strictly browser-only components + "xterm", + "xterm-addon-*", + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**/{common,browser}/**", + "**/vs/platform/**/{common,browser}/**", + "**/vs/editor/**", + "**/vs/workbench/{common,browser}/**", + "**/vs/workbench/contrib/**/{common,browser}/**", + "**/vs/workbench/services/**/{common,browser}/**" + ] + }, + { + "target": "**/vs/workbench/contrib/extensions/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**/{common,browser}/**", + "**/vs/platform/**/{common,browser}/**", + "**/vs/editor/**", + "**/vs/workbench/{common,browser}/**", + "**/vs/workbench/contrib/**/{common,browser}/**", + "**/vs/workbench/services/**/{common,browser}/**" + ] + }, + { + "target": "**/vs/workbench/contrib/update/browser/update.ts", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**/{common,browser}/**", + "**/vs/platform/**/{common,browser}/**", + "**/vs/editor/**", + "**/vs/workbench/{common,browser}/**", + "**/vs/workbench/contrib/**/{common,browser}/**", + "**/vs/workbench/services/**/{common,browser}/**" + ] + }, + { + "target": "**/vs/workbench/contrib/notebook/common/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**/{common,worker}/**", + "**/vs/platform/**/common/**", + "**/vs/editor/**", + "**/vs/workbench/common/**", + "**/vs/workbench/api/common/**", + "**/vs/workbench/services/**/common/**", + "**/vs/workbench/contrib/**/common/**" + ] + }, + { + "target": "**/vs/workbench/contrib/**/common/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**/common/**", + "**/vs/platform/**/common/**", + "**/vs/editor/**", + "**/vs/workbench/common/**", + "**/vs/workbench/api/common/**", + "**/vs/workbench/services/**/common/**", + "**/vs/workbench/contrib/**/common/**" + ] + }, + { + "target": "**/vs/workbench/contrib/**/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**/{common,browser}/**", + "**/vs/platform/**/{common,browser}/**", + "**/vs/editor/**", + "**/vs/workbench/{common,browser}/**", + "**/vs/workbench/api/{common,browser}/**", + "**/vs/workbench/services/**/{common,browser}/**", + "**/vs/workbench/contrib/**/{common,browser}/**", + "vscode-textmate", + "vscode-oniguruma", + "iconv-lite-umd", + "jschardet" + ] + }, + { + "target": "**/vs/workbench/contrib/**/node/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**/{common,node}/**", + "**/vs/platform/**/{common,node}/**", + "**/vs/editor/**/common/**", + "**/vs/workbench/{common,node}/**", + "**/vs/workbench/api/{common,node}/**", + "**/vs/workbench/services/**/{common,node}/**", + "**/vs/workbench/contrib/**/{common,node}/**", + "*" // node modules + ] + }, + { + "target": "**/vs/workbench/contrib/**/electron-sandbox/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**/{common,browser,worker,electron-sandbox}/**", + "**/vs/platform/**/{common,browser,electron-sandbox}/**", + "**/vs/editor/**", + "**/vs/workbench/{common,browser,electron-sandbox}/**", + "**/vs/workbench/api/{common,browser,electron-sandbox}/**", + "**/vs/workbench/services/**/{common,browser,electron-sandbox}/**", + "**/vs/workbench/contrib/**/{common,browser,electron-sandbox}/**", + "vscode-textmate", + "vscode-oniguruma", + "iconv-lite-umd", + "jschardet" + ] + }, + { + "target": "**/vs/workbench/contrib/**/electron-browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**/{common,browser,worker,node,electron-sandbox,electron-browser}/**", + "**/vs/platform/**/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/editor/**", + "**/vs/workbench/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/workbench/api/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/workbench/services/**/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/workbench/contrib/**/{common,browser,node,electron-sandbox,electron-browser}/**", + "*" // node modules + ] + }, + { + "target": "**/vs/code/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**/{common,browser}/**", + "**/vs/base/parts/**/{common,browser}/**", + "**/vs/platform/**/{common,browser}/**", + "**/vs/code/**/{common,browser}/**", + "**/vs/workbench/workbench.web.api" + ] + }, + { + "target": "**/vs/code/node/**", + "restrictions": [ + "vs/nls", + "**/vs/base/**/{common,node}/**", + "**/vs/base/parts/**/{common,node}/**", + "**/vs/platform/**/{common,node}/**", + "**/vs/code/**/{common,node}/**", + "*" // node modules + ] + }, + { + "target": "**/vs/code/electron-browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/**/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/base/parts/**/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/platform/**/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/code/**/{common,browser,node,electron-sandbox,electron-browser}/**", + "*" // node modules + ] + }, + { + "target": "**/vs/code/electron-main/**", + "restrictions": [ + "vs/nls", + "**/vs/base/**/{common,node,electron-main}/**", + "**/vs/base/parts/**/{common,node,electron-main}/**", + "**/vs/platform/**/{common,node,electron-main}/**", + "**/vs/code/**/{common,node,electron-main}/**", + "*" // node modules + ] + }, + { + "target": "**/vs/server/**", + "restrictions": [ + "vs/nls", + "**/vs/base/**/{common,node}/**", + "**/vs/base/parts/**/{common,node}/**", + "**/vs/platform/**/{common,node}/**", + "**/vs/workbench/**/{common,node}/**", + "**/vs/server/**", + "*" // node modules + ] + }, + { + "target": "**/src/vs/workbench/workbench.common.main.ts", + "restrictions": [ + "vs/nls", + "**/vs/base/**/{common,browser}/**", + "**/vs/base/parts/**/{common,browser}/**", + "**/vs/platform/**/{common,browser}/**", + "**/vs/editor/**", + "**/vs/workbench/**/{common,browser}/**" + ] + }, + { + "target": "**/src/vs/workbench/workbench.web.main.ts", + "restrictions": [ + "vs/nls", + "**/vs/base/**/{common,browser}/**", + "**/vs/base/parts/**/{common,browser}/**", + "**/vs/platform/**/{common,browser}/**", + "**/vs/editor/**", + "**/vs/workbench/**/{common,browser}/**", + "**/vs/workbench/workbench.common.main" + ] + }, + { + "target": "**/src/vs/workbench/workbench.web.api.ts", + "restrictions": [ + "vs/nls", + "**/vs/base/**/{common,browser}/**", + "**/vs/base/parts/**/{common,browser}/**", + "**/vs/platform/**/{common,browser}/**", + "**/vs/editor/**", + "**/vs/workbench/**/{common,browser}/**", + "**/vs/workbench/workbench.web.main" + ] + }, + { + "target": "**/src/vs/workbench/workbench.sandbox.main.ts", + "restrictions": [ + "vs/nls", + "**/vs/base/**/{common,browser,electron-sandbox}/**", + "**/vs/base/parts/**/{common,browser,electron-sandbox}/**", + "**/vs/platform/**/{common,browser,electron-sandbox}/**", + "**/vs/editor/**", + "**/vs/workbench/**/{common,browser,electron-sandbox}/**", + "**/vs/workbench/workbench.common.main" + ] + }, + { + "target": "**/src/vs/workbench/workbench.desktop.main.ts", + "restrictions": [ + "vs/nls", + "**/vs/base/**/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/base/parts/**/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/platform/**/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/editor/**", + "**/vs/workbench/**/{common,browser,node,electron-sandbox,electron-browser}/**", + "**/vs/workbench/workbench.common.main", + "**/vs/workbench/workbench.sandbox.main" + ] + }, + { + "target": "**/extensions/**", + "restrictions": "**/*" + }, + { + "target": "**/test/smoke/**", + "restrictions": [ + "**/test/smoke/**", + "*" // node modules + ] + }, + { + "target": "**/test/automation/**", + "restrictions": [ + "**/test/automation/**", + "*" // node modules + ] + }, + { + "target": "**/test/integration/**", + "restrictions": [ + "**/test/integration/**", + "*" // node modules + ] + }, + { + "target": "**/test/monaco/**", + "restrictions": [ + "**/test/monaco/**", + "*" // node modules + ] + }, + { + "target": "**/api/**.test.ts", + "restrictions": [ + "**/vs/**", + "assert", + "sinon", + "crypto", + "vscode" + ] + }, + { + "target": "**/{node,electron-browser,electron-main}/**/*.test.ts", + "restrictions": [ + "**/vs/**", + "*" // node modules + ] + }, + { + "target": "**/{node,electron-browser,electron-main}/**/test/**", + "restrictions": [ + "**/vs/**", + "*" // node modules + ] + }, + { + "target": "**/test/{node,electron-browser,electron-main}/**", + "restrictions": [ + "**/vs/**", + "*" // node modules + ] + }, + { + "target": "**/**.test.ts", + "restrictions": [ + "**/vs/**", + "assert", + "sinon", + "crypto", + "xterm*" + ] + }, + { + "target": "**/test/**", + "restrictions": [ + "**/vs/**", + "assert", + "sinon", + "crypto", + "xterm*" + ] + } + ] + }, + "overrides": [ + { + "files": [ + "*.js" + ], + "rules": { + "jsdoc/no-types": "off" + } + }, + { + "files": [ + "**/vscode.d.ts", + "**/vscode.proposed.d.ts" + ], + "rules": { + "vscode-dts-create-func": "warn", + "vscode-dts-literal-or-types": "warn", + "vscode-dts-interface-naming": "warn", + "vscode-dts-cancellation": "warn", + "vscode-dts-use-thenable": "warn", + "vscode-dts-region-comments": "warn", + "vscode-dts-provider-naming": [ + "warn", + { + "allowed": [ + "FileSystemProvider", + "TreeDataProvider", + "TestProvider", + "CustomEditorProvider", + "CustomReadonlyEditorProvider", + "TerminalLinkProvider", + "AuthenticationProvider", + "NotebookContentProvider" + ] + } + ], + "vscode-dts-event-naming": [ + "warn", + { + "allowed": [ + "onCancellationRequested", + "event" + ], + "verbs": [ + "accept", + "change", + "close", + "collapse", + "create", + "delete", + "discover", + "dispose", + "edit", + "end", + "expand", + "grant", + "hide", + "invalidate", + "open", + "override", + "receive", + "register", + "remove", + "rename", + "save", + "send", + "start", + "terminate", + "trigger", + "unregister", + "write" + ] + } + ] + } + } + ] +} diff --git a/.eslintrc.yaml b/.eslintrc.yaml deleted file mode 100644 index b579a9a24671..000000000000 --- a/.eslintrc.yaml +++ /dev/null @@ -1,46 +0,0 @@ -parser: "@typescript-eslint/parser" -env: - browser: true - es6: true # Map, etc. - jest: true - node: true - -parserOptions: - ecmaVersion: 2018 - sourceType: module - -extends: - - eslint:recommended - - plugin:@typescript-eslint/recommended - - plugin:import/recommended - - plugin:import/typescript - - plugin:prettier/recommended - # Prettier should always be last - # Removes eslint rules that conflict with prettier. - - prettier - -rules: - # Sometimes you need to add args to implement a function signature even - # if they are unused. - "@typescript-eslint/no-unused-vars": ["error", { "args": "none" }] - # For overloads. - no-dupe-class-members: off - "@typescript-eslint/no-use-before-define": off - "@typescript-eslint/no-non-null-assertion": off - "@typescript-eslint/ban-types": off - "@typescript-eslint/no-var-requires": off - "@typescript-eslint/explicit-module-boundary-types": off - "@typescript-eslint/no-explicit-any": off - "@typescript-eslint/no-extra-semi": off - eqeqeq: error - import/order: - [error, { alphabetize: { order: "asc" }, groups: [["builtin", "external", "internal"], "parent", "sibling"] }] - no-async-promise-executor: off - # This isn't a real module, just types, which apparently doesn't resolve. - import/no-unresolved: [error, { ignore: ["express-serve-static-core"] }] - -settings: - # Does not work with CommonJS unfortunately. - import/ignore: - - env-paths - - xdg-basedir diff --git a/.gitattributes b/.gitattributes index dc5caf936908..5a817c30b6d7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,10 @@ -*.afdesign filter=lfs diff=lfs merge=lfs -text +* text=auto + +LICENSE.txt eol=crlf +ThirdPartyNotices.txt eol=crlf + +*.bat eol=crlf +*.cmd eol=crlf +*.ps1 eol=lf +*.sh eol=lf +*.rtf -text \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index b7e6805b7f29..000000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,3 +0,0 @@ -* @cdr/code-server-reviewers - -ci/helm-chart @Matthew-Beckett @alexgorbatchev diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index 4ec82a898d65..000000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -name: Bug report -about: Report a bug and help us improve -title: "" -labels: "" -assignees: "" ---- - - - -## OS/Web Information - -- Web Browser: -- Local OS: -- Remote OS: -- Remote Architecture: -- `code-server --version`: - -## Steps to Reproduce - -1. -2. -3. - -## Expected - - - -## Actual - - - -## Logs - - - -## Screenshot - - - -## Notes - - - -This issue can be reproduced in VS Code: Yes/No diff --git a/lib/vscode/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md similarity index 99% rename from lib/vscode/.github/ISSUE_TEMPLATE/bug_report.md rename to .github/ISSUE_TEMPLATE/bug_report.md index b40ba5ddd483..8a44ce8c7ac1 100644 --- a/lib/vscode/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -8,6 +8,11 @@ about: Create a report to help us improve + +Does this issue occur when all extensions are disabled?: Yes/No + + + - VS Code Version: - OS Version: @@ -15,9 +20,3 @@ Steps to Reproduce: 1. 2. - - -Does this issue occur when all extensions are disabled?: Yes/No - - - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 2f567fce310b..51e7f3660431 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,5 @@ blank_issues_enabled: false contact_links: - name: Question - url: https://github.com/cdr/code-server/discussions/new?category_id=22503114 - about: Ask the community for help on our GitHub Discussions board - - name: Chat - about: Need immediate help or just want to talk? Hop in our Slack - url: https://cdr.co/join-community + url: https://stackoverflow.com/questions/tagged/visual-studio-code + about: Please ask and answer questions here. diff --git a/.github/ISSUE_TEMPLATE/doc.md b/.github/ISSUE_TEMPLATE/doc.md deleted file mode 100644 index ba63b11bdf8f..000000000000 --- a/.github/ISSUE_TEMPLATE/doc.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: Documentation improvement -about: Suggest a documentation improvement -title: "" -labels: "docs" -assignees: "" ---- diff --git a/.github/ISSUE_TEMPLATE/extension-request.md b/.github/ISSUE_TEMPLATE/extension-request.md deleted file mode 100644 index 97f6059ae045..000000000000 --- a/.github/ISSUE_TEMPLATE/extension-request.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Extension request -about: Request an extension missing from the code-server marketplace -title: "" -labels: extension-request -assignees: "" ---- - - - -- [ ] Extension name: -- [ ] Extension GitHub or homepage: diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index 3f7411eefb6b..000000000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Feature request -about: Suggest an idea -title: "" -labels: feature -assignees: "" ---- - - diff --git a/lib/vscode/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md similarity index 100% rename from lib/vscode/.github/ISSUE_TEMPLATE/feature_request.md rename to .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md deleted file mode 100644 index 4cdeac9f7b66..000000000000 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/.github/PULL_REQUEST_TEMPLATE/release_template.md b/.github/PULL_REQUEST_TEMPLATE/release_template.md deleted file mode 100644 index a88b6de174b6..000000000000 --- a/.github/PULL_REQUEST_TEMPLATE/release_template.md +++ /dev/null @@ -1,18 +0,0 @@ - - -This PR is to generate a new release of `code-server` at `$CODE_SERVER_VERSION_TO_UPDATE` - -## Screenshot - -TODO - -## TODOs - -- [ ] test locally -- [ ] upload assets to draft release -- [ ] test one of the release packages locally -- [ ] double-check github release tag is the commit with artifacts (_note gets messed up after uploading assets_) -- [ ] publish release -- [ ] merge PR -- [ ] update the homebrew package -- [ ] update the AUR package diff --git a/lib/vscode/.github/calendar.yml b/.github/calendar.yml similarity index 100% rename from lib/vscode/.github/calendar.yml rename to .github/calendar.yml diff --git a/lib/vscode/.github/classifier.json b/.github/classifier.json similarity index 93% rename from lib/vscode/.github/classifier.json rename to .github/classifier.json index 5adabb9aa9c9..1783b82c8797 100644 --- a/lib/vscode/.github/classifier.json +++ b/.github/classifier.json @@ -1,16 +1,17 @@ { "$schema": "https://raw.githubusercontent.com/microsoft/vscode-github-triage-actions/master/classifier-deep/apply/apply-labels/deep-classifier-config.schema.json", - "vacation": [], + "vacation": ["RMacfarlane"], "assignees": { "JacksonKearl": {"accuracy": 0.5} }, "labels": { "L10N": {"assign": []}, "VIM": {"assign": []}, + "accessibility": { "assign": ["isidorn"]}, "api": {"assign": ["jrieken"]}, "api-finalization": {"assign": []}, "api-proposal": {"assign": ["jrieken"]}, - "authentication": {"assign": ["RMacfarlane"]}, + "authentication": {"assign": ["TylerLeonhardt"]}, "breadcrumbs": {"assign": ["jrieken"]}, "callhierarchy": {"assign": ["jrieken"]}, "code-lens": {"assign": ["jrieken"]}, @@ -20,8 +21,7 @@ "context-keys": {"assign": []}, "css-less-scss": {"assign": ["aeschli"]}, "custom-editors": {"assign": ["mjbvz"]}, - "debug": {"assign": ["isidorn"]}, - "debug-console": {"assign": ["isidorn"]}, + "debug": {"assign": ["weinand"]}, "dialogs": {"assign": ["sbatten"]}, "diff-editor": {"assign": []}, "dropdown": {"assign": []}, @@ -81,14 +81,15 @@ "icon-brand": {"assign": []}, "icons-product": {"assign": ["misolori"]}, "install-update": {"assign": []}, - "integrated-terminal": {"assign": ["meganrogge"]}, - "integrated-terminal-conpty": {"assign": ["meganrogge"]}, - "integrated-terminal-links": {"assign": ["meganrogge"]}, + "terminal": {"assign": ["meganrogge"]}, + "terminal-conpty": {"assign": ["meganrogge"]}, + "terminal-links": {"assign": ["meganrogge"]}, + "terminal-external": {"assign": ["meganrogge"]}, "integration-test": {"assign": []}, "intellisense-config": {"assign": []}, "ipc": {"assign": ["joaomoreno"]}, "issue-bot": {"assign": ["chrmarti"]}, - "issue-reporter": {"assign": ["RMacfarlane"]}, + "issue-reporter": {"assign": ["TylerLeonhardt"]}, "javascript": {"assign": ["mjbvz"]}, "json": {"assign": ["aeschli"]}, "keybindings": {"assign": []}, @@ -113,7 +114,7 @@ "php": {"assign": ["roblourens"]}, "portable-mode": {"assign": ["joaomoreno"]}, "proxy": {"assign": []}, - "quick-pick": {"assign": ["chrmarti"]}, + "quick-pick": {"assign": ["TylerLeonhardt"]}, "references-viewlet": {"assign": ["jrieken"]}, "release-notes": {"assign": []}, "remote": {"assign": []}, @@ -152,7 +153,7 @@ "web": {"assign": ["bpasero"]}, "webview": {"assign": ["mjbvz"]}, "workbench-cli": {"assign": []}, - "workbench-diagnostics": {"assign": ["RMacfarlane"]}, + "workbench-diagnostics": {"assign": ["Tyriar"]}, "workbench-dnd": {"assign": ["bpasero"]}, "workbench-editor-grid": {"assign": ["sbatten"]}, "workbench-editors": {"assign": ["bpasero"]}, diff --git a/.github/codeql-config.yml b/.github/codeql-config.yml deleted file mode 100644 index 690b8e5a92e0..000000000000 --- a/.github/codeql-config.yml +++ /dev/null @@ -1,4 +0,0 @@ -name: "code-server CodeQL config" - -paths-ignore: - - lib/vscode diff --git a/lib/vscode/.github/commands.json b/.github/commands.json similarity index 97% rename from lib/vscode/.github/commands.json rename to .github/commands.json index de0643d56c92..388a9c3dbb33 100644 --- a/lib/vscode/.github/commands.json +++ b/.github/commands.json @@ -90,7 +90,7 @@ "@author" ], "action": "updateLabels", - "addLabel": "z-author-verified", + "addLabel": "verified", "removeLabel": "author-verification-requested", "requireLabel": "author-verification-requested", "disallowLabel": "unreleased" @@ -133,6 +133,18 @@ "action": "updateLabels", "addLabel": "~needs more info" }, + { + "type": "comment", + "name": "needsPerfInfo", + "allowUsers": [ + "cleidigh", + "usernamehw", + "gjsjohnmurray", + "IllusionMH" + ], + "addLabel": "needs more info", + "comment": "Thanks for creating this issue regarding performance! Please follow this guide to help us diagnose performance issues: https://github.com/microsoft/vscode/wiki/Performance-Issues \n\nHappy Coding!" + }, { "type": "comment", "name": "jsDebugLogs", diff --git a/lib/vscode/.github/commands.yml b/.github/commands.yml similarity index 100% rename from lib/vscode/.github/commands.yml rename to .github/commands.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 4ec51d013758..000000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,27 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - time: "11:00" - ignore: - # GitHub always delivers the latest versions for each major - # release tag, so handle updates manually - - dependency-name: "actions/*" - - dependency-name: "github/codeql-action/*" - - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "daily" - time: "11:00" - ignore: - - dependency-name: "@types/node" - versions: ["15.x", "14.x", "13.x"] - - dependency-name: "xdg-basedir" - # 5.0.0 has breaking changes as they switch to named exports - # and convert the module to ESM - # We can't use it until we switch to ESM across the project - # See release notes: https://github.com/sindresorhus/xdg-basedir/releases/tag/v5.0.0 - versions: ["5.x"] diff --git a/lib/vscode/.github/endgame/insiders.yml b/.github/endgame/insiders.yml similarity index 100% rename from lib/vscode/.github/endgame/insiders.yml rename to .github/endgame/insiders.yml diff --git a/lib/vscode/.github/insiders.yml b/.github/insiders.yml similarity index 100% rename from lib/vscode/.github/insiders.yml rename to .github/insiders.yml diff --git a/.github/lock.yml b/.github/lock.yml deleted file mode 100644 index 2dfb6cf38862..000000000000 --- a/.github/lock.yml +++ /dev/null @@ -1,37 +0,0 @@ -# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app - -# Number of days of inactivity before a closed issue or pull request is locked -daysUntilLock: 90 - -# Skip issues and pull requests created before a given timestamp. Timestamp must -# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable -skipCreatedBefore: false - -# Issues and pull requests with these labels will be ignored. Set to `[]` to disable -exemptLabels: [] - -# Label to add before locking, such as `outdated`. Set to `false` to disable -lockLabel: false - -# Comment to post before locking. Set to `false` to disable -lockComment: > - This thread has been automatically locked since there has not been - any recent activity after it was closed. Please open a new issue for - related bugs. - -# Assign `resolved` as the reason for locking. Set to `false` to disable -setLockReason: true -# Limit to only `issues` or `pulls` -# only: issues - -# Optionally, specify configuration settings just for `issues` or `pulls` -# issues: -# exemptLabels: -# - help-wanted -# lockLabel: outdated - -# pulls: -# daysUntilLock: 30 - -# Repository to extend settings from -# _extends: repo diff --git a/lib/vscode/.github/pull_request_template.md b/.github/pull_request_template.md similarity index 100% rename from lib/vscode/.github/pull_request_template.md rename to .github/pull_request_template.md diff --git a/.github/ranger.yml b/.github/ranger.yml deleted file mode 100644 index ec029b19c261..000000000000 --- a/.github/ranger.yml +++ /dev/null @@ -1,45 +0,0 @@ -# Configuration for the repo ranger bot -# See docs: https://www.notion.so/Documentation-8d7627bb1f3c42b7b1820e8d6f157a57#9879d1374fab4d1f9c607c230fd5123d -default: - close: - # Default time to wait before closing the label. Can either be a number in milliseconds - # or a string specified by the `ms` package (https://www.npmjs.com/package/ms) - delay: "2 days" - - # Default comment to post when an issue is first marked with a closing label - comment: "โš ๏ธ This issue has been marked $LABEL and will be closed in $DELAY." - -labels: - duplicate: close - wontfix: close - "squash when passing": merge - "rebase when passing": merge - "merge when passing": merge - stale: - action: close - delay: 7 days - comment: "โš ๏ธ This issue has been marked stale and will automatically be closed in $DELAY." - "new contributor": - action: comment - delay: 5s - message: "Thanks for making your first contribution! :slightly_smiling_face:" - extension-request: - action: close - delay: 5s - comment: > - Thanks for opening an extension request! - We are currently in the process of switching extension - marketplaces and transitioning over to [Open VSX](https://open-vsx.org/). - Once https://github.com/eclipse/openvsx/issues/249 is implemented, we - can fully make this transition. Therefore, we are no longer accepting - new requests for extension requests. We suggest installing the VSIX - file and then installing into code-server as a temporary workaround. - See [docs](https://github.com/cdr/code-server/blob/main/docs/FAQ.md#installing-vsix-extensions-via-the-command-line) for more info. - "upstream:vscode": - action: close - delay: 5s - comment: > - This issue has been marked as 'upstream:vscode'. - Please file this upstream: [link to open issue](https://github.com/microsoft/vscode/issues/new/choose) - - This issue will automatically close in $DELAY. diff --git a/lib/vscode/.github/similarity.yml b/.github/similarity.yml similarity index 100% rename from lib/vscode/.github/similarity.yml rename to .github/similarity.yml diff --git a/.github/subscribers.json b/.github/subscribers.json new file mode 100644 index 000000000000..25c676a47c74 --- /dev/null +++ b/.github/subscribers.json @@ -0,0 +1,10 @@ +{ + "notebook": [ + "claudiaregio", + "rchiodo", + "greazer", + "donjayamanne", + "jilljac", + "IanMatthewHuff" + ] +} diff --git a/lib/vscode/.github/workflows/author-verified.yml b/.github/workflows/author-verified.yml similarity index 100% rename from lib/vscode/.github/workflows/author-verified.yml rename to .github/workflows/author-verified.yml diff --git a/lib/vscode/.github/workflows/build-chat.yml b/.github/workflows/build-chat.yml similarity index 100% rename from lib/vscode/.github/workflows/build-chat.yml rename to .github/workflows/build-chat.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 8e6344db09e4..000000000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,466 +0,0 @@ -name: ci - -on: - push: - branches: - - main - pull_request: - branches: - - main - -# Note: if: success() is used in several jobs - -# this ensures that it only executes if all previous jobs succeeded. - -# if: steps.cache-yarn.outputs.cache-hit != 'true' -# will skip running `yarn install` if it successfully fetched from cache - -jobs: - prebuild: - name: Pre-build checks - runs-on: ubuntu-latest - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - steps: - - name: Checkout repo - uses: actions/checkout@v2 - - - name: Install Node.js v12 - uses: actions/setup-node@v2 - with: - node-version: "12" - - - name: Install helm - uses: azure/setup-helm@v1.1 - - - name: Fetch dependencies from cache - id: cache-yarn - uses: actions/cache@v2 - with: - path: "**/node_modules" - key: yarn-build-${{ hashFiles('**/yarn.lock') }} - - - name: Install dependencies - if: steps.cache-yarn.outputs.cache-hit != 'true' - run: yarn --frozen-lockfile - - - name: Audit for vulnerabilities - run: yarn _audit - if: success() - - - name: Run yarn fmt - run: yarn fmt - if: success() - - - name: Run yarn lint - run: yarn lint - if: success() - - - name: Run code-server unit tests - run: yarn test:unit - if: success() - - - name: Upload coverage report to Codecov - run: yarn coverage - if: success() - - build: - name: Build - needs: prebuild - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Install Node.js v12 - uses: actions/setup-node@v2 - with: - node-version: "12" - - - name: Fetch dependencies from cache - id: cache-yarn - uses: actions/cache@v2 - with: - path: "**/node_modules" - key: yarn-build-${{ hashFiles('**/yarn.lock') }} - - - name: Install dependencies - if: steps.cache-yarn.outputs.cache-hit != 'true' - run: yarn --frozen-lockfile - - - name: Build code-server - run: yarn build - - # Parse the hash of the latest commit inside lib/vscode - # use this to avoid rebuilding it if nothing changed - # How it works: the `git log` command fetches the hash of the last commit - # that changed a file inside `lib/vscode`. If a commit changes any file in there, - # the hash returned will change, and we rebuild vscode. If the hash did not change, - # (for example, a change to `src/` or `docs/`), we reuse the same build as last time. - # This saves a lot of time in CI, as compiling VSCode can take anywhere from 5-10 minutes. - - name: Get latest lib/vscode rev - id: vscode-rev - run: echo "::set-output name=rev::$(git log -1 --format='%H' ./lib/vscode)" - - - name: Attempt to fetch vscode build from cache - id: cache-vscode - uses: actions/cache@v2 - with: - path: | - lib/vscode/.build - lib/vscode/out-build - lib/vscode/out-vscode - lib/vscode/out-vscode-min - key: vscode-build-${{ steps.vscode-rev.outputs.rev }} - - - name: Build vscode - if: steps.cache-vscode.outputs.cache-hit != 'true' - run: yarn build:vscode - - # The release package does not contain any native modules - # and is neutral to architecture/os/libc version. - - name: Create release package - run: yarn release - if: success() - - # https://github.com/actions/upload-artifact/issues/38 - - name: Compress release package - run: tar -czf package.tar.gz release - - - name: Upload npm package artifact - uses: actions/upload-artifact@v2 - with: - name: npm-package - path: ./package.tar.gz - - # TODO: cache building yarn --production - # possibly 2m30s of savings(?) - # this requires refactoring our release scripts - package-linux-amd64: - name: x86-64 Linux build - needs: build - runs-on: ubuntu-latest - container: "centos:7" - - steps: - - uses: actions/checkout@v2 - - - name: Install Node.js v12 - uses: actions/setup-node@v2 - with: - node-version: "12" - - - name: Install development tools - run: | - yum install -y epel-release centos-release-scl - yum install -y devtoolset-9-{make,gcc,gcc-c++} jq rsync - - - name: Install nfpm and envsubst - run: | - curl -sfL https://install.goreleaser.com/github.com/goreleaser/nfpm.sh | sh -s -- -b ~/.local/bin v2.3.1 - curl -L https://github.com/a8m/envsubst/releases/download/v1.1.0/envsubst-`uname -s`-`uname -m` -o envsubst - chmod +x envsubst - mv envsubst ~/.local/bin - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Install yarn - run: npm install -g yarn - - - name: Download npm package - uses: actions/download-artifact@v2 - with: - name: npm-package - - - name: Decompress npm package - run: tar -xzf package.tar.gz - - # NOTE: && here is deliberate - GitHub puts each line in its own `.sh` - # file when running inside a docker container. - - name: Build standalone release - run: source scl_source enable devtoolset-9 && yarn release:standalone - - - name: Sanity test standalone release - run: yarn test:standalone-release - - - name: Build packages with nfpm - run: yarn package - - - name: Upload release artifacts - uses: actions/upload-artifact@v2 - with: - name: release-packages - path: ./release-packages - - # NOTE@oxy: - # We use Ubuntu 16.04 here, so that our build is more compatible - # with older libc versions. We used to (Q1'20) use CentOS 7 here, - # but it has a full update EOL of Q4'20 and a 'critical security' - # update EOL of 2024. We're dropping full support a few years before - # the final EOL, but I don't believe CentOS 7 has a large arm64 userbase. - # It is not feasible to cross-compile with CentOS. - - # Cross-compile notes: To compile native dependencies for arm64, - # we install the aarch64 cross toolchain and then set it as the default - # compiler/linker/etc. with the AR/CC/CXX/LINK environment variables. - # qemu-user-static on ubuntu-16.04 currently doesn't run Node correctly, - # so we just build with "native"/x86_64 node, then download arm64 node - # and then put it in our release. We can't smoke test the arm64 build this way, - # but this means we don't need to maintain a self-hosted runner! - package-linux-arm64: - name: Linux ARM64 cross-compile build - needs: build - runs-on: ubuntu-16.04 - env: - AR: aarch64-linux-gnu-ar - CC: aarch64-linux-gnu-gcc - CXX: aarch64-linux-gnu-g++ - LINK: aarch64-linux-gnu-g++ - NPM_CONFIG_ARCH: arm64 - - steps: - - uses: actions/checkout@v2 - - - name: Install Node.js v12 - uses: actions/setup-node@v2 - with: - node-version: "12" - - - name: Install nfpm - run: | - curl -sfL https://install.goreleaser.com/github.com/goreleaser/nfpm.sh | sh -s -- -b ~/.local/bin v2.3.1 - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Install cross-compiler - run: sudo apt install g++-aarch64-linux-gnu - - - name: Download npm package - uses: actions/download-artifact@v2 - with: - name: npm-package - - - name: Decompress npm package - run: tar -xzf package.tar.gz - - - name: Build standalone release - run: yarn release:standalone - - - name: Replace node with arm64 equivalent - run: | - wget https://nodejs.org/dist/v12.18.4/node-v12.18.4-linux-arm64.tar.gz - tar -xzf node-v12.18.4-linux-arm64.tar.gz node-v12.18.4-linux-arm64/bin/node --strip-components=2 - mv ./node ./release-standalone/lib/node - - - name: Build packages with nfpm - run: yarn package arm64 - - - name: Upload release artifacts - uses: actions/upload-artifact@v2 - with: - name: release-packages - path: ./release-packages - - package-macos-amd64: - name: x86-64 macOS build - needs: build - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - - name: Install Node.js v12 - uses: actions/setup-node@v2 - with: - node-version: "12" - - - name: Install nfpm - run: | - curl -sfL https://install.goreleaser.com/github.com/goreleaser/nfpm.sh | sh -s -- -b ~/.local/bin v2.3.1 - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Download npm package - uses: actions/download-artifact@v2 - with: - name: npm-package - - - name: Decompress npm package - run: tar -xzf package.tar.gz - - - name: Build standalone release - run: yarn release:standalone - - - name: Sanity test standalone release - run: yarn test:standalone-release - - - name: Build packages with nfpm - run: yarn package - - - name: Upload release artifacts - uses: actions/upload-artifact@v2 - with: - name: release-packages - path: ./release-packages - - test-e2e: - name: End-to-end tests - needs: package-linux-amd64 - runs-on: ubuntu-latest - env: - PASSWORD: e45432jklfdsab - CODE_SERVER_ADDRESS: http://localhost:8080 - steps: - - uses: actions/checkout@v2 - - - name: Install Node.js v12 - uses: actions/setup-node@v2 - with: - node-version: "12" - - - name: Install playwright - uses: microsoft/playwright-github-action@v1 - - - name: Fetch dependencies from cache - id: cache-yarn - uses: actions/cache@v2 - with: - path: "**/node_modules" - key: yarn-build-${{ hashFiles('**/yarn.lock') }} - - - name: Download release packages - uses: actions/download-artifact@v2 - with: - name: release-packages - path: ./release-packages - - - name: Untar code-server file - run: | - cd release-packages && tar -xzf code-server*-linux-amd64.tar.gz - - - name: Install dependencies - if: steps.cache-yarn.outputs.cache-hit != 'true' - run: yarn --frozen-lockfile - - # HACK: this shouldn't need to exist, but put it here anyway - # in an attempt to solve Playwright cache failures. - - name: Reinstall playwright - if: steps.cache-yarn.outputs.cache-hit == 'true' - run: | - cd test/ - rm -r node_modules/playwright - yarn install --check-files - - - name: Run end-to-end tests - run: | - ./release-packages/code-server*-linux-amd64/bin/code-server --log trace & - yarn test:e2e - - - name: Upload test artifacts - if: always() - uses: actions/upload-artifact@v2 - with: - name: failed-test-videos - path: ./test/test-results - - - name: Remove release packages and test artifacts - run: rm -rf ./release-packages ./test/test-results - - docker-amd64: - runs-on: ubuntu-latest - needs: package-linux-amd64 - steps: - - uses: actions/checkout@v2 - - - name: Download release package - uses: actions/download-artifact@v2 - with: - name: release-packages - path: ./release-packages - - - name: Run ./ci/steps/build-docker-image.sh - run: ./ci/steps/build-docker-image.sh - - - name: Upload release image - uses: actions/upload-artifact@v2 - with: - name: release-images - path: ./release-images - - # TODO: this is the last place where we use our self-hosted arm64 runner. - # In the future, consider switching to docker buildx + qemu, - # thus removing the requirement for us to maintain the runner. - docker-arm64: - runs-on: ubuntu-arm64-latest - needs: package-linux-arm64 - steps: - - uses: actions/checkout@v2 - - - name: Download release package - uses: actions/download-artifact@v2 - with: - name: release-packages - path: ./release-packages - - - name: Run ./ci/steps/build-docker-image.sh - run: ./ci/steps/build-docker-image.sh - - - name: Upload release image - uses: actions/upload-artifact@v2 - with: - name: release-images - path: ./release-images - - trivy-scan-image: - runs-on: ubuntu-20.04 - needs: docker-amd64 - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Download release images - uses: actions/download-artifact@v2 - with: - name: release-images - path: ./release-images - - - name: Run Trivy vulnerability scanner in image mode - # Commit SHA for v0.0.14 - uses: aquasecurity/trivy-action@b38389f8efef9798810fe0c5b5096ac198cffd54 - with: - input: "./release-images/code-server-amd64-*.tar" - scan-type: "image" - ignore-unfixed: true - format: "template" - template: "@/contrib/sarif.tpl" - output: "trivy-image-results.sarif" - severity: "HIGH,CRITICAL" - - - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v1 - with: - sarif_file: "trivy-image-results.sarif" - - # We have to use two trivy jobs - # because GitHub only allows - # codeql/upload-sarif action per job - trivy-scan-repo: - runs-on: ubuntu-20.04 - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Run Trivy vulnerability scanner in repo mode - # Commit SHA for v0.0.14 - uses: aquasecurity/trivy-action@b38389f8efef9798810fe0c5b5096ac198cffd54 - with: - scan-type: "fs" - scan-ref: "." - ignore-unfixed: true - format: "template" - template: "@/contrib/sarif.tpl" - output: "trivy-repo-results.sarif" - severity: "HIGH,CRITICAL" - - - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v1 - with: - sarif_file: "trivy-repo-results.sarif" diff --git a/lib/vscode/.github/workflows/ci.yml b/.github/workflows/ci.yml similarity index 99% rename from lib/vscode/.github/workflows/ci.yml rename to .github/workflows/ci.yml index d08dac3c03b9..faac7802508d 100644 --- a/lib/vscode/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -244,6 +244,9 @@ jobs: - name: Run Valid Layers Checks run: yarn valid-layers-check + - name: Compile /build/ + run: yarn --cwd build compile + - name: Run Monaco Editor Checks run: yarn monaco-compile-check diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 3b41e3d9b2ad..000000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: "Code Scanning" - -on: - push: - branches: [main] - pull_request: - # The branches below must be a subset of the branches above - branches: [main] - schedule: - # Runs every Monday morning PST - - cron: "17 15 * * 1" - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-20.04 - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - config-file: ./.github/codeql-config.yml - languages: javascript - - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 diff --git a/lib/vscode/.github/workflows/codeql.yml b/.github/workflows/codeql.yml similarity index 100% rename from lib/vscode/.github/workflows/codeql.yml rename to .github/workflows/codeql.yml diff --git a/lib/vscode/.github/workflows/deep-classifier-monitor.yml b/.github/workflows/deep-classifier-monitor.yml similarity index 100% rename from lib/vscode/.github/workflows/deep-classifier-monitor.yml rename to .github/workflows/deep-classifier-monitor.yml diff --git a/lib/vscode/.github/workflows/deep-classifier-runner.yml b/.github/workflows/deep-classifier-runner.yml similarity index 100% rename from lib/vscode/.github/workflows/deep-classifier-runner.yml rename to .github/workflows/deep-classifier-runner.yml diff --git a/lib/vscode/.github/workflows/deep-classifier-scraper.yml b/.github/workflows/deep-classifier-scraper.yml similarity index 100% rename from lib/vscode/.github/workflows/deep-classifier-scraper.yml rename to .github/workflows/deep-classifier-scraper.yml diff --git a/lib/vscode/.github/workflows/devcontainer-cache.yml b/.github/workflows/devcontainer-cache.yml similarity index 100% rename from lib/vscode/.github/workflows/devcontainer-cache.yml rename to .github/workflows/devcontainer-cache.yml diff --git a/lib/vscode/.github/workflows/english-please.yml b/.github/workflows/english-please.yml similarity index 100% rename from lib/vscode/.github/workflows/english-please.yml rename to .github/workflows/english-please.yml diff --git a/lib/vscode/.github/workflows/feature-request.yml b/.github/workflows/feature-request.yml similarity index 100% rename from lib/vscode/.github/workflows/feature-request.yml rename to .github/workflows/feature-request.yml diff --git a/lib/vscode/.github/workflows/latest-release-monitor.yml b/.github/workflows/latest-release-monitor.yml similarity index 100% rename from lib/vscode/.github/workflows/latest-release-monitor.yml rename to .github/workflows/latest-release-monitor.yml diff --git a/lib/vscode/.github/workflows/locker.yml b/.github/workflows/locker.yml similarity index 100% rename from lib/vscode/.github/workflows/locker.yml rename to .github/workflows/locker.yml diff --git a/lib/vscode/.github/workflows/needs-more-info-closer.yml b/.github/workflows/needs-more-info-closer.yml similarity index 100% rename from lib/vscode/.github/workflows/needs-more-info-closer.yml rename to .github/workflows/needs-more-info-closer.yml diff --git a/lib/vscode/.github/workflows/no-yarn-lock-changes.yml b/.github/workflows/no-yarn-lock-changes.yml similarity index 100% rename from lib/vscode/.github/workflows/no-yarn-lock-changes.yml rename to .github/workflows/no-yarn-lock-changes.yml diff --git a/lib/vscode/.github/workflows/on-comment.yml b/.github/workflows/on-comment.yml similarity index 100% rename from lib/vscode/.github/workflows/on-comment.yml rename to .github/workflows/on-comment.yml diff --git a/lib/vscode/.github/workflows/on-label.yml b/.github/workflows/on-label.yml similarity index 100% rename from lib/vscode/.github/workflows/on-label.yml rename to .github/workflows/on-label.yml diff --git a/lib/vscode/.github/workflows/on-open.yml b/.github/workflows/on-open.yml similarity index 100% rename from lib/vscode/.github/workflows/on-open.yml rename to .github/workflows/on-open.yml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml deleted file mode 100644 index 361c47ae7c33..000000000000 --- a/.github/workflows/publish.yaml +++ /dev/null @@ -1,53 +0,0 @@ -name: publish - -on: - # Shows the manual trigger in GitHub UI - # helpful as a back-up in case the GitHub Actions Workflow fails - workflow_dispatch: - - release: - types: [published] - -jobs: - # NOTE: this job requires curl, jq and yarn - # All of them are included in ubuntu-latest. - npm: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Run ./ci/steps/publish-npm.sh - run: ./ci/steps/publish-npm.sh - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - # NOTE: this job requires curl, jq and docker - # All of them are included in ubuntu-latest. - docker: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Run ./ci/steps/push-docker-manifest.sh - run: ./ci/steps/push-docker-manifest.sh - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - - homebrew: - # The newest version of code-server needs to be available on npm when this runs - # otherwise, it will 404 and won't open a PR to bump version on homebrew/homebrew-core - needs: npm - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - name: Configure git - run: | - git config user.name github-actions - git config user.email github-actions@github.com - - name: Bump code-server homebrew version - env: - HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}} - run: ./ci/steps/brew-bump.sh diff --git a/lib/vscode/.github/workflows/release-pipeline-labeler.yml b/.github/workflows/release-pipeline-labeler.yml similarity index 100% rename from lib/vscode/.github/workflows/release-pipeline-labeler.yml rename to .github/workflows/release-pipeline-labeler.yml diff --git a/lib/vscode/.github/workflows/rich-navigation.yml b/.github/workflows/rich-navigation.yml similarity index 100% rename from lib/vscode/.github/workflows/rich-navigation.yml rename to .github/workflows/rich-navigation.yml diff --git a/lib/vscode/.github/workflows/test-plan-item-validator.yml b/.github/workflows/test-plan-item-validator.yml similarity index 100% rename from lib/vscode/.github/workflows/test-plan-item-validator.yml rename to .github/workflows/test-plan-item-validator.yml diff --git a/.gitignore b/.gitignore index 736e30c59648..11a7486bf533 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1,18 @@ -.tsbuildinfo +.DS_Store .cache -dist* -out* -release/ -release-npm-package/ -release-standalone/ -release-packages/ -release-gcp/ -release-images/ -node_modules -/lib/vscode/node_modules.asar -node-* -/plugins -/lib/coder-cloud-agent -.home -coverage -**/.DS_Store -# Failed e2e test videos are saved here -test/test-results +npm-debug.log +Thumbs.db +node_modules/ +.build/ +extensions/**/dist/ +/out*/ +/extensions/**/out/ +src/vs/server +resources/server +build/node_modules +coverage/ +test_data/ +test-results/ +yarn-error.log +vscode.lsif +vscode.db diff --git a/lib/vscode/.mailmap b/.mailmap similarity index 100% rename from lib/vscode/.mailmap rename to .mailmap diff --git a/lib/vscode/.mention-bot b/.mention-bot similarity index 100% rename from lib/vscode/.mention-bot rename to .mention-bot diff --git a/.prettierrc.yaml b/.prettierrc.yaml deleted file mode 100644 index a0634116d20d..000000000000 --- a/.prettierrc.yaml +++ /dev/null @@ -1,4 +0,0 @@ -printWidth: 120 -semi: false -trailingComma: all -arrowParens: always diff --git a/.stylelintrc.yaml b/.stylelintrc.yaml deleted file mode 100644 index af5c94bc4f3e..000000000000 --- a/.stylelintrc.yaml +++ /dev/null @@ -1,2 +0,0 @@ -extends: - - stylelint-config-recommended diff --git a/.tours/contributing.tour b/.tours/contributing.tour deleted file mode 100644 index 1dd8e6b2ab8e..000000000000 --- a/.tours/contributing.tour +++ /dev/null @@ -1,151 +0,0 @@ -{ - "$schema": "https://aka.ms/codetour-schema", - "title": "Contributing", - "steps": [ - { - "directory": "src", - "line": 1, - "description": "Hello world! code-server's source code lives here in `src` (see the explorer). It's broadly arranged into browser code, Node code, and code shared between both." - }, - { - "file": "src/node/entry.ts", - "line": 157, - "description": "code-server begins execution here. CLI arguments are parsed, special flags like --help are handled, then the HTTP server is started." - }, - { - "file": "src/node/cli.ts", - "line": 28, - "description": "This describes all of the code-server CLI options and how they will be parsed." - }, - { - "file": "src/node/cli.ts", - "line": 233, - "description": "Here's the actual CLI parser." - }, - { - "file": "src/node/settings.ts", - "line": 1, - "description": "code-server maintains a settings file that is read and written here." - }, - { - "file": "src/node/app.ts", - "line": 11, - "description": "The core of code-server are HTTP and web socket servers which are created here. They provide authentication, file access, an API, and serve web-based applications like VS Code." - }, - { - "file": "src/node/wsRouter.ts", - "line": 38, - "description": "This is an analog to Express's Router that handles web socket routes." - }, - { - "file": "src/node/http.ts", - "line": 1, - "description": "This file provides various HTTP utility functions." - }, - { - "file": "src/node/coder_cloud.ts", - "line": 9, - "description": "The cloud agent spawned here provides the --link functionality." - }, - { - "file": "src/node/heart.ts", - "line": 7, - "description": "code-server's heart beats to indicate recent activity.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/docs/FAQ.md#heartbeat-file](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#heartbeat-file)" - }, - { - "file": "src/node/socket.ts", - "line": 13, - "description": "We pass sockets to child processes, however we can't pass TLS sockets so when code-server is handling TLS (via --cert) we use this to create a proxy that can be passed to the child." - }, - { - "directory": "src/node/routes", - "line": 1, - "description": "code-server's routes live here in `src/node/routes` (see the explorer)." - }, - { - "file": "src/node/routes/index.ts", - "line": 123, - "description": "The architecture of code-server allows it to be extended with applications via plugins. Each application is registered at its own route and handles requests at and below that route. Currently we have only VS Code (although it is not yet actually split out into a plugin)." - }, - { - "file": "src/node/plugin.ts", - "line": 103, - "description": "The previously mentioned plugins are loaded here." - }, - { - "file": "src/node/routes/apps.ts", - "line": 12, - "description": "This provides a list of the applications registered with code-server." - }, - { - "file": "src/node/routes/domainProxy.ts", - "line": 18, - "description": "code-server provides a built-in proxy to help in developing web-based applications. This is the code for the domain-based proxy.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services)" - }, - { - "file": "src/node/routes/pathProxy.ts", - "line": 19, - "description": "Here is the path-based version of the proxy.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#how-do-i-securely-access-web-services)" - }, - { - "file": "src/node/proxy.ts", - "line": 4, - "description": "Both the domain and path proxy use the single proxy instance created here." - }, - { - "file": "src/node/routes/health.ts", - "line": 5, - "description": "A simple endpoint that lets you see if code-server is up.\n\nAlso documented here: [https://github.com/cdr/code-server/blob/master/docs/FAQ.md#healthz-endpoint](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#healthz-endpoint)" - }, - { - "file": "src/node/routes/login.ts", - "line": 46, - "description": "code-server supports a password-based login here." - }, - { - "file": "src/node/routes/static.ts", - "line": 16, - "description": "This serves static assets. Anything under the code-server directory can be fetched. Anything outside requires authentication." - }, - { - "file": "src/node/routes/update.ts", - "line": 10, - "description": "This endpoint lets you query for the latest code-server version. It's used to power the update popup you see in VS Code." - }, - { - "file": "src/node/routes/vscode.ts", - "line": 15, - "description": "This is the endpoint that serves VS Code's HTML, handles VS Code's websockets, and handles a few VS Code-specific endpoints for fetching static files." - }, - { - "file": "src/node/vscode.ts", - "line": 13, - "description": "The actual VS Code spawn and initialization is handled here. VS Code runs in a separate child process. We communicate via IPC and by passing it web sockets." - }, - { - "file": "src/browser/serviceWorker.ts", - "line": 1, - "description": "The service worker only exists to provide PWA functionality." - }, - { - "directory": "src/browser/pages", - "line": 1, - "description": "HTML, CSS, and JavaScript for each page lives in here `src/browser/pages` (see the explorer). Currently our HTML uses a simple search and replace template system with variables that {{LOOK_LIKE_THIS}}." - }, - { - "file": "src/browser/pages/vscode.html", - "line": 1, - "description": "The VS Code HTML is based off VS Code's own `workbench.html`." - }, - { - "directory": "src/browser/media", - "line": 1, - "description": "Static images and the manifest live here in `src/browser/media` (see the explorer)." - }, - { - "directory": "lib/vscode", - "line": 1, - "description": "code-server makes use of VS Code's frontend web/remote support. Most of the modifications implement the remote server since that portion of the code is closed source and not released with VS Code.\n\nWe also have a few bug fixes and have added some features (like client-side extensions). See [https://github.com/cdr/code-server/blob/master/docs/CONTRIBUTING.md#modifications-to-vs-code](https://github.com/cdr/code-server/blob/master/docs/CONTRIBUTING.md#modifications-to-vs-code) for a list.\n\nWe make an effort to keep the modifications as few as possible." - } - ] -} \ No newline at end of file diff --git a/.tours/start-development.tour b/.tours/start-development.tour deleted file mode 100644 index 4df15077d36f..000000000000 --- a/.tours/start-development.tour +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema": "https://aka.ms/codetour-schema", - "title": "Start Development", - "steps": [ - { - "file": "package.json", - "line": 31, - "description": "## Commands\n\nTo start developing, make sure you have Node 12+ and the [required dependencies](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites) installed. Then, run the following commands:\n\n1. Install dependencies:\n>> yarn\n\n3. Start development mode (and watch for changes):\n>> yarn watch" - }, - { - "file": "src/node/app.ts", - "line": 68, - "description": "## Visit the web server\n\nIf all goes well, you should see something like this in your terminal. code-server should be live in development mode.\n\n---\n```bash\n[2020-12-09T21:03:37.156Z] info code-server 3.7.4 development\n[2020-12-09T21:03:37.157Z] info Using user-data-dir ~/.local/share/code-server\n[2020-12-09T21:03:37.165Z] info Using config file ~/.config/code-server/config.yaml\n[2020-12-09T21:03:37.165Z] info HTTP server listening on http://127.0.0.1:8080 \n[2020-12-09T21:03:37.165Z] info - Authentication is enabled\n[2020-12-09T21:03:37.165Z] info - Using password from ~/.config/code-server/config.yaml\n[2020-12-09T21:03:37.165Z] info - Not serving HTTPS\n```\n\n---\n\nIf you have the default configuration, you can access it at [http://localhost:8080](http://localhost:8080)." - }, - { - "file": "src/browser/pages/login.html", - "line": 26, - "description": "## Make a change\n\nThis is the login page, let's make a change and see it update on our web server! Perhaps change the text :)\n\n```html\n
Modifying the login page ๐Ÿ‘จ๐Ÿผโ€๐Ÿ’ป
\n```\n\nReminder, you can likely preview at [http://localhost:8080](http://localhost:8080)" - }, - { - "file": "src/node/app.ts", - "line": 62, - "description": "## That's it!\n\n\nThat's all there is to it! When this tour ends, your terminal session may stop, but just use `yarn watch` to start developing from here on out!\n\n\nIf you haven't already, be sure to check out these resources:\n- [Tour: Contributing](command:codetour.startTourByTitle?[\"Contributing\")\n- [Docs: FAQ.md](https://github.com/cdr/code-server/blob/master/docs/FAQ.md)\n- [Docs: CONTRIBUTING.md](https://github.com/cdr/code-server/blob/master/docs/CONTRIBUTING.md)\n- [Community: GitHub Discussions](https://github.com/cdr/code-server/discussions)\n- [Community: Slack](https://community.coder.com)" - } - ] -} diff --git a/lib/vscode/.vscode/cglicenses.schema.json b/.vscode/cglicenses.schema.json similarity index 100% rename from lib/vscode/.vscode/cglicenses.schema.json rename to .vscode/cglicenses.schema.json diff --git a/lib/vscode/.vscode/cgmanifest.schema.json b/.vscode/cgmanifest.schema.json similarity index 100% rename from lib/vscode/.vscode/cgmanifest.schema.json rename to .vscode/cgmanifest.schema.json diff --git a/lib/vscode/.vscode/extensions.json b/.vscode/extensions.json similarity index 100% rename from lib/vscode/.vscode/extensions.json rename to .vscode/extensions.json diff --git a/lib/vscode/.vscode/launch.json b/.vscode/launch.json similarity index 100% rename from lib/vscode/.vscode/launch.json rename to .vscode/launch.json diff --git a/.vscode/notebooks/api.github-issues b/.vscode/notebooks/api.github-issues new file mode 100644 index 000000000000..112920287601 --- /dev/null +++ b/.vscode/notebooks/api.github-issues @@ -0,0 +1,32 @@ +[ + { + "kind": 1, + "language": "markdown", + "value": "#### Config" + }, + { + "kind": 2, + "language": "github-issues", + "value": "$repo=repo:microsoft/vscode\n$milestone=milestone:\"May 2021\"" + }, + { + "kind": 1, + "language": "markdown", + "value": "### Finalization" + }, + { + "kind": 2, + "language": "github-issues", + "value": "$repo $milestone label:api-finalization" + }, + { + "kind": 1, + "language": "markdown", + "value": "### Proposals" + }, + { + "kind": 2, + "language": "github-issues", + "value": "$repo $milestone is:open label:api-proposal " + } +] \ No newline at end of file diff --git a/lib/vscode/.vscode/notebooks/endgame.github-issues b/.vscode/notebooks/endgame.github-issues similarity index 99% rename from lib/vscode/.vscode/notebooks/endgame.github-issues rename to .vscode/notebooks/endgame.github-issues index 881af2c14b43..bc2fba29ddf1 100644 --- a/lib/vscode/.vscode/notebooks/endgame.github-issues +++ b/.vscode/notebooks/endgame.github-issues @@ -7,7 +7,7 @@ { "kind": 2, "language": "github-issues", - "value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-js-debug repo:microsoft/vscode-remote-release repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-remotehub\n\n$MILESTONE=milestone:\"April 2021\"" + "value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-js-debug repo:microsoft/vscode-remote-release repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-remotehub\n\n$MILESTONE=milestone:\"May 2021\"" }, { "kind": 1, diff --git a/lib/vscode/.vscode/notebooks/grooming-delta.github-issues b/.vscode/notebooks/grooming-delta.github-issues similarity index 100% rename from lib/vscode/.vscode/notebooks/grooming-delta.github-issues rename to .vscode/notebooks/grooming-delta.github-issues diff --git a/lib/vscode/.vscode/notebooks/grooming.github-issues b/.vscode/notebooks/grooming.github-issues similarity index 100% rename from lib/vscode/.vscode/notebooks/grooming.github-issues rename to .vscode/notebooks/grooming.github-issues diff --git a/lib/vscode/.vscode/notebooks/inbox.github-issues b/.vscode/notebooks/inbox.github-issues similarity index 100% rename from lib/vscode/.vscode/notebooks/inbox.github-issues rename to .vscode/notebooks/inbox.github-issues diff --git a/lib/vscode/.vscode/notebooks/my-endgame.github-issues b/.vscode/notebooks/my-endgame.github-issues similarity index 98% rename from lib/vscode/.vscode/notebooks/my-endgame.github-issues rename to .vscode/notebooks/my-endgame.github-issues index c435ee77500b..aad3a8db3a90 100644 --- a/lib/vscode/.vscode/notebooks/my-endgame.github-issues +++ b/.vscode/notebooks/my-endgame.github-issues @@ -7,7 +7,7 @@ { "kind": 2, "language": "github-issues", - "value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-js-debug repo:microsoft/vscode-remote-release repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remotehub\n\n$MILESTONE=milestone:\"April 2021\"\n\n$MINE=assignee:@me" + "value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-js-debug repo:microsoft/vscode-remote-release repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remotehub\n\n$MILESTONE=milestone:\"May 2021\"\n\n$MINE=assignee:@me" }, { "kind": 1, @@ -157,7 +157,7 @@ { "kind": 2, "language": "github-issues", - "value": "$REPOS $MILESTONE -$MINE is:issue is:closed sort:updated-asc label:bug -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -author:aeschli -author:alexdima -author:alexr00 -author:AmandaSilver -author:bamurtaugh -author:bpasero -author:btholt -author:chrisdias -author:chrmarti -author:Chuxel -author:connor4312 -author:dbaeumer -author:deepak1556 -author:devinvalenciano -author:digitarald -author:eamodio -author:egamma -author:fiveisprime -author:gregvanl -author:isidorn -author:ItalyPaleAle -author:JacksonKearl -author:joaomoreno -author:jrieken -author:kieferrm -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:ornellaalt -author:orta -author:rebornix -author:RMacfarlane -author:roblourens -author:rzhao271 -author:sana-ajani -author:sandy081 -author:sbatten -author:stevencl -author:Tyriar -author:weinand -author:TylerLeonhardt -author:lramos15" + "value": "$REPOS $MILESTONE -$MINE is:issue is:closed sort:updated-asc label:bug -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -author:aeschli -author:alexdima -author:alexr00 -author:AmandaSilver -author:bamurtaugh -author:bpasero -author:btholt -author:chrisdias -author:chrmarti -author:Chuxel -author:connor4312 -author:dbaeumer -author:deepak1556 -author:devinvalenciano -author:digitarald -author:eamodio -author:egamma -author:fiveisprime -author:gregvanl -author:isidorn -author:ItalyPaleAle -author:JacksonKearl -author:joaomoreno -author:jrieken -author:kieferrm -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:ornellaalt -author:orta -author:rebornix -author:RMacfarlane -author:roblourens -author:rzhao271 -author:sana-ajani -author:sandy081 -author:sbatten -author:stevencl -author:Tyriar -author:weinand -author:TylerLeonhardt -author:lramos15 -author:hediet" }, { "kind": 1, diff --git a/.vscode/notebooks/my-work.github-issues b/.vscode/notebooks/my-work.github-issues new file mode 100644 index 000000000000..77ca0e0443b5 --- /dev/null +++ b/.vscode/notebooks/my-work.github-issues @@ -0,0 +1,97 @@ +[ + { + "kind": 1, + "language": "markdown", + "value": "##### `Config`: This should be changed every month/milestone" + }, + { + "kind": 2, + "language": "github-issues", + "value": "// list of repos we work in\n$repos=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog\n\n// current milestone name\n$milestone=milestone:\"May 2021\"" + }, + { + "kind": 1, + "language": "github-issues", + "value": "## Milestone Work" + }, + { + "kind": 2, + "language": "github-issues", + "value": "$repos $milestone assignee:@me is:open" + }, + { + "kind": 1, + "language": "github-issues", + "value": "## Bugs, Debt, Features..." + }, + { + "kind": 1, + "language": "markdown", + "value": "#### My Bugs" + }, + { + "kind": 2, + "language": "github-issues", + "value": "$repos assignee:@me is:open label:bug" + }, + { + "kind": 1, + "language": "markdown", + "value": "#### Debt & Engineering" + }, + { + "kind": 2, + "language": "github-issues", + "value": "$repos assignee:@me is:open label:debt OR $repos assignee:@me is:open label:engineering" + }, + { + "kind": 1, + "language": "markdown", + "value": "#### Performance ๐ŸŒ ๐Ÿ”œ ๐ŸŽ" + }, + { + "kind": 2, + "language": "github-issues", + "value": "$repos assignee:@me is:open label:perf OR $repos assignee:@me is:open label:perf-startup OR $repos assignee:@me is:open label:perf-bloat OR $repos assignee:@me is:open label:freeze-slow-crash-leak" + }, + { + "kind": 1, + "language": "markdown", + "value": "#### Feature Requests" + }, + { + "kind": 2, + "language": "github-issues", + "value": "$repos assignee:@me is:open label:feature-request milestone:Backlog sort:reactions-+1-desc" + }, + { + "kind": 2, + "language": "github-issues", + "value": "$repos assignee:@me is:open milestone:\"Backlog Candidates\"" + }, + { + "kind": 1, + "language": "markdown", + "value": "### Personal Inbox\n" + }, + { + "kind": 1, + "language": "markdown", + "value": "\n#### Missing Type label" + }, + { + "kind": 2, + "language": "github-issues", + "value": "$repos assignee:@me is:open type:issue -label:bug -label:\"needs more info\" -label:feature-request -label:under-discussion -label:debt -label:plan-item -label:upstream" + }, + { + "kind": 1, + "language": "markdown", + "value": "#### Not Actionable" + }, + { + "kind": 2, + "language": "github-issues", + "value": "$repos assignee:@me is:open label:\"needs more info\"" + } +] \ No newline at end of file diff --git a/lib/vscode/.vscode/notebooks/papercuts.github-issues b/.vscode/notebooks/papercuts.github-issues similarity index 100% rename from lib/vscode/.vscode/notebooks/papercuts.github-issues rename to .vscode/notebooks/papercuts.github-issues diff --git a/lib/vscode/.vscode/notebooks/verification.github-issues b/.vscode/notebooks/verification.github-issues similarity index 100% rename from lib/vscode/.vscode/notebooks/verification.github-issues rename to .vscode/notebooks/verification.github-issues diff --git a/lib/vscode/.vscode/searches/TrustedTypes.code-search b/.vscode/searches/TrustedTypes.code-search similarity index 100% rename from lib/vscode/.vscode/searches/TrustedTypes.code-search rename to .vscode/searches/TrustedTypes.code-search diff --git a/lib/vscode/.vscode/searches/ts36031.code-search b/.vscode/searches/ts36031.code-search similarity index 100% rename from lib/vscode/.vscode/searches/ts36031.code-search rename to .vscode/searches/ts36031.code-search diff --git a/lib/vscode/.vscode/settings.json b/.vscode/settings.json similarity index 100% rename from lib/vscode/.vscode/settings.json rename to .vscode/settings.json diff --git a/lib/vscode/.vscode/shared.code-snippets b/.vscode/shared.code-snippets similarity index 100% rename from lib/vscode/.vscode/shared.code-snippets rename to .vscode/shared.code-snippets diff --git a/lib/vscode/.vscode/tasks.json b/.vscode/tasks.json similarity index 80% rename from lib/vscode/.vscode/tasks.json rename to .vscode/tasks.json index 8fb5cb440b79..c0b290afa729 100644 --- a/lib/vscode/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -55,39 +55,11 @@ } } }, - { - "type": "npm", - "script": "watch-extension-mediad", - "label": "Ext Media - Build", - "isBackground": true, - "presentation": { - "reveal": "never", - "group": "buildWatchers" - }, - "problemMatcher": { - "owner": "typescript", - "applyTo": "closedDocuments", - "fileLocation": [ - "absolute" - ], - "pattern": { - "regexp": "Error: ([^(]+)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\): (.*)$", - "file": 1, - "location": 2, - "message": 3 - }, - "background": { - "beginsPattern": "Starting compilation", - "endsPattern": "Finished compilation" - } - } - }, { "label": "VS Code - Build", "dependsOn": [ "Core - Build", - "Ext - Build", - "Ext Media - Build", + "Ext - Build" ], "group": { "kind": "build", @@ -102,7 +74,8 @@ "group": "build", "presentation": { "reveal": "never", - "group": "buildKillers" + "group": "buildKillers", + "close": true }, "problemMatcher": "$tsc" }, @@ -113,18 +86,8 @@ "group": "build", "presentation": { "reveal": "never", - "group": "buildKillers" - }, - "problemMatcher": "$tsc" - }, - { - "type": "npm", - "script": "kill-watch-extension-mediad", - "label": "Kill Ext Media - Build", - "group": "build", - "presentation": { - "reveal": "never", - "group": "buildKillers" + "group": "buildKillers", + "close": true }, "problemMatcher": "$tsc" }, @@ -132,8 +95,7 @@ "label": "Kill VS Code - Build", "dependsOn": [ "Kill Core - Build", - "Kill Ext - Build", - "Kill Ext Media - Build", + "Kill Ext - Build" ], "group": "build", "problemMatcher": [] @@ -238,7 +200,8 @@ "command": "node build/lib/preLaunch.js", "label": "Ensure Prelaunch Dependencies", "presentation": { - "reveal": "silent" + "reveal": "silent", + "close": true } }, { diff --git a/lib/vscode/.yarnrc b/.yarnrc similarity index 78% rename from lib/vscode/.yarnrc rename to .yarnrc index 1965e671993f..ba290809667b 100644 --- a/lib/vscode/.yarnrc +++ b/.yarnrc @@ -1,3 +1,3 @@ disturl "https://electronjs.org/headers" -target "12.0.4" +target "12.0.9" runtime "electron" diff --git a/lib/vscode/CONTRIBUTING.md b/CONTRIBUTING.md similarity index 100% rename from lib/vscode/CONTRIBUTING.md rename to CONTRIBUTING.md diff --git a/LICENSE.txt b/LICENSE.txt index 0270469f3670..0ac28ee234d2 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,20 +1,21 @@ -The MIT License +MIT License -Copyright (c) 2019 Coder Technologies Inc. +Copyright (c) 2015 - present Microsoft Corporation -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: +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. +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/README.md b/README.md index d472c33f8322..ac7f2194233f 100644 --- a/README.md +++ b/README.md @@ -1,77 +1,75 @@ -# code-server · [!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/cdr/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://cdr.co/join-community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq) +# Visual Studio Code - Open Source ("Code - OSS") +[![Feature Requests](https://img.shields.io/github/issues/microsoft/vscode/feature-request.svg)](https://github.com/microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+sort%3Areactions-%2B1-desc) +[![Bugs](https://img.shields.io/github/issues/microsoft/vscode/bug.svg)](https://github.com/microsoft/vscode/issues?utf8=โœ“&q=is%3Aissue+is%3Aopen+label%3Abug) +[![Gitter](https://img.shields.io/badge/chat-on%20gitter-yellow.svg)](https://gitter.im/Microsoft/vscode) -[![codecov](https://codecov.io/gh/cdr/code-server/branch/main/graph/badge.svg?token=5iM9farjnC)](https://codecov.io/gh/cdr/code-server) -[![See latest docs](https://img.shields.io/static/v1?label=Docs&message=see%20latest%20&color=blue)](https://github.com/cdr/code-server/tree/v3.9.3/docs) +## The Repository -Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser. +This repository ("`Code - OSS`") is where we (Microsoft) develop the [Visual Studio Code](https://code.visualstudio.com) product together with the community. Not only do we work on code and issues here, we also publish our [roadmap](https://github.com/microsoft/vscode/wiki/Roadmap), [monthly iteration plans](https://github.com/microsoft/vscode/wiki/Iteration-Plans), and our [endgame plans](https://github.com/microsoft/vscode/wiki/Running-the-Endgame). This source code is available to everyone under the standard [MIT license](https://github.com/microsoft/vscode/blob/main/LICENSE.txt). -![Screenshot](./docs/assets/screenshot.png) +## Visual Studio Code -## Highlights +

+ VS Code in action +

-- Code on any device with a consistent development environment -- Use cloud servers to speed up tests, compilations, downloads, and more -- Preserve battery life when you're on the go; all intensive tasks run on your server +[Visual Studio Code](https://code.visualstudio.com) is a distribution of the `Code - OSS` repository with Microsoft specific customizations released under a traditional [Microsoft product license](https://code.visualstudio.com/License/). -## Requirements +[Visual Studio Code](https://code.visualstudio.com) combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle. It provides comprehensive code editing, navigation, and understanding support along with lightweight debugging, a rich extensibility model, and lightweight integration with existing tools. -For a good experience, we recommend at least: +Visual Studio Code is updated monthly with new features and bug fixes. You can download it for Windows, macOS, and Linux on [Visual Studio Code's website](https://code.visualstudio.com/Download). To get the latest releases every day, install the [Insiders build](https://code.visualstudio.com/insiders). -- 1 GB of RAM -- 2 cores +## Contributing -You can use whatever linux distribution floats your boat but in our [guide](./docs/guide.md) we assume Debian on Google Cloud. +There are many ways in which you can participate in this project, for example: -## Getting Started +* [Submit bugs and feature requests](https://github.com/microsoft/vscode/issues), and help us verify as they are checked in +* Review [source code changes](https://github.com/microsoft/vscode/pulls) +* Review the [documentation](https://github.com/microsoft/vscode-docs) and make pull requests for anything from typos to additional and new content -There are three ways you can get started: +If you are interested in fixing issues and contributing directly to the code base, +please see the document [How to Contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute), which covers the following: -1. Using the [install script](./install.sh), which automates most of the process. The script uses the system package manager (if possible) -2. Manually installing code-server; see [Installation](./docs/install.md) for instructions applicable to most use cases -3. Use our one-click buttons and guides to [deploy code-server to a popular cloud provider](https://github.com/cdr/deploy-code-server) โšก +* [How to build and run from source](https://github.com/microsoft/vscode/wiki/How-to-Contribute) +* [The development workflow, including debugging and running tests](https://github.com/microsoft/vscode/wiki/How-to-Contribute#debugging) +* [Coding guidelines](https://github.com/microsoft/vscode/wiki/Coding-Guidelines) +* [Submitting pull requests](https://github.com/microsoft/vscode/wiki/How-to-Contribute#pull-requests) +* [Finding an issue to work on](https://github.com/microsoft/vscode/wiki/How-to-Contribute#where-to-contribute) +* [Contributing to translations](https://aka.ms/vscodeloc) -If you choose to use the install script, you can preview what occurs during the install process: +## Feedback -```bash -curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run -``` +* Ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/vscode) +* [Request a new feature](CONTRIBUTING.md) +* Upvote [popular feature requests](https://github.com/microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+sort%3Areactions-%2B1-desc) +* [File an issue](https://github.com/microsoft/vscode/issues) +* Follow [@code](https://twitter.com/code) and let us know what you think! -To install, run: +See our [wiki](https://github.com/microsoft/vscode/wiki/Feedback-Channels) for a description of each of these channels and information on some other available community-driven channels. -```bash -curl -fsSL https://code-server.dev/install.sh | sh -``` +## Related Projects -When done, the install script prints out instructions for running and starting code-server. +Many of the core components and extensions to VS Code live in their own repositories on GitHub. For example, the [node debug adapter](https://github.com/microsoft/vscode-node-debug) and the [mono debug adapter](https://github.com/microsoft/vscode-mono-debug) have their own repositories. For a complete list, please visit the [Related Projects](https://github.com/microsoft/vscode/wiki/Related-Projects) page on our [wiki](https://github.com/microsoft/vscode/wiki). -We also have an in-depth [setup and configuration](./docs/guide.md) guide. +## Bundled Extensions -### code-server --link +VS Code includes a set of built-in extensions located in the [extensions](extensions) folder, including grammars and snippets for many languages. Extensions that provide rich language support (code completion, Go to Definition) for a language have the suffix `language-features`. For example, the `json` extension provides coloring for `JSON` and the `json-language-features` provides rich language support for `JSON`. -We're working on a cloud platform that makes deploying and managing code-server easier. -Consider running code-server with the beta flag `--link` if you don't want to worry about +## Development Container -- TLS -- Authentication -- Port Forwarding +This repository includes a Visual Studio Code Remote - Containers / GitHub Codespaces development container. -```bash -$ code-server --link -Proxying code-server, you can access your IDE at https://valmar-jon.cdr.co -``` +- For [Remote - Containers](https://aka.ms/vscode-remote/download/containers), use the **Remote-Containers: Clone Repository in Container Volume...** command which creates a Docker volume for better disk I/O on macOS and Windows. +- For Codespaces, install the [Github Codespaces](https://marketplace.visualstudio.com/items?itemName=GitHub.codespacese) extension in VS Code, and use the **Codespaces: Create New Codespace** command. -## FAQ +Docker / the Codespace should have at least **4 Cores and 6 GB of RAM (8 GB recommended)** to run full build. See the [development container README](.devcontainer/README.md) for more information. -See [./docs/FAQ.md](./docs/FAQ.md). +## Code of Conduct -## Want to help? +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. -See [CONTRIBUTING](./docs/CONTRIBUTING.md) for details. +## License -## Hiring +Copyright (c) Microsoft Corporation. All rights reserved. -Interested in [working at Coder](https://coder.com)? Check out [our open positions](https://jobs.lever.co/coder)! - -## For Organizations - -Visit [our website](https://coder.com) for more information about remote development for your organization or enterprise. +Licensed under the [MIT](LICENSE.txt) license. diff --git a/lib/vscode/SECURITY.md b/SECURITY.md similarity index 100% rename from lib/vscode/SECURITY.md rename to SECURITY.md diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt index fd6f420e235e..d929c6b59e78 100644 --- a/ThirdPartyNotices.txt +++ b/ThirdPartyNotices.txt @@ -1,22 +1,2886 @@ -code-server +microsoft-vscode THIRD-PARTY SOFTWARE NOTICES AND INFORMATION Do Not Translate or Localize -1. Microsoft/vscode version 1.47.0 (https://github.com/Microsoft/vscode) +This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise. -%% Microsoft/vscode NOTICES AND INFORMATION BEGIN HERE +1. atom/language-clojure version 0.22.7 (https://github.com/atom/language-clojure) +2. atom/language-coffee-script version 0.49.3 (https://github.com/atom/language-coffee-script) +3. atom/language-css version 0.44.4 (https://github.com/atom/language-css) +4. atom/language-java version 0.32.1 (https://github.com/atom/language-java) +5. atom/language-sass version 0.62.1 (https://github.com/atom/language-sass) +6. atom/language-shellscript version 0.26.0 (https://github.com/atom/language-shellscript) +7. atom/language-xml version 0.35.2 (https://github.com/atom/language-xml) +8. better-go-syntax version 1.0.0 (https://github.com/jeff-hykin/better-go-syntax/ ) +9. Colorsublime-Themes version 0.1.0 (https://github.com/Colorsublime/Colorsublime-Themes) +10. daaain/Handlebars version 1.8.0 (https://github.com/daaain/Handlebars) +11. dart-lang/dart-syntax-highlight (https://github.com/dart-lang/dart-syntax-highlight) +12. davidrios/pug-tmbundle (https://github.com/davidrios/pug-tmbundle) +13. definitelytyped (https://github.com/DefinitelyTyped/DefinitelyTyped) +14. demyte/language-cshtml version 0.3.0 (https://github.com/demyte/language-cshtml) +15. Document Object Model version 4.0.0 (https://www.w3.org/DOM/) +16. dotnet/csharp-tmLanguage version 0.1.0 (https://github.com/dotnet/csharp-tmLanguage) +17. expand-abbreviation version 0.5.8 (https://github.com/emmetio/expand-abbreviation) +18. fadeevab/make.tmbundle (https://github.com/fadeevab/make.tmbundle) +19. freebroccolo/atom-language-swift (https://github.com/freebroccolo/atom-language-swift) +20. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/) +21. Ikuyadeu/vscode-R version 1.3.0 (https://github.com/Ikuyadeu/vscode-R) +22. insane version 2.6.2 (https://github.com/bevacqua/insane) +23. Ionic documentation version 1.2.4 (https://github.com/ionic-team/ionic-site) +24. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar) +25. jeff-hykin/cpp-textmate-grammar version 1.12.11 (https://github.com/jeff-hykin/cpp-textmate-grammar) +26. jeff-hykin/cpp-textmate-grammar version 1.15.5 (https://github.com/jeff-hykin/cpp-textmate-grammar) +27. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify) +28. JuliaEditorSupport/atom-language-julia version 0.21.0 (https://github.com/JuliaEditorSupport/atom-language-julia) +29. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert) +30. language-docker (https://github.com/moby/moby) +31. language-less version 0.34.2 (https://github.com/atom/language-less) +32. language-php version 0.46.2 (https://github.com/atom/language-php) +33. MagicStack/MagicPython version 1.1.1 (https://github.com/MagicStack/MagicPython) +34. marked version 1.1.0 (https://github.com/markedjs/marked) +35. mdn-data version 1.1.12 (https://github.com/mdn/data) +36. microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/microsoft/TypeScript-TmLanguage) +37. microsoft/vscode-JSON.tmLanguage (https://github.com/microsoft/vscode-JSON.tmLanguage) +38. microsoft/vscode-markdown-tm-grammar version 1.0.0 (https://github.com/microsoft/vscode-markdown-tm-grammar) +39. microsoft/vscode-mssql version 1.9.0 (https://github.com/microsoft/vscode-mssql) +40. mmims/language-batchfile version 0.7.6 (https://github.com/mmims/language-batchfile) +41. NVIDIA/cuda-cpp-grammar (https://github.com/NVIDIA/cuda-cpp-grammar) +42. PowerShell/EditorSyntax version 1.0.0 (https://github.com/PowerShell/EditorSyntax) +43. rust-syntax version 0.4.3 (https://github.com/dustypomerleau/rust-syntax) +44. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui) +45. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage) +46. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle) +47. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle) +48. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle) +49. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle) +50. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle) +51. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle) +52. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle) +53. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle) +54. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle) +55. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle) +56. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle) +57. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle) +58. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle) +59. TypeScript-TmLanguage version 0.1.8 (https://github.com/microsoft/TypeScript-TmLanguage) +60. TypeScript-TmLanguage version 1.0.0 (https://github.com/microsoft/TypeScript-TmLanguage) +61. Unicode version 12.0.0 (https://home.unicode.org/) +62. vscode-codicons version 0.0.14 (https://github.com/microsoft/vscode-codicons) +63. vscode-logfile-highlighter version 2.11.0 (https://github.com/emilast/vscode-logfile-highlighter) +64. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift) +65. Web Background Synchronization (https://github.com/WICG/background-sync) + + +%% atom/language-clojure NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) 2014 GitHub Inc. + +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. + + +This package was derived from a TextMate bundle located at +https://github.com/mmcgrana/textmate-clojure and distributed under the +following license, located in `LICENSE.md`: + +The MIT License (MIT) + +Copyright (c) 2010- Mark McGranaghan + +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 atom/language-clojure NOTICES AND INFORMATION + +%% atom/language-coffee-script NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2014 GitHub Inc. + +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. + + +This package was derived from a TextMate bundle located at +https://github.com/jashkenas/coffee-script-tmbundle and distributed under the +following license, located in `LICENSE`: + +Copyright (c) 2009-2014 Jeremy Ashkenas + +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 atom/language-coffee-script NOTICES AND INFORMATION + +%% atom/language-css NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) 2014 GitHub Inc. + +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. + +-------------------------------------------------------------------- + +This package was derived from a TextMate bundle located at +https://github.com/textmate/css.tmbundle and distributed under the following +license, located in `README.mdown`: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. +========================================= +END OF atom/language-css NOTICES AND INFORMATION + +%% atom/language-java NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2014 GitHub Inc. + +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. + + +This package was derived from a TextMate bundle located at +https://github.com/textmate/java.tmbundle and distributed under the following +license, located in `README.mdown`: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. +========================================= +END OF atom/language-java NOTICES AND INFORMATION + +%% atom/language-sass NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2014 GitHub Inc. + +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. + + +This package was derived from a TextMate bundle located at +https://github.com/alexsancho/Sass.tmbundle and distributed under the following +license, located in `LICENSE.md`: + +Copyright (c) 2012 Alex Sancho, http://alexsancho.name/ + +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 atom/language-sass NOTICES AND INFORMATION + +%% atom/language-shellscript NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2014 GitHub Inc. + +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. + + +This package was derived from a TextMate bundle located at +https://github.com/textmate/shellscript.tmbundle and distributed under the +following license, located in `README.mdown`: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. +========================================= +END OF atom/language-shellscript NOTICES AND INFORMATION + +%% atom/language-xml NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2014 GitHub Inc. + +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. + + +This package was derived from a TextMate bundle located at +https://github.com/textmate/xml.tmbundle and distributed under the following +license, located in `README.mdown`: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. +========================================= +END OF atom/language-xml NOTICES AND INFORMATION + +%% better-go-syntax NOTICES AND INFORMATION BEGIN HERE +========================================= +MIT License + +Copyright (c) 2019 Jeff Hykin + +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 better-go-syntax NOTICES AND INFORMATION + +%% Colorsublime-Themes NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) 2015 Colorsublime.com + +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 Colorsublime-Themes NOTICES AND INFORMATION + +%% daaain/Handlebars NOTICES AND INFORMATION BEGIN HERE +========================================= +-- Credits + +Adapted from the great sublime-text-handlebars package by Nicholas Westlake. + +Thanks a lot to all the generous contributors (in alphabetical order): @bittersweetryan, @bradcliffe, @calumbrodie, @duncanbeevers, @hlvnst, @jonschlinkert, @Krutius, @samselikoff, @utkarshkukreti, @zeppelin + +-- License + +(The MIT License) + +Copyright (c) daaain/Handlebars project authors + +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 daaain/Handlebars NOTICES AND INFORMATION + +%% dart-lang/dart-syntax-highlight NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright 2020, the Dart project authors. + +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. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +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 +OWNER 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. +========================================= +END OF dart-lang/dart-syntax-highlight NOTICES AND INFORMATION + +%% davidrios/pug-tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2016 David Rios + +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 davidrios/pug-tmbundle NOTICES AND INFORMATION + +%% 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 + +%% demyte/language-cshtml NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2014 James Summerton + +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 demyte/language-cshtml NOTICES AND INFORMATION + +%% Document Object Model NOTICES AND INFORMATION BEGIN HERE +========================================= +W3C License +This work is being provided by the copyright holders under the following license. +By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions. +Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following +on ALL copies of the work or portions thereof, including modifications: +* The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. +* Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included. +* Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived +from Document Object Model. Copyright ยฉ 2015 W3Cยฎ (MIT, ERCIM, Keio, Beihang)." +Disclaimers +THIS WORK IS PROVIDED "AS IS + AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR +FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT 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 SOFTWARE OR DOCUMENT. +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. +Title to copyright in this work will at all times remain with copyright holders. +========================================= +END OF Document Object Model NOTICES AND INFORMATION + +%% dotnet/csharp-tmLanguage NOTICES AND INFORMATION BEGIN HERE +========================================= +MIT License + +Copyright (c) 2016 .NET Foundation + +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 dotnet/csharp-tmLanguage NOTICES AND INFORMATION + +%% expand-abbreviation NOTICES AND INFORMATION BEGIN HERE +========================================= +MIT License + +Copyright (c) 2017 Emmet.io + +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 expand-abbreviation NOTICES AND INFORMATION + +%% fadeevab/make.tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) textmate-make.tmbundle project authors + +If not otherwise specified (see below), files in this repository fall under the following license: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, +or files where an accompanying file exists (in the same directory) with a "-license" suffix added +to the base-name name of the original file, and an extension of txt, html, or similar. For example +"tidy" is accompanied by "tidy-license.txt". +========================================= +END OF fadeevab/make.tmbundle NOTICES AND INFORMATION + +%% freebroccolo/atom-language-swift NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2014 Darin Morrison + +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 freebroccolo/atom-language-swift NOTICES AND INFORMATION + +%% 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 + +%% Ikuyadeu/vscode-R NOTICES AND INFORMATION BEGIN HERE +========================================= +MIT License + +Copyright (c) 2019 Yuki Ueda + +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 Ikuyadeu/vscode-R NOTICES AND INFORMATION + +%% insane NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright ยฉ 2015 Nicolas Bevacqua + +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 insane NOTICES AND INFORMATION + +%% Ionic documentation NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright Drifty Co. http://drifty.com/. + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS +========================================= +END OF Ionic documentation NOTICES AND INFORMATION + +%% ionide/ionide-fsgrammar NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2015 Krzysztof Cieslak + +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 ionide/ionide-fsgrammar NOTICES AND INFORMATION + +%% jeff-hykin/cpp-textmate-grammar NOTICES AND INFORMATION BEGIN HERE +========================================= +MIT License + +Copyright (c) 2019 Jeff Hykin + +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 jeff-hykin/cpp-textmate-grammar NOTICES AND INFORMATION + +%% js-beautify NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2007-2018 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. +========================================= +END OF js-beautify NOTICES AND INFORMATION + +%% JuliaEditorSupport/atom-language-julia NOTICES AND INFORMATION BEGIN HERE +========================================= +The atom-language-julia package is licensed under the MIT "Expat" License: + +> Copyright (c) 2015 +> +> 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 JuliaEditorSupport/atom-language-julia NOTICES AND INFORMATION + +%% Jxck/assert NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2011 Jxck + +Originally from node.js (http://nodejs.org) +Copyright Joyent, Inc. + +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 Jxck/assert NOTICES AND INFORMATION + +%% language-docker NOTICES AND INFORMATION BEGIN HERE +========================================= +Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2013-2018 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +========================================= +END OF language-docker NOTICES AND INFORMATION + +%% language-less NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2014 GitHub Inc. + +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. + + +This package was derived from a TextMate bundle located at +https://github.com/textmate/less.tmbundle and distributed under the following +license, located in `LICENSE.md`: + +Copyright (c) 2010 Scott Kyle and Rasmus Andersson + +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 language-less NOTICES AND INFORMATION + +%% language-php NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2014 GitHub Inc. + +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. + + +This package was derived from a TextMate bundle located at +https://github.com/textmate/php.tmbundle and distributed under the following +license, located in `README.mdown`: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. +========================================= +END OF language-php NOTICES AND INFORMATION + +%% MagicStack/MagicPython NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License + +Copyright (c) 2015-present MagicStack Inc. http://magic.io + +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 MagicStack/MagicPython NOTICES AND INFORMATION + +%% marked NOTICES AND INFORMATION BEGIN HERE +========================================= +information + +## Contribution License Agreement + +If you contribute code to this project, you are implicitly allowing your code +to be distributed under the MIT license. You are also implicitly verifying that +all code is your original work. `` + +## Marked + +Copyright (c) 2018+, MarkedJS (https://github.com/markedjs/) +Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/) + +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. + +## Markdown + +Copyright ยฉ 2004, John Gruber +http://daringfireball.net/ +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. +* Neither the name "Markdown" nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +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 owner 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. +========================================= +END OF marked NOTICES AND INFORMATION + +%% mdn-data NOTICES AND INFORMATION BEGIN HERE +========================================= +Mozilla Public License Version 2.0 + +Copyright (c) 2018 Mozilla Corporation + +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. +========================================= +END OF mdn-data NOTICES AND INFORMATION + +%% microsoft/TypeScript-TmLanguage NOTICES AND INFORMATION BEGIN HERE +========================================= +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. +========================================= +END OF microsoft/TypeScript-TmLanguage NOTICES AND INFORMATION + +%% microsoft/vscode-JSON.tmLanguage NOTICES AND INFORMATION BEGIN HERE +========================================= +vscode-JSON.tmLanguage + +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. +========================================= +END OF microsoft/vscode-JSON.tmLanguage NOTICES AND INFORMATION + +%% microsoft/vscode-markdown-tm-grammar NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) Microsoft 2018 + +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 microsoft/vscode-markdown-tm-grammar NOTICES AND INFORMATION + +%% microsoft/vscode-mssql NOTICES AND INFORMATION BEGIN HERE +========================================= +------------------------------------------ START OF LICENSE ----------------------------------------- +vscode-mssql +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: +Copyright (c) 2016 Microsoft +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 LICENSE ----------------------------------------- +========================================= +END OF microsoft/vscode-mssql NOTICES AND INFORMATION + +%% mmims/language-batchfile NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2021 Michael Mims + +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 mmims/language-batchfile NOTICES AND INFORMATION + +%% NVIDIA/cuda-cpp-grammar NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright 2021 NVIDIA Corporation + +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 NVIDIA/cuda-cpp-grammar NOTICES AND INFORMATION + +%% PowerShell/EditorSyntax NOTICES AND INFORMATION BEGIN HERE +========================================= +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. +========================================= +END OF PowerShell/EditorSyntax NOTICES AND INFORMATION + +%% rust-syntax NOTICES AND INFORMATION BEGIN HERE +========================================= +MIT License + +Copyright (c) 2020 Dustin Pomerleau + +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 rust-syntax NOTICES AND INFORMATION + +%% seti-ui NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) 2014 Jesse Weed + +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 seti-ui NOTICES AND INFORMATION + +%% shaders-tmLanguage NOTICES AND INFORMATION BEGIN HERE +========================================= +MIT License + +Copyright (c) 2017 Tim Jones + +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 shaders-tmLanguage NOTICES AND INFORMATION + +%% textmate/asp.vb.net.tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) textmate-asp.vb.net.tmbundle project authors + +If not otherwise specified (see below), files in this folder fall under the following license: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, +or files where an accompanying file exists (in the same directory) with a "-license" suffix added +to the base-name name of the original file, and an extension of txt, html, or similar. For example +"tidy" is accompanied by "tidy-license.txt". +========================================= +END OF textmate/asp.vb.net.tmbundle NOTICES AND INFORMATION + +%% textmate/c.tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) textmate-c.tmbundle authors + +If not otherwise specified (see below), files in this repository fall under the following license: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, +or files where an accompanying file exists (in the same directory) with a "-license" suffix added +to the base-name name of the original file, and an extension of txt, html, or similar. For example +"tidy" is accompanied by "tidy-license.txt". +========================================= +END OF textmate/c.tmbundle NOTICES AND INFORMATION + +%% textmate/diff.tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) textmate-diff.tmbundle project authors + +If not otherwise specified (see below), files in this repository fall under the following license: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, +or files where an accompanying file exists (in the same directory) with a "-license" suffix added +to the base-name name of the original file, and an extension of txt, html, or similar. For example +"tidy" is accompanied by "tidy-license.txt". +========================================= +END OF textmate/diff.tmbundle NOTICES AND INFORMATION + +%% textmate/git.tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2008 Tim Harper + +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 textmate/git.tmbundle NOTICES AND INFORMATION + +%% textmate/groovy.tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) textmate-groovy.tmbundle project authors + +If not otherwise specified (see below), files in this repository fall under the following license: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, +or files where an accompanying file exists (in the same directory) with a "-license" suffix added +to the base-name name of the original file, and an extension of txt, html, or similar. For example +"tidy" is accompanied by "tidy-license.txt". +========================================= +END OF textmate/groovy.tmbundle NOTICES AND INFORMATION + +%% textmate/html.tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) textmate-html.tmbundle project authors + +If not otherwise specified (see below), files in this repository fall under the following license: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, +or files where an accompanying file exists (in the same directory) with a "-license" suffix added +to the base-name name of the original file, and an extension of txt, html, or similar. For example +"tidy" is accompanied by "tidy-license.txt". +========================================= +END OF textmate/html.tmbundle NOTICES AND INFORMATION + +%% textmate/ini.tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) textmate-ini.tmbundle project authors + +If not otherwise specified (see below), files in this folder fall under the following license: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, +or files where an accompanying file exists (in the same directory) with a "-license" suffix added +to the base-name name of the original file, and an extension of txt, html, or similar. For example +"tidy" is accompanied by "tidy-license.txt". +========================================= +END OF textmate/ini.tmbundle NOTICES AND INFORMATION + +%% textmate/javascript.tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) textmate-javascript.tmbundle project authors + +If not otherwise specified (see below), files in this repository fall under the following license: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, +or files where an accompanying file exists (in the same directory) with a "-license" suffix added +to the base-name name of the original file, and an extension of txt, html, or similar. For example +"tidy" is accompanied by "tidy-license.txt". +========================================= +END OF textmate/javascript.tmbundle NOTICES AND INFORMATION + +%% textmate/lua.tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) textmate-lua.tmbundle project authors + +If not otherwise specified (see below), files in this repository fall under the following license: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, +or files where an accompanying file exists (in the same directory) with a "-license" suffix added +to the base-name name of the original file, and an extension of txt, html, or similar. For example +"tidy" is accompanied by "tidy-license.txt". +========================================= +END OF textmate/lua.tmbundle NOTICES AND INFORMATION + +%% textmate/markdown.tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) markdown.tmbundle authors + +If not otherwise specified (see below), files in this repository fall under the following license: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, +or files where an accompanying file exists (in the same directory) with a "-license" suffix added +to the base-name name of the original file, and an extension of txt, html, or similar. For example +"tidy" is accompanied by "tidy-license.txt". +========================================= +END OF textmate/markdown.tmbundle NOTICES AND INFORMATION + +%% textmate/perl.tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) textmate-perl.tmbundle project authors + +If not otherwise specified (see below), files in this repository fall under the following license: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, +or files where an accompanying file exists (in the same directory) with a "-license" suffix added +to the base-name name of the original file, and an extension of txt, html, or similar. For example +"tidy" is accompanied by "tidy-license.txt". +========================================= +END OF textmate/perl.tmbundle NOTICES AND INFORMATION + +%% textmate/ruby.tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) textmate-ruby.tmbundle project authors + +If not otherwise specified (see below), files in this folder fall under the following license: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, +or files where an accompanying file exists (in the same directory) with a "-license" suffix added +to the base-name name of the original file, and an extension of txt, html, or similar. For example +"tidy" is accompanied by "tidy-license.txt". +========================================= +END OF textmate/ruby.tmbundle NOTICES AND INFORMATION + +%% textmate/yaml.tmbundle NOTICES AND INFORMATION BEGIN HERE +========================================= +Copyright (c) 2015 FichteFoll + +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 textmate/yaml.tmbundle NOTICES AND INFORMATION + +%% TypeScript-TmLanguage NOTICES AND INFORMATION BEGIN HERE +========================================= +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. +========================================= +END OF TypeScript-TmLanguage NOTICES AND INFORMATION + +%% Unicode NOTICES AND INFORMATION BEGIN HERE +========================================= +Unicode Data Files include all data files under the directories +http://www.unicode.org/Public/, http://www.unicode.org/reports/, +http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and +http://www.unicode.org/utility/trac/browser/. + +Unicode Data Files do not include PDF online code charts under the +directory http://www.unicode.org/Public/. + +Software includes any source code published in the Unicode Standard +or under the directories +http://www.unicode.org/Public/, http://www.unicode.org/reports/, +http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and +http://www.unicode.org/utility/trac/browser/. + +NOTICE TO USER: Carefully read the following legal agreement. +BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S +DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), +YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. +IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE +THE DATA FILES OR SOFTWARE. + +COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 1991-2017 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in http://www.unicode.org/copyright.html. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Unicode data files and any associated documentation +(the "Data Files") or Unicode software and any associated documentation +(the "Software") to deal in the Data Files or Software +without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files +or Software are furnished to do so, provided that either +(a) this copyright and permission notice appear with all copies +of the Data Files or Software, or +(b) this copyright and permission notice appear in associated +Documentation. + +THE DATA FILES AND SOFTWARE ARE 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 OF THIRD PARTY RIGHTS. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 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 THE DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in these Data Files or Software without prior +written authorization of the copyright holder. +========================================= +END OF Unicode NOTICES AND INFORMATION + +%% vscode-codicons NOTICES AND INFORMATION BEGIN HERE +========================================= +Attribution 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution 4.0 International Public License ("Public License"). To the +extent this Public License may be interpreted as a contract, You are +granted the Licensed Rights in consideration of Your acceptance of +these terms and conditions, and the Licensor grants You such rights in +consideration of benefits the Licensor receives from making the +Licensed Material available under these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + d. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + e. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + f. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + g. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + h. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's + License You apply must not prevent recipients of the Adapted + Material from complying with this Public License. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the "Licensor." The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. +========================================= +END OF vscode-codicons NOTICES AND INFORMATION + +%% vscode-logfile-highlighter NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2015 emilast + +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 vscode-logfile-highlighter NOTICES AND INFORMATION + +%% vscode-swift NOTICES AND INFORMATION BEGIN HERE ========================================= -MIT License +The MIT License (MIT) +Copyright (c) 2015 David Owens II -Copyright (c) 2015 - present Microsoft Corporation +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. -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 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 vscode-swift NOTICES AND INFORMATION + +%% Web Background Synchronization NOTICES AND INFORMATION BEGIN HERE +========================================= +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and -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 + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +========================================= +END OF Web Background Synchronization NOTICES AND INFORMATION \ No newline at end of file diff --git a/lib/vscode/build/.cachesalt b/build/.cachesalt similarity index 100% rename from lib/vscode/build/.cachesalt rename to build/.cachesalt diff --git a/lib/vscode/build/.gitattributes b/build/.gitattributes similarity index 100% rename from lib/vscode/build/.gitattributes rename to build/.gitattributes diff --git a/lib/vscode/build/.moduleignore b/build/.moduleignore similarity index 100% rename from lib/vscode/build/.moduleignore rename to build/.moduleignore diff --git a/lib/vscode/build/.webignore b/build/.webignore similarity index 100% rename from lib/vscode/build/.webignore rename to build/.webignore diff --git a/lib/vscode/build/azure-pipelines/common/computeNodeModulesCacheKey.js b/build/azure-pipelines/common/computeNodeModulesCacheKey.js similarity index 100% rename from lib/vscode/build/azure-pipelines/common/computeNodeModulesCacheKey.js rename to build/azure-pipelines/common/computeNodeModulesCacheKey.js diff --git a/lib/vscode/build/azure-pipelines/common/computeNodeModulesCacheKey.ts b/build/azure-pipelines/common/computeNodeModulesCacheKey.ts similarity index 100% rename from lib/vscode/build/azure-pipelines/common/computeNodeModulesCacheKey.ts rename to build/azure-pipelines/common/computeNodeModulesCacheKey.ts diff --git a/build/azure-pipelines/common/createAsset.js b/build/azure-pipelines/common/createAsset.js new file mode 100644 index 000000000000..340c6fd7e5d9 --- /dev/null +++ b/build/azure-pipelines/common/createAsset.js @@ -0,0 +1,197 @@ +/*--------------------------------------------------------------------------------------------- + * 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 }); +const fs = require("fs"); +const url = require("url"); +const crypto = require("crypto"); +const azure = require("azure-storage"); +const mime = require("mime"); +const cosmos_1 = require("@azure/cosmos"); +const retry_1 = require("./retry"); +if (process.argv.length !== 8) { + console.error('Usage: node createAsset.js PRODUCT OS ARCH TYPE NAME FILE'); + process.exit(-1); +} +// Contains all of the logic for mapping details to our actual product names in CosmosDB +function getPlatform(product, os, arch, type) { + switch (os) { + case 'win32': + switch (product) { + case 'client': + const asset = arch === 'ia32' ? 'win32' : `win32-${arch}`; + switch (type) { + case 'archive': + return `${asset}-archive`; + case 'setup': + return asset; + case 'user-setup': + return `${asset}-user`; + default: + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } + case 'server': + if (arch === 'arm64') { + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } + return arch === 'ia32' ? 'server-win32' : `server-win32-${arch}`; + case 'web': + if (arch === 'arm64') { + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } + return arch === 'ia32' ? 'server-win32-web' : `server-win32-${arch}-web`; + default: + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } + case 'linux': + switch (type) { + case 'snap': + return `linux-snap-${arch}`; + case 'archive-unsigned': + switch (product) { + case 'client': + return `linux-${arch}`; + case 'server': + return `server-linux-${arch}`; + case 'web': + return arch === 'standalone' ? 'web-standalone' : `server-linux-${arch}-web`; + default: + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } + case 'deb-package': + return `linux-deb-${arch}`; + case 'rpm-package': + return `linux-rpm-${arch}`; + default: + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } + case 'darwin': + switch (product) { + case 'client': + if (arch === 'x64') { + return 'darwin'; + } + return `darwin-${arch}`; + case 'server': + return 'server-darwin'; + case 'web': + if (arch !== 'x64') { + throw `What should the platform be?: ${product} ${os} ${arch} ${type}`; + } + return 'server-darwin-web'; + default: + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } + default: + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } +} +// Contains all of the logic for mapping types to our actual types in CosmosDB +function getRealType(type) { + switch (type) { + case 'user-setup': + return 'setup'; + case 'deb-package': + case 'rpm-package': + return 'package'; + default: + return type; + } +} +function hashStream(hashName, stream) { + return new Promise((c, e) => { + const shasum = crypto.createHash(hashName); + stream + .on('data', shasum.update.bind(shasum)) + .on('error', e) + .on('close', () => c(shasum.digest('hex'))); + }); +} +async function doesAssetExist(blobService, quality, blobName) { + const existsResult = await new Promise((c, e) => blobService.doesBlobExist(quality, blobName, (err, r) => err ? e(err) : c(r))); + return existsResult.exists; +} +async function uploadBlob(blobService, quality, blobName, filePath, fileName) { + const blobOptions = { + contentSettings: { + contentType: mime.lookup(filePath), + contentDisposition: `attachment; filename="${fileName}"`, + cacheControl: 'max-age=31536000, public' + } + }; + await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, filePath, blobOptions, err => err ? e(err) : c())); +} +function getEnv(name) { + const result = process.env[name]; + if (typeof result === 'undefined') { + throw new Error('Missing env: ' + name); + } + return result; +} +async function main() { + const [, , product, os, arch, unprocessedType, fileName, filePath] = process.argv; + // getPlatform needs the unprocessedType + const platform = getPlatform(product, os, arch, unprocessedType); + const type = getRealType(unprocessedType); + const quality = getEnv('VSCODE_QUALITY'); + const commit = getEnv('BUILD_SOURCEVERSION'); + console.log('Creating asset...'); + const stat = await new Promise((c, e) => fs.stat(filePath, (err, stat) => err ? e(err) : c(stat))); + const size = stat.size; + console.log('Size:', size); + const stream = fs.createReadStream(filePath); + const [sha1hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]); + console.log('SHA1:', sha1hash); + console.log('SHA256:', sha256hash); + const blobName = commit + '/' + fileName; + const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']; + const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']) + .withFilter(new azure.ExponentialRetryPolicyFilter(20)); + const blobExists = await doesAssetExist(blobService, quality, blobName); + if (blobExists) { + console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`); + return; + } + const mooncakeBlobService = azure.createBlobService(storageAccount, process.env['MOONCAKE_STORAGE_ACCESS_KEY'], `${storageAccount}.blob.core.chinacloudapi.cn`) + .withFilter(new azure.ExponentialRetryPolicyFilter(20)); + // mooncake is fussy and far away, this is needed! + blobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000; + mooncakeBlobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000; + console.log('Uploading blobs to Azure storage and Mooncake Azure storage...'); + await retry_1.retry(() => Promise.all([ + uploadBlob(blobService, quality, blobName, filePath, fileName), + uploadBlob(mooncakeBlobService, quality, blobName, filePath, fileName) + ])); + console.log('Blobs successfully uploaded.'); + // TODO: Understand if blobName and blobPath are the same and replace blobPath with blobName if so. + const assetUrl = `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`; + const blobPath = url.parse(assetUrl).path; + const mooncakeUrl = `${process.env['MOONCAKE_CDN_URL']}${blobPath}`; + const asset = { + platform, + type, + url: assetUrl, + hash: sha1hash, + mooncakeUrl, + sha256hash, + size + }; + // Remove this if we ever need to rollback fast updates for windows + if (/win32/.test(platform)) { + asset.supportsFastUpdate = true; + } + console.log('Asset:', JSON.stringify(asset, null, ' ')); + const client = new cosmos_1.CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT'], key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] }); + const scripts = client.database('builds').container(quality).scripts; + await retry_1.retry(() => scripts.storedProcedure('createAsset').execute('', [commit, asset, true])); + console.log(` Done โœ”๏ธ`); +} +main().then(() => { + console.log('Asset successfully created'); + process.exit(0); +}, err => { + console.error(err); + process.exit(1); +}); diff --git a/build/azure-pipelines/common/createAsset.ts b/build/azure-pipelines/common/createAsset.ts new file mode 100644 index 000000000000..5fe93c566bb1 --- /dev/null +++ b/build/azure-pipelines/common/createAsset.ts @@ -0,0 +1,243 @@ +/*--------------------------------------------------------------------------------------------- + * 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 fs from 'fs'; +import * as url from 'url'; +import { Readable } from 'stream'; +import * as crypto from 'crypto'; +import * as azure from 'azure-storage'; +import * as mime from 'mime'; +import { CosmosClient } from '@azure/cosmos'; +import { retry } from './retry'; + +interface Asset { + platform: string; + type: string; + url: string; + mooncakeUrl?: string; + hash: string; + sha256hash: string; + size: number; + supportsFastUpdate?: boolean; +} + +if (process.argv.length !== 8) { + console.error('Usage: node createAsset.js PRODUCT OS ARCH TYPE NAME FILE'); + process.exit(-1); +} + +// Contains all of the logic for mapping details to our actual product names in CosmosDB +function getPlatform(product: string, os: string, arch: string, type: string): string { + switch (os) { + case 'win32': + switch (product) { + case 'client': + const asset = arch === 'ia32' ? 'win32' : `win32-${arch}`; + switch (type) { + case 'archive': + return `${asset}-archive`; + case 'setup': + return asset; + case 'user-setup': + return `${asset}-user`; + default: + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } + case 'server': + if (arch === 'arm64') { + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } + return arch === 'ia32' ? 'server-win32' : `server-win32-${arch}`; + case 'web': + if (arch === 'arm64') { + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } + return arch === 'ia32' ? 'server-win32-web' : `server-win32-${arch}-web`; + default: + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } + case 'linux': + switch (type) { + case 'snap': + return `linux-snap-${arch}`; + case 'archive-unsigned': + switch (product) { + case 'client': + return `linux-${arch}`; + case 'server': + return `server-linux-${arch}`; + case 'web': + return arch === 'standalone' ? 'web-standalone' : `server-linux-${arch}-web`; + default: + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } + case 'deb-package': + return `linux-deb-${arch}`; + case 'rpm-package': + return `linux-rpm-${arch}`; + default: + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } + case 'darwin': + switch (product) { + case 'client': + if (arch === 'x64') { + return 'darwin'; + } + return `darwin-${arch}`; + case 'server': + return 'server-darwin'; + case 'web': + if (arch !== 'x64') { + throw `What should the platform be?: ${product} ${os} ${arch} ${type}`; + } + return 'server-darwin-web'; + default: + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } + default: + throw `Unrecognized: ${product} ${os} ${arch} ${type}`; + } +} + +// Contains all of the logic for mapping types to our actual types in CosmosDB +function getRealType(type: string) { + switch (type) { + case 'user-setup': + return 'setup'; + case 'deb-package': + case 'rpm-package': + return 'package'; + default: + return type; + } +} + +function hashStream(hashName: string, stream: Readable): Promise { + return new Promise((c, e) => { + const shasum = crypto.createHash(hashName); + + stream + .on('data', shasum.update.bind(shasum)) + .on('error', e) + .on('close', () => c(shasum.digest('hex'))); + }); +} + +async function doesAssetExist(blobService: azure.BlobService, quality: string, blobName: string): Promise { + const existsResult = await new Promise((c, e) => blobService.doesBlobExist(quality, blobName, (err, r) => err ? e(err) : c(r))); + return existsResult.exists; +} + +async function uploadBlob(blobService: azure.BlobService, quality: string, blobName: string, filePath: string, fileName: string): Promise { + const blobOptions: azure.BlobService.CreateBlockBlobRequestOptions = { + contentSettings: { + contentType: mime.lookup(filePath), + contentDisposition: `attachment; filename="${fileName}"`, + cacheControl: 'max-age=31536000, public' + } + }; + + await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, filePath, blobOptions, err => err ? e(err) : c())); +} + +function getEnv(name: string): string { + const result = process.env[name]; + + if (typeof result === 'undefined') { + throw new Error('Missing env: ' + name); + } + + return result; +} + +async function main(): Promise { + const [, , product, os, arch, unprocessedType, fileName, filePath] = process.argv; + // getPlatform needs the unprocessedType + const platform = getPlatform(product, os, arch, unprocessedType); + const type = getRealType(unprocessedType); + const quality = getEnv('VSCODE_QUALITY'); + const commit = getEnv('BUILD_SOURCEVERSION'); + + console.log('Creating asset...'); + + const stat = await new Promise((c, e) => fs.stat(filePath, (err, stat) => err ? e(err) : c(stat))); + const size = stat.size; + + console.log('Size:', size); + + const stream = fs.createReadStream(filePath); + const [sha1hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]); + + console.log('SHA1:', sha1hash); + console.log('SHA256:', sha256hash); + + const blobName = commit + '/' + fileName; + const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']!; + + const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!) + .withFilter(new azure.ExponentialRetryPolicyFilter(20)); + + const blobExists = await doesAssetExist(blobService, quality, blobName); + + if (blobExists) { + console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`); + return; + } + + const mooncakeBlobService = azure.createBlobService(storageAccount, process.env['MOONCAKE_STORAGE_ACCESS_KEY']!, `${storageAccount}.blob.core.chinacloudapi.cn`) + .withFilter(new azure.ExponentialRetryPolicyFilter(20)); + + // mooncake is fussy and far away, this is needed! + blobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000; + mooncakeBlobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000; + + console.log('Uploading blobs to Azure storage and Mooncake Azure storage...'); + + await retry(() => Promise.all([ + uploadBlob(blobService, quality, blobName, filePath, fileName), + uploadBlob(mooncakeBlobService, quality, blobName, filePath, fileName) + ])); + + console.log('Blobs successfully uploaded.'); + + // TODO: Understand if blobName and blobPath are the same and replace blobPath with blobName if so. + const assetUrl = `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`; + const blobPath = url.parse(assetUrl).path; + const mooncakeUrl = `${process.env['MOONCAKE_CDN_URL']}${blobPath}`; + + const asset: Asset = { + platform, + type, + url: assetUrl, + hash: sha1hash, + mooncakeUrl, + sha256hash, + size + }; + + // Remove this if we ever need to rollback fast updates for windows + if (/win32/.test(platform)) { + asset.supportsFastUpdate = true; + } + + console.log('Asset:', JSON.stringify(asset, null, ' ')); + + const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] }); + const scripts = client.database('builds').container(quality).scripts; + await retry(() => scripts.storedProcedure('createAsset').execute('', [commit, asset, true])); + + console.log(` Done โœ”๏ธ`); +} + +main().then(() => { + console.log('Asset successfully created'); + process.exit(0); +}, err => { + console.error(err); + process.exit(1); +}); diff --git a/lib/vscode/build/azure-pipelines/common/createBuild.js b/build/azure-pipelines/common/createBuild.js similarity index 100% rename from lib/vscode/build/azure-pipelines/common/createBuild.js rename to build/azure-pipelines/common/createBuild.js diff --git a/lib/vscode/build/azure-pipelines/common/createBuild.ts b/build/azure-pipelines/common/createBuild.ts similarity index 100% rename from lib/vscode/build/azure-pipelines/common/createBuild.ts rename to build/azure-pipelines/common/createBuild.ts diff --git a/lib/vscode/build/azure-pipelines/common/extract-telemetry.sh b/build/azure-pipelines/common/extract-telemetry.sh similarity index 100% rename from lib/vscode/build/azure-pipelines/common/extract-telemetry.sh rename to build/azure-pipelines/common/extract-telemetry.sh diff --git a/lib/vscode/build/azure-pipelines/common/installPlaywright.js b/build/azure-pipelines/common/installPlaywright.js similarity index 100% rename from lib/vscode/build/azure-pipelines/common/installPlaywright.js rename to build/azure-pipelines/common/installPlaywright.js diff --git a/lib/vscode/build/azure-pipelines/common/installPlaywright.ts b/build/azure-pipelines/common/installPlaywright.ts similarity index 100% rename from lib/vscode/build/azure-pipelines/common/installPlaywright.ts rename to build/azure-pipelines/common/installPlaywright.ts diff --git a/lib/vscode/build/azure-pipelines/common/listNodeModules.js b/build/azure-pipelines/common/listNodeModules.js similarity index 100% rename from lib/vscode/build/azure-pipelines/common/listNodeModules.js rename to build/azure-pipelines/common/listNodeModules.js diff --git a/lib/vscode/build/azure-pipelines/common/listNodeModules.ts b/build/azure-pipelines/common/listNodeModules.ts similarity index 100% rename from lib/vscode/build/azure-pipelines/common/listNodeModules.ts rename to build/azure-pipelines/common/listNodeModules.ts diff --git a/lib/vscode/build/azure-pipelines/common/publish-webview.js b/build/azure-pipelines/common/publish-webview.js similarity index 100% rename from lib/vscode/build/azure-pipelines/common/publish-webview.js rename to build/azure-pipelines/common/publish-webview.js diff --git a/lib/vscode/build/azure-pipelines/common/publish-webview.sh b/build/azure-pipelines/common/publish-webview.sh similarity index 100% rename from lib/vscode/build/azure-pipelines/common/publish-webview.sh rename to build/azure-pipelines/common/publish-webview.sh diff --git a/lib/vscode/build/azure-pipelines/common/publish-webview.ts b/build/azure-pipelines/common/publish-webview.ts similarity index 100% rename from lib/vscode/build/azure-pipelines/common/publish-webview.ts rename to build/azure-pipelines/common/publish-webview.ts diff --git a/lib/vscode/build/azure-pipelines/common/releaseBuild.js b/build/azure-pipelines/common/releaseBuild.js similarity index 100% rename from lib/vscode/build/azure-pipelines/common/releaseBuild.js rename to build/azure-pipelines/common/releaseBuild.js diff --git a/lib/vscode/build/azure-pipelines/common/releaseBuild.ts b/build/azure-pipelines/common/releaseBuild.ts similarity index 100% rename from lib/vscode/build/azure-pipelines/common/releaseBuild.ts rename to build/azure-pipelines/common/releaseBuild.ts diff --git a/lib/vscode/build/azure-pipelines/common/retry.js b/build/azure-pipelines/common/retry.js similarity index 100% rename from lib/vscode/build/azure-pipelines/common/retry.js rename to build/azure-pipelines/common/retry.js diff --git a/lib/vscode/build/azure-pipelines/common/retry.ts b/build/azure-pipelines/common/retry.ts similarity index 100% rename from lib/vscode/build/azure-pipelines/common/retry.ts rename to build/azure-pipelines/common/retry.ts diff --git a/lib/vscode/build/azure-pipelines/common/telemetry-config.json b/build/azure-pipelines/common/telemetry-config.json similarity index 100% rename from lib/vscode/build/azure-pipelines/common/telemetry-config.json rename to build/azure-pipelines/common/telemetry-config.json diff --git a/lib/vscode/build/azure-pipelines/darwin/app-entitlements.plist b/build/azure-pipelines/darwin/app-entitlements.plist similarity index 100% rename from lib/vscode/build/azure-pipelines/darwin/app-entitlements.plist rename to build/azure-pipelines/darwin/app-entitlements.plist diff --git a/lib/vscode/build/azure-pipelines/darwin/helper-gpu-entitlements.plist b/build/azure-pipelines/darwin/helper-gpu-entitlements.plist similarity index 100% rename from lib/vscode/build/azure-pipelines/darwin/helper-gpu-entitlements.plist rename to build/azure-pipelines/darwin/helper-gpu-entitlements.plist diff --git a/lib/vscode/build/azure-pipelines/darwin/helper-renderer-entitlements.plist b/build/azure-pipelines/darwin/helper-renderer-entitlements.plist similarity index 100% rename from lib/vscode/build/azure-pipelines/darwin/helper-renderer-entitlements.plist rename to build/azure-pipelines/darwin/helper-renderer-entitlements.plist diff --git a/lib/vscode/build/azure-pipelines/darwin/product-build-darwin-sign.yml b/build/azure-pipelines/darwin/product-build-darwin-sign.yml similarity index 80% rename from lib/vscode/build/azure-pipelines/darwin/product-build-darwin-sign.yml rename to build/azure-pipelines/darwin/product-build-darwin-sign.yml index 4ad8349c51a8..49f74b55c933 100644 --- a/lib/vscode/build/azure-pipelines/darwin/product-build-darwin-sign.yml +++ b/build/azure-pipelines/darwin/product-build-darwin-sign.yml @@ -35,13 +35,13 @@ steps: displayName: Restore modules for just build folder and compile it - download: current - artifact: vscode-darwin-$(VSCODE_ARCH) + artifact: unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive displayName: Download $(VSCODE_ARCH) artifact - script: | set -e - unzip $(Pipeline.Workspace)/vscode-darwin-$(VSCODE_ARCH)/VSCode-darwin-$(VSCODE_ARCH).zip -d $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH) - mv $(Pipeline.Workspace)/vscode-darwin-$(VSCODE_ARCH)/VSCode-darwin-$(VSCODE_ARCH).zip $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH).zip + unzip $(Pipeline.Workspace)/unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive/VSCode-darwin-$(VSCODE_ARCH).zip -d $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH) + mv $(Pipeline.Workspace)/unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive/VSCode-darwin-$(VSCODE_ARCH).zip $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH).zip displayName: Unzip & move - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 @@ -108,22 +108,18 @@ steps: condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64')) - script: | - set -e - # For legacy purposes, arch for x64 is just 'darwin' case $VSCODE_ARCH in x64) ASSET_ID="darwin" ;; arm64) ASSET_ID="darwin-arm64" ;; universal) ASSET_ID="darwin-universal" ;; esac + echo "##vso[task.setvariable variable=ASSET_ID]$ASSET_ID" + displayName: Set asset id variable + + - script: mv $(agent.builddirectory)/VSCode-darwin-x64.zip $(agent.builddirectory)/VSCode-darwin.zip + displayName: Rename x64 build to it's legacy name + condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64')) - VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ - AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \ - AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \ - AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \ - node build/azure-pipelines/common/createAsset.js \ - "$ASSET_ID" \ - archive \ - "VSCode-$ASSET_ID.zip" \ - ../VSCode-darwin-$(VSCODE_ARCH).zip - displayName: Publish Clients + - publish: $(Agent.BuildDirectory)/VSCode-$(ASSET_ID).zip + artifact: vscode_client_darwin_$(VSCODE_ARCH)_archive diff --git a/lib/vscode/build/azure-pipelines/darwin/product-build-darwin.yml b/build/azure-pipelines/darwin/product-build-darwin.yml similarity index 92% rename from lib/vscode/build/azure-pipelines/darwin/product-build-darwin.yml rename to build/azure-pipelines/darwin/product-build-darwin.yml index 186920fe96d6..566eeb805229 100644 --- a/lib/vscode/build/azure-pipelines/darwin/product-build-darwin.yml +++ b/build/azure-pipelines/darwin/product-build-darwin.yml @@ -138,19 +138,19 @@ steps: condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'universal'), eq(variables['VSCODE_STEP_ON_IT'], 'false')) - download: current - artifact: vscode-darwin-x64 + artifact: unsigned_vscode_client_darwin_x64_archive displayName: Download x64 artifact condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'universal')) - download: current - artifact: vscode-darwin-arm64 + artifact: unsigned_vscode_client_darwin_arm64_archive displayName: Download arm64 artifact condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'universal')) - script: | set -e - cp $(Pipeline.Workspace)/vscode-darwin-x64/VSCode-darwin-x64.zip $(agent.builddirectory)/VSCode-darwin-x64.zip - cp $(Pipeline.Workspace)/vscode-darwin-arm64/VSCode-darwin-arm64.zip $(agent.builddirectory)/VSCode-darwin-arm64.zip + cp $(Pipeline.Workspace)/unsigned_vscode_client_darwin_x64_archive/VSCode-darwin-x64.zip $(agent.builddirectory)/VSCode-darwin-x64.zip + cp $(Pipeline.Workspace)/unsigned_vscode_client_darwin_arm64_archive/VSCode-darwin-arm64.zip $(agent.builddirectory)/VSCode-darwin-arm64.zip unzip $(agent.builddirectory)/VSCode-darwin-x64.zip -d $(agent.builddirectory)/VSCode-darwin-x64 unzip $(agent.builddirectory)/VSCode-darwin-arm64.zip -d $(agent.builddirectory)/VSCode-darwin-arm64 DEBUG=* node build/darwin/create-universal-app.js @@ -280,26 +280,27 @@ steps: - script: | set -e - VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ - AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \ - AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \ - AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \ - VSCODE_ARCH="$(VSCODE_ARCH)" ./build/azure-pipelines/darwin/publish-server.sh - displayName: Publish Servers + + # package Remote Extension Host + pushd .. && mv vscode-reh-darwin vscode-server-darwin && zip -Xry vscode-server-darwin.zip vscode-server-darwin && popd + + # package Remote Extension Host (Web) + pushd .. && mv vscode-reh-web-darwin vscode-server-darwin-web && zip -Xry vscode-server-darwin-web.zip vscode-server-darwin-web && popd + displayName: Prepare to publish servers condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), ne(variables['VSCODE_PUBLISH'], 'false')) - publish: $(Agent.BuildDirectory)/VSCode-darwin-$(VSCODE_ARCH).zip - artifact: vscode-darwin-$(VSCODE_ARCH) + artifact: unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive displayName: Publish client archive condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) - publish: $(Agent.BuildDirectory)/vscode-server-darwin.zip - artifact: vscode-server-darwin-$(VSCODE_ARCH) + artifact: vscode_server_darwin_$(VSCODE_ARCH)_archive-unsigned displayName: Publish server archive condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), ne(variables['VSCODE_PUBLISH'], 'false')) - publish: $(Agent.BuildDirectory)/vscode-server-darwin-web.zip - artifact: vscode-server-darwin-$(VSCODE_ARCH)-web + artifact: vscode_web_darwin_$(VSCODE_ARCH)_archive-unsigned displayName: Publish web server archive condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), ne(variables['VSCODE_PUBLISH'], 'false')) @@ -308,5 +309,5 @@ steps: VSCODE_ARCH="$(VSCODE_ARCH)" \ yarn gulp upload-vscode-configuration displayName: Upload configuration (for Bing settings search) - condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64')) + condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), ne(variables['VSCODE_PUBLISH'], 'false')) continueOnError: true diff --git a/lib/vscode/build/azure-pipelines/distro-build.yml b/build/azure-pipelines/distro-build.yml similarity index 100% rename from lib/vscode/build/azure-pipelines/distro-build.yml rename to build/azure-pipelines/distro-build.yml diff --git a/lib/vscode/build/azure-pipelines/exploration-build.yml b/build/azure-pipelines/exploration-build.yml similarity index 100% rename from lib/vscode/build/azure-pipelines/exploration-build.yml rename to build/azure-pipelines/exploration-build.yml diff --git a/lib/vscode/build/azure-pipelines/linux/.gitignore b/build/azure-pipelines/linux/.gitignore similarity index 100% rename from lib/vscode/build/azure-pipelines/linux/.gitignore rename to build/azure-pipelines/linux/.gitignore diff --git a/lib/vscode/build/azure-pipelines/linux/alpine/install-dependencies.sh b/build/azure-pipelines/linux/alpine/install-dependencies.sh similarity index 100% rename from lib/vscode/build/azure-pipelines/linux/alpine/install-dependencies.sh rename to build/azure-pipelines/linux/alpine/install-dependencies.sh diff --git a/build/azure-pipelines/linux/prepare-publish.sh b/build/azure-pipelines/linux/prepare-publish.sh new file mode 100755 index 000000000000..891fa8024ef5 --- /dev/null +++ b/build/azure-pipelines/linux/prepare-publish.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +set -e +REPO="$(pwd)" +ROOT="$REPO/.." + +# Publish tarball +PLATFORM_LINUX="linux-$VSCODE_ARCH" +BUILDNAME="VSCode-$PLATFORM_LINUX" +BUILD_VERSION="$(date +%s)" +[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$VSCODE_ARCH-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$VSCODE_ARCH-$BUILD_VERSION.tar.gz" +TARBALL_PATH="$ROOT/$TARBALL_FILENAME" + +rm -rf $ROOT/code-*.tar.* +(cd $ROOT && tar -czf $TARBALL_PATH $BUILDNAME) + +# Publish Remote Extension Host +LEGACY_SERVER_BUILD_NAME="vscode-reh-$PLATFORM_LINUX" +SERVER_BUILD_NAME="vscode-server-$PLATFORM_LINUX" +SERVER_TARBALL_FILENAME="vscode-server-$PLATFORM_LINUX.tar.gz" +SERVER_TARBALL_PATH="$ROOT/$SERVER_TARBALL_FILENAME" + +rm -rf $ROOT/vscode-server-*.tar.* +(cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME) + +# Publish Remote Extension Host (Web) +LEGACY_SERVER_BUILD_NAME="vscode-reh-web-$PLATFORM_LINUX" +SERVER_BUILD_NAME="vscode-server-$PLATFORM_LINUX-web" +SERVER_TARBALL_FILENAME="vscode-server-$PLATFORM_LINUX-web.tar.gz" +SERVER_TARBALL_PATH="$ROOT/$SERVER_TARBALL_FILENAME" + +rm -rf $ROOT/vscode-server-*-web.tar.* +(cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME) + +# Publish DEB +case $VSCODE_ARCH in + x64) DEB_ARCH="amd64" ;; + *) DEB_ARCH="$VSCODE_ARCH" ;; +esac + +PLATFORM_DEB="linux-deb-$VSCODE_ARCH" +DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)" +DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME" + +# Publish RPM +case $VSCODE_ARCH in + x64) RPM_ARCH="x86_64" ;; + armhf) RPM_ARCH="armv7hl" ;; + arm64) RPM_ARCH="aarch64" ;; + *) RPM_ARCH="$VSCODE_ARCH" ;; +esac + +PLATFORM_RPM="linux-rpm-$VSCODE_ARCH" +RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)" +RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME" + +# Publish Snap +# Pack snap tarball artifact, in order to preserve file perms +mkdir -p $REPO/.build/linux/snap-tarball +SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-$VSCODE_ARCH.tar.gz" +rm -rf $SNAP_TARBALL_PATH +(cd .build/linux && tar -czf $SNAP_TARBALL_PATH snap) + +# Export DEB_PATH, RPM_PATH +echo "##vso[task.setvariable variable=DEB_PATH]$DEB_PATH" +echo "##vso[task.setvariable variable=RPM_PATH]$RPM_PATH" +echo "##vso[task.setvariable variable=TARBALL_PATH]$TARBALL_PATH" diff --git a/lib/vscode/build/azure-pipelines/linux/product-build-alpine.yml b/build/azure-pipelines/linux/product-build-alpine.yml similarity index 77% rename from lib/vscode/build/azure-pipelines/linux/product-build-alpine.yml rename to build/azure-pipelines/linux/product-build-alpine.yml index 8376c079ce88..ed0c35346c70 100644 --- a/lib/vscode/build/azure-pipelines/linux/product-build-alpine.yml +++ b/build/azure-pipelines/linux/product-build-alpine.yml @@ -117,19 +117,37 @@ steps: - script: | set -e - AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \ - AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \ - VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ - ./build/azure-pipelines/linux/alpine/publish.sh - displayName: Publish + REPO="$(pwd)" + ROOT="$REPO/.." + + PLATFORM_LINUX="linux-alpine" + + # Publish Remote Extension Host + LEGACY_SERVER_BUILD_NAME="vscode-reh-$PLATFORM_LINUX" + SERVER_BUILD_NAME="vscode-server-$PLATFORM_LINUX" + SERVER_TARBALL_FILENAME="vscode-server-$PLATFORM_LINUX.tar.gz" + SERVER_TARBALL_PATH="$ROOT/$SERVER_TARBALL_FILENAME" + + rm -rf $ROOT/vscode-server-*.tar.* + (cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME) + + # Publish Remote Extension Host (Web) + LEGACY_SERVER_BUILD_NAME="vscode-reh-web-$PLATFORM_LINUX" + SERVER_BUILD_NAME="vscode-server-$PLATFORM_LINUX-web" + SERVER_TARBALL_FILENAME="vscode-server-$PLATFORM_LINUX-web.tar.gz" + SERVER_TARBALL_PATH="$ROOT/$SERVER_TARBALL_FILENAME" + + rm -rf $ROOT/vscode-server-*-web.tar.* + (cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME) + displayName: Prepare for publish condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) - publish: $(Agent.BuildDirectory)/vscode-server-linux-alpine.tar.gz - artifact: vscode-server-linux-alpine + artifact: vscode_server_linux_alpine_archive-unsigned displayName: Publish server archive condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) - publish: $(Agent.BuildDirectory)/vscode-server-linux-alpine-web.tar.gz - artifact: vscode-server-linux-alpine-web + artifact: vscode_web_linux_alpine_archive-unsigned displayName: Publish web server archive condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) diff --git a/lib/vscode/build/azure-pipelines/linux/product-build-linux.yml b/build/azure-pipelines/linux/product-build-linux.yml similarity index 94% rename from lib/vscode/build/azure-pipelines/linux/product-build-linux.yml rename to build/azure-pipelines/linux/product-build-linux.yml index cb06bf6a7249..8181083d1f25 100644 --- a/lib/vscode/build/azure-pipelines/linux/product-build-linux.yml +++ b/build/azure-pipelines/linux/product-build-linux.yml @@ -245,27 +245,32 @@ steps: AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \ VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ VSCODE_ARCH="$(VSCODE_ARCH)" \ - ./build/azure-pipelines/linux/publish.sh - displayName: Publish + ./build/azure-pipelines/linux/prepare-publish.sh + displayName: Prepare for Publish condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) - publish: $(DEB_PATH) - artifact: vscode-linux-deb-$(VSCODE_ARCH) + artifact: vscode_client_linux_$(VSCODE_ARCH)_deb-package displayName: Publish deb package condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) - publish: $(RPM_PATH) - artifact: vscode-linux-rpm-$(VSCODE_ARCH) + artifact: vscode_client_linux_$(VSCODE_ARCH)_rpm-package displayName: Publish rpm package condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) + - publish: $(TARBALL_PATH) + artifact: vscode_client_linux_$(VSCODE_ARCH)_archive-unsigned + displayName: Publish client archive + condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) + - publish: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH).tar.gz - artifact: vscode-server-linux-$(VSCODE_ARCH) + artifact: vscode_server_linux_$(VSCODE_ARCH)_archive-unsigned displayName: Publish server archive condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) - publish: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH)-web.tar.gz - artifact: vscode-server-linux-$(VSCODE_ARCH)-web + artifact: vscode_web_linux_$(VSCODE_ARCH)_archive-unsigned displayName: Publish web server archive condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) diff --git a/lib/vscode/build/azure-pipelines/linux/snap-build-linux.yml b/build/azure-pipelines/linux/snap-build-linux.yml similarity index 84% rename from lib/vscode/build/azure-pipelines/linux/snap-build-linux.yml rename to build/azure-pipelines/linux/snap-build-linux.yml index f5e0288f0b92..f7af900e1d0d 100644 --- a/lib/vscode/build/azure-pipelines/linux/snap-build-linux.yml +++ b/build/azure-pipelines/linux/snap-build-linux.yml @@ -50,15 +50,11 @@ steps: esac (cd $SNAP_ROOT/code-* && sudo --preserve-env snapcraft prime $SNAPCRAFT_TARGET_ARGS && snap pack prime --compression=lzo --filename="$SNAP_PATH") - # Publish snap package - AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \ - AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \ - node build/azure-pipelines/common/createAsset.js "linux-snap-$(VSCODE_ARCH)" package "$SNAP_FILENAME" "$SNAP_PATH" - # Export SNAP_PATH echo "##vso[task.setvariable variable=SNAP_PATH]$SNAP_PATH" + displayName: Prepare for publish - publish: $(SNAP_PATH) - artifact: vscode-linux-snap-$(VSCODE_ARCH) + artifact: vscode_client_linux_$(VSCODE_ARCH)_snap displayName: Publish snap package condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) diff --git a/lib/vscode/build/azure-pipelines/linux/xvfb.init b/build/azure-pipelines/linux/xvfb.init similarity index 100% rename from lib/vscode/build/azure-pipelines/linux/xvfb.init rename to build/azure-pipelines/linux/xvfb.init diff --git a/lib/vscode/build/azure-pipelines/mixin.js b/build/azure-pipelines/mixin.js similarity index 100% rename from lib/vscode/build/azure-pipelines/mixin.js rename to build/azure-pipelines/mixin.js diff --git a/lib/vscode/build/azure-pipelines/mixin.ts b/build/azure-pipelines/mixin.ts similarity index 100% rename from lib/vscode/build/azure-pipelines/mixin.ts rename to build/azure-pipelines/mixin.ts diff --git a/lib/vscode/build/azure-pipelines/product-build.yml b/build/azure-pipelines/product-build.yml similarity index 89% rename from lib/vscode/build/azure-pipelines/product-build.yml rename to build/azure-pipelines/product-build.yml index fd698a0e7dfc..2c475b9deddd 100644 --- a/lib/vscode/build/azure-pipelines/product-build.yml +++ b/build/azure-pipelines/product-build.yml @@ -86,6 +86,8 @@ variables: value: ${{ eq(parameters.ENABLE_TERRAPIN, true) }} - name: VSCODE_QUALITY value: ${{ parameters.VSCODE_QUALITY }} + - name: VSCODE_RELEASE + value: ${{ parameters.VSCODE_RELEASE }} - name: VSCODE_BUILD_STAGE_WINDOWS value: ${{ or(eq(parameters.VSCODE_BUILD_WIN32, true), eq(parameters.VSCODE_BUILD_WIN32_32BIT, true), eq(parameters.VSCODE_BUILD_WIN32_ARM64, true)) }} - name: VSCODE_BUILD_STAGE_LINUX @@ -301,37 +303,30 @@ stages: steps: - template: darwin/product-build-darwin-sign.yml - - ${{ if and(eq(variables['VSCODE_PUBLISH'], true), eq(parameters.VSCODE_COMPILE_ONLY, false)) }}: - - stage: Mooncake + - ${{ if and(eq(parameters.VSCODE_COMPILE_ONLY, false), ne(variables['VSCODE_PUBLISH'], 'false')) }}: + - stage: Publish dependsOn: - - ${{ if eq(variables['VSCODE_BUILD_STAGE_WINDOWS'], true) }}: - - Windows - - ${{ if eq(variables['VSCODE_BUILD_STAGE_LINUX'], true) }}: - - Linux - - ${{ if eq(variables['VSCODE_BUILD_STAGE_MACOS'], true) }}: - - macOS - condition: succeededOrFailed() + - Compile pool: vmImage: "Ubuntu-18.04" + variables: + - name: BUILDS_API_URL + value: $(System.CollectionUri)$(System.TeamProject)/_apis/build/builds/$(Build.BuildId)/ jobs: - - job: SyncMooncake - displayName: Sync Mooncake + - job: PublishBuild + timeoutInMinutes: 180 + displayName: Publish Build steps: - - template: sync-mooncake.yml + - template: product-publish.yml - - ${{ if and(eq(parameters.VSCODE_COMPILE_ONLY, false), or(eq(parameters.VSCODE_RELEASE, true), and(in(parameters.VSCODE_QUALITY, 'insider', 'exploration'), eq(variables['VSCODE_SCHEDULEDBUILD'], true)))) }}: - - stage: Release - dependsOn: - - ${{ if eq(variables['VSCODE_BUILD_STAGE_WINDOWS'], true) }}: - - Windows - - ${{ if eq(variables['VSCODE_BUILD_STAGE_LINUX'], true) }}: - - Linux - - ${{ if eq(variables['VSCODE_BUILD_STAGE_MACOS'], true) }}: - - macOS - pool: - vmImage: "Ubuntu-18.04" - jobs: - - job: ReleaseBuild - displayName: Release Build - steps: - - template: release.yml + - ${{ if or(eq(parameters.VSCODE_RELEASE, true), and(in(parameters.VSCODE_QUALITY, 'insider', 'exploration'), eq(variables['VSCODE_SCHEDULEDBUILD'], true))) }}: + - stage: Release + dependsOn: + - Publish + pool: + vmImage: "Ubuntu-18.04" + jobs: + - job: ReleaseBuild + displayName: Release Build + steps: + - template: product-release.yml diff --git a/lib/vscode/build/azure-pipelines/product-compile.yml b/build/azure-pipelines/product-compile.yml similarity index 93% rename from lib/vscode/build/azure-pipelines/product-compile.yml rename to build/azure-pipelines/product-compile.yml index 52c7758cfdee..18c17639b830 100644 --- a/lib/vscode/build/azure-pipelines/product-compile.yml +++ b/build/azure-pipelines/product-compile.yml @@ -118,14 +118,6 @@ steps: displayName: Publish Webview condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) - - script: | - set -e - VERSION=`node -p "require(\"./package.json\").version"` - AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \ - node build/azure-pipelines/common/createBuild.js $VERSION - displayName: Create build - condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) - # we gotta tarball everything in order to preserve file permissions - script: | set -e diff --git a/build/azure-pipelines/product-publish.ps1 b/build/azure-pipelines/product-publish.ps1 new file mode 100644 index 000000000000..339002ab0c17 --- /dev/null +++ b/build/azure-pipelines/product-publish.ps1 @@ -0,0 +1,114 @@ +. build/azure-pipelines/win32/exec.ps1 +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' +$ARTIFACT_PROCESSED_WILDCARD_PATH = "$env:PIPELINE_WORKSPACE/artifacts_processed_*/artifacts_processed_*" +$ARTIFACT_PROCESSED_FILE_PATH = "$env:PIPELINE_WORKSPACE/artifacts_processed_$env:SYSTEM_STAGEATTEMPT/artifacts_processed_$env:SYSTEM_STAGEATTEMPT.txt" + +function Get-PipelineArtifact { + param($Name = '*') + try { + $res = Invoke-RestMethod "$($env:BUILDS_API_URL)artifacts?api-version=6.0" -Headers @{ + Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN" + } -MaximumRetryCount 5 -RetryIntervalSec 1 + + if (!$res) { + return + } + + $res.value | Where-Object { $_.name -Like $Name } + } catch { + Write-Warning $_ + } +} + +# This set will keep track of which artifacts have already been processed +$set = [System.Collections.Generic.HashSet[string]]::new() + +if (Test-Path $ARTIFACT_PROCESSED_WILDCARD_PATH) { + # Grab the latest artifact_processed text file and load all assets already processed from that. + # This means that the latest artifact_processed_*.txt file has all of the contents of the previous ones. + # Note: The kusto-like syntax only works in PS7+ and only in scripts, not at the REPL. + Get-ChildItem $ARTIFACT_PROCESSED_WILDCARD_PATH + | Sort-Object + | Select-Object -Last 1 + | Get-Content + | ForEach-Object { + $set.Add($_) | Out-Null + Write-Host "Already processed artifact: $_" + } +} + +# Create the artifact file that will be used for this run +New-Item -Path $ARTIFACT_PROCESSED_FILE_PATH -Force | Out-Null + +# Determine which stages we need to watch +$stages = @( + if ($env:VSCODE_BUILD_STAGE_WINDOWS -eq 'True') { 'Windows' } + if ($env:VSCODE_BUILD_STAGE_LINUX -eq 'True') { 'Linux' } + if ($env:VSCODE_BUILD_STAGE_MACOS -eq 'True') { 'macOS' } +) + +do { + Start-Sleep -Seconds 10 + + $artifacts = Get-PipelineArtifact -Name 'vscode_*' + if (!$artifacts) { + continue + } + + $artifacts | ForEach-Object { + $artifactName = $_.name + if($set.Add($artifactName)) { + Write-Host "Processing artifact: '$artifactName. Downloading from: $($_.resource.downloadUrl)" + + try { + Invoke-RestMethod $_.resource.downloadUrl -OutFile "$env:AGENT_TEMPDIRECTORY/$artifactName.zip" -Headers @{ + Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN" + } -MaximumRetryCount 5 -RetryIntervalSec 1 | Out-Null + + Expand-Archive -Path "$env:AGENT_TEMPDIRECTORY/$artifactName.zip" -DestinationPath $env:AGENT_TEMPDIRECTORY | Out-Null + } catch { + Write-Warning $_ + $set.Remove($artifactName) | Out-Null + continue + } + + $null,$product,$os,$arch,$type = $artifactName -split '_' + $asset = Get-ChildItem -rec "$env:AGENT_TEMPDIRECTORY/$artifactName" + Write-Host "Processing artifact with the following values:" + # turning in into an object just to log nicely + @{ + product = $product + os = $os + arch = $arch + type = $type + asset = $asset.Name + } | Format-Table + + exec { node build/azure-pipelines/common/createAsset.js $product $os $arch $type $asset.Name $asset.FullName } + $artifactName >> $ARTIFACT_PROCESSED_FILE_PATH + } + } + + # Get the timeline and see if it says the other stage completed + try { + $timeline = Invoke-RestMethod "$($env:BUILDS_API_URL)timeline?api-version=6.0" -Headers @{ + Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN" + } -MaximumRetryCount 5 -RetryIntervalSec 1 + } catch { + Write-Warning $_ + continue + } + + foreach ($stage in $stages) { + $otherStageFinished = $timeline.records | Where-Object { $_.name -eq $stage -and $_.type -eq 'stage' -and $_.state -eq 'completed' } + if (!$otherStageFinished) { + break + } + } + + $artifacts = Get-PipelineArtifact -Name 'vscode_*' + $artifactsStillToProcess = $artifacts.Count -ne $set.Count +} while (!$otherStageFinished -or $artifactsStillToProcess) + +Write-Host "Processed $($set.Count) artifacts." diff --git a/build/azure-pipelines/product-publish.yml b/build/azure-pipelines/product-publish.yml new file mode 100644 index 000000000000..de8cb216b8a1 --- /dev/null +++ b/build/azure-pipelines/product-publish.yml @@ -0,0 +1,89 @@ +steps: + - task: NodeTool@0 + inputs: + versionSpec: "12.x" + + - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 + inputs: + versionSpec: "1.x" + + - task: AzureKeyVault@1 + displayName: "Azure Key Vault: Get Secrets" + inputs: + azureSubscription: "vscode-builds-subscription" + KeyVaultName: vscode + + - pwsh: | + . build/azure-pipelines/win32/exec.ps1 + cd build + exec { yarn } + displayName: Install dependencies + + - download: current + patterns: '**/artifacts_processed_*.txt' + displayName: Download all artifacts_processed text files + + - pwsh: | + . build/azure-pipelines/win32/exec.ps1 + + if (Test-Path "$(Pipeline.Workspace)/artifacts_processed_*/artifacts_processed_*.txt") { + Write-Host "Artifacts already processed so a build must have already been created." + return + } + + $env:AZURE_DOCUMENTDB_MASTERKEY = "$(builds-docdb-key-readwrite)" + $VERSION = node -p "require('./package.json').version" + Write-Host "Creating build with version: $VERSION" + exec { node build/azure-pipelines/common/createBuild.js $VERSION } + displayName: Create build if it hasn't been created before + + - pwsh: | + $env:VSCODE_MIXIN_PASSWORD = "$(github-distro-mixin-password)" + $env:AZURE_DOCUMENTDB_MASTERKEY = "$(builds-docdb-key-readwrite)" + $env:AZURE_STORAGE_ACCESS_KEY = "$(ticino-storage-key)" + $env:AZURE_STORAGE_ACCESS_KEY_2 = "$(vscode-storage-key)" + $env:MOONCAKE_STORAGE_ACCESS_KEY = "$(vscode-mooncake-storage-key)" + build/azure-pipelines/product-publish.ps1 + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + displayName: Process artifacts + + - publish: $(Pipeline.Workspace)/artifacts_processed_$(System.StageAttempt)/artifacts_processed_$(System.StageAttempt).txt + artifact: artifacts_processed_$(System.StageAttempt) + displayName: Publish what artifacts were published for this stage attempt + + - pwsh: | + $ErrorActionPreference = 'Stop' + + # Determine which stages we need to watch + $stages = @( + if ($env:VSCODE_BUILD_STAGE_WINDOWS -eq 'True') { 'Windows' } + if ($env:VSCODE_BUILD_STAGE_LINUX -eq 'True') { 'Linux' } + if ($env:VSCODE_BUILD_STAGE_MACOS -eq 'True') { 'macOS' } + ) + Write-Host "Stages to check: $stages" + + # Get the timeline and see if it says the other stage completed + $timeline = Invoke-RestMethod "$($env:BUILDS_API_URL)timeline?api-version=6.0" -Headers @{ + Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN" + } -MaximumRetryCount 5 -RetryIntervalSec 1 + + $failedStages = @() + foreach ($stage in $stages) { + $didStageFail = $timeline.records | Where-Object { + $_.name -eq $stage -and $_.type -eq 'stage' -and $_.result -ne 'succeeded' -and $_.result -ne 'succeededWithIssues' + } + + if($didStageFail) { + $failedStages += $stage + } else { + Write-Host "'$stage' did not fail." + } + } + + if ($failedStages.Length) { + throw "Failed stages: $($failedStages -join ', '). This stage will now fail so that it is easier to retry failed jobs." + } + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + displayName: Determine if stage should succeed diff --git a/lib/vscode/build/azure-pipelines/release.yml b/build/azure-pipelines/product-release.yml similarity index 100% rename from lib/vscode/build/azure-pipelines/release.yml rename to build/azure-pipelines/product-release.yml diff --git a/lib/vscode/build/azure-pipelines/publish-types/check-version.js b/build/azure-pipelines/publish-types/check-version.js similarity index 100% rename from lib/vscode/build/azure-pipelines/publish-types/check-version.js rename to build/azure-pipelines/publish-types/check-version.js diff --git a/lib/vscode/build/azure-pipelines/publish-types/check-version.ts b/build/azure-pipelines/publish-types/check-version.ts similarity index 100% rename from lib/vscode/build/azure-pipelines/publish-types/check-version.ts rename to build/azure-pipelines/publish-types/check-version.ts diff --git a/lib/vscode/build/azure-pipelines/publish-types/publish-types.yml b/build/azure-pipelines/publish-types/publish-types.yml similarity index 100% rename from lib/vscode/build/azure-pipelines/publish-types/publish-types.yml rename to build/azure-pipelines/publish-types/publish-types.yml diff --git a/lib/vscode/build/azure-pipelines/publish-types/update-types.js b/build/azure-pipelines/publish-types/update-types.js similarity index 100% rename from lib/vscode/build/azure-pipelines/publish-types/update-types.js rename to build/azure-pipelines/publish-types/update-types.js diff --git a/lib/vscode/build/azure-pipelines/publish-types/update-types.ts b/build/azure-pipelines/publish-types/update-types.ts similarity index 100% rename from lib/vscode/build/azure-pipelines/publish-types/update-types.ts rename to build/azure-pipelines/publish-types/update-types.ts diff --git a/lib/vscode/build/azure-pipelines/upload-cdn.js b/build/azure-pipelines/upload-cdn.js similarity index 100% rename from lib/vscode/build/azure-pipelines/upload-cdn.js rename to build/azure-pipelines/upload-cdn.js diff --git a/lib/vscode/build/azure-pipelines/upload-cdn.ts b/build/azure-pipelines/upload-cdn.ts similarity index 100% rename from lib/vscode/build/azure-pipelines/upload-cdn.ts rename to build/azure-pipelines/upload-cdn.ts diff --git a/lib/vscode/build/azure-pipelines/upload-sourcemaps.js b/build/azure-pipelines/upload-sourcemaps.js similarity index 100% rename from lib/vscode/build/azure-pipelines/upload-sourcemaps.js rename to build/azure-pipelines/upload-sourcemaps.js diff --git a/lib/vscode/build/azure-pipelines/upload-sourcemaps.ts b/build/azure-pipelines/upload-sourcemaps.ts similarity index 100% rename from lib/vscode/build/azure-pipelines/upload-sourcemaps.ts rename to build/azure-pipelines/upload-sourcemaps.ts diff --git a/lib/vscode/build/azure-pipelines/web/product-build-web.yml b/build/azure-pipelines/web/product-build-web.yml similarity index 90% rename from lib/vscode/build/azure-pipelines/web/product-build-web.yml rename to build/azure-pipelines/web/product-build-web.yml index 772fe1c05abd..45dedea1b4c6 100644 --- a/lib/vscode/build/azure-pipelines/web/product-build-web.yml +++ b/build/azure-pipelines/web/product-build-web.yml @@ -119,13 +119,19 @@ steps: - script: | set -e - AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \ - AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \ - VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ - ./build/azure-pipelines/web/publish.sh - displayName: Publish + REPO="$(pwd)" + ROOT="$REPO/.." + + WEB_BUILD_NAME="vscode-web" + WEB_TARBALL_FILENAME="vscode-web.tar.gz" + WEB_TARBALL_PATH="$ROOT/$WEB_TARBALL_FILENAME" + + rm -rf $ROOT/vscode-web.tar.* + + cd $ROOT && tar --owner=0 --group=0 -czf $WEB_TARBALL_PATH $WEB_BUILD_NAME + displayName: Prepare for publish - publish: $(Agent.BuildDirectory)/vscode-web.tar.gz - artifact: vscode-web-standalone + artifact: vscode_web_linux_standalone_archive-unsigned displayName: Publish web archive condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) diff --git a/lib/vscode/build/azure-pipelines/win32/ESRPClient/NuGet.config b/build/azure-pipelines/win32/ESRPClient/NuGet.config similarity index 100% rename from lib/vscode/build/azure-pipelines/win32/ESRPClient/NuGet.config rename to build/azure-pipelines/win32/ESRPClient/NuGet.config diff --git a/lib/vscode/build/azure-pipelines/win32/ESRPClient/packages.config b/build/azure-pipelines/win32/ESRPClient/packages.config similarity index 100% rename from lib/vscode/build/azure-pipelines/win32/ESRPClient/packages.config rename to build/azure-pipelines/win32/ESRPClient/packages.config diff --git a/lib/vscode/build/azure-pipelines/win32/exec.ps1 b/build/azure-pipelines/win32/exec.ps1 similarity index 100% rename from lib/vscode/build/azure-pipelines/win32/exec.ps1 rename to build/azure-pipelines/win32/exec.ps1 diff --git a/lib/vscode/build/azure-pipelines/win32/import-esrp-auth-cert.ps1 b/build/azure-pipelines/win32/import-esrp-auth-cert.ps1 similarity index 100% rename from lib/vscode/build/azure-pipelines/win32/import-esrp-auth-cert.ps1 rename to build/azure-pipelines/win32/import-esrp-auth-cert.ps1 diff --git a/build/azure-pipelines/win32/prepare-publish.ps1 b/build/azure-pipelines/win32/prepare-publish.ps1 new file mode 100644 index 000000000000..f80e1ca0ce9a --- /dev/null +++ b/build/azure-pipelines/win32/prepare-publish.ps1 @@ -0,0 +1,43 @@ +. build/azure-pipelines/win32/exec.ps1 +$ErrorActionPreference = "Stop" + +$Arch = "$env:VSCODE_ARCH" + +exec { yarn gulp "vscode-win32-$Arch-archive" "vscode-win32-$Arch-system-setup" "vscode-win32-$Arch-user-setup" --sign } + +$Repo = "$(pwd)" +$Root = "$Repo\.." +$SystemExe = "$Repo\.build\win32-$Arch\system-setup\VSCodeSetup.exe" +$UserExe = "$Repo\.build\win32-$Arch\user-setup\VSCodeSetup.exe" +$Zip = "$Repo\.build\win32-$Arch\archive\VSCode-win32-$Arch.zip" +$LegacyServer = "$Root\vscode-reh-win32-$Arch" +$Server = "$Root\vscode-server-win32-$Arch" +$ServerZip = "$Repo\.build\vscode-server-win32-$Arch.zip" +$LegacyWeb = "$Root\vscode-reh-web-win32-$Arch" +$Web = "$Root\vscode-server-win32-$Arch-web" +$WebZip = "$Repo\.build\vscode-server-win32-$Arch-web.zip" +$Build = "$Root\VSCode-win32-$Arch" + +# Create server archive +if ("$Arch" -ne "arm64") { + exec { xcopy $LegacyServer $Server /H /E /I } + exec { .\node_modules\7zip\7zip-lite\7z.exe a -tzip $ServerZip $Server -r } + exec { xcopy $LegacyWeb $Web /H /E /I } + exec { .\node_modules\7zip\7zip-lite\7z.exe a -tzip $WebZip $Web -r } +} + +# get version +$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json +$Version = $PackageJson.version + +$ARCHIVE_NAME = "VSCode-win32-$Arch-$Version.zip" +$SYSTEM_SETUP_NAME = "VSCodeSetup-$Arch-$Version.exe" +$USER_SETUP_NAME = "VSCodeUserSetup-$Arch-$Version.exe" + +# Set variables for upload +Move-Item $Zip "$Repo\.build\win32-$Arch\archive\$ARCHIVE_NAME" +Write-Host "##vso[task.setvariable variable=ARCHIVE_NAME]$ARCHIVE_NAME" +Move-Item $SystemExe "$Repo\.build\win32-$Arch\system-setup\$SYSTEM_SETUP_NAME" +Write-Host "##vso[task.setvariable variable=SYSTEM_SETUP_NAME]$SYSTEM_SETUP_NAME" +Move-Item $UserExe "$Repo\.build\win32-$Arch\user-setup\$USER_SETUP_NAME" +Write-Host "##vso[task.setvariable variable=USER_SETUP_NAME]$USER_SETUP_NAME" diff --git a/lib/vscode/build/azure-pipelines/win32/product-build-win32.yml b/build/azure-pipelines/win32/product-build-win32.yml similarity index 96% rename from lib/vscode/build/azure-pipelines/win32/product-build-win32.yml rename to build/azure-pipelines/win32/product-build-win32.yml index 2dcaf8b2e010..1f8514ae7e3e 100644 --- a/lib/vscode/build/azure-pipelines/win32/product-build-win32.yml +++ b/build/azure-pipelines/win32/product-build-win32.yml @@ -295,31 +295,31 @@ steps: $env:AZURE_STORAGE_ACCESS_KEY_2 = "$(vscode-storage-key)" $env:AZURE_DOCUMENTDB_MASTERKEY = "$(builds-docdb-key-readwrite)" $env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" - .\build\azure-pipelines\win32\publish.ps1 + .\build\azure-pipelines\win32\prepare-publish.ps1 displayName: Publish condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) - - publish: $(System.DefaultWorkingDirectory)\.build\win32-$(VSCODE_ARCH)\archive\VSCode-win32-$(VSCODE_ARCH).zip - artifact: vscode-win32-$(VSCODE_ARCH) + - publish: $(System.DefaultWorkingDirectory)\.build\win32-$(VSCODE_ARCH)\archive\$(ARCHIVE_NAME) + artifact: vscode_client_win32_$(VSCODE_ARCH)_archive displayName: Publish archive condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) - - publish: $(System.DefaultWorkingDirectory)\.build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup.exe - artifact: vscode-win32-$(VSCODE_ARCH)-setup + - publish: $(System.DefaultWorkingDirectory)\.build\win32-$(VSCODE_ARCH)\system-setup\$(SYSTEM_SETUP_NAME) + artifact: vscode_client_win32_$(VSCODE_ARCH)_setup displayName: Publish system setup condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) - - publish: $(System.DefaultWorkingDirectory)\.build\win32-$(VSCODE_ARCH)\user-setup\VSCodeSetup.exe - artifact: vscode-win32-$(VSCODE_ARCH)-user-setup + - publish: $(System.DefaultWorkingDirectory)\.build\win32-$(VSCODE_ARCH)\user-setup\$(USER_SETUP_NAME) + artifact: vscode_client_win32_$(VSCODE_ARCH)_user-setup displayName: Publish user setup condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false')) - publish: $(System.DefaultWorkingDirectory)\.build\vscode-server-win32-$(VSCODE_ARCH).zip - artifact: vscode-server-win32-$(VSCODE_ARCH) + artifact: vscode_server_win32_$(VSCODE_ARCH)_archive displayName: Publish server archive condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64')) - publish: $(System.DefaultWorkingDirectory)\.build\vscode-server-win32-$(VSCODE_ARCH)-web.zip - artifact: vscode-server-win32-$(VSCODE_ARCH)-web + artifact: vscode_web_win32_$(VSCODE_ARCH)_archive displayName: Publish web server archive condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64')) diff --git a/lib/vscode/build/azure-pipelines/win32/retry.ps1 b/build/azure-pipelines/win32/retry.ps1 similarity index 100% rename from lib/vscode/build/azure-pipelines/win32/retry.ps1 rename to build/azure-pipelines/win32/retry.ps1 diff --git a/lib/vscode/build/azure-pipelines/win32/sign.ps1 b/build/azure-pipelines/win32/sign.ps1 similarity index 100% rename from lib/vscode/build/azure-pipelines/win32/sign.ps1 rename to build/azure-pipelines/win32/sign.ps1 diff --git a/lib/vscode/build/builtin/.eslintrc b/build/builtin/.eslintrc similarity index 100% rename from lib/vscode/build/builtin/.eslintrc rename to build/builtin/.eslintrc diff --git a/lib/vscode/build/builtin/browser-main.js b/build/builtin/browser-main.js similarity index 100% rename from lib/vscode/build/builtin/browser-main.js rename to build/builtin/browser-main.js diff --git a/lib/vscode/build/builtin/index.html b/build/builtin/index.html similarity index 100% rename from lib/vscode/build/builtin/index.html rename to build/builtin/index.html diff --git a/lib/vscode/build/builtin/main.js b/build/builtin/main.js similarity index 100% rename from lib/vscode/build/builtin/main.js rename to build/builtin/main.js diff --git a/lib/vscode/build/builtin/package.json b/build/builtin/package.json similarity index 100% rename from lib/vscode/build/builtin/package.json rename to build/builtin/package.json diff --git a/lib/vscode/build/darwin/create-universal-app.js b/build/darwin/create-universal-app.js similarity index 96% rename from lib/vscode/build/darwin/create-universal-app.js rename to build/darwin/create-universal-app.js index d455a5cef703..d91064d41a60 100644 --- a/lib/vscode/build/darwin/create-universal-app.js +++ b/build/darwin/create-universal-app.js @@ -33,7 +33,7 @@ async function main() { 'Credits.rtf', 'CodeResources', 'fsevents.node', - 'Info.plist', // TODO@deepak1556: regressed with 11.4.2 internal builds + 'Info.plist', '.npmrc' ], outAppPath, diff --git a/lib/vscode/build/darwin/create-universal-app.ts b/build/darwin/create-universal-app.ts similarity index 100% rename from lib/vscode/build/darwin/create-universal-app.ts rename to build/darwin/create-universal-app.ts diff --git a/lib/vscode/build/darwin/sign.js b/build/darwin/sign.js similarity index 100% rename from lib/vscode/build/darwin/sign.js rename to build/darwin/sign.js diff --git a/lib/vscode/build/darwin/sign.ts b/build/darwin/sign.ts similarity index 100% rename from lib/vscode/build/darwin/sign.ts rename to build/darwin/sign.ts diff --git a/lib/vscode/build/eslint.js b/build/eslint.js similarity index 100% rename from lib/vscode/build/eslint.js rename to build/eslint.js diff --git a/lib/vscode/build/filters.js b/build/filters.js similarity index 100% rename from lib/vscode/build/filters.js rename to build/filters.js diff --git a/lib/vscode/build/gulpfile.compile.js b/build/gulpfile.compile.js similarity index 100% rename from lib/vscode/build/gulpfile.compile.js rename to build/gulpfile.compile.js diff --git a/lib/vscode/build/gulpfile.editor.js b/build/gulpfile.editor.js similarity index 100% rename from lib/vscode/build/gulpfile.editor.js rename to build/gulpfile.editor.js diff --git a/build/gulpfile.extensions.js b/build/gulpfile.extensions.js new file mode 100644 index 000000000000..cbb7c486b13d --- /dev/null +++ b/build/gulpfile.extensions.js @@ -0,0 +1,244 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +// Increase max listeners for event emitters +require('events').EventEmitter.defaultMaxListeners = 100; + +const gulp = require('gulp'); +const path = require('path'); +const nodeUtil = require('util'); +const es = require('event-stream'); +const filter = require('gulp-filter'); +const util = require('./lib/util'); +const task = require('./lib/task'); +const watcher = require('./lib/watch'); +const createReporter = require('./lib/reporter').createReporter; +const glob = require('glob'); +const root = path.dirname(__dirname); +const commit = util.getVersion(root); +const plumber = require('gulp-plumber'); +const ext = require('./lib/extensions'); + +const extensionsPath = path.join(path.dirname(__dirname), 'extensions'); + +// To save 250ms for each gulp startup, we are caching the result here +// const compilations = glob.sync('**/tsconfig.json', { +// cwd: extensionsPath, +// ignore: ['**/out/**', '**/node_modules/**'] +// }); +const compilations = [ + 'configuration-editing/build/tsconfig.json', + 'configuration-editing/tsconfig.json', + 'css-language-features/client/tsconfig.json', + 'css-language-features/server/tsconfig.json', + 'debug-auto-launch/tsconfig.json', + 'debug-server-ready/tsconfig.json', + 'emmet/tsconfig.json', + 'extension-editing/tsconfig.json', + 'git/tsconfig.json', + 'github-authentication/tsconfig.json', + 'github/tsconfig.json', + 'grunt/tsconfig.json', + 'gulp/tsconfig.json', + 'html-language-features/client/tsconfig.json', + 'html-language-features/server/tsconfig.json', + 'image-preview/tsconfig.json', + 'jake/tsconfig.json', + 'json-language-features/client/tsconfig.json', + 'json-language-features/server/tsconfig.json', + 'markdown-language-features/preview-src/tsconfig.json', + 'markdown-language-features/tsconfig.json', + 'merge-conflict/tsconfig.json', + 'microsoft-authentication/tsconfig.json', + 'npm/tsconfig.json', + 'php-language-features/tsconfig.json', + 'search-result/tsconfig.json', + 'simple-browser/tsconfig.json', + 'testing-editor-contributions/tsconfig.json', + 'typescript-language-features/test-workspace/tsconfig.json', + 'typescript-language-features/tsconfig.json', + 'vscode-api-tests/tsconfig.json', + 'vscode-colorize-tests/tsconfig.json', + 'vscode-custom-editor-tests/tsconfig.json', + 'vscode-notebook-tests/tsconfig.json', + 'vscode-test-resolver/tsconfig.json' +]; + +const getBaseUrl = out => `https://ticino.blob.core.windows.net/sourcemaps/${commit}/${out}`; + +const tasks = compilations.map(function (tsconfigFile) { + const absolutePath = path.join(extensionsPath, tsconfigFile); + const relativeDirname = path.dirname(tsconfigFile); + + const overrideOptions = {}; + overrideOptions.sourceMap = true; + + const name = relativeDirname.replace(/\//g, '-'); + + const root = path.join('extensions', relativeDirname); + const srcBase = path.join(root, 'src'); + const src = path.join(srcBase, '**'); + const srcOpts = { cwd: path.dirname(__dirname), base: srcBase }; + + const out = path.join(root, 'out'); + const baseUrl = getBaseUrl(out); + + let headerId, headerOut; + let index = relativeDirname.indexOf('/'); + if (index < 0) { + headerId = 'vscode.' + relativeDirname; + headerOut = 'out'; + } else { + headerId = 'vscode.' + relativeDirname.substr(0, index); + headerOut = relativeDirname.substr(index + 1) + '/out'; + } + + function createPipeline(build, emitError) { + const nlsDev = require('vscode-nls-dev'); + const tsb = require('gulp-tsb'); + const sourcemaps = require('gulp-sourcemaps'); + + const reporter = createReporter('extensions'); + + overrideOptions.inlineSources = Boolean(build); + overrideOptions.base = path.dirname(absolutePath); + + const compilation = tsb.create(absolutePath, overrideOptions, false, err => reporter(err.toString())); + + const pipeline = function () { + const input = es.through(); + const tsFilter = filter(['**/*.ts', '!**/lib/lib*.d.ts', '!**/node_modules/**'], { restore: true }); + const output = input + .pipe(plumber({ + errorHandler: function (err) { + if (err && !err.__reporter__) { + reporter(err); + } + } + })) + .pipe(tsFilter) + .pipe(util.loadSourcemaps()) + .pipe(compilation()) + .pipe(build ? nlsDev.rewriteLocalizeCalls() : es.through()) + .pipe(build ? util.stripSourceMappingURL() : es.through()) + .pipe(sourcemaps.write('.', { + sourceMappingURL: !build ? null : f => `${baseUrl}/${f.relative}.map`, + addComment: !!build, + includeContent: !!build, + sourceRoot: '../src' + })) + .pipe(tsFilter.restore) + .pipe(build ? nlsDev.bundleMetaDataFiles(headerId, headerOut) : es.through()) + // Filter out *.nls.json file. We needed them only to bundle meta data file. + .pipe(filter(['**', '!**/*.nls.json'])) + .pipe(reporter.end(emitError)); + + return es.duplex(input, output); + }; + + // add src-stream for project files + pipeline.tsProjectSrc = () => { + return compilation.src(srcOpts); + }; + return pipeline; + } + + const cleanTask = task.define(`clean-extension-${name}`, util.rimraf(out)); + + const compileTask = task.define(`compile-extension:${name}`, task.series(cleanTask, () => { + const pipeline = createPipeline(false, true); + const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts'])); + const input = es.merge(nonts, pipeline.tsProjectSrc()); + + return input + .pipe(pipeline()) + .pipe(gulp.dest(out)); + })); + + const watchTask = task.define(`watch-extension:${name}`, task.series(cleanTask, () => { + const pipeline = createPipeline(false); + const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts'])); + const input = es.merge(nonts, pipeline.tsProjectSrc()); + const watchInput = watcher(src, { ...srcOpts, ...{ readDelay: 200 } }); + + return watchInput + .pipe(util.incremental(pipeline, input)) + .pipe(gulp.dest(out)); + })); + + const compileBuildTask = task.define(`compile-build-extension-${name}`, task.series(cleanTask, () => { + const pipeline = createPipeline(true, true); + const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts'])); + const input = es.merge(nonts, pipeline.tsProjectSrc()); + + return input + .pipe(pipeline()) + .pipe(gulp.dest(out)); + })); + + // Tasks + gulp.task(compileTask); + gulp.task(watchTask); + + return { compileTask, watchTask, compileBuildTask }; +}); + +const compileExtensionsTask = task.define('compile-extensions', task.parallel(...tasks.map(t => t.compileTask))); +gulp.task(compileExtensionsTask); +exports.compileExtensionsTask = compileExtensionsTask; + +const watchExtensionsTask = task.define('watch-extensions', task.parallel(...tasks.map(t => t.watchTask))); +gulp.task(watchExtensionsTask); +exports.watchExtensionsTask = watchExtensionsTask; + +const compileExtensionsBuildLegacyTask = task.define('compile-extensions-build-legacy', task.parallel(...tasks.map(t => t.compileBuildTask))); +gulp.task(compileExtensionsBuildLegacyTask); + +//#region Extension media + +const compileExtensionMediaTask = task.define('compile-extension-media', () => ext.buildExtensionMedia(false)); +gulp.task(compileExtensionMediaTask); +exports.compileExtensionMediaTask = compileExtensionMediaTask; + +const watchExtensionMedia = task.define('watch-extension-media', () => ext.buildExtensionMedia(true)); +gulp.task(watchExtensionMedia); +exports.watchExtensionMedia = watchExtensionMedia; + +const compileExtensionMediaBuildTask = task.define('compile-extension-media-build', () => ext.buildExtensionMedia(false, '.build/extensions')); +gulp.task(compileExtensionMediaBuildTask); + +//#endregion + +//#region Azure Pipelines + +const cleanExtensionsBuildTask = task.define('clean-extensions-build', util.rimraf('.build/extensions')); +const compileExtensionsBuildTask = task.define('compile-extensions-build', task.series( + cleanExtensionsBuildTask, + task.define('bundle-extensions-build', () => ext.packageLocalExtensionsStream(false).pipe(gulp.dest('.build'))), + task.define('bundle-marketplace-extensions-build', () => ext.packageMarketplaceExtensionsStream(false).pipe(gulp.dest('.build'))), +)); + +gulp.task(compileExtensionsBuildTask); +gulp.task(task.define('extensions-ci', task.series(compileExtensionsBuildTask, compileExtensionMediaBuildTask))); + +exports.compileExtensionsBuildTask = compileExtensionsBuildTask; + +//#endregion + +const compileWebExtensionsTask = task.define('compile-web', () => buildWebExtensions(false)); +gulp.task(compileWebExtensionsTask); +exports.compileWebExtensionsTask = compileWebExtensionsTask; + +const watchWebExtensionsTask = task.define('watch-web', () => buildWebExtensions(true)); +gulp.task(watchWebExtensionsTask); +exports.watchWebExtensionsTask = watchWebExtensionsTask; + +async function buildWebExtensions(isWatch) { + const webpackConfigLocations = await nodeUtil.promisify(glob)( + path.join(extensionsPath, '**', 'extension-browser.webpack.config.js'), + { ignore: ['**/node_modules'] } + ); + return ext.webpackExtensions('packaging web extension', isWatch, webpackConfigLocations.map(configPath => ({ configPath }))); +} diff --git a/lib/vscode/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js similarity index 100% rename from lib/vscode/build/gulpfile.hygiene.js rename to build/gulpfile.hygiene.js diff --git a/lib/vscode/build/gulpfile.js b/build/gulpfile.js similarity index 100% rename from lib/vscode/build/gulpfile.js rename to build/gulpfile.js diff --git a/lib/vscode/build/gulpfile.reh.js b/build/gulpfile.reh.js similarity index 99% rename from lib/vscode/build/gulpfile.reh.js rename to build/gulpfile.reh.js index 6230916a1dc8..387a54cbbfea 100644 --- a/lib/vscode/build/gulpfile.reh.js +++ b/build/gulpfile.reh.js @@ -42,7 +42,6 @@ BUILD_TARGETS.forEach(({ platform, arch }) => { }); function getNodeVersion() { - return process.versions.node; const yarnrc = fs.readFileSync(path.join(REPO_ROOT, 'remote', '.yarnrc'), 'utf8'); const target = /^target "(.*)"$/m.exec(yarnrc)[1]; return target; diff --git a/lib/vscode/build/gulpfile.vscode.js b/build/gulpfile.vscode.js similarity index 97% rename from lib/vscode/build/gulpfile.vscode.js rename to build/gulpfile.vscode.js index 3eeba69d2581..a6e043f122cb 100644 --- a/lib/vscode/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -228,7 +228,14 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op .pipe(jsFilter) .pipe(util.rewriteSourceMappingURL(sourceMappingURLBase)) .pipe(jsFilter.restore) - .pipe(createAsar(path.join(process.cwd(), 'node_modules'), ['**/*.node', '**/vscode-ripgrep/bin/*', '**/node-pty/build/Release/*', '**/*.wasm'], 'node_modules.asar')); + .pipe(createAsar(path.join(process.cwd(), 'node_modules'), [ + '**/*.node', + '**/vscode-ripgrep/bin/*', + '**/node-pty/build/Release/*', + '**/node-pty/lib/worker/conoutSocketWorker.js', + '**/node-pty/lib/shared/conout.js', + '**/*.wasm' + ], 'node_modules.asar')); let all = es.merge( packageJsonStream, @@ -383,8 +390,6 @@ BUILD_TARGETS.forEach(buildTarget => { } }); -// Transifex Localizations - const innoSetupConfig = { 'zh-cn': { codePage: 'CP936', defaultInfo: { name: 'Simplified Chinese', id: '$0804', } }, 'zh-tw': { codePage: 'CP950', defaultInfo: { name: 'Traditional Chinese', id: '$0404' } }, @@ -400,6 +405,8 @@ const innoSetupConfig = { 'tr': { codePage: 'CP1254' } }; +// Transifex Localizations + const apiHostname = process.env.TRANSIFEX_API_URL; const apiName = process.env.TRANSIFEX_API_NAME; const apiToken = process.env.TRANSIFEX_API_TOKEN; @@ -434,7 +441,7 @@ gulp.task(task.define( function () { const pathToMetadata = './out-vscode/nls.metadata.json'; const pathToExtensions = '.build/extensions/*'; - const pathToSetup = 'build/win32/**/{Default.isl,messages.en.isl}'; + const pathToSetup = 'build/win32/i18n/messages.en.isl'; return es.merge( gulp.src(pathToMetadata).pipe(i18n.createXlfFilesForCoreBundle()), @@ -460,8 +467,8 @@ gulp.task('vscode-translations-import', function () { } }); return es.merge([...i18n.defaultLanguages, ...i18n.extraLanguages].map(language => { - let id = language.transifexId || language.id; - return gulp.src(`${options.location}/${id}/setup/*/*.xlf`) + let id = language.id; + return gulp.src(`${options.location}/${id}/vscode-setup/messages.xlf`) .pipe(i18n.prepareIslFiles(language, innoSetupConfig[language.id])) .pipe(vfs.dest(`./build/win32/i18n`)); })); diff --git a/lib/vscode/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js similarity index 100% rename from lib/vscode/build/gulpfile.vscode.linux.js rename to build/gulpfile.vscode.linux.js diff --git a/lib/vscode/build/gulpfile.vscode.web.js b/build/gulpfile.vscode.web.js similarity index 100% rename from lib/vscode/build/gulpfile.vscode.web.js rename to build/gulpfile.vscode.web.js diff --git a/lib/vscode/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js similarity index 100% rename from lib/vscode/build/gulpfile.vscode.win32.js rename to build/gulpfile.vscode.win32.js diff --git a/lib/vscode/build/hygiene.js b/build/hygiene.js similarity index 100% rename from lib/vscode/build/hygiene.js rename to build/hygiene.js diff --git a/lib/vscode/build/jsconfig.json b/build/jsconfig.json similarity index 100% rename from lib/vscode/build/jsconfig.json rename to build/jsconfig.json diff --git a/lib/vscode/build/lib/asar.js b/build/lib/asar.js similarity index 100% rename from lib/vscode/build/lib/asar.js rename to build/lib/asar.js diff --git a/lib/vscode/build/lib/asar.ts b/build/lib/asar.ts similarity index 100% rename from lib/vscode/build/lib/asar.ts rename to build/lib/asar.ts diff --git a/lib/vscode/build/lib/builtInExtensions.js b/build/lib/builtInExtensions.js similarity index 97% rename from lib/vscode/build/lib/builtInExtensions.js rename to build/lib/builtInExtensions.js index 9b8bcc9e0009..d851a6ee5f9a 100644 --- a/lib/vscode/build/lib/builtInExtensions.js +++ b/build/lib/builtInExtensions.js @@ -18,8 +18,8 @@ const ansiColors = require("ansi-colors"); const mkdirp = require('mkdirp'); const root = path.dirname(path.dirname(__dirname)); const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')); -const builtInExtensions = productjson.builtInExtensions; -const webBuiltInExtensions = productjson.webBuiltInExtensions; +const builtInExtensions = productjson.builtInExtensions || []; +const webBuiltInExtensions = productjson.webBuiltInExtensions || []; const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json'); const ENABLE_LOGGING = !process.env['VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE']; function log(...messages) { diff --git a/lib/vscode/build/lib/builtInExtensions.ts b/build/lib/builtInExtensions.ts similarity index 99% rename from lib/vscode/build/lib/builtInExtensions.ts rename to build/lib/builtInExtensions.ts index af444defab88..2c1cb3abba2c 100644 --- a/lib/vscode/build/lib/builtInExtensions.ts +++ b/build/lib/builtInExtensions.ts @@ -36,8 +36,8 @@ export interface IExtensionDefinition { const root = path.dirname(path.dirname(__dirname)); const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')); -const builtInExtensions = productjson.builtInExtensions; -const webBuiltInExtensions = productjson.webBuiltInExtensions; +const builtInExtensions = productjson.builtInExtensions || []; +const webBuiltInExtensions = productjson.webBuiltInExtensions || []; const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json'); const ENABLE_LOGGING = !process.env['VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE']; diff --git a/lib/vscode/build/lib/builtInExtensionsCG.js b/build/lib/builtInExtensionsCG.js similarity index 96% rename from lib/vscode/build/lib/builtInExtensionsCG.js rename to build/lib/builtInExtensionsCG.js index 10bf38f8c8e2..679663724c8b 100644 --- a/lib/vscode/build/lib/builtInExtensionsCG.js +++ b/build/lib/builtInExtensionsCG.js @@ -12,8 +12,8 @@ const ansiColors = require("ansi-colors"); const root = path.dirname(path.dirname(__dirname)); const rootCG = path.join(root, 'extensionsCG'); const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')); -const builtInExtensions = productjson.builtInExtensions; -const webBuiltInExtensions = productjson.webBuiltInExtensions; +const builtInExtensions = productjson.builtInExtensions || []; +const webBuiltInExtensions = productjson.webBuiltInExtensions || []; const token = process.env['VSCODE_MIXIN_PASSWORD'] || process.env['GITHUB_TOKEN'] || undefined; const contentBasePath = 'raw.githubusercontent.com'; const contentFileNames = ['package.json', 'package-lock.json', 'yarn.lock']; diff --git a/lib/vscode/build/lib/builtInExtensionsCG.ts b/build/lib/builtInExtensionsCG.ts similarity index 98% rename from lib/vscode/build/lib/builtInExtensionsCG.ts rename to build/lib/builtInExtensionsCG.ts index 45785529b66d..2b758da5c912 100644 --- a/lib/vscode/build/lib/builtInExtensionsCG.ts +++ b/build/lib/builtInExtensionsCG.ts @@ -13,8 +13,8 @@ import { IExtensionDefinition } from './builtInExtensions'; const root = path.dirname(path.dirname(__dirname)); const rootCG = path.join(root, 'extensionsCG'); const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')); -const builtInExtensions = productjson.builtInExtensions; -const webBuiltInExtensions = productjson.webBuiltInExtensions; +const builtInExtensions = productjson.builtInExtensions || []; +const webBuiltInExtensions = productjson.webBuiltInExtensions || []; const token = process.env['VSCODE_MIXIN_PASSWORD'] || process.env['GITHUB_TOKEN'] || undefined; const contentBasePath = 'raw.githubusercontent.com'; diff --git a/lib/vscode/build/lib/bundle.js b/build/lib/bundle.js similarity index 100% rename from lib/vscode/build/lib/bundle.js rename to build/lib/bundle.js diff --git a/lib/vscode/build/lib/bundle.ts b/build/lib/bundle.ts similarity index 100% rename from lib/vscode/build/lib/bundle.ts rename to build/lib/bundle.ts diff --git a/lib/vscode/build/lib/compilation.js b/build/lib/compilation.js similarity index 100% rename from lib/vscode/build/lib/compilation.js rename to build/lib/compilation.js diff --git a/lib/vscode/build/lib/compilation.ts b/build/lib/compilation.ts similarity index 100% rename from lib/vscode/build/lib/compilation.ts rename to build/lib/compilation.ts diff --git a/lib/vscode/build/lib/dependencies.js b/build/lib/dependencies.js similarity index 100% rename from lib/vscode/build/lib/dependencies.js rename to build/lib/dependencies.js diff --git a/lib/vscode/build/lib/dependencies.ts b/build/lib/dependencies.ts similarity index 100% rename from lib/vscode/build/lib/dependencies.ts rename to build/lib/dependencies.ts diff --git a/lib/vscode/build/lib/electron.js b/build/lib/electron.js similarity index 100% rename from lib/vscode/build/lib/electron.js rename to build/lib/electron.js diff --git a/lib/vscode/build/lib/electron.ts b/build/lib/electron.ts similarity index 100% rename from lib/vscode/build/lib/electron.ts rename to build/lib/electron.ts diff --git a/lib/vscode/build/lib/eslint/code-import-patterns.js b/build/lib/eslint/code-import-patterns.js similarity index 100% rename from lib/vscode/build/lib/eslint/code-import-patterns.js rename to build/lib/eslint/code-import-patterns.js diff --git a/lib/vscode/build/lib/eslint/code-import-patterns.ts b/build/lib/eslint/code-import-patterns.ts similarity index 100% rename from lib/vscode/build/lib/eslint/code-import-patterns.ts rename to build/lib/eslint/code-import-patterns.ts diff --git a/lib/vscode/build/lib/eslint/code-layering.js b/build/lib/eslint/code-layering.js similarity index 100% rename from lib/vscode/build/lib/eslint/code-layering.js rename to build/lib/eslint/code-layering.js diff --git a/lib/vscode/build/lib/eslint/code-layering.ts b/build/lib/eslint/code-layering.ts similarity index 100% rename from lib/vscode/build/lib/eslint/code-layering.ts rename to build/lib/eslint/code-layering.ts diff --git a/lib/vscode/build/lib/eslint/code-no-nls-in-standalone-editor.js b/build/lib/eslint/code-no-nls-in-standalone-editor.js similarity index 100% rename from lib/vscode/build/lib/eslint/code-no-nls-in-standalone-editor.js rename to build/lib/eslint/code-no-nls-in-standalone-editor.js diff --git a/lib/vscode/build/lib/eslint/code-no-nls-in-standalone-editor.ts b/build/lib/eslint/code-no-nls-in-standalone-editor.ts similarity index 100% rename from lib/vscode/build/lib/eslint/code-no-nls-in-standalone-editor.ts rename to build/lib/eslint/code-no-nls-in-standalone-editor.ts diff --git a/lib/vscode/build/lib/eslint/code-no-standalone-editor.js b/build/lib/eslint/code-no-standalone-editor.js similarity index 100% rename from lib/vscode/build/lib/eslint/code-no-standalone-editor.js rename to build/lib/eslint/code-no-standalone-editor.js diff --git a/lib/vscode/build/lib/eslint/code-no-standalone-editor.ts b/build/lib/eslint/code-no-standalone-editor.ts similarity index 100% rename from lib/vscode/build/lib/eslint/code-no-standalone-editor.ts rename to build/lib/eslint/code-no-standalone-editor.ts diff --git a/lib/vscode/build/lib/eslint/code-no-unexternalized-strings.js b/build/lib/eslint/code-no-unexternalized-strings.js similarity index 100% rename from lib/vscode/build/lib/eslint/code-no-unexternalized-strings.js rename to build/lib/eslint/code-no-unexternalized-strings.js diff --git a/lib/vscode/build/lib/eslint/code-no-unexternalized-strings.ts b/build/lib/eslint/code-no-unexternalized-strings.ts similarity index 100% rename from lib/vscode/build/lib/eslint/code-no-unexternalized-strings.ts rename to build/lib/eslint/code-no-unexternalized-strings.ts diff --git a/lib/vscode/build/lib/eslint/code-no-unused-expressions.js b/build/lib/eslint/code-no-unused-expressions.js similarity index 100% rename from lib/vscode/build/lib/eslint/code-no-unused-expressions.js rename to build/lib/eslint/code-no-unused-expressions.js diff --git a/lib/vscode/build/lib/eslint/code-no-unused-expressions.ts b/build/lib/eslint/code-no-unused-expressions.ts similarity index 100% rename from lib/vscode/build/lib/eslint/code-no-unused-expressions.ts rename to build/lib/eslint/code-no-unused-expressions.ts diff --git a/lib/vscode/build/lib/eslint/code-translation-remind.js b/build/lib/eslint/code-translation-remind.js similarity index 100% rename from lib/vscode/build/lib/eslint/code-translation-remind.js rename to build/lib/eslint/code-translation-remind.js diff --git a/lib/vscode/build/lib/eslint/code-translation-remind.ts b/build/lib/eslint/code-translation-remind.ts similarity index 100% rename from lib/vscode/build/lib/eslint/code-translation-remind.ts rename to build/lib/eslint/code-translation-remind.ts diff --git a/lib/vscode/build/lib/eslint/utils.js b/build/lib/eslint/utils.js similarity index 100% rename from lib/vscode/build/lib/eslint/utils.js rename to build/lib/eslint/utils.js diff --git a/lib/vscode/build/lib/eslint/utils.ts b/build/lib/eslint/utils.ts similarity index 100% rename from lib/vscode/build/lib/eslint/utils.ts rename to build/lib/eslint/utils.ts diff --git a/lib/vscode/build/lib/eslint/vscode-dts-cancellation.js b/build/lib/eslint/vscode-dts-cancellation.js similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-cancellation.js rename to build/lib/eslint/vscode-dts-cancellation.js diff --git a/lib/vscode/build/lib/eslint/vscode-dts-cancellation.ts b/build/lib/eslint/vscode-dts-cancellation.ts similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-cancellation.ts rename to build/lib/eslint/vscode-dts-cancellation.ts diff --git a/lib/vscode/build/lib/eslint/vscode-dts-create-func.js b/build/lib/eslint/vscode-dts-create-func.js similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-create-func.js rename to build/lib/eslint/vscode-dts-create-func.js diff --git a/lib/vscode/build/lib/eslint/vscode-dts-create-func.ts b/build/lib/eslint/vscode-dts-create-func.ts similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-create-func.ts rename to build/lib/eslint/vscode-dts-create-func.ts diff --git a/lib/vscode/build/lib/eslint/vscode-dts-event-naming.js b/build/lib/eslint/vscode-dts-event-naming.js similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-event-naming.js rename to build/lib/eslint/vscode-dts-event-naming.js diff --git a/lib/vscode/build/lib/eslint/vscode-dts-event-naming.ts b/build/lib/eslint/vscode-dts-event-naming.ts similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-event-naming.ts rename to build/lib/eslint/vscode-dts-event-naming.ts diff --git a/lib/vscode/build/lib/eslint/vscode-dts-interface-naming.js b/build/lib/eslint/vscode-dts-interface-naming.js similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-interface-naming.js rename to build/lib/eslint/vscode-dts-interface-naming.js diff --git a/lib/vscode/build/lib/eslint/vscode-dts-interface-naming.ts b/build/lib/eslint/vscode-dts-interface-naming.ts similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-interface-naming.ts rename to build/lib/eslint/vscode-dts-interface-naming.ts diff --git a/lib/vscode/build/lib/eslint/vscode-dts-literal-or-types.js b/build/lib/eslint/vscode-dts-literal-or-types.js similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-literal-or-types.js rename to build/lib/eslint/vscode-dts-literal-or-types.js diff --git a/lib/vscode/build/lib/eslint/vscode-dts-literal-or-types.ts b/build/lib/eslint/vscode-dts-literal-or-types.ts similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-literal-or-types.ts rename to build/lib/eslint/vscode-dts-literal-or-types.ts diff --git a/lib/vscode/build/lib/eslint/vscode-dts-provider-naming.js b/build/lib/eslint/vscode-dts-provider-naming.js similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-provider-naming.js rename to build/lib/eslint/vscode-dts-provider-naming.js diff --git a/lib/vscode/build/lib/eslint/vscode-dts-provider-naming.ts b/build/lib/eslint/vscode-dts-provider-naming.ts similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-provider-naming.ts rename to build/lib/eslint/vscode-dts-provider-naming.ts diff --git a/lib/vscode/build/lib/eslint/vscode-dts-region-comments.js b/build/lib/eslint/vscode-dts-region-comments.js similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-region-comments.js rename to build/lib/eslint/vscode-dts-region-comments.js diff --git a/lib/vscode/build/lib/eslint/vscode-dts-region-comments.ts b/build/lib/eslint/vscode-dts-region-comments.ts similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-region-comments.ts rename to build/lib/eslint/vscode-dts-region-comments.ts diff --git a/lib/vscode/build/lib/eslint/vscode-dts-use-thenable.js b/build/lib/eslint/vscode-dts-use-thenable.js similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-use-thenable.js rename to build/lib/eslint/vscode-dts-use-thenable.js diff --git a/lib/vscode/build/lib/eslint/vscode-dts-use-thenable.ts b/build/lib/eslint/vscode-dts-use-thenable.ts similarity index 100% rename from lib/vscode/build/lib/eslint/vscode-dts-use-thenable.ts rename to build/lib/eslint/vscode-dts-use-thenable.ts diff --git a/build/lib/extensions.js b/build/lib/extensions.js new file mode 100644 index 000000000000..3d6a2906178c --- /dev/null +++ b/build/lib/extensions.js @@ -0,0 +1,460 @@ +"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.buildExtensionMedia = exports.webpackExtensions = exports.translatePackageJSON = exports.scanBuiltinExtensions = exports.packageMarketplaceExtensionsStream = exports.packageLocalExtensionsStream = exports.fromMarketplace = void 0; +const es = require("event-stream"); +const fs = require("fs"); +const cp = require("child_process"); +const glob = require("glob"); +const gulp = require("gulp"); +const path = require("path"); +const File = require("vinyl"); +const stats_1 = require("./stats"); +const util2 = require("./util"); +const vzip = require('gulp-vinyl-zip'); +const filter = require("gulp-filter"); +const rename = require("gulp-rename"); +const fancyLog = require("fancy-log"); +const ansiColors = require("ansi-colors"); +const buffer = require('gulp-buffer'); +const jsoncParser = require("jsonc-parser"); +const util = require('./util'); +const root = path.dirname(path.dirname(__dirname)); +const commit = util.getVersion(root); +const sourceMappingURLBase = `https://ticino.blob.core.windows.net/sourcemaps/${commit}`; +function minifyExtensionResources(input) { + const jsonFilter = filter(['**/*.json', '**/*.code-snippets'], { restore: true }); + return input + .pipe(jsonFilter) + .pipe(buffer()) + .pipe(es.mapSync((f) => { + const errors = []; + const value = jsoncParser.parse(f.contents.toString('utf8'), errors); + if (errors.length === 0) { + // file parsed OK => just stringify to drop whitespace and comments + f.contents = Buffer.from(JSON.stringify(value)); + } + return f; + })) + .pipe(jsonFilter.restore); +} +function updateExtensionPackageJSON(input, update) { + const packageJsonFilter = filter('extensions/*/package.json', { restore: true }); + return input + .pipe(packageJsonFilter) + .pipe(buffer()) + .pipe(es.mapSync((f) => { + const data = JSON.parse(f.contents.toString('utf8')); + f.contents = Buffer.from(JSON.stringify(update(data))); + return f; + })) + .pipe(packageJsonFilter.restore); +} +function fromLocal(extensionPath, forWeb) { + const webpackConfigFileName = forWeb ? 'extension-browser.webpack.config.js' : 'extension.webpack.config.js'; + const isWebPacked = fs.existsSync(path.join(extensionPath, webpackConfigFileName)); + let input = isWebPacked + ? fromLocalWebpack(extensionPath, webpackConfigFileName) + : fromLocalNormal(extensionPath); + if (isWebPacked) { + input = updateExtensionPackageJSON(input, (data) => { + delete data.scripts; + delete data.dependencies; + delete data.devDependencies; + if (data.main) { + data.main = data.main.replace('/out/', /dist/); + } + return data; + }); + } + return input; +} +function fromLocalWebpack(extensionPath, webpackConfigFileName) { + const result = es.through(); + const packagedDependencies = []; + const packageJsonConfig = require(path.join(extensionPath, 'package.json')); + if (packageJsonConfig.dependencies) { + const webpackRootConfig = require(path.join(extensionPath, webpackConfigFileName)); + for (const key in webpackRootConfig.externals) { + if (key in packageJsonConfig.dependencies) { + packagedDependencies.push(key); + } + } + } + const vsce = require('vsce'); + const webpack = require('webpack'); + const webpackGulp = require('webpack-stream'); + vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Yarn, packagedDependencies }).then(fileNames => { + const files = fileNames + .map(fileName => path.join(extensionPath, fileName)) + .map(filePath => new File({ + path: filePath, + stat: fs.statSync(filePath), + base: extensionPath, + contents: fs.createReadStream(filePath) + })); + // check for a webpack configuration files, then invoke webpack + // and merge its output with the files stream. + const webpackConfigLocations = glob.sync(path.join(extensionPath, '**', webpackConfigFileName), { ignore: ['**/node_modules'] }); + const webpackStreams = webpackConfigLocations.map(webpackConfigPath => { + const webpackDone = (err, stats) => { + fancyLog(`Bundled extension: ${ansiColors.yellow(path.join(path.basename(extensionPath), path.relative(extensionPath, webpackConfigPath)))}...`); + if (err) { + result.emit('error', err); + } + const { compilation } = stats; + if (compilation.errors.length > 0) { + result.emit('error', compilation.errors.join('\n')); + } + if (compilation.warnings.length > 0) { + result.emit('error', compilation.warnings.join('\n')); + } + }; + const webpackConfig = Object.assign(Object.assign({}, require(webpackConfigPath)), { mode: 'production' }); + const relativeOutputPath = path.relative(extensionPath, webpackConfig.output.path); + return webpackGulp(webpackConfig, webpack, webpackDone) + .pipe(es.through(function (data) { + data.stat = data.stat || {}; + data.base = extensionPath; + this.emit('data', data); + })) + .pipe(es.through(function (data) { + // source map handling: + // * rewrite sourceMappingURL + // * save to disk so that upload-task picks this up + const contents = data.contents.toString('utf8'); + data.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, function (_m, g1) { + return `\n//# sourceMappingURL=${sourceMappingURLBase}/extensions/${path.basename(extensionPath)}/${relativeOutputPath}/${g1}`; + }), 'utf8'); + this.emit('data', data); + })); + }); + es.merge(...webpackStreams, es.readArray(files)) + // .pipe(es.through(function (data) { + // // debug + // console.log('out', data.path, data.contents.length); + // this.emit('data', data); + // })) + .pipe(result); + }).catch(err => { + console.error(extensionPath); + console.error(packagedDependencies); + result.emit('error', err); + }); + return result.pipe(stats_1.createStatsStream(path.basename(extensionPath))); +} +function fromLocalNormal(extensionPath) { + const result = es.through(); + const vsce = require('vsce'); + vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Yarn }) + .then(fileNames => { + const files = fileNames + .map(fileName => path.join(extensionPath, fileName)) + .map(filePath => new File({ + path: filePath, + stat: fs.statSync(filePath), + base: extensionPath, + contents: fs.createReadStream(filePath) + })); + es.readArray(files).pipe(result); + }) + .catch(err => result.emit('error', err)); + return result.pipe(stats_1.createStatsStream(path.basename(extensionPath))); +} +const baseHeaders = { + 'X-Market-Client-Id': 'VSCode Build', + 'User-Agent': 'VSCode Build', + 'X-Market-User-Id': '291C1CD0-051A-4123-9B4B-30D60EF52EE2', +}; +function fromMarketplace(extensionName, version, metadata) { + const remote = require('gulp-remote-retry-src'); + const json = require('gulp-json-editor'); + const [publisher, name] = extensionName.split('.'); + const url = `https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${publisher}/vsextensions/${name}/${version}/vspackage`; + fancyLog('Downloading extension:', ansiColors.yellow(`${extensionName}@${version}`), '...'); + const options = { + base: url, + requestOptions: { + gzip: true, + headers: baseHeaders + } + }; + const packageJsonFilter = filter('package.json', { restore: true }); + return remote('', options) + .pipe(vzip.src()) + .pipe(filter('extension/**')) + .pipe(rename(p => p.dirname = p.dirname.replace(/^extension\/?/, ''))) + .pipe(packageJsonFilter) + .pipe(buffer()) + .pipe(json({ __metadata: metadata })) + .pipe(packageJsonFilter.restore); +} +exports.fromMarketplace = fromMarketplace; +const excludedExtensions = [ + 'vscode-api-tests', + 'vscode-colorize-tests', + 'vscode-test-resolver', + 'ms-vscode.node-debug', + 'ms-vscode.node-debug2', + 'vscode-notebook-tests', + 'vscode-custom-editor-tests', +]; +const marketplaceWebExtensionsExclude = new Set([ + 'ms-vscode.node-debug', + 'ms-vscode.node-debug2', + 'ms-vscode.js-debug-companion', + 'ms-vscode.js-debug', + 'ms-vscode.vscode-js-profile-table' +]); +const productJson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')); +const builtInExtensions = productJson.builtInExtensions || []; +const webBuiltInExtensions = productJson.webBuiltInExtensions || []; +/** + * Loosely based on `getExtensionKind` from `src/vs/workbench/services/extensions/common/extensionsUtil.ts` + */ +function isWebExtension(manifest) { + if (typeof manifest.extensionKind !== 'undefined') { + const extensionKind = Array.isArray(manifest.extensionKind) ? manifest.extensionKind : [manifest.extensionKind]; + return (extensionKind.indexOf('web') >= 0); + } + return (!Boolean(manifest.main) || Boolean(manifest.browser)); +} +function packageLocalExtensionsStream(forWeb) { + const localExtensionsDescriptions = (glob.sync('extensions/*/package.json') + .map(manifestPath => { + const absoluteManifestPath = path.join(root, manifestPath); + const extensionPath = path.dirname(path.join(root, manifestPath)); + const extensionName = path.basename(extensionPath); + return { name: extensionName, path: extensionPath, manifestPath: absoluteManifestPath }; + }) + .filter(({ name }) => excludedExtensions.indexOf(name) === -1) + .filter(({ name }) => builtInExtensions.every(b => b.name !== name)) + .filter(({ manifestPath }) => (forWeb ? isWebExtension(require(manifestPath)) : true))); + const localExtensionsStream = minifyExtensionResources(es.merge(...localExtensionsDescriptions.map(extension => { + return fromLocal(extension.path, forWeb) + .pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`)); + }))); + let result; + if (forWeb) { + result = localExtensionsStream; + } + else { + // also include shared node modules + result = es.merge(localExtensionsStream, gulp.src('extensions/node_modules/**', { base: '.' })); + } + return (result + .pipe(util2.setExecutableBit(['**/*.sh']))); +} +exports.packageLocalExtensionsStream = packageLocalExtensionsStream; +function packageMarketplaceExtensionsStream(forWeb) { + const marketplaceExtensionsDescriptions = [ + ...builtInExtensions.filter(({ name }) => (forWeb ? !marketplaceWebExtensionsExclude.has(name) : true)), + ...(forWeb ? webBuiltInExtensions : []) + ]; + const marketplaceExtensionsStream = minifyExtensionResources(es.merge(...marketplaceExtensionsDescriptions + .map(extension => { + const input = fromMarketplace(extension.name, extension.version, extension.metadata) + .pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`)); + return updateExtensionPackageJSON(input, (data) => { + delete data.scripts; + delete data.dependencies; + delete data.devDependencies; + return data; + }); + }))); + return (marketplaceExtensionsStream + .pipe(util2.setExecutableBit(['**/*.sh']))); +} +exports.packageMarketplaceExtensionsStream = packageMarketplaceExtensionsStream; +function scanBuiltinExtensions(extensionsRoot, exclude = []) { + const scannedExtensions = []; + try { + const extensionsFolders = fs.readdirSync(extensionsRoot); + for (const extensionFolder of extensionsFolders) { + if (exclude.indexOf(extensionFolder) >= 0) { + continue; + } + const packageJSONPath = path.join(extensionsRoot, extensionFolder, 'package.json'); + if (!fs.existsSync(packageJSONPath)) { + continue; + } + let packageJSON = JSON.parse(fs.readFileSync(packageJSONPath).toString('utf8')); + if (!isWebExtension(packageJSON)) { + continue; + } + const children = fs.readdirSync(path.join(extensionsRoot, extensionFolder)); + const packageNLSPath = children.filter(child => child === 'package.nls.json')[0]; + const packageNLS = packageNLSPath ? JSON.parse(fs.readFileSync(path.join(extensionsRoot, extensionFolder, packageNLSPath)).toString()) : undefined; + const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0]; + const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0]; + scannedExtensions.push({ + extensionPath: extensionFolder, + packageJSON, + packageNLS, + readmePath: readme ? path.join(extensionFolder, readme) : undefined, + changelogPath: changelog ? path.join(extensionFolder, changelog) : undefined, + }); + } + return scannedExtensions; + } + catch (ex) { + return scannedExtensions; + } +} +exports.scanBuiltinExtensions = scanBuiltinExtensions; +function translatePackageJSON(packageJSON, packageNLSPath) { + const CharCode_PC = '%'.charCodeAt(0); + const packageNls = JSON.parse(fs.readFileSync(packageNLSPath).toString()); + const translate = (obj) => { + for (let key in obj) { + const val = obj[key]; + if (Array.isArray(val)) { + val.forEach(translate); + } + else if (val && typeof val === 'object') { + translate(val); + } + else if (typeof val === 'string' && val.charCodeAt(0) === CharCode_PC && val.charCodeAt(val.length - 1) === CharCode_PC) { + const translated = packageNls[val.substr(1, val.length - 2)]; + if (translated) { + obj[key] = translated; + } + } + } + }; + translate(packageJSON); + return packageJSON; +} +exports.translatePackageJSON = translatePackageJSON; +const extensionsPath = path.join(root, 'extensions'); +// Additional projects to webpack. These typically build code for webviews +const webpackMediaConfigFiles = [ + 'markdown-language-features/webpack.config.js', + 'simple-browser/webpack.config.js', +]; +// Additional projects to run esbuild on. These typically build code for webviews +const esbuildMediaScripts = [ + 'markdown-language-features/esbuild.js', + 'notebook-markdown-extensions/esbuild.js', +]; +async function webpackExtensions(taskName, isWatch, webpackConfigLocations) { + const webpack = require('webpack'); + const webpackConfigs = []; + for (const { configPath, outputRoot } of webpackConfigLocations) { + const configOrFnOrArray = require(configPath); + function addConfig(configOrFn) { + let config; + if (typeof configOrFn === 'function') { + config = configOrFn({}, {}); + webpackConfigs.push(config); + } + else { + config = configOrFn; + } + if (outputRoot) { + config.output.path = path.join(outputRoot, path.relative(path.dirname(configPath), config.output.path)); + } + webpackConfigs.push(configOrFn); + } + addConfig(configOrFnOrArray); + } + function reporter(fullStats) { + if (Array.isArray(fullStats.children)) { + for (const stats of fullStats.children) { + const outputPath = stats.outputPath; + if (outputPath) { + const relativePath = path.relative(extensionsPath, outputPath).replace(/\\/g, '/'); + const match = relativePath.match(/[^\/]+(\/server|\/client)?/); + fancyLog(`Finished ${ansiColors.green(taskName)} ${ansiColors.cyan(match[0])} with ${stats.errors.length} errors.`); + } + if (Array.isArray(stats.errors)) { + stats.errors.forEach((error) => { + fancyLog.error(error); + }); + } + if (Array.isArray(stats.warnings)) { + stats.warnings.forEach((warning) => { + fancyLog.warn(warning); + }); + } + } + } + } + return new Promise((resolve, reject) => { + if (isWatch) { + webpack(webpackConfigs).watch({}, (err, stats) => { + if (err) { + reject(); + } + else { + reporter(stats.toJson()); + } + }); + } + else { + webpack(webpackConfigs).run((err, stats) => { + if (err) { + fancyLog.error(err); + reject(); + } + else { + reporter(stats.toJson()); + resolve(); + } + }); + } + }); +} +exports.webpackExtensions = webpackExtensions; +async function esbuildExtensions(taskName, isWatch, scripts) { + function reporter(stdError, script) { + const matches = (stdError || '').match(/\> (.+): error: (.+)?/g); + fancyLog(`Finished ${ansiColors.green(taskName)} ${script} with ${matches ? matches.length : 0} errors.`); + for (const match of matches || []) { + fancyLog.error(match); + } + } + const tasks = scripts.map(({ script, outputRoot }) => { + return new Promise((resolve, reject) => { + const args = [script]; + if (isWatch) { + args.push('--watch'); + } + if (outputRoot) { + args.push('--outputRoot', outputRoot); + } + const proc = cp.execFile(process.argv[0], args, {}, (error, _stdout, stderr) => { + if (error) { + return reject(error); + } + reporter(stderr, script); + if (stderr) { + return reject(); + } + return resolve(); + }); + proc.stdout.on('data', (data) => { + fancyLog(`${ansiColors.green(taskName)}: ${data.toString('utf8')}`); + }); + }); + }); + return Promise.all(tasks); +} +async function buildExtensionMedia(isWatch, outputRoot) { + return Promise.all([ + webpackExtensions('webpacking extension media', isWatch, webpackMediaConfigFiles.map(p => { + return { + configPath: path.join(extensionsPath, p), + outputRoot: outputRoot ? path.join(root, outputRoot, path.dirname(p)) : undefined + }; + })), + esbuildExtensions('esbuilding extension media', isWatch, esbuildMediaScripts.map(p => ({ + script: path.join(extensionsPath, p), + outputRoot: outputRoot ? path.join(root, outputRoot, path.dirname(p)) : undefined + }))), + ]); +} +exports.buildExtensionMedia = buildExtensionMedia; diff --git a/build/lib/extensions.ts b/build/lib/extensions.ts new file mode 100644 index 000000000000..6c55569b9731 --- /dev/null +++ b/build/lib/extensions.ts @@ -0,0 +1,542 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as es from 'event-stream'; +import * as fs from 'fs'; +import * as cp from 'child_process'; +import * as glob from 'glob'; +import * as gulp from 'gulp'; +import * as path from 'path'; +import { Stream } from 'stream'; +import * as File from 'vinyl'; +import { createStatsStream } from './stats'; +import * as util2 from './util'; +const vzip = require('gulp-vinyl-zip'); +import filter = require('gulp-filter'); +import rename = require('gulp-rename'); +import * as fancyLog from 'fancy-log'; +import * as ansiColors from 'ansi-colors'; +const buffer = require('gulp-buffer'); +import * as jsoncParser from 'jsonc-parser'; +import webpack = require('webpack'); +const util = require('./util'); +const root = path.dirname(path.dirname(__dirname)); +const commit = util.getVersion(root); +const sourceMappingURLBase = `https://ticino.blob.core.windows.net/sourcemaps/${commit}`; + +function minifyExtensionResources(input: Stream): Stream { + const jsonFilter = filter(['**/*.json', '**/*.code-snippets'], { restore: true }); + return input + .pipe(jsonFilter) + .pipe(buffer()) + .pipe(es.mapSync((f: File) => { + const errors: jsoncParser.ParseError[] = []; + const value = jsoncParser.parse(f.contents.toString('utf8'), errors); + if (errors.length === 0) { + // file parsed OK => just stringify to drop whitespace and comments + f.contents = Buffer.from(JSON.stringify(value)); + } + return f; + })) + .pipe(jsonFilter.restore); +} + +function updateExtensionPackageJSON(input: Stream, update: (data: any) => any): Stream { + const packageJsonFilter = filter('extensions/*/package.json', { restore: true }); + return input + .pipe(packageJsonFilter) + .pipe(buffer()) + .pipe(es.mapSync((f: File) => { + const data = JSON.parse(f.contents.toString('utf8')); + f.contents = Buffer.from(JSON.stringify(update(data))); + return f; + })) + .pipe(packageJsonFilter.restore); +} + +function fromLocal(extensionPath: string, forWeb: boolean): Stream { + const webpackConfigFileName = forWeb ? 'extension-browser.webpack.config.js' : 'extension.webpack.config.js'; + + const isWebPacked = fs.existsSync(path.join(extensionPath, webpackConfigFileName)); + let input = isWebPacked + ? fromLocalWebpack(extensionPath, webpackConfigFileName) + : fromLocalNormal(extensionPath); + + if (isWebPacked) { + input = updateExtensionPackageJSON(input, (data: any) => { + delete data.scripts; + delete data.dependencies; + delete data.devDependencies; + if (data.main) { + data.main = data.main.replace('/out/', /dist/); + } + return data; + }); + } + + return input; +} + + +function fromLocalWebpack(extensionPath: string, webpackConfigFileName: string): Stream { + const result = es.through(); + + const packagedDependencies: string[] = []; + const packageJsonConfig = require(path.join(extensionPath, 'package.json')); + if (packageJsonConfig.dependencies) { + const webpackRootConfig = require(path.join(extensionPath, webpackConfigFileName)); + for (const key in webpackRootConfig.externals) { + if (key in packageJsonConfig.dependencies) { + packagedDependencies.push(key); + } + } + } + + const vsce = require('vsce') as typeof import('vsce'); + const webpack = require('webpack'); + const webpackGulp = require('webpack-stream'); + + vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Yarn, packagedDependencies }).then(fileNames => { + const files = fileNames + .map(fileName => path.join(extensionPath, fileName)) + .map(filePath => new File({ + path: filePath, + stat: fs.statSync(filePath), + base: extensionPath, + contents: fs.createReadStream(filePath) as any + })); + + // check for a webpack configuration files, then invoke webpack + // and merge its output with the files stream. + const webpackConfigLocations = (glob.sync( + path.join(extensionPath, '**', webpackConfigFileName), + { ignore: ['**/node_modules'] } + )); + + const webpackStreams = webpackConfigLocations.map(webpackConfigPath => { + + const webpackDone = (err: any, stats: any) => { + fancyLog(`Bundled extension: ${ansiColors.yellow(path.join(path.basename(extensionPath), path.relative(extensionPath, webpackConfigPath)))}...`); + if (err) { + result.emit('error', err); + } + const { compilation } = stats; + if (compilation.errors.length > 0) { + result.emit('error', compilation.errors.join('\n')); + } + if (compilation.warnings.length > 0) { + result.emit('error', compilation.warnings.join('\n')); + } + }; + + const webpackConfig = { + ...require(webpackConfigPath), + ...{ mode: 'production' } + }; + const relativeOutputPath = path.relative(extensionPath, webpackConfig.output.path); + + return webpackGulp(webpackConfig, webpack, webpackDone) + .pipe(es.through(function (data) { + data.stat = data.stat || {}; + data.base = extensionPath; + this.emit('data', data); + })) + .pipe(es.through(function (data: File) { + // source map handling: + // * rewrite sourceMappingURL + // * save to disk so that upload-task picks this up + const contents = (data.contents).toString('utf8'); + data.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, function (_m, g1) { + return `\n//# sourceMappingURL=${sourceMappingURLBase}/extensions/${path.basename(extensionPath)}/${relativeOutputPath}/${g1}`; + }), 'utf8'); + + this.emit('data', data); + })); + }); + + es.merge(...webpackStreams, es.readArray(files)) + // .pipe(es.through(function (data) { + // // debug + // console.log('out', data.path, data.contents.length); + // this.emit('data', data); + // })) + .pipe(result); + + }).catch(err => { + console.error(extensionPath); + console.error(packagedDependencies); + result.emit('error', err); + }); + + return result.pipe(createStatsStream(path.basename(extensionPath))); +} + +function fromLocalNormal(extensionPath: string): Stream { + const result = es.through(); + + const vsce = require('vsce') as typeof import('vsce'); + + vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Yarn }) + .then(fileNames => { + const files = fileNames + .map(fileName => path.join(extensionPath, fileName)) + .map(filePath => new File({ + path: filePath, + stat: fs.statSync(filePath), + base: extensionPath, + contents: fs.createReadStream(filePath) as any + })); + + es.readArray(files).pipe(result); + }) + .catch(err => result.emit('error', err)); + + return result.pipe(createStatsStream(path.basename(extensionPath))); +} + +const baseHeaders = { + 'X-Market-Client-Id': 'VSCode Build', + 'User-Agent': 'VSCode Build', + 'X-Market-User-Id': '291C1CD0-051A-4123-9B4B-30D60EF52EE2', +}; + +export function fromMarketplace(extensionName: string, version: string, metadata: any): Stream { + const remote = require('gulp-remote-retry-src'); + const json = require('gulp-json-editor') as typeof import('gulp-json-editor'); + + const [publisher, name] = extensionName.split('.'); + const url = `https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${publisher}/vsextensions/${name}/${version}/vspackage`; + + fancyLog('Downloading extension:', ansiColors.yellow(`${extensionName}@${version}`), '...'); + + const options = { + base: url, + requestOptions: { + gzip: true, + headers: baseHeaders + } + }; + + const packageJsonFilter = filter('package.json', { restore: true }); + + return remote('', options) + .pipe(vzip.src()) + .pipe(filter('extension/**')) + .pipe(rename(p => p.dirname = p.dirname!.replace(/^extension\/?/, ''))) + .pipe(packageJsonFilter) + .pipe(buffer()) + .pipe(json({ __metadata: metadata })) + .pipe(packageJsonFilter.restore); +} +const excludedExtensions = [ + 'vscode-api-tests', + 'vscode-colorize-tests', + 'vscode-test-resolver', + 'ms-vscode.node-debug', + 'ms-vscode.node-debug2', + 'vscode-notebook-tests', + 'vscode-custom-editor-tests', +]; + +const marketplaceWebExtensionsExclude = new Set([ + 'ms-vscode.node-debug', + 'ms-vscode.node-debug2', + 'ms-vscode.js-debug-companion', + 'ms-vscode.js-debug', + 'ms-vscode.vscode-js-profile-table' +]); + +interface IBuiltInExtension { + name: string; + version: string; + repo: string; + metadata: any; +} + +const productJson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')); +const builtInExtensions: IBuiltInExtension[] = productJson.builtInExtensions || []; +const webBuiltInExtensions: IBuiltInExtension[] = productJson.webBuiltInExtensions || []; + +type ExtensionKind = 'ui' | 'workspace' | 'web'; +interface IExtensionManifest { + main: string; + browser: string; + extensionKind?: ExtensionKind | ExtensionKind[]; +} +/** + * Loosely based on `getExtensionKind` from `src/vs/workbench/services/extensions/common/extensionsUtil.ts` + */ +function isWebExtension(manifest: IExtensionManifest): boolean { + if (typeof manifest.extensionKind !== 'undefined') { + const extensionKind = Array.isArray(manifest.extensionKind) ? manifest.extensionKind : [manifest.extensionKind]; + return (extensionKind.indexOf('web') >= 0); + } + return (!Boolean(manifest.main) || Boolean(manifest.browser)); +} + +export function packageLocalExtensionsStream(forWeb: boolean): Stream { + const localExtensionsDescriptions = ( + (glob.sync('extensions/*/package.json')) + .map(manifestPath => { + const absoluteManifestPath = path.join(root, manifestPath); + const extensionPath = path.dirname(path.join(root, manifestPath)); + const extensionName = path.basename(extensionPath); + return { name: extensionName, path: extensionPath, manifestPath: absoluteManifestPath }; + }) + .filter(({ name }) => excludedExtensions.indexOf(name) === -1) + .filter(({ name }) => builtInExtensions.every(b => b.name !== name)) + .filter(({ manifestPath }) => (forWeb ? isWebExtension(require(manifestPath)) : true)) + ); + const localExtensionsStream = minifyExtensionResources( + es.merge( + ...localExtensionsDescriptions.map(extension => { + return fromLocal(extension.path, forWeb) + .pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`)); + }) + ) + ); + + let result: Stream; + if (forWeb) { + result = localExtensionsStream; + } else { + // also include shared node modules + result = es.merge(localExtensionsStream, gulp.src('extensions/node_modules/**', { base: '.' })); + } + + return ( + result + .pipe(util2.setExecutableBit(['**/*.sh'])) + ); +} + +export function packageMarketplaceExtensionsStream(forWeb: boolean): Stream { + const marketplaceExtensionsDescriptions = [ + ...builtInExtensions.filter(({ name }) => (forWeb ? !marketplaceWebExtensionsExclude.has(name) : true)), + ...(forWeb ? webBuiltInExtensions : []) + ]; + const marketplaceExtensionsStream = minifyExtensionResources( + es.merge( + ...marketplaceExtensionsDescriptions + .map(extension => { + const input = fromMarketplace(extension.name, extension.version, extension.metadata) + .pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`)); + return updateExtensionPackageJSON(input, (data: any) => { + delete data.scripts; + delete data.dependencies; + delete data.devDependencies; + return data; + }); + }) + ) + ); + + return ( + marketplaceExtensionsStream + .pipe(util2.setExecutableBit(['**/*.sh'])) + ); +} + +export interface IScannedBuiltinExtension { + extensionPath: string; + packageJSON: any; + packageNLS?: any; + readmePath?: string; + changelogPath?: string; +} + +export function scanBuiltinExtensions(extensionsRoot: string, exclude: string[] = []): IScannedBuiltinExtension[] { + const scannedExtensions: IScannedBuiltinExtension[] = []; + + try { + const extensionsFolders = fs.readdirSync(extensionsRoot); + for (const extensionFolder of extensionsFolders) { + if (exclude.indexOf(extensionFolder) >= 0) { + continue; + } + const packageJSONPath = path.join(extensionsRoot, extensionFolder, 'package.json'); + if (!fs.existsSync(packageJSONPath)) { + continue; + } + let packageJSON = JSON.parse(fs.readFileSync(packageJSONPath).toString('utf8')); + if (!isWebExtension(packageJSON)) { + continue; + } + const children = fs.readdirSync(path.join(extensionsRoot, extensionFolder)); + const packageNLSPath = children.filter(child => child === 'package.nls.json')[0]; + const packageNLS = packageNLSPath ? JSON.parse(fs.readFileSync(path.join(extensionsRoot, extensionFolder, packageNLSPath)).toString()) : undefined; + const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0]; + const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0]; + + scannedExtensions.push({ + extensionPath: extensionFolder, + packageJSON, + packageNLS, + readmePath: readme ? path.join(extensionFolder, readme) : undefined, + changelogPath: changelog ? path.join(extensionFolder, changelog) : undefined, + }); + } + return scannedExtensions; + } catch (ex) { + return scannedExtensions; + } +} + +export function translatePackageJSON(packageJSON: string, packageNLSPath: string) { + const CharCode_PC = '%'.charCodeAt(0); + const packageNls = JSON.parse(fs.readFileSync(packageNLSPath).toString()); + const translate = (obj: any) => { + for (let key in obj) { + const val = obj[key]; + if (Array.isArray(val)) { + val.forEach(translate); + } else if (val && typeof val === 'object') { + translate(val); + } else if (typeof val === 'string' && val.charCodeAt(0) === CharCode_PC && val.charCodeAt(val.length - 1) === CharCode_PC) { + const translated = packageNls[val.substr(1, val.length - 2)]; + if (translated) { + obj[key] = translated; + } + } + } + }; + translate(packageJSON); + return packageJSON; +} + +const extensionsPath = path.join(root, 'extensions'); + +// Additional projects to webpack. These typically build code for webviews +const webpackMediaConfigFiles = [ + 'markdown-language-features/webpack.config.js', + 'simple-browser/webpack.config.js', +]; + +// Additional projects to run esbuild on. These typically build code for webviews +const esbuildMediaScripts = [ + 'markdown-language-features/esbuild.js', + 'notebook-markdown-extensions/esbuild.js', +]; + +export async function webpackExtensions(taskName: string, isWatch: boolean, webpackConfigLocations: { configPath: string, outputRoot?: string }[]) { + const webpack = require('webpack') as typeof import('webpack'); + + const webpackConfigs: webpack.Configuration[] = []; + + for (const { configPath, outputRoot } of webpackConfigLocations) { + const configOrFnOrArray = require(configPath); + function addConfig(configOrFn: webpack.Configuration | Function) { + let config; + if (typeof configOrFn === 'function') { + config = configOrFn({}, {}); + webpackConfigs.push(config); + } else { + config = configOrFn; + } + + if (outputRoot) { + config.output.path = path.join(outputRoot, path.relative(path.dirname(configPath), config.output.path)); + } + + webpackConfigs.push(configOrFn); + } + addConfig(configOrFnOrArray); + } + function reporter(fullStats: any) { + if (Array.isArray(fullStats.children)) { + for (const stats of fullStats.children) { + const outputPath = stats.outputPath; + if (outputPath) { + const relativePath = path.relative(extensionsPath, outputPath).replace(/\\/g, '/'); + const match = relativePath.match(/[^\/]+(\/server|\/client)?/); + fancyLog(`Finished ${ansiColors.green(taskName)} ${ansiColors.cyan(match![0])} with ${stats.errors.length} errors.`); + } + if (Array.isArray(stats.errors)) { + stats.errors.forEach((error: any) => { + fancyLog.error(error); + }); + } + if (Array.isArray(stats.warnings)) { + stats.warnings.forEach((warning: any) => { + fancyLog.warn(warning); + }); + } + } + } + } + return new Promise((resolve, reject) => { + if (isWatch) { + webpack(webpackConfigs).watch({}, (err, stats) => { + if (err) { + reject(); + } else { + reporter(stats.toJson()); + } + }); + } else { + webpack(webpackConfigs).run((err, stats) => { + if (err) { + fancyLog.error(err); + reject(); + } else { + reporter(stats.toJson()); + resolve(); + } + }); + } + }); +} + +async function esbuildExtensions(taskName: string, isWatch: boolean, scripts: { script: string, outputRoot?: string }[]) { + function reporter(stdError: string, script: string) { + const matches = (stdError || '').match(/\> (.+): error: (.+)?/g); + fancyLog(`Finished ${ansiColors.green(taskName)} ${script} with ${matches ? matches.length : 0} errors.`); + for (const match of matches || []) { + fancyLog.error(match); + } + } + + const tasks = scripts.map(({ script, outputRoot }) => { + return new Promise((resolve, reject) => { + const args = [script]; + if (isWatch) { + args.push('--watch'); + } + if (outputRoot) { + args.push('--outputRoot', outputRoot); + } + const proc = cp.execFile(process.argv[0], args, {}, (error, _stdout, stderr) => { + if (error) { + return reject(error); + } + reporter(stderr, script); + if (stderr) { + return reject(); + } + return resolve(); + }); + + proc.stdout!.on('data', (data) => { + fancyLog(`${ansiColors.green(taskName)}: ${data.toString('utf8')}`); + }); + }); + }); + return Promise.all(tasks); +} + +export async function buildExtensionMedia(isWatch: boolean, outputRoot?: string) { + return Promise.all([ + webpackExtensions('webpacking extension media', isWatch, webpackMediaConfigFiles.map(p => { + return { + configPath: path.join(extensionsPath, p), + outputRoot: outputRoot ? path.join(root, outputRoot, path.dirname(p)) : undefined + }; + })), + esbuildExtensions('esbuilding extension media', isWatch, esbuildMediaScripts.map(p => ({ + script: path.join(extensionsPath, p), + outputRoot: outputRoot ? path.join(root, outputRoot, path.dirname(p)) : undefined + }))), + ]); +} diff --git a/lib/vscode/build/lib/git.js b/build/lib/git.js similarity index 100% rename from lib/vscode/build/lib/git.js rename to build/lib/git.js diff --git a/lib/vscode/build/lib/git.ts b/build/lib/git.ts similarity index 100% rename from lib/vscode/build/lib/git.ts rename to build/lib/git.ts diff --git a/build/lib/i18n.js b/build/lib/i18n.js new file mode 100644 index 000000000000..4c7c5c32eb44 --- /dev/null +++ b/build/lib/i18n.js @@ -0,0 +1,1163 @@ +"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.prepareIslFiles = exports.prepareI18nPackFiles = exports.prepareI18nFiles = exports.pullSetupXlfFiles = exports.findObsoleteResources = exports.pushXlfFiles = exports.createXlfFilesForIsl = exports.createXlfFilesForExtensions = exports.createXlfFilesForCoreBundle = exports.getResource = exports.processNlsFiles = exports.Limiter = exports.XLF = exports.Line = exports.externalExtensionsWithTranslations = exports.extraLanguages = exports.defaultLanguages = void 0; +const path = require("path"); +const fs = require("fs"); +const event_stream_1 = require("event-stream"); +const File = require("vinyl"); +const Is = require("is"); +const xml2js = require("xml2js"); +const https = require("https"); +const gulp = require("gulp"); +const fancyLog = require("fancy-log"); +const ansiColors = require("ansi-colors"); +const iconv = require("iconv-lite-umd"); +const NUMBER_OF_CONCURRENT_DOWNLOADS = 4; +function log(message, ...rest) { + fancyLog(ansiColors.green('[i18n]'), message, ...rest); +} +exports.defaultLanguages = [ + { id: 'zh-tw', folderName: 'cht', translationId: 'zh-hant' }, + { id: 'zh-cn', folderName: 'chs', translationId: 'zh-hans' }, + { id: 'ja', folderName: 'jpn' }, + { id: 'ko', folderName: 'kor' }, + { id: 'de', folderName: 'deu' }, + { id: 'fr', folderName: 'fra' }, + { id: 'es', folderName: 'esn' }, + { id: 'ru', folderName: 'rus' }, + { id: 'it', folderName: 'ita' } +]; +// languages requested by the community to non-stable builds +exports.extraLanguages = [ + { id: 'pt-br', folderName: 'ptb' }, + { id: 'hu', folderName: 'hun' }, + { id: 'tr', folderName: 'trk' } +]; +// non built-in extensions also that are transifex and need to be part of the language packs +exports.externalExtensionsWithTranslations = { + 'vscode-chrome-debug': 'msjsdiag.debugger-for-chrome', + 'vscode-node-debug': 'ms-vscode.node-debug', + 'vscode-node-debug2': 'ms-vscode.node-debug2' +}; +var LocalizeInfo; +(function (LocalizeInfo) { + function is(value) { + let candidate = value; + return Is.defined(candidate) && Is.string(candidate.key) && (Is.undef(candidate.comment) || (Is.array(candidate.comment) && candidate.comment.every(element => Is.string(element)))); + } + LocalizeInfo.is = is; +})(LocalizeInfo || (LocalizeInfo = {})); +var BundledFormat; +(function (BundledFormat) { + function is(value) { + if (Is.undef(value)) { + return false; + } + let candidate = value; + let length = Object.keys(value).length; + return length === 3 && Is.defined(candidate.keys) && Is.defined(candidate.messages) && Is.defined(candidate.bundles); + } + BundledFormat.is = is; +})(BundledFormat || (BundledFormat = {})); +var PackageJsonFormat; +(function (PackageJsonFormat) { + function is(value) { + if (Is.undef(value) || !Is.object(value)) { + return false; + } + return Object.keys(value).every(key => { + let element = value[key]; + return Is.string(element) || (Is.object(element) && Is.defined(element.message) && Is.defined(element.comment)); + }); + } + PackageJsonFormat.is = is; +})(PackageJsonFormat || (PackageJsonFormat = {})); +class Line { + constructor(indent = 0) { + this.buffer = []; + if (indent > 0) { + this.buffer.push(new Array(indent + 1).join(' ')); + } + } + append(value) { + this.buffer.push(value); + return this; + } + toString() { + return this.buffer.join(''); + } +} +exports.Line = Line; +class TextModel { + constructor(contents) { + this._lines = contents.split(/\r\n|\r|\n/); + } + get lines() { + return this._lines; + } +} +class XLF { + constructor(project) { + this.project = project; + this.buffer = []; + this.files = Object.create(null); + this.numberOfMessages = 0; + } + toString() { + this.appendHeader(); + const files = Object.keys(this.files).sort(); + for (const file of files) { + this.appendNewLine(``, 2); + const items = this.files[file].sort((a, b) => { + return a.id < b.id ? -1 : a.id > b.id ? 1 : 0; + }); + for (const item of items) { + this.addStringItem(file, item); + } + this.appendNewLine(''); + } + this.appendFooter(); + return this.buffer.join('\r\n'); + } + addFile(original, keys, messages) { + if (keys.length === 0) { + console.log('No keys in ' + original); + return; + } + if (keys.length !== messages.length) { + throw new Error(`Unmatching keys(${keys.length}) and messages(${messages.length}).`); + } + this.numberOfMessages += keys.length; + this.files[original] = []; + let existingKeys = new Set(); + for (let i = 0; i < keys.length; i++) { + let key = keys[i]; + let realKey; + let comment; + if (Is.string(key)) { + realKey = key; + comment = undefined; + } + else if (LocalizeInfo.is(key)) { + realKey = key.key; + if (key.comment && key.comment.length > 0) { + comment = key.comment.map(comment => encodeEntities(comment)).join('\r\n'); + } + } + if (!realKey || existingKeys.has(realKey)) { + continue; + } + existingKeys.add(realKey); + let message = encodeEntities(messages[i]); + this.files[original].push({ id: realKey, message: message, comment: comment }); + } + } + addStringItem(file, item) { + if (!item.id || item.message === undefined || item.message === null) { + throw new Error(`No item ID or value specified: ${JSON.stringify(item)}. File: ${file}`); + } + if (item.message.length === 0) { + log(`Item with id ${item.id} in file ${file} has an empty message.`); + } + this.appendNewLine(``, 4); + this.appendNewLine(`${item.message}`, 6); + if (item.comment) { + this.appendNewLine(`${item.comment}`, 6); + } + this.appendNewLine('', 4); + } + appendHeader() { + this.appendNewLine('', 0); + this.appendNewLine('', 0); + } + appendFooter() { + this.appendNewLine('', 0); + } + appendNewLine(content, indent) { + let line = new Line(indent); + line.append(content); + this.buffer.push(line.toString()); + } +} +exports.XLF = XLF; +XLF.parsePseudo = function (xlfString) { + return new Promise((resolve) => { + let parser = new xml2js.Parser(); + let files = []; + parser.parseString(xlfString, function (_err, result) { + const fileNodes = result['xliff']['file']; + fileNodes.forEach(file => { + const originalFilePath = file.$.original; + const messages = {}; + const transUnits = file.body[0]['trans-unit']; + if (transUnits) { + transUnits.forEach((unit) => { + const key = unit.$.id; + const val = pseudify(unit.source[0]['_'].toString()); + if (key && val) { + messages[key] = decodeEntities(val); + } + }); + files.push({ messages: messages, originalFilePath: originalFilePath, language: 'ps' }); + } + }); + resolve(files); + }); + }); +}; +XLF.parse = function (xlfString) { + return new Promise((resolve, reject) => { + let parser = new xml2js.Parser(); + let files = []; + parser.parseString(xlfString, function (err, result) { + if (err) { + reject(new Error(`XLF parsing error: Failed to parse XLIFF string. ${err}`)); + } + const fileNodes = result['xliff']['file']; + if (!fileNodes) { + reject(new Error(`XLF parsing error: XLIFF file does not contain "xliff" or "file" node(s) required for parsing.`)); + } + fileNodes.forEach((file) => { + const originalFilePath = file.$.original; + if (!originalFilePath) { + reject(new Error(`XLF parsing error: XLIFF file node does not contain original attribute to determine the original location of the resource file.`)); + } + let language = file.$['target-language']; + if (!language) { + reject(new Error(`XLF parsing error: XLIFF file node does not contain target-language attribute to determine translated language.`)); + } + const messages = {}; + const transUnits = file.body[0]['trans-unit']; + if (transUnits) { + transUnits.forEach((unit) => { + const key = unit.$.id; + if (!unit.target) { + return; // No translation available + } + let val = unit.target[0]; + if (typeof val !== 'string') { + // We allow empty source values so support them for translations as well. + val = val._ ? val._ : ''; + } + if (!key) { + reject(new Error(`XLF parsing error: trans-unit ${JSON.stringify(unit, undefined, 0)} defined in file ${originalFilePath} is missing the ID attribute.`)); + return; + } + messages[key] = decodeEntities(val); + }); + files.push({ messages: messages, originalFilePath: originalFilePath, language: language.toLowerCase() }); + } + }); + resolve(files); + }); + }); +}; +class Limiter { + constructor(maxDegreeOfParalellism) { + this.maxDegreeOfParalellism = maxDegreeOfParalellism; + this.outstandingPromises = []; + this.runningPromises = 0; + } + queue(factory) { + return new Promise((c, e) => { + this.outstandingPromises.push({ factory, c, e }); + this.consume(); + }); + } + consume() { + while (this.outstandingPromises.length && this.runningPromises < this.maxDegreeOfParalellism) { + const iLimitedTask = this.outstandingPromises.shift(); + this.runningPromises++; + const promise = iLimitedTask.factory(); + promise.then(iLimitedTask.c).catch(iLimitedTask.e); + promise.then(() => this.consumed()).catch(() => this.consumed()); + } + } + consumed() { + this.runningPromises--; + this.consume(); + } +} +exports.Limiter = Limiter; +function sortLanguages(languages) { + return languages.sort((a, b) => { + return a.id < b.id ? -1 : (a.id > b.id ? 1 : 0); + }); +} +function stripComments(content) { + /** + * First capturing group matches double quoted string + * Second matches single quotes string + * Third matches block comments + * Fourth matches line comments + */ + const regexp = /("(?:[^\\\"]*(?:\\.)?)*")|('(?:[^\\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g; + let result = content.replace(regexp, (match, _m1, _m2, m3, m4) => { + // Only one of m1, m2, m3, m4 matches + if (m3) { + // A block comment. Replace with nothing + return ''; + } + else if (m4) { + // A line comment. If it ends in \r?\n then keep it. + let length = m4.length; + if (length > 2 && m4[length - 1] === '\n') { + return m4[length - 2] === '\r' ? '\r\n' : '\n'; + } + else { + return ''; + } + } + else { + // We match a string + return match; + } + }); + return result; +} +function escapeCharacters(value) { + const result = []; + for (let i = 0; i < value.length; i++) { + const ch = value.charAt(i); + switch (ch) { + case '\'': + result.push('\\\''); + break; + case '"': + result.push('\\"'); + break; + case '\\': + result.push('\\\\'); + break; + case '\n': + result.push('\\n'); + break; + case '\r': + result.push('\\r'); + break; + case '\t': + result.push('\\t'); + break; + case '\b': + result.push('\\b'); + break; + case '\f': + result.push('\\f'); + break; + default: + result.push(ch); + } + } + return result.join(''); +} +function processCoreBundleFormat(fileHeader, languages, json, emitter) { + let keysSection = json.keys; + let messageSection = json.messages; + let bundleSection = json.bundles; + let statistics = Object.create(null); + let defaultMessages = Object.create(null); + let modules = Object.keys(keysSection); + modules.forEach((module) => { + let keys = keysSection[module]; + let messages = messageSection[module]; + if (!messages || keys.length !== messages.length) { + emitter.emit('error', `Message for module ${module} corrupted. Mismatch in number of keys and messages.`); + return; + } + let messageMap = Object.create(null); + defaultMessages[module] = messageMap; + keys.map((key, i) => { + if (typeof key === 'string') { + messageMap[key] = messages[i]; + } + else { + messageMap[key.key] = messages[i]; + } + }); + }); + let languageDirectory = path.join(__dirname, '..', '..', '..', 'vscode-loc', 'i18n'); + if (!fs.existsSync(languageDirectory)) { + log(`No VS Code localization repository found. Looking at ${languageDirectory}`); + log(`To bundle translations please check out the vscode-loc repository as a sibling of the vscode repository.`); + } + let sortedLanguages = sortLanguages(languages); + sortedLanguages.forEach((language) => { + if (process.env['VSCODE_BUILD_VERBOSE']) { + log(`Generating nls bundles for: ${language.id}`); + } + statistics[language.id] = 0; + let localizedModules = Object.create(null); + let languageFolderName = language.translationId || language.id; + let i18nFile = path.join(languageDirectory, `vscode-language-pack-${languageFolderName}`, 'translations', 'main.i18n.json'); + let allMessages; + if (fs.existsSync(i18nFile)) { + let content = stripComments(fs.readFileSync(i18nFile, 'utf8')); + allMessages = JSON.parse(content); + } + modules.forEach((module) => { + let order = keysSection[module]; + let moduleMessage; + if (allMessages) { + moduleMessage = allMessages.contents[module]; + } + if (!moduleMessage) { + if (process.env['VSCODE_BUILD_VERBOSE']) { + log(`No localized messages found for module ${module}. Using default messages.`); + } + moduleMessage = defaultMessages[module]; + statistics[language.id] = statistics[language.id] + Object.keys(moduleMessage).length; + } + let localizedMessages = []; + order.forEach((keyInfo) => { + let key = null; + if (typeof keyInfo === 'string') { + key = keyInfo; + } + else { + key = keyInfo.key; + } + let message = moduleMessage[key]; + if (!message) { + if (process.env['VSCODE_BUILD_VERBOSE']) { + log(`No localized message found for key ${key} in module ${module}. Using default message.`); + } + message = defaultMessages[module][key]; + statistics[language.id] = statistics[language.id] + 1; + } + localizedMessages.push(message); + }); + localizedModules[module] = localizedMessages; + }); + Object.keys(bundleSection).forEach((bundle) => { + let modules = bundleSection[bundle]; + let contents = [ + fileHeader, + `define("${bundle}.nls.${language.id}", {` + ]; + modules.forEach((module, index) => { + contents.push(`\t"${module}": [`); + let messages = localizedModules[module]; + if (!messages) { + emitter.emit('error', `Didn't find messages for module ${module}.`); + return; + } + messages.forEach((message, index) => { + contents.push(`\t\t"${escapeCharacters(message)}${index < messages.length ? '",' : '"'}`); + }); + contents.push(index < modules.length - 1 ? '\t],' : '\t]'); + }); + contents.push('});'); + emitter.queue(new File({ path: bundle + '.nls.' + language.id + '.js', contents: Buffer.from(contents.join('\n'), 'utf-8') })); + }); + }); + Object.keys(statistics).forEach(key => { + let value = statistics[key]; + log(`${key} has ${value} untranslated strings.`); + }); + sortedLanguages.forEach(language => { + let stats = statistics[language.id]; + if (Is.undef(stats)) { + log(`\tNo translations found for language ${language.id}. Using default language instead.`); + } + }); +} +function processNlsFiles(opts) { + return event_stream_1.through(function (file) { + let fileName = path.basename(file.path); + if (fileName === 'nls.metadata.json') { + let json = null; + if (file.isBuffer()) { + json = JSON.parse(file.contents.toString('utf8')); + } + else { + this.emit('error', `Failed to read component file: ${file.relative}`); + return; + } + if (BundledFormat.is(json)) { + processCoreBundleFormat(opts.fileHeader, opts.languages, json, this); + } + } + this.queue(file); + }); +} +exports.processNlsFiles = processNlsFiles; +const editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench', extensionsProject = 'vscode-extensions', setupProject = 'vscode-setup'; +function getResource(sourceFile) { + let resource; + if (/^vs\/platform/.test(sourceFile)) { + return { name: 'vs/platform', project: editorProject }; + } + else if (/^vs\/editor\/contrib/.test(sourceFile)) { + return { name: 'vs/editor/contrib', project: editorProject }; + } + else if (/^vs\/editor/.test(sourceFile)) { + return { name: 'vs/editor', project: editorProject }; + } + else if (/^vs\/base/.test(sourceFile)) { + return { name: 'vs/base', project: editorProject }; + } + else if (/^vs\/code/.test(sourceFile)) { + return { name: 'vs/code', project: workbenchProject }; + } + else if (/^vs\/workbench\/contrib/.test(sourceFile)) { + resource = sourceFile.split('/', 4).join('/'); + return { name: resource, project: workbenchProject }; + } + else if (/^vs\/workbench\/services/.test(sourceFile)) { + resource = sourceFile.split('/', 4).join('/'); + return { name: resource, project: workbenchProject }; + } + else if (/^vs\/workbench/.test(sourceFile)) { + return { name: 'vs/workbench', project: workbenchProject }; + } + throw new Error(`Could not identify the XLF bundle for ${sourceFile}`); +} +exports.getResource = getResource; +function createXlfFilesForCoreBundle() { + return event_stream_1.through(function (file) { + const basename = path.basename(file.path); + if (basename === 'nls.metadata.json') { + if (file.isBuffer()) { + const xlfs = Object.create(null); + const json = JSON.parse(file.contents.toString('utf8')); + for (let coreModule in json.keys) { + const projectResource = getResource(coreModule); + const resource = projectResource.name; + const project = projectResource.project; + const keys = json.keys[coreModule]; + const messages = json.messages[coreModule]; + if (keys.length !== messages.length) { + this.emit('error', `There is a mismatch between keys and messages in ${file.relative} for module ${coreModule}`); + return; + } + else { + let xlf = xlfs[resource]; + if (!xlf) { + xlf = new XLF(project); + xlfs[resource] = xlf; + } + xlf.addFile(`src/${coreModule}`, keys, messages); + } + } + for (let resource in xlfs) { + const xlf = xlfs[resource]; + const filePath = `${xlf.project}/${resource.replace(/\//g, '_')}.xlf`; + const xlfFile = new File({ + path: filePath, + contents: Buffer.from(xlf.toString(), 'utf8') + }); + this.queue(xlfFile); + } + } + else { + this.emit('error', new Error(`File ${file.relative} is not using a buffer content`)); + return; + } + } + else { + this.emit('error', new Error(`File ${file.relative} is not a core meta data file.`)); + return; + } + }); +} +exports.createXlfFilesForCoreBundle = createXlfFilesForCoreBundle; +function createXlfFilesForExtensions() { + let counter = 0; + let folderStreamEnded = false; + let folderStreamEndEmitted = false; + return event_stream_1.through(function (extensionFolder) { + const folderStream = this; + const stat = fs.statSync(extensionFolder.path); + if (!stat.isDirectory()) { + return; + } + let extensionName = path.basename(extensionFolder.path); + if (extensionName === 'node_modules') { + return; + } + counter++; + let _xlf; + function getXlf() { + if (!_xlf) { + _xlf = new XLF(extensionsProject); + } + return _xlf; + } + gulp.src([`.build/extensions/${extensionName}/package.nls.json`, `.build/extensions/${extensionName}/**/nls.metadata.json`], { allowEmpty: true }).pipe(event_stream_1.through(function (file) { + if (file.isBuffer()) { + const buffer = file.contents; + const basename = path.basename(file.path); + if (basename === 'package.nls.json') { + const json = JSON.parse(buffer.toString('utf8')); + const keys = Object.keys(json); + const messages = keys.map((key) => { + const value = json[key]; + if (Is.string(value)) { + return value; + } + else if (value) { + return value.message; + } + else { + return `Unknown message for key: ${key}`; + } + }); + getXlf().addFile(`extensions/${extensionName}/package`, keys, messages); + } + else if (basename === 'nls.metadata.json') { + const json = JSON.parse(buffer.toString('utf8')); + const relPath = path.relative(`.build/extensions/${extensionName}`, path.dirname(file.path)); + for (let file in json) { + const fileContent = json[file]; + getXlf().addFile(`extensions/${extensionName}/${relPath}/${file}`, fileContent.keys, fileContent.messages); + } + } + else { + this.emit('error', new Error(`${file.path} is not a valid extension nls file`)); + return; + } + } + }, function () { + if (_xlf) { + let xlfFile = new File({ + path: path.join(extensionsProject, extensionName + '.xlf'), + contents: Buffer.from(_xlf.toString(), 'utf8') + }); + folderStream.queue(xlfFile); + } + this.queue(null); + counter--; + if (counter === 0 && folderStreamEnded && !folderStreamEndEmitted) { + folderStreamEndEmitted = true; + folderStream.queue(null); + } + })); + }, function () { + folderStreamEnded = true; + if (counter === 0) { + folderStreamEndEmitted = true; + this.queue(null); + } + }); +} +exports.createXlfFilesForExtensions = createXlfFilesForExtensions; +function createXlfFilesForIsl() { + return event_stream_1.through(function (file) { + let projectName, resourceFile; + if (path.basename(file.path) === 'messages.en.isl') { + projectName = setupProject; + resourceFile = 'messages.xlf'; + } + else { + throw new Error(`Unknown input file ${file.path}`); + } + let xlf = new XLF(projectName), keys = [], messages = []; + let model = new TextModel(file.contents.toString()); + let inMessageSection = false; + model.lines.forEach(line => { + if (line.length === 0) { + return; + } + let firstChar = line.charAt(0); + switch (firstChar) { + case ';': + // Comment line; + return; + case '[': + inMessageSection = '[Messages]' === line || '[CustomMessages]' === line; + return; + } + if (!inMessageSection) { + return; + } + let sections = line.split('='); + if (sections.length !== 2) { + throw new Error(`Badly formatted message found: ${line}`); + } + else { + let key = sections[0]; + let value = sections[1]; + if (key.length > 0 && value.length > 0) { + keys.push(key); + messages.push(value); + } + } + }); + const originalPath = file.path.substring(file.cwd.length + 1, file.path.split('.')[0].length).replace(/\\/g, '/'); + xlf.addFile(originalPath, keys, messages); + // Emit only upon all ISL files combined into single XLF instance + const newFilePath = path.join(projectName, resourceFile); + const xlfFile = new File({ path: newFilePath, contents: Buffer.from(xlf.toString(), 'utf-8') }); + this.queue(xlfFile); + }); +} +exports.createXlfFilesForIsl = createXlfFilesForIsl; +function pushXlfFiles(apiHostname, username, password) { + let tryGetPromises = []; + let updateCreatePromises = []; + return event_stream_1.through(function (file) { + const project = path.dirname(file.relative); + const fileName = path.basename(file.path); + const slug = fileName.substr(0, fileName.length - '.xlf'.length); + const credentials = `${username}:${password}`; + // Check if resource already exists, if not, then create it. + let promise = tryGetResource(project, slug, apiHostname, credentials); + tryGetPromises.push(promise); + promise.then(exists => { + if (exists) { + promise = updateResource(project, slug, file, apiHostname, credentials); + } + else { + promise = createResource(project, slug, file, apiHostname, credentials); + } + updateCreatePromises.push(promise); + }); + }, function () { + // End the pipe only after all the communication with Transifex API happened + Promise.all(tryGetPromises).then(() => { + Promise.all(updateCreatePromises).then(() => { + this.queue(null); + }).catch((reason) => { throw new Error(reason); }); + }).catch((reason) => { throw new Error(reason); }); + }); +} +exports.pushXlfFiles = pushXlfFiles; +function getAllResources(project, apiHostname, username, password) { + return new Promise((resolve, reject) => { + const credentials = `${username}:${password}`; + const options = { + hostname: apiHostname, + path: `/api/2/project/${project}/resources`, + auth: credentials, + method: 'GET' + }; + const request = https.request(options, (res) => { + let buffer = []; + res.on('data', (chunk) => buffer.push(chunk)); + res.on('end', () => { + if (res.statusCode === 200) { + let json = JSON.parse(Buffer.concat(buffer).toString()); + if (Array.isArray(json)) { + resolve(json.map(o => o.slug)); + return; + } + reject(`Unexpected data format. Response code: ${res.statusCode}.`); + } + else { + reject(`No resources in ${project} returned no data. Response code: ${res.statusCode}.`); + } + }); + }); + request.on('error', (err) => { + reject(`Failed to query resources in ${project} with the following error: ${err}. ${options.path}`); + }); + request.end(); + }); +} +function findObsoleteResources(apiHostname, username, password) { + let resourcesByProject = Object.create(null); + resourcesByProject[extensionsProject] = [].concat(exports.externalExtensionsWithTranslations); // clone + return event_stream_1.through(function (file) { + const project = path.dirname(file.relative); + const fileName = path.basename(file.path); + const slug = fileName.substr(0, fileName.length - '.xlf'.length); + let slugs = resourcesByProject[project]; + if (!slugs) { + resourcesByProject[project] = slugs = []; + } + slugs.push(slug); + this.push(file); + }, function () { + const json = JSON.parse(fs.readFileSync('./build/lib/i18n.resources.json', 'utf8')); + let i18Resources = [...json.editor, ...json.workbench].map((r) => r.project + '/' + r.name.replace(/\//g, '_')); + let extractedResources = []; + for (let project of [workbenchProject, editorProject]) { + for (let resource of resourcesByProject[project]) { + if (resource !== 'setup_messages') { + extractedResources.push(project + '/' + resource); + } + } + } + if (i18Resources.length !== extractedResources.length) { + console.log(`[i18n] Obsolete resources in file 'build/lib/i18n.resources.json': JSON.stringify(${i18Resources.filter(p => extractedResources.indexOf(p) === -1)})`); + console.log(`[i18n] Missing resources in file 'build/lib/i18n.resources.json': JSON.stringify(${extractedResources.filter(p => i18Resources.indexOf(p) === -1)})`); + } + let promises = []; + for (let project in resourcesByProject) { + promises.push(getAllResources(project, apiHostname, username, password).then(resources => { + let expectedResources = resourcesByProject[project]; + let unusedResources = resources.filter(resource => resource && expectedResources.indexOf(resource) === -1); + if (unusedResources.length) { + console.log(`[transifex] Obsolete resources in project '${project}': ${unusedResources.join(', ')}`); + } + })); + } + return Promise.all(promises).then(_ => { + this.push(null); + }).catch((reason) => { throw new Error(reason); }); + }); +} +exports.findObsoleteResources = findObsoleteResources; +function tryGetResource(project, slug, apiHostname, credentials) { + return new Promise((resolve, reject) => { + const options = { + hostname: apiHostname, + path: `/api/2/project/${project}/resource/${slug}/?details`, + auth: credentials, + method: 'GET' + }; + const request = https.request(options, (response) => { + if (response.statusCode === 404) { + resolve(false); + } + else if (response.statusCode === 200) { + resolve(true); + } + else { + reject(`Failed to query resource ${project}/${slug}. Response: ${response.statusCode} ${response.statusMessage}`); + } + }); + request.on('error', (err) => { + reject(`Failed to get ${project}/${slug} on Transifex: ${err}`); + }); + request.end(); + }); +} +function createResource(project, slug, xlfFile, apiHostname, credentials) { + return new Promise((_resolve, reject) => { + const data = JSON.stringify({ + 'content': xlfFile.contents.toString(), + 'name': slug, + 'slug': slug, + 'i18n_type': 'XLIFF' + }); + const options = { + hostname: apiHostname, + path: `/api/2/project/${project}/resources`, + headers: { + 'Content-Type': 'application/json', + 'Content-Length': Buffer.byteLength(data) + }, + auth: credentials, + method: 'POST' + }; + let request = https.request(options, (res) => { + if (res.statusCode === 201) { + log(`Resource ${project}/${slug} successfully created on Transifex.`); + } + else { + reject(`Something went wrong in the request creating ${slug} in ${project}. ${res.statusCode}`); + } + }); + request.on('error', (err) => { + reject(`Failed to create ${project}/${slug} on Transifex: ${err}`); + }); + request.write(data); + request.end(); + }); +} +/** + * The following link provides information about how Transifex handles updates of a resource file: + * https://dev.befoolish.co/tx-docs/public/projects/updating-content#what-happens-when-you-update-files + */ +function updateResource(project, slug, xlfFile, apiHostname, credentials) { + return new Promise((resolve, reject) => { + const data = JSON.stringify({ content: xlfFile.contents.toString() }); + const options = { + hostname: apiHostname, + path: `/api/2/project/${project}/resource/${slug}/content`, + headers: { + 'Content-Type': 'application/json', + 'Content-Length': Buffer.byteLength(data) + }, + auth: credentials, + method: 'PUT' + }; + let request = https.request(options, (res) => { + if (res.statusCode === 200) { + res.setEncoding('utf8'); + let responseBuffer = ''; + res.on('data', function (chunk) { + responseBuffer += chunk; + }); + res.on('end', () => { + const response = JSON.parse(responseBuffer); + log(`Resource ${project}/${slug} successfully updated on Transifex. Strings added: ${response.strings_added}, updated: ${response.strings_added}, deleted: ${response.strings_added}`); + resolve(); + }); + } + else { + reject(`Something went wrong in the request updating ${slug} in ${project}. ${res.statusCode}`); + } + }); + request.on('error', (err) => { + reject(`Failed to update ${project}/${slug} on Transifex: ${err}`); + }); + request.write(data); + request.end(); + }); +} +function pullSetupXlfFiles(apiHostname, username, password, language, includeDefault) { + let setupResources = [{ name: 'setup_messages', project: workbenchProject }]; + if (includeDefault) { + setupResources.push({ name: 'setup_default', project: setupProject }); + } + return pullXlfFiles(apiHostname, username, password, language, setupResources); +} +exports.pullSetupXlfFiles = pullSetupXlfFiles; +function pullXlfFiles(apiHostname, username, password, language, resources) { + const credentials = `${username}:${password}`; + let expectedTranslationsCount = resources.length; + let translationsRetrieved = 0, called = false; + return event_stream_1.readable(function (_count, callback) { + // Mark end of stream when all resources were retrieved + if (translationsRetrieved === expectedTranslationsCount) { + return this.emit('end'); + } + if (!called) { + called = true; + const stream = this; + resources.map(function (resource) { + retrieveResource(language, resource, apiHostname, credentials).then((file) => { + if (file) { + stream.emit('data', file); + } + translationsRetrieved++; + }).catch(error => { throw new Error(error); }); + }); + } + callback(); + }); +} +const limiter = new Limiter(NUMBER_OF_CONCURRENT_DOWNLOADS); +function retrieveResource(language, resource, apiHostname, credentials) { + return limiter.queue(() => new Promise((resolve, reject) => { + const slug = resource.name.replace(/\//g, '_'); + const project = resource.project; + let transifexLanguageId = language.id === 'ps' ? 'en' : language.translationId || language.id; + const options = { + hostname: apiHostname, + path: `/api/2/project/${project}/resource/${slug}/translation/${transifexLanguageId}?file&mode=onlyreviewed`, + auth: credentials, + port: 443, + method: 'GET' + }; + console.log('[transifex] Fetching ' + options.path); + let request = https.request(options, (res) => { + let xlfBuffer = []; + res.on('data', (chunk) => xlfBuffer.push(chunk)); + res.on('end', () => { + if (res.statusCode === 200) { + resolve(new File({ contents: Buffer.concat(xlfBuffer), path: `${project}/${slug}.xlf` })); + } + else if (res.statusCode === 404) { + console.log(`[transifex] ${slug} in ${project} returned no data.`); + resolve(null); + } + else { + reject(`${slug} in ${project} returned no data. Response code: ${res.statusCode}.`); + } + }); + }); + request.on('error', (err) => { + reject(`Failed to query resource ${slug} with the following error: ${err}. ${options.path}`); + }); + request.end(); + })); +} +function prepareI18nFiles() { + let parsePromises = []; + return event_stream_1.through(function (xlf) { + let stream = this; + let parsePromise = XLF.parse(xlf.contents.toString()); + parsePromises.push(parsePromise); + parsePromise.then(resolvedFiles => { + resolvedFiles.forEach(file => { + let translatedFile = createI18nFile(file.originalFilePath, file.messages); + stream.queue(translatedFile); + }); + }); + }, function () { + Promise.all(parsePromises) + .then(() => { this.queue(null); }) + .catch(reason => { throw new Error(reason); }); + }); +} +exports.prepareI18nFiles = prepareI18nFiles; +function createI18nFile(originalFilePath, messages) { + let result = Object.create(null); + result[''] = [ + '--------------------------------------------------------------------------------------------', + 'Copyright (c) Microsoft Corporation. All rights reserved.', + 'Licensed under the MIT License. See License.txt in the project root for license information.', + '--------------------------------------------------------------------------------------------', + 'Do not edit this file. It is machine generated.' + ]; + for (let key of Object.keys(messages)) { + result[key] = messages[key]; + } + let content = JSON.stringify(result, null, '\t'); + if (process.platform === 'win32') { + content = content.replace(/\n/g, '\r\n'); + } + return new File({ + path: path.join(originalFilePath + '.i18n.json'), + contents: Buffer.from(content, 'utf8') + }); +} +const i18nPackVersion = '1.0.0'; +function prepareI18nPackFiles(externalExtensions, resultingTranslationPaths, pseudo = false) { + let parsePromises = []; + let mainPack = { version: i18nPackVersion, contents: {} }; + let extensionsPacks = {}; + let errors = []; + return event_stream_1.through(function (xlf) { + let project = path.basename(path.dirname(path.dirname(xlf.relative))); + let resource = path.basename(xlf.relative, '.xlf'); + let contents = xlf.contents.toString(); + log(`Found ${project}: ${resource}`); + let parsePromise = pseudo ? XLF.parsePseudo(contents) : XLF.parse(contents); + parsePromises.push(parsePromise); + parsePromise.then(resolvedFiles => { + resolvedFiles.forEach(file => { + const path = file.originalFilePath; + const firstSlash = path.indexOf('/'); + if (project === extensionsProject) { + let extPack = extensionsPacks[resource]; + if (!extPack) { + extPack = extensionsPacks[resource] = { version: i18nPackVersion, contents: {} }; + } + const externalId = externalExtensions[resource]; + if (!externalId) { // internal extension: remove 'extensions/extensionId/' segnent + const secondSlash = path.indexOf('/', firstSlash + 1); + extPack.contents[path.substr(secondSlash + 1)] = file.messages; + } + else { + extPack.contents[path] = file.messages; + } + } + else { + mainPack.contents[path.substr(firstSlash + 1)] = file.messages; + } + }); + }).catch(reason => { + errors.push(reason); + }); + }, function () { + Promise.all(parsePromises) + .then(() => { + if (errors.length > 0) { + throw errors; + } + const translatedMainFile = createI18nFile('./main', mainPack); + resultingTranslationPaths.push({ id: 'vscode', resourceName: 'main.i18n.json' }); + this.queue(translatedMainFile); + for (let extension in extensionsPacks) { + const translatedExtFile = createI18nFile(`extensions/${extension}`, extensionsPacks[extension]); + this.queue(translatedExtFile); + const externalExtensionId = externalExtensions[extension]; + if (externalExtensionId) { + resultingTranslationPaths.push({ id: externalExtensionId, resourceName: `extensions/${extension}.i18n.json` }); + } + else { + resultingTranslationPaths.push({ id: `vscode.${extension}`, resourceName: `extensions/${extension}.i18n.json` }); + } + } + this.queue(null); + }) + .catch((reason) => { + this.emit('error', reason); + }); + }); +} +exports.prepareI18nPackFiles = prepareI18nPackFiles; +function prepareIslFiles(language, innoSetupConfig) { + let parsePromises = []; + return event_stream_1.through(function (xlf) { + let stream = this; + let parsePromise = XLF.parse(xlf.contents.toString()); + parsePromises.push(parsePromise); + parsePromise.then(resolvedFiles => { + resolvedFiles.forEach(file => { + let translatedFile = createIslFile(file.originalFilePath, file.messages, language, innoSetupConfig); + stream.queue(translatedFile); + }); + }).catch(reason => { + this.emit('error', reason); + }); + }, function () { + Promise.all(parsePromises) + .then(() => { this.queue(null); }) + .catch(reason => { + this.emit('error', reason); + }); + }); +} +exports.prepareIslFiles = prepareIslFiles; +function createIslFile(originalFilePath, messages, language, innoSetup) { + let content = []; + let originalContent; + if (path.basename(originalFilePath) === 'Default') { + originalContent = new TextModel(fs.readFileSync(originalFilePath + '.isl', 'utf8')); + } + else { + originalContent = new TextModel(fs.readFileSync(originalFilePath + '.en.isl', 'utf8')); + } + originalContent.lines.forEach(line => { + if (line.length > 0) { + let firstChar = line.charAt(0); + if (firstChar === '[' || firstChar === ';') { + content.push(line); + } + else { + let sections = line.split('='); + let key = sections[0]; + let translated = line; + if (key) { + let translatedMessage = messages[key]; + if (translatedMessage) { + translated = `${key}=${translatedMessage}`; + } + } + content.push(translated); + } + } + }); + const basename = path.basename(originalFilePath); + const filePath = `${basename}.${language.id}.isl`; + const encoded = iconv.encode(Buffer.from(content.join('\r\n'), 'utf8').toString(), innoSetup.codePage); + return new File({ + path: filePath, + contents: Buffer.from(encoded), + }); +} +function encodeEntities(value) { + let result = []; + for (let i = 0; i < value.length; i++) { + let ch = value[i]; + switch (ch) { + case '<': + result.push('<'); + break; + case '>': + result.push('>'); + break; + case '&': + result.push('&'); + break; + default: + result.push(ch); + } + } + return result.join(''); +} +function decodeEntities(value) { + return value.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'); +} +function pseudify(message) { + return '\uFF3B' + message.replace(/[aouei]/g, '$&$&') + '\uFF3D'; +} diff --git a/lib/vscode/build/lib/i18n.resources.json b/build/lib/i18n.resources.json similarity index 100% rename from lib/vscode/build/lib/i18n.resources.json rename to build/lib/i18n.resources.json diff --git a/lib/vscode/build/lib/i18n.ts b/build/lib/i18n.ts similarity index 93% rename from lib/vscode/build/lib/i18n.ts rename to build/lib/i18n.ts index 746c481b262d..5e00e9d6c6e6 100644 --- a/lib/vscode/build/lib/i18n.ts +++ b/build/lib/i18n.ts @@ -10,7 +10,6 @@ import { through, readable, ThroughStream } from 'event-stream'; import * as File from 'vinyl'; import * as Is from 'is'; import * as xml2js from 'xml2js'; -import * as glob from 'glob'; import * as https from 'https'; import * as gulp from 'gulp'; import * as fancyLog from 'fancy-log'; @@ -31,10 +30,6 @@ export interface Language { export interface InnoSetup { codePage: string; //code page for encoding (http://www.jrsoftware.org/ishelp/index.php?topic=langoptionssection) - defaultInfo?: { - name: string; // inno setup language name - id: string; // locale identifier (https://msdn.microsoft.com/en-us/library/dd318693.aspx) - }; } export const defaultLanguages: Language[] = [ @@ -198,14 +193,17 @@ export class XLF { public toString(): string { this.appendHeader(); - for (let file in this.files) { + const files = Object.keys(this.files).sort(); + for (const file of files) { this.appendNewLine(``, 2); - for (let item of this.files[file]) { + const items = this.files[file].sort((a: Item, b: Item) => { + return a.id < b.id ? -1 : a.id > b.id ? 1 : 0; + }); + for (const item of items) { this.addStringItem(file, item); } - this.appendNewLine('', 2); + this.appendNewLine(''); } - this.appendFooter(); return this.buffer.join('\r\n'); } @@ -763,12 +761,11 @@ export function createXlfFilesForIsl(): ThroughStream { return through(function (this: ThroughStream, file: File) { let projectName: string, resourceFile: string; - if (path.basename(file.path) === 'Default.isl') { + if (path.basename(file.path) === 'messages.en.isl') { projectName = setupProject; - resourceFile = 'setup_default.xlf'; + resourceFile = 'messages.xlf'; } else { - projectName = workbenchProject; - resourceFile = 'setup_messages.xlf'; + throw new Error(`Unknown input file ${file.path}`); } let xlf = new XLF(projectName), @@ -1036,35 +1033,6 @@ function updateResource(project: string, slug: string, xlfFile: File, apiHostnam }); } -// cache resources -let _coreAndExtensionResources: Resource[]; - -export function pullCoreAndExtensionsXlfFiles(apiHostname: string, username: string, password: string, language: Language, externalExtensions?: Map): NodeJS.ReadableStream { - if (!_coreAndExtensionResources) { - _coreAndExtensionResources = []; - // editor and workbench - const json = JSON.parse(fs.readFileSync('./build/lib/i18n.resources.json', 'utf8')); - _coreAndExtensionResources.push(...json.editor); - _coreAndExtensionResources.push(...json.workbench); - - // extensions - let extensionsToLocalize = Object.create(null); - glob.sync('.build/extensions/**/*.nls.json').forEach(extension => extensionsToLocalize[extension.split('/')[2]] = true); - glob.sync('.build/extensions/*/node_modules/vscode-nls').forEach(extension => extensionsToLocalize[extension.split('/')[2]] = true); - - Object.keys(extensionsToLocalize).forEach(extension => { - _coreAndExtensionResources.push({ name: extension, project: extensionsProject }); - }); - - if (externalExtensions) { - for (let resourceName in externalExtensions) { - _coreAndExtensionResources.push({ name: resourceName, project: extensionsProject }); - } - } - } - return pullXlfFiles(apiHostname, username, password, language, _coreAndExtensionResources); -} - export function pullSetupXlfFiles(apiHostname: string, username: string, password: string, language: Language, includeDefault: boolean): NodeJS.ReadableStream { let setupResources = [{ name: 'setup_messages', project: workbenchProject }]; if (includeDefault) { @@ -1196,20 +1164,16 @@ export interface TranslationPath { resourceName: string; } -export function pullI18nPackFiles(apiHostname: string, username: string, password: string, language: Language, resultingTranslationPaths: TranslationPath[]): NodeJS.ReadableStream { - return pullCoreAndExtensionsXlfFiles(apiHostname, username, password, language, externalExtensionsWithTranslations) - .pipe(prepareI18nPackFiles(externalExtensionsWithTranslations, resultingTranslationPaths, language.id === 'ps')); -} - export function prepareI18nPackFiles(externalExtensions: Map, resultingTranslationPaths: TranslationPath[], pseudo = false): NodeJS.ReadWriteStream { let parsePromises: Promise[] = []; let mainPack: I18nPack = { version: i18nPackVersion, contents: {} }; let extensionsPacks: Map = {}; let errors: any[] = []; return through(function (this: ThroughStream, xlf: File) { - let project = path.basename(path.dirname(xlf.relative)); + let project = path.basename(path.dirname(path.dirname(xlf.relative))); let resource = path.basename(xlf.relative, '.xlf'); let contents = xlf.contents.toString(); + log(`Found ${project}: ${resource}`); let parsePromise = pseudo ? XLF.parsePseudo(contents) : XLF.parse(contents); parsePromises.push(parsePromise); parsePromise.then( @@ -1278,9 +1242,6 @@ export function prepareIslFiles(language: Language, innoSetupConfig: InnoSetup): parsePromise.then( resolvedFiles => { resolvedFiles.forEach(file => { - if (path.basename(file.originalFilePath) === 'Default' && !innoSetupConfig.defaultInfo) { - return; - } let translatedFile = createIslFile(file.originalFilePath, file.messages, language, innoSetupConfig); stream.queue(translatedFile); }); @@ -1315,17 +1276,9 @@ function createIslFile(originalFilePath: string, messages: Map, language let key = sections[0]; let translated = line; if (key) { - if (key === 'LanguageName') { - translated = `${key}=${innoSetup.defaultInfo!.name}`; - } else if (key === 'LanguageID') { - translated = `${key}=${innoSetup.defaultInfo!.id}`; - } else if (key === 'LanguageCodePage') { - translated = `${key}=${innoSetup.codePage.substr(2)}`; - } else { - let translatedMessage = messages[key]; - if (translatedMessage) { - translated = `${key}=${translatedMessage}`; - } + let translatedMessage = messages[key]; + if (translatedMessage) { + translated = `${key}=${translatedMessage}`; } } diff --git a/lib/vscode/build/lib/layersChecker.js b/build/lib/layersChecker.js similarity index 100% rename from lib/vscode/build/lib/layersChecker.js rename to build/lib/layersChecker.js diff --git a/lib/vscode/build/lib/layersChecker.ts b/build/lib/layersChecker.ts similarity index 100% rename from lib/vscode/build/lib/layersChecker.ts rename to build/lib/layersChecker.ts diff --git a/lib/vscode/build/lib/monaco-api.js b/build/lib/monaco-api.js similarity index 100% rename from lib/vscode/build/lib/monaco-api.js rename to build/lib/monaco-api.js diff --git a/lib/vscode/build/lib/monaco-api.ts b/build/lib/monaco-api.ts similarity index 100% rename from lib/vscode/build/lib/monaco-api.ts rename to build/lib/monaco-api.ts diff --git a/lib/vscode/build/lib/nls.js b/build/lib/nls.js similarity index 100% rename from lib/vscode/build/lib/nls.js rename to build/lib/nls.js diff --git a/lib/vscode/build/lib/nls.ts b/build/lib/nls.ts similarity index 100% rename from lib/vscode/build/lib/nls.ts rename to build/lib/nls.ts diff --git a/lib/vscode/build/lib/node.js b/build/lib/node.js similarity index 100% rename from lib/vscode/build/lib/node.js rename to build/lib/node.js diff --git a/lib/vscode/build/lib/node.ts b/build/lib/node.ts similarity index 78% rename from lib/vscode/build/lib/node.ts rename to build/lib/node.ts index 20389c69445b..6ac45ebb1f89 100644 --- a/lib/vscode/build/lib/node.ts +++ b/build/lib/node.ts @@ -4,11 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import * as path from 'path'; +import * as fs from 'fs'; const root = path.dirname(path.dirname(__dirname)); -const version = process.versions.node; -const platform = process.platform; +const yarnrcPath = path.join(root, 'remote', '.yarnrc'); +const yarnrc = fs.readFileSync(yarnrcPath, 'utf8'); +const version = /^target\s+"([^"]+)"$/m.exec(yarnrc)![1]; +const platform = process.platform; const arch = platform === 'darwin' ? 'x64' : process.arch; const node = platform === 'win32' ? 'node.exe' : 'node'; diff --git a/lib/vscode/build/lib/optimize.js b/build/lib/optimize.js similarity index 99% rename from lib/vscode/build/lib/optimize.js rename to build/lib/optimize.js index 1cfca357f7c8..762a1ac2b4f1 100644 --- a/lib/vscode/build/lib/optimize.js +++ b/build/lib/optimize.js @@ -177,7 +177,7 @@ function minifyTask(src, sourceMapBaseUrl) { sourcemap: 'external', outdir: '.', platform: 'node', - target: ['node12.18'], + target: ['node14.16'], write: false }).then(res => { const jsFile = res.outputFiles.find(f => /\.js$/.test(f.path)); diff --git a/lib/vscode/build/lib/optimize.ts b/build/lib/optimize.ts similarity index 99% rename from lib/vscode/build/lib/optimize.ts rename to build/lib/optimize.ts index c3c29e4a7004..b613416cab2f 100644 --- a/lib/vscode/build/lib/optimize.ts +++ b/build/lib/optimize.ts @@ -254,7 +254,7 @@ export function minifyTask(src: string, sourceMapBaseUrl?: string): (cb: any) => sourcemap: 'external', outdir: '.', platform: 'node', - target: ['node12.18'], + target: ['node14.16'], write: false }).then(res => { const jsFile = res.outputFiles.find(f => /\.js$/.test(f.path))!; diff --git a/lib/vscode/build/lib/preLaunch.js b/build/lib/preLaunch.js similarity index 100% rename from lib/vscode/build/lib/preLaunch.js rename to build/lib/preLaunch.js diff --git a/lib/vscode/build/lib/preLaunch.ts b/build/lib/preLaunch.ts similarity index 100% rename from lib/vscode/build/lib/preLaunch.ts rename to build/lib/preLaunch.ts diff --git a/lib/vscode/build/lib/reporter.js b/build/lib/reporter.js similarity index 100% rename from lib/vscode/build/lib/reporter.js rename to build/lib/reporter.js diff --git a/lib/vscode/build/lib/reporter.ts b/build/lib/reporter.ts similarity index 100% rename from lib/vscode/build/lib/reporter.ts rename to build/lib/reporter.ts diff --git a/lib/vscode/build/lib/snapshotLoader.js b/build/lib/snapshotLoader.js similarity index 100% rename from lib/vscode/build/lib/snapshotLoader.js rename to build/lib/snapshotLoader.js diff --git a/lib/vscode/build/lib/snapshotLoader.ts b/build/lib/snapshotLoader.ts similarity index 100% rename from lib/vscode/build/lib/snapshotLoader.ts rename to build/lib/snapshotLoader.ts diff --git a/lib/vscode/build/lib/standalone.js b/build/lib/standalone.js similarity index 100% rename from lib/vscode/build/lib/standalone.js rename to build/lib/standalone.js diff --git a/lib/vscode/build/lib/standalone.ts b/build/lib/standalone.ts similarity index 100% rename from lib/vscode/build/lib/standalone.ts rename to build/lib/standalone.ts diff --git a/lib/vscode/build/lib/stats.js b/build/lib/stats.js similarity index 100% rename from lib/vscode/build/lib/stats.js rename to build/lib/stats.js diff --git a/lib/vscode/build/lib/stats.ts b/build/lib/stats.ts similarity index 100% rename from lib/vscode/build/lib/stats.ts rename to build/lib/stats.ts diff --git a/lib/vscode/build/lib/task.js b/build/lib/task.js similarity index 100% rename from lib/vscode/build/lib/task.js rename to build/lib/task.js diff --git a/lib/vscode/build/lib/task.ts b/build/lib/task.ts similarity index 100% rename from lib/vscode/build/lib/task.ts rename to build/lib/task.ts diff --git a/lib/vscode/build/lib/test/i18n.test.js b/build/lib/test/i18n.test.js similarity index 100% rename from lib/vscode/build/lib/test/i18n.test.js rename to build/lib/test/i18n.test.js diff --git a/lib/vscode/build/lib/test/i18n.test.ts b/build/lib/test/i18n.test.ts similarity index 100% rename from lib/vscode/build/lib/test/i18n.test.ts rename to build/lib/test/i18n.test.ts diff --git a/lib/vscode/build/lib/treeshaking.js b/build/lib/treeshaking.js similarity index 99% rename from lib/vscode/build/lib/treeshaking.js rename to build/lib/treeshaking.js index 3abe020882bc..41cb33809b04 100644 --- a/lib/vscode/build/lib/treeshaking.js +++ b/build/lib/treeshaking.js @@ -241,6 +241,9 @@ function nodeOrChildIsBlack(node) { } return false; } +function isSymbolWithDeclarations(symbol) { + return !!(symbol && symbol.declarations); +} function markNodes(ts, languageService, options) { const program = languageService.getProgram(); if (!program) { @@ -413,7 +416,7 @@ function markNodes(ts, languageService, options) { if (symbolImportNode) { setColor(symbolImportNode, 2 /* Black */); } - if (symbol && !nodeIsInItsOwnDeclaration(nodeSourceFile, node, symbol)) { + if (isSymbolWithDeclarations(symbol) && !nodeIsInItsOwnDeclaration(nodeSourceFile, node, symbol)) { for (let i = 0, len = symbol.declarations.length; i < len; i++) { const declaration = symbol.declarations[i]; if (ts.isSourceFile(declaration)) { @@ -686,7 +689,7 @@ function getRealNodeSymbol(ts, checker, node) { // get the aliased symbol instead. This allows for goto def on an import e.g. // import {A, B} from "mod"; // to jump to the implementation directly. - if (symbol && symbol.flags & ts.SymbolFlags.Alias && shouldSkipAlias(node, symbol.declarations[0])) { + if (symbol && symbol.flags & ts.SymbolFlags.Alias && symbol.declarations && shouldSkipAlias(node, symbol.declarations[0])) { const aliased = checker.getAliasedSymbol(symbol); if (aliased.declarations) { // We should mark the import as visited diff --git a/lib/vscode/build/lib/treeshaking.ts b/build/lib/treeshaking.ts similarity index 98% rename from lib/vscode/build/lib/treeshaking.ts rename to build/lib/treeshaking.ts index f941e9791a76..f24b31e26ac9 100644 --- a/lib/vscode/build/lib/treeshaking.ts +++ b/build/lib/treeshaking.ts @@ -323,6 +323,10 @@ function nodeOrChildIsBlack(node: ts.Node): boolean { return false; } +function isSymbolWithDeclarations(symbol: ts.Symbol | undefined | null): symbol is ts.Symbol & { declarations: ts.Declaration[] } { + return !!(symbol && symbol.declarations); +} + function markNodes(ts: typeof import('typescript'), languageService: ts.LanguageService, options: ITreeShakingOptions) { const program = languageService.getProgram(); if (!program) { @@ -530,7 +534,7 @@ function markNodes(ts: typeof import('typescript'), languageService: ts.Language setColor(symbolImportNode, NodeColor.Black); } - if (symbol && !nodeIsInItsOwnDeclaration(nodeSourceFile, node, symbol)) { + if (isSymbolWithDeclarations(symbol) && !nodeIsInItsOwnDeclaration(nodeSourceFile, node, symbol)) { for (let i = 0, len = symbol.declarations.length; i < len; i++) { const declaration = symbol.declarations[i]; if (ts.isSourceFile(declaration)) { @@ -595,7 +599,7 @@ function markNodes(ts: typeof import('typescript'), languageService: ts.Language } } -function nodeIsInItsOwnDeclaration(nodeSourceFile: ts.SourceFile, node: ts.Node, symbol: ts.Symbol): boolean { +function nodeIsInItsOwnDeclaration(nodeSourceFile: ts.SourceFile, node: ts.Node, symbol: ts.Symbol & { declarations: ts.Declaration[] }): boolean { for (let i = 0, len = symbol.declarations.length; i < len; i++) { const declaration = symbol.declarations[i]; const declarationSourceFile = declaration.getSourceFile(); @@ -838,7 +842,7 @@ function getRealNodeSymbol(ts: typeof import('typescript'), checker: ts.TypeChec // get the aliased symbol instead. This allows for goto def on an import e.g. // import {A, B} from "mod"; // to jump to the implementation directly. - if (symbol && symbol.flags & ts.SymbolFlags.Alias && shouldSkipAlias(node, symbol.declarations[0])) { + if (symbol && symbol.flags & ts.SymbolFlags.Alias && symbol.declarations && shouldSkipAlias(node, symbol.declarations[0])) { const aliased = checker.getAliasedSymbol(symbol); if (aliased.declarations) { // We should mark the import as visited diff --git a/lib/vscode/build/lib/typings/cgmanifest.json b/build/lib/typings/cgmanifest.json similarity index 100% rename from lib/vscode/build/lib/typings/cgmanifest.json rename to build/lib/typings/cgmanifest.json diff --git a/lib/vscode/build/lib/typings/event-stream.d.ts b/build/lib/typings/event-stream.d.ts similarity index 100% rename from lib/vscode/build/lib/typings/event-stream.d.ts rename to build/lib/typings/event-stream.d.ts diff --git a/lib/vscode/build/lib/typings/github-releases.d.ts b/build/lib/typings/github-releases.d.ts similarity index 100% rename from lib/vscode/build/lib/typings/github-releases.d.ts rename to build/lib/typings/github-releases.d.ts diff --git a/lib/vscode/build/lib/typings/gulp-bom.d.ts b/build/lib/typings/gulp-bom.d.ts similarity index 100% rename from lib/vscode/build/lib/typings/gulp-bom.d.ts rename to build/lib/typings/gulp-bom.d.ts diff --git a/lib/vscode/build/lib/typings/gulp-flatmap.d.ts b/build/lib/typings/gulp-flatmap.d.ts similarity index 100% rename from lib/vscode/build/lib/typings/gulp-flatmap.d.ts rename to build/lib/typings/gulp-flatmap.d.ts diff --git a/lib/vscode/build/lib/typings/gulp-remote-src.d.ts b/build/lib/typings/gulp-remote-src.d.ts similarity index 100% rename from lib/vscode/build/lib/typings/gulp-remote-src.d.ts rename to build/lib/typings/gulp-remote-src.d.ts diff --git a/lib/vscode/build/lib/typings/gulp-tsb.d.ts b/build/lib/typings/gulp-tsb.d.ts similarity index 100% rename from lib/vscode/build/lib/typings/gulp-tsb.d.ts rename to build/lib/typings/gulp-tsb.d.ts diff --git a/lib/vscode/build/lib/typings/is.d.ts b/build/lib/typings/is.d.ts similarity index 100% rename from lib/vscode/build/lib/typings/is.d.ts rename to build/lib/typings/is.d.ts diff --git a/lib/vscode/build/lib/typings/lazy.js.d.ts b/build/lib/typings/lazy.js.d.ts similarity index 100% rename from lib/vscode/build/lib/typings/lazy.js.d.ts rename to build/lib/typings/lazy.js.d.ts diff --git a/lib/vscode/build/lib/typings/vinyl.d.ts b/build/lib/typings/vinyl.d.ts similarity index 100% rename from lib/vscode/build/lib/typings/vinyl.d.ts rename to build/lib/typings/vinyl.d.ts diff --git a/lib/vscode/build/lib/util.js b/build/lib/util.js similarity index 100% rename from lib/vscode/build/lib/util.js rename to build/lib/util.js diff --git a/build/lib/util.ts b/build/lib/util.ts new file mode 100644 index 000000000000..c0a0d9619d73 --- /dev/null +++ b/build/lib/util.ts @@ -0,0 +1,342 @@ +/*--------------------------------------------------------------------------------------------- + * 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 es from 'event-stream'; +import debounce = require('debounce'); +import * as _filter from 'gulp-filter'; +import * as rename from 'gulp-rename'; +import * as _ from 'underscore'; +import * as path from 'path'; +import * as fs from 'fs'; +import * as _rimraf from 'rimraf'; +import * as git from './git'; +import * as VinylFile from 'vinyl'; +import { ThroughStream } from 'through'; +import * as sm from 'source-map'; + +const root = path.dirname(path.dirname(__dirname)); + +export interface ICancellationToken { + isCancellationRequested(): boolean; +} + +const NoCancellationToken: ICancellationToken = { isCancellationRequested: () => false }; + +export interface IStreamProvider { + (cancellationToken?: ICancellationToken): NodeJS.ReadWriteStream; +} + +export function incremental(streamProvider: IStreamProvider, initial: NodeJS.ReadWriteStream, supportsCancellation?: boolean): NodeJS.ReadWriteStream { + const input = es.through(); + const output = es.through(); + let state = 'idle'; + let buffer = Object.create(null); + + const token: ICancellationToken | undefined = !supportsCancellation ? undefined : { isCancellationRequested: () => Object.keys(buffer).length > 0 }; + + const run = (input: NodeJS.ReadWriteStream, isCancellable: boolean) => { + state = 'running'; + + const stream = !supportsCancellation ? streamProvider() : streamProvider(isCancellable ? token : NoCancellationToken); + + input + .pipe(stream) + .pipe(es.through(undefined, () => { + state = 'idle'; + eventuallyRun(); + })) + .pipe(output); + }; + + if (initial) { + run(initial, false); + } + + const eventuallyRun = debounce(() => { + const paths = Object.keys(buffer); + + if (paths.length === 0) { + return; + } + + const data = paths.map(path => buffer[path]); + buffer = Object.create(null); + run(es.readArray(data), true); + }, 500); + + input.on('data', (f: any) => { + buffer[f.path] = f; + + if (state === 'idle') { + eventuallyRun(); + } + }); + + return es.duplex(input, output); +} + +export function fixWin32DirectoryPermissions(): NodeJS.ReadWriteStream { + if (!/win32/.test(process.platform)) { + return es.through(); + } + + return es.mapSync(f => { + if (f.stat && f.stat.isDirectory && f.stat.isDirectory()) { + f.stat.mode = 16877; + } + + return f; + }); +} + +export function setExecutableBit(pattern?: string | string[]): NodeJS.ReadWriteStream { + const setBit = es.mapSync(f => { + if (!f.stat) { + f.stat = { isFile() { return true; } } as any; + } + f.stat.mode = /* 100755 */ 33261; + return f; + }); + + if (!pattern) { + return setBit; + } + + const input = es.through(); + const filter = _filter(pattern, { restore: true }); + const output = input + .pipe(filter) + .pipe(setBit) + .pipe(filter.restore); + + return es.duplex(input, output); +} + +export function toFileUri(filePath: string): string { + const match = filePath.match(/^([a-z])\:(.*)$/i); + + if (match) { + filePath = '/' + match[1].toUpperCase() + ':' + match[2]; + } + + return 'file://' + filePath.replace(/\\/g, '/'); +} + +export function skipDirectories(): NodeJS.ReadWriteStream { + return es.mapSync(f => { + if (!f.isDirectory()) { + return f; + } + }); +} + +export function cleanNodeModules(rulePath: string): NodeJS.ReadWriteStream { + const rules = fs.readFileSync(rulePath, 'utf8') + .split(/\r?\n/g) + .map(line => line.trim()) + .filter(line => line && !/^#/.test(line)); + + const excludes = rules.filter(line => !/^!/.test(line)).map(line => `!**/node_modules/${line}`); + const includes = rules.filter(line => /^!/.test(line)).map(line => `**/node_modules/${line.substr(1)}`); + + const input = es.through(); + const output = es.merge( + input.pipe(_filter(['**', ...excludes])), + input.pipe(_filter(includes)) + ); + + return es.duplex(input, output); +} + +declare class FileSourceMap extends VinylFile { + public sourceMap: sm.RawSourceMap; +} + +export function loadSourcemaps(): NodeJS.ReadWriteStream { + const input = es.through(); + + const output = input + .pipe(es.map((f, cb): FileSourceMap | undefined => { + if (f.sourceMap) { + cb(undefined, f); + return; + } + + if (!f.contents) { + cb(undefined, f); + return; + } + + const contents = (f.contents).toString('utf8'); + + const reg = /\/\/# sourceMappingURL=(.*)$/g; + let lastMatch: RegExpMatchArray | null = null; + let match: RegExpMatchArray | null = null; + + while (match = reg.exec(contents)) { + lastMatch = match; + } + + if (!lastMatch) { + f.sourceMap = { + version: '3', + names: [], + mappings: '', + sources: [f.relative], + sourcesContent: [contents] + }; + + cb(undefined, f); + return; + } + + f.contents = Buffer.from(contents.replace(/\/\/# sourceMappingURL=(.*)$/g, ''), 'utf8'); + + fs.readFile(path.join(path.dirname(f.path), lastMatch[1]), 'utf8', (err, contents) => { + if (err) { return cb(err); } + + f.sourceMap = JSON.parse(contents); + cb(undefined, f); + }); + })); + + return es.duplex(input, output); +} + +export function stripSourceMappingURL(): NodeJS.ReadWriteStream { + const input = es.through(); + + const output = input + .pipe(es.mapSync(f => { + const contents = (f.contents).toString('utf8'); + f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, ''), 'utf8'); + return f; + })); + + return es.duplex(input, output); +} + +export function rewriteSourceMappingURL(sourceMappingURLBase: string): NodeJS.ReadWriteStream { + const input = es.through(); + + const output = input + .pipe(es.mapSync(f => { + const contents = (f.contents).toString('utf8'); + const str = `//# sourceMappingURL=${sourceMappingURLBase}/${path.dirname(f.relative).replace(/\\/g, '/')}/$1`; + f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, str)); + return f; + })); + + return es.duplex(input, output); +} + +export function rimraf(dir: string): () => Promise { + const result = () => new Promise((c, e) => { + let retries = 0; + + const retry = () => { + _rimraf(dir, { maxBusyTries: 1 }, (err: any) => { + if (!err) { + return c(); + } + + if (err.code === 'ENOTEMPTY' && ++retries < 5) { + return setTimeout(() => retry(), 10); + } + + return e(err); + }); + }; + + retry(); + }); + + result.taskName = `clean-${path.basename(dir).toLowerCase()}`; + return result; +} + +function _rreaddir(dirPath: string, prepend: string, result: string[]): void { + const entries = fs.readdirSync(dirPath, { withFileTypes: true }); + for (const entry of entries) { + if (entry.isDirectory()) { + _rreaddir(path.join(dirPath, entry.name), `${prepend}/${entry.name}`, result); + } else { + result.push(`${prepend}/${entry.name}`); + } + } +} + +export function rreddir(dirPath: string): string[] { + let result: string[] = []; + _rreaddir(dirPath, '', result); + return result; +} + +export function ensureDir(dirPath: string): void { + if (fs.existsSync(dirPath)) { + return; + } + ensureDir(path.dirname(dirPath)); + fs.mkdirSync(dirPath); +} + +export function getVersion(root: string): string | undefined { + let version = process.env['BUILD_SOURCEVERSION']; + + if (!version || !/^[0-9a-f]{40}$/i.test(version)) { + version = git.getVersion(root); + } + + return version; +} + +export function rebase(count: number): NodeJS.ReadWriteStream { + return rename(f => { + const parts = f.dirname ? f.dirname.split(/[\/\\]/) : []; + f.dirname = parts.slice(count).join(path.sep); + }); +} + +export interface FilterStream extends NodeJS.ReadWriteStream { + restore: ThroughStream; +} + +export function filter(fn: (data: any) => boolean): FilterStream { + const result = es.through(function (data) { + if (fn(data)) { + this.emit('data', data); + } else { + result.restore.push(data); + } + }); + + result.restore = es.through(); + return result; +} + +export function versionStringToNumber(versionStr: string) { + const semverRegex = /(\d+)\.(\d+)\.(\d+)/; + const match = versionStr.match(semverRegex); + if (!match) { + throw new Error('Version string is not properly formatted: ' + versionStr); + } + + return parseInt(match[1], 10) * 1e4 + parseInt(match[2], 10) * 1e2 + parseInt(match[3], 10); +} + +export function streamToPromise(stream: NodeJS.ReadWriteStream): Promise { + return new Promise((c, e) => { + stream.on('error', err => e(err)); + stream.on('end', () => c()); + }); +} + +export function getElectronVersion(): string { + const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8'); + const target = /^target "(.*)"$/m.exec(yarnrc)![1]; + return target; +} diff --git a/lib/vscode/build/lib/watch/.gitignore b/build/lib/watch/.gitignore similarity index 100% rename from lib/vscode/build/lib/watch/.gitignore rename to build/lib/watch/.gitignore diff --git a/lib/vscode/build/lib/watch/index.js b/build/lib/watch/index.js similarity index 100% rename from lib/vscode/build/lib/watch/index.js rename to build/lib/watch/index.js diff --git a/lib/vscode/build/lib/watch/index.ts b/build/lib/watch/index.ts similarity index 100% rename from lib/vscode/build/lib/watch/index.ts rename to build/lib/watch/index.ts diff --git a/lib/vscode/build/lib/watch/package.json b/build/lib/watch/package.json similarity index 100% rename from lib/vscode/build/lib/watch/package.json rename to build/lib/watch/package.json diff --git a/lib/vscode/build/lib/watch/watch-win32.js b/build/lib/watch/watch-win32.js similarity index 100% rename from lib/vscode/build/lib/watch/watch-win32.js rename to build/lib/watch/watch-win32.js diff --git a/lib/vscode/build/lib/watch/watch-win32.ts b/build/lib/watch/watch-win32.ts similarity index 100% rename from lib/vscode/build/lib/watch/watch-win32.ts rename to build/lib/watch/watch-win32.ts diff --git a/lib/vscode/build/lib/watch/watcher.exe b/build/lib/watch/watcher.exe similarity index 100% rename from lib/vscode/build/lib/watch/watcher.exe rename to build/lib/watch/watcher.exe diff --git a/lib/vscode/build/lib/watch/yarn.lock b/build/lib/watch/yarn.lock similarity index 100% rename from lib/vscode/build/lib/watch/yarn.lock rename to build/lib/watch/yarn.lock diff --git a/lib/vscode/build/monaco/LICENSE b/build/monaco/LICENSE similarity index 100% rename from lib/vscode/build/monaco/LICENSE rename to build/monaco/LICENSE diff --git a/lib/vscode/build/monaco/README-npm.md b/build/monaco/README-npm.md similarity index 100% rename from lib/vscode/build/monaco/README-npm.md rename to build/monaco/README-npm.md diff --git a/lib/vscode/build/monaco/README.md b/build/monaco/README.md similarity index 100% rename from lib/vscode/build/monaco/README.md rename to build/monaco/README.md diff --git a/lib/vscode/build/monaco/ThirdPartyNotices.txt b/build/monaco/ThirdPartyNotices.txt similarity index 100% rename from lib/vscode/build/monaco/ThirdPartyNotices.txt rename to build/monaco/ThirdPartyNotices.txt diff --git a/lib/vscode/build/monaco/esm.core.js b/build/monaco/esm.core.js similarity index 100% rename from lib/vscode/build/monaco/esm.core.js rename to build/monaco/esm.core.js diff --git a/lib/vscode/build/monaco/monaco.d.ts.recipe b/build/monaco/monaco.d.ts.recipe similarity index 100% rename from lib/vscode/build/monaco/monaco.d.ts.recipe rename to build/monaco/monaco.d.ts.recipe diff --git a/lib/vscode/build/monaco/monaco.usage.recipe b/build/monaco/monaco.usage.recipe similarity index 100% rename from lib/vscode/build/monaco/monaco.usage.recipe rename to build/monaco/monaco.usage.recipe diff --git a/lib/vscode/build/monaco/monaco.webpack.config.js b/build/monaco/monaco.webpack.config.js similarity index 100% rename from lib/vscode/build/monaco/monaco.webpack.config.js rename to build/monaco/monaco.webpack.config.js diff --git a/lib/vscode/build/monaco/package.json b/build/monaco/package.json similarity index 100% rename from lib/vscode/build/monaco/package.json rename to build/monaco/package.json diff --git a/lib/vscode/build/monaco/version.txt b/build/monaco/version.txt similarity index 100% rename from lib/vscode/build/monaco/version.txt rename to build/monaco/version.txt diff --git a/lib/vscode/build/npm/dirs.js b/build/npm/dirs.js similarity index 100% rename from lib/vscode/build/npm/dirs.js rename to build/npm/dirs.js diff --git a/lib/vscode/build/npm/postinstall.js b/build/npm/postinstall.js similarity index 100% rename from lib/vscode/build/npm/postinstall.js rename to build/npm/postinstall.js diff --git a/lib/vscode/build/npm/preinstall.js b/build/npm/preinstall.js similarity index 100% rename from lib/vscode/build/npm/preinstall.js rename to build/npm/preinstall.js diff --git a/lib/vscode/build/npm/update-all-grammars.js b/build/npm/update-all-grammars.js similarity index 100% rename from lib/vscode/build/npm/update-all-grammars.js rename to build/npm/update-all-grammars.js diff --git a/lib/vscode/build/npm/update-distro.js b/build/npm/update-distro.js similarity index 100% rename from lib/vscode/build/npm/update-distro.js rename to build/npm/update-distro.js diff --git a/build/npm/update-localization-extension.js b/build/npm/update-localization-extension.js new file mode 100644 index 000000000000..43bc792d9f84 --- /dev/null +++ b/build/npm/update-localization-extension.js @@ -0,0 +1,101 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +let i18n = require("../lib/i18n"); + +let fs = require("fs"); +let path = require("path"); + +let gulp = require('gulp'); +let vfs = require("vinyl-fs"); +let rimraf = require('rimraf'); +let minimist = require('minimist'); + +function update(options) { + let idOrPath = options._; + if (!idOrPath) { + throw new Error('Argument must be the location of the localization extension.'); + } + let location = options.location; + if (location !== undefined && !fs.existsSync(location)) { + throw new Error(`${location} doesn't exist.`); + } + let locExtFolder = idOrPath; + if (/^\w{2}(-\w+)?$/.test(idOrPath)) { + locExtFolder = path.join('..', 'vscode-loc', 'i18n', `vscode-language-pack-${idOrPath}`); + } + let locExtStat = fs.statSync(locExtFolder); + if (!locExtStat || !locExtStat.isDirectory) { + throw new Error('No directory found at ' + idOrPath); + } + let packageJSON = JSON.parse(fs.readFileSync(path.join(locExtFolder, 'package.json')).toString()); + let contributes = packageJSON['contributes']; + if (!contributes) { + throw new Error('The extension must define a "localizations" contribution in the "package.json"'); + } + let localizations = contributes['localizations']; + if (!localizations) { + throw new Error('The extension must define a "localizations" contribution of type array in the "package.json"'); + } + + localizations.forEach(function (localization) { + if (!localization.languageId || !localization.languageName || !localization.localizedLanguageName) { + throw new Error('Each localization contribution must define "languageId", "languageName" and "localizedLanguageName" properties.'); + } + let languageId = localization.languageId; + let translationDataFolder = path.join(locExtFolder, 'translations'); + + switch (languageId) { + case 'zh-cn': + languageId = 'zh-Hans'; + break; + case 'zh-tw': + languageId = 'zh-Hant'; + break; + case 'pt-br': + languageId = 'pt-BR'; + break; + } + + if (fs.existsSync(translationDataFolder) && fs.existsSync(path.join(translationDataFolder, 'main.i18n.json'))) { + console.log('Clearing \'' + translationDataFolder + '\'...'); + rimraf.sync(translationDataFolder); + } + + console.log(`Importing translations for ${languageId} form '${location}' to '${translationDataFolder}' ...`); + let translationPaths = []; + gulp.src(path.join(location, '**', languageId, '*.xlf'), { silent: false }) + .pipe(i18n.prepareI18nPackFiles(i18n.externalExtensionsWithTranslations, translationPaths, languageId === 'ps')) + .on('error', (error) => { + console.log(`Error occurred while importing translations:`); + translationPaths = undefined; + if (Array.isArray(error)) { + error.forEach(console.log); + } else if (error) { + console.log(error); + } else { + console.log('Unknown error'); + } + }) + .pipe(vfs.dest(translationDataFolder)) + .on('end', function () { + if (translationPaths !== undefined) { + localization.translations = []; + for (let tp of translationPaths) { + localization.translations.push({ id: tp.id, path: `./translations/${tp.resourceName}` }); + } + fs.writeFileSync(path.join(locExtFolder, 'package.json'), JSON.stringify(packageJSON, null, '\t')); + } + }); + }); +} +if (path.basename(process.argv[1]) === 'update-localization-extension.js') { + var options = minimist(process.argv.slice(2), { + string: 'location' + }); + update(options); +} diff --git a/build/package.json b/build/package.json new file mode 100644 index 000000000000..f683c3241dc1 --- /dev/null +++ b/build/package.json @@ -0,0 +1,65 @@ +{ + "name": "code-oss-dev-build", + "version": "1.0.0", + "license": "MIT", + "devDependencies": { + "@azure/cosmos": "^3.9.3", + "@azure/storage-blob": "^12.4.0", + "@types/ansi-colors": "^3.2.0", + "@types/azure": "0.9.19", + "@types/byline": "^4.2.32", + "@types/debounce": "^1.0.0", + "@types/eslint": "4.16.1", + "@types/fancy-log": "^1.3.0", + "@types/glob": "^7.1.1", + "@types/gulp": "^4.0.5", + "@types/gulp-concat": "^0.0.32", + "@types/gulp-filter": "^3.0.32", + "@types/gulp-gzip": "^0.0.31", + "@types/gulp-json-editor": "^2.2.31", + "@types/gulp-rename": "^0.0.33", + "@types/gulp-sourcemaps": "^0.0.32", + "@types/mime": "0.0.29", + "@types/minimatch": "^3.0.3", + "@types/minimist": "^1.2.1", + "@types/mkdirp": "^1.0.1", + "@types/mocha": "^8.2.0", + "@types/node": "14.x", + "@types/p-limit": "^2.2.0", + "@types/plist": "^3.0.2", + "@types/pump": "^1.0.1", + "@types/request": "^2.47.0", + "@types/rimraf": "^2.0.4", + "@types/through": "^0.0.29", + "@types/through2": "^2.0.34", + "@types/underscore": "^1.8.9", + "@types/xml2js": "0.0.33", + "@typescript-eslint/experimental-utils": "~2.13.0", + "@typescript-eslint/parser": "^3.3.0", + "applicationinsights": "1.0.8", + "azure-storage": "^2.1.0", + "byline": "^5.0.0", + "colors": "^1.4.0", + "commander": "^7.0.0", + "electron-osx-sign": "^0.4.16", + "esbuild": "^0.12.6", + "fs-extra": "^9.1.0", + "got": "11.8.1", + "iconv-lite-umd": "0.6.8", + "jsonc-parser": "^2.3.0", + "mime": "^1.4.1", + "mkdirp": "^1.0.4", + "p-limit": "^3.1.0", + "plist": "^3.0.1", + "source-map": "0.6.1", + "typescript": "^4.4.0-dev.20210528", + "vsce": "1.48.0", + "vscode-universal": "deepak1556/universal#61454d96223b774c53cda10f72c2098c0ce02d58" + }, + "scripts": { + "compile": "tsc -p tsconfig.build.json", + "watch": "tsc -p tsconfig.build.json --watch", + "npmCheckJs": "tsc --noEmit" + }, + "dependencies": {} +} diff --git a/lib/vscode/build/polyfills/vscode-extension-telemetry.js b/build/polyfills/vscode-extension-telemetry.js similarity index 100% rename from lib/vscode/build/polyfills/vscode-extension-telemetry.js rename to build/polyfills/vscode-extension-telemetry.js diff --git a/lib/vscode/build/polyfills/vscode-nls.js b/build/polyfills/vscode-nls.js similarity index 100% rename from lib/vscode/build/polyfills/vscode-nls.js rename to build/polyfills/vscode-nls.js diff --git a/lib/vscode/build/tsconfig.build.json b/build/tsconfig.build.json similarity index 100% rename from lib/vscode/build/tsconfig.build.json rename to build/tsconfig.build.json diff --git a/lib/vscode/build/tsconfig.json b/build/tsconfig.json similarity index 100% rename from lib/vscode/build/tsconfig.json rename to build/tsconfig.json diff --git a/lib/vscode/build/win32/.gitignore b/build/win32/.gitignore similarity index 100% rename from lib/vscode/build/win32/.gitignore rename to build/win32/.gitignore diff --git a/lib/vscode/build/win32/Cargo.lock b/build/win32/Cargo.lock similarity index 100% rename from lib/vscode/build/win32/Cargo.lock rename to build/win32/Cargo.lock diff --git a/lib/vscode/build/win32/code.iss b/build/win32/code.iss similarity index 100% rename from lib/vscode/build/win32/code.iss rename to build/win32/code.iss diff --git a/lib/vscode/build/win32/i18n/Default.hu.isl b/build/win32/i18n/Default.hu.isl similarity index 100% rename from lib/vscode/build/win32/i18n/Default.hu.isl rename to build/win32/i18n/Default.hu.isl diff --git a/lib/vscode/build/win32/i18n/Default.ko.isl b/build/win32/i18n/Default.ko.isl similarity index 100% rename from lib/vscode/build/win32/i18n/Default.ko.isl rename to build/win32/i18n/Default.ko.isl diff --git a/lib/vscode/build/win32/i18n/Default.zh-cn.isl b/build/win32/i18n/Default.zh-cn.isl similarity index 100% rename from lib/vscode/build/win32/i18n/Default.zh-cn.isl rename to build/win32/i18n/Default.zh-cn.isl diff --git a/lib/vscode/build/win32/i18n/Default.zh-tw.isl b/build/win32/i18n/Default.zh-tw.isl similarity index 100% rename from lib/vscode/build/win32/i18n/Default.zh-tw.isl rename to build/win32/i18n/Default.zh-tw.isl diff --git a/lib/vscode/build/win32/i18n/messages.de.isl b/build/win32/i18n/messages.de.isl similarity index 100% rename from lib/vscode/build/win32/i18n/messages.de.isl rename to build/win32/i18n/messages.de.isl diff --git a/lib/vscode/build/win32/i18n/messages.en.isl b/build/win32/i18n/messages.en.isl similarity index 100% rename from lib/vscode/build/win32/i18n/messages.en.isl rename to build/win32/i18n/messages.en.isl diff --git a/lib/vscode/build/win32/i18n/messages.es.isl b/build/win32/i18n/messages.es.isl similarity index 100% rename from lib/vscode/build/win32/i18n/messages.es.isl rename to build/win32/i18n/messages.es.isl diff --git a/lib/vscode/build/win32/i18n/messages.fr.isl b/build/win32/i18n/messages.fr.isl similarity index 100% rename from lib/vscode/build/win32/i18n/messages.fr.isl rename to build/win32/i18n/messages.fr.isl diff --git a/lib/vscode/build/win32/i18n/messages.hu.isl b/build/win32/i18n/messages.hu.isl similarity index 100% rename from lib/vscode/build/win32/i18n/messages.hu.isl rename to build/win32/i18n/messages.hu.isl diff --git a/lib/vscode/build/win32/i18n/messages.it.isl b/build/win32/i18n/messages.it.isl similarity index 100% rename from lib/vscode/build/win32/i18n/messages.it.isl rename to build/win32/i18n/messages.it.isl diff --git a/lib/vscode/build/win32/i18n/messages.ja.isl b/build/win32/i18n/messages.ja.isl similarity index 100% rename from lib/vscode/build/win32/i18n/messages.ja.isl rename to build/win32/i18n/messages.ja.isl diff --git a/lib/vscode/build/win32/i18n/messages.ko.isl b/build/win32/i18n/messages.ko.isl similarity index 100% rename from lib/vscode/build/win32/i18n/messages.ko.isl rename to build/win32/i18n/messages.ko.isl diff --git a/lib/vscode/build/win32/i18n/messages.pt-br.isl b/build/win32/i18n/messages.pt-br.isl similarity index 100% rename from lib/vscode/build/win32/i18n/messages.pt-br.isl rename to build/win32/i18n/messages.pt-br.isl diff --git a/lib/vscode/build/win32/i18n/messages.ru.isl b/build/win32/i18n/messages.ru.isl similarity index 100% rename from lib/vscode/build/win32/i18n/messages.ru.isl rename to build/win32/i18n/messages.ru.isl diff --git a/lib/vscode/build/win32/i18n/messages.tr.isl b/build/win32/i18n/messages.tr.isl similarity index 100% rename from lib/vscode/build/win32/i18n/messages.tr.isl rename to build/win32/i18n/messages.tr.isl diff --git a/lib/vscode/build/win32/i18n/messages.zh-cn.isl b/build/win32/i18n/messages.zh-cn.isl similarity index 100% rename from lib/vscode/build/win32/i18n/messages.zh-cn.isl rename to build/win32/i18n/messages.zh-cn.isl diff --git a/lib/vscode/build/win32/i18n/messages.zh-tw.isl b/build/win32/i18n/messages.zh-tw.isl similarity index 100% rename from lib/vscode/build/win32/i18n/messages.zh-tw.isl rename to build/win32/i18n/messages.zh-tw.isl diff --git a/lib/vscode/build/win32/inno_updater.exe b/build/win32/inno_updater.exe similarity index 100% rename from lib/vscode/build/win32/inno_updater.exe rename to build/win32/inno_updater.exe diff --git a/lib/vscode/build/win32/vcruntime140.dll b/build/win32/vcruntime140.dll similarity index 100% rename from lib/vscode/build/win32/vcruntime140.dll rename to build/win32/vcruntime140.dll diff --git a/build/yarn.lock b/build/yarn.lock new file mode 100644 index 000000000000..b0449db06eeb --- /dev/null +++ b/build/yarn.lock @@ -0,0 +1,2080 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@azure/abort-controller@^1.0.0": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@azure/abort-controller/-/abort-controller-1.0.2.tgz#822405c966b2aec16fb62c1b19d37eaccf231995" + integrity sha512-XUyTo+bcyxHEf+jlN2MXA7YU9nxVehaubngHV1MIZZaqYmZqykkoeAz/JMMEeR7t3TcyDwbFa3Zw8BZywmIx4g== + dependencies: + tslib "^2.0.0" + +"@azure/core-asynciterator-polyfill@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.0.tgz#dcccebb88406e5c76e0e1d52e8cc4c43a68b3ee7" + integrity sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg== + +"@azure/core-auth@^1.1.3": + version "1.1.4" + resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.1.4.tgz#af9a334acf3cb9c49e6013e6caf6dc9d43476030" + integrity sha512-+j1embyH1jqf04AIfJPdLafd5SC1y6z1Jz4i+USR1XkTp6KM8P5u4/AjmWMVoEQdM/M29PJcRDZcCEWjK9S1bw== + dependencies: + "@azure/abort-controller" "^1.0.0" + tslib "^2.0.0" + +"@azure/core-http@^1.2.0": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@azure/core-http/-/core-http-1.2.2.tgz#a6f7717184fd2657d3acabd1d64dfdc0bd531ce3" + integrity sha512-9eu2OcbR7e44gqBy4U1Uv8NTWgLIMwKXMEGgO2MahsJy5rdTiAhs5fJHQffPq8uX2MFh21iBODwO9R/Xlov88A== + dependencies: + "@azure/abort-controller" "^1.0.0" + "@azure/core-auth" "^1.1.3" + "@azure/core-tracing" "1.0.0-preview.9" + "@azure/logger" "^1.0.0" + "@opentelemetry/api" "^0.10.2" + "@types/node-fetch" "^2.5.0" + "@types/tunnel" "^0.0.1" + form-data "^3.0.0" + node-fetch "^2.6.0" + process "^0.11.10" + tough-cookie "^4.0.0" + tslib "^2.0.0" + tunnel "^0.0.6" + uuid "^8.3.0" + xml2js "^0.4.19" + +"@azure/core-lro@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@azure/core-lro/-/core-lro-1.0.3.tgz#1ddfb4ecdb81ce87b5f5d972ffe2acbbc46e524e" + integrity sha512-Py2crJ84qx1rXkzIwfKw5Ni4WJuzVU7KAF6i1yP3ce8fbynUeu8eEWS4JGtSQgU7xv02G55iPDROifmSDbxeHA== + dependencies: + "@azure/abort-controller" "^1.0.0" + "@azure/core-http" "^1.2.0" + events "^3.0.0" + tslib "^2.0.0" + +"@azure/core-paging@^1.1.1": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@azure/core-paging/-/core-paging-1.1.3.tgz#3587c9898a0530cacb64bab216d7318468aa5efc" + integrity sha512-his7Ah40ThEYORSpIAwuh6B8wkGwO/zG7gqVtmSE4WAJ46e36zUDXTKReUCLBDc6HmjjApQQxxcRFy5FruG79A== + dependencies: + "@azure/core-asynciterator-polyfill" "^1.0.0" + +"@azure/core-tracing@1.0.0-preview.9": + version "1.0.0-preview.9" + resolved "https://registry.yarnpkg.com/@azure/core-tracing/-/core-tracing-1.0.0-preview.9.tgz#84f3b85572013f9d9b85e1e5d89787aa180787eb" + integrity sha512-zczolCLJ5QG42AEPQ+Qg9SRYNUyB+yZ5dzof4YEc+dyWczO9G2sBqbAjLB7IqrsdHN2apkiB2oXeDKCsq48jug== + dependencies: + "@opencensus/web-types" "0.0.7" + "@opentelemetry/api" "^0.10.2" + tslib "^2.0.0" + +"@azure/cosmos@^3.9.3": + version "3.9.3" + resolved "https://registry.yarnpkg.com/@azure/cosmos/-/cosmos-3.9.3.tgz#7e95ff92e5c3e9da7e8316bc50c9cc928be6c1d6" + integrity sha512-1mh8a6LAIykz24tJvQpafXiABUfq+HSAZBFJVZXea0Rd0qG8Ia9z8AK9FtPbC1nPvDC2RID2mRIjJvYbxRM/BA== + dependencies: + "@types/debug" "^4.1.4" + debug "^4.1.1" + fast-json-stable-stringify "^2.0.0" + jsbi "^3.1.3" + node-abort-controller "^1.0.4" + node-fetch "^2.6.0" + priorityqueuejs "^1.0.0" + semaphore "^1.0.5" + tslib "^2.0.0" + universal-user-agent "^6.0.0" + uuid "^8.3.0" + +"@azure/logger@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@azure/logger/-/logger-1.0.1.tgz#19b333203d1b2931353d8879e814b64a7274837a" + integrity sha512-QYQeaJ+A5x6aMNu8BG5qdsVBnYBop9UMwgUvGihSjf1PdZZXB+c/oMdM2ajKwzobLBh9e9QuMQkN9iL+IxLBLA== + dependencies: + tslib "^2.0.0" + +"@azure/storage-blob@^12.4.0": + version "12.4.0" + resolved "https://registry.yarnpkg.com/@azure/storage-blob/-/storage-blob-12.4.0.tgz#7127ddd9f413105e2c3688691bc4c6245d0806b3" + integrity sha512-OnhVSoKD1HzBB79/rFzPbC4w9TdzFXeoOwkX+aIu3rb8qvN0VaqvUqZXSrBCyG2LcLyVkY4MPCJQBrmEUm9kvw== + dependencies: + "@azure/abort-controller" "^1.0.0" + "@azure/core-http" "^1.2.0" + "@azure/core-lro" "^1.0.2" + "@azure/core-paging" "^1.1.1" + "@azure/core-tracing" "1.0.0-preview.9" + "@azure/logger" "^1.0.0" + "@opentelemetry/api" "^0.10.2" + events "^3.0.0" + tslib "^2.0.0" + +"@malept/cross-spawn-promise@^1.1.0": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz#504af200af6b98e198bce768bc1730c6936ae01d" + integrity sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ== + dependencies: + cross-spawn "^7.0.1" + +"@opencensus/web-types@0.0.7": + version "0.0.7" + resolved "https://registry.yarnpkg.com/@opencensus/web-types/-/web-types-0.0.7.tgz#4426de1fe5aa8f624db395d2152b902874f0570a" + integrity sha512-xB+w7ZDAu3YBzqH44rCmG9/RlrOmFuDPt/bpf17eJr8eZSrLt7nc7LnWdxM9Mmoj/YKMHpxRg28txu3TcpiL+g== + +"@opentelemetry/api@^0.10.2": + version "0.10.2" + resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-0.10.2.tgz#9647b881f3e1654089ff7ea59d587b2d35060654" + integrity sha512-GtpMGd6vkzDMYcpu2t9LlhEgMy/SzBwRnz48EejlRArYqZzqSzAsKmegUK7zHgl+EOIaK9mKHhnRaQu3qw20cA== + dependencies: + "@opentelemetry/context-base" "^0.10.2" + +"@opentelemetry/context-base@^0.10.2": + version "0.10.2" + resolved "https://registry.yarnpkg.com/@opentelemetry/context-base/-/context-base-0.10.2.tgz#55bea904b2b91aa8a8675df9eaba5961bddb1def" + integrity sha512-hZNKjKOYsckoOEgBziGMnBcX0M7EtstnCmwz5jZUOUYwlZ+/xxX6z3jPu1XVO2Jivk0eLfuP9GP+vFD49CMetw== + +"@sindresorhus/is@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.0.0.tgz#2ff674e9611b45b528896d820d3d7a812de2f0e4" + integrity sha512-FyD2meJpDPjyNQejSjvnhpgI/azsQkA4lGbuu5BQZfjvJ9cbRZXzeWL2HceCekW4lixO9JPesIIQkSoLjeJHNQ== + +"@szmarczak/http-timer@^4.0.5": + version "4.0.5" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.5.tgz#bfbd50211e9dfa51ba07da58a14cdfd333205152" + integrity sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ== + dependencies: + defer-to-connect "^2.0.0" + +"@types/ansi-colors@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@types/ansi-colors/-/ansi-colors-3.2.0.tgz#3e4fe85d9131ce1c6994f3040bd0b25306c16a6e" + integrity sha512-0caWAhXht9N2lOdMzJLXybsSkYCx1QOdxx6pae48tswI9QV3DFX26AoOpy0JxwhCb+zISTqmd6H8t9Zby9BoZg== + +"@types/azure@0.9.19": + version "0.9.19" + resolved "https://registry.yarnpkg.com/@types/azure/-/azure-0.9.19.tgz#1a6a9bd856b437ddecf3f9fc8407a683c869ba02" + integrity sha1-Gmqb2Fa0N93s8/n8hAemg8hpugI= + dependencies: + "@types/node" "*" + +"@types/byline@^4.2.32": + version "4.2.32" + resolved "https://registry.yarnpkg.com/@types/byline/-/byline-4.2.32.tgz#9d35ec15968056118548412ee24c2c3026c997dc" + integrity sha512-qtlm/J6XOO9p+Ep/ZB5+mCFEDhzWDDHWU4a1eReN7lkPZXW9rkloq2jcAhvKKmlO5tL2GSvKROb+PTsNVhBiyQ== + dependencies: + "@types/node" "*" + +"@types/cacheable-request@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.1.tgz#5d22f3dded1fd3a84c0bbeb5039a7419c2c91976" + integrity sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ== + dependencies: + "@types/http-cache-semantics" "*" + "@types/keyv" "*" + "@types/node" "*" + "@types/responselike" "*" + +"@types/caseless@*": + version "0.12.1" + resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.1.tgz#9794c69c8385d0192acc471a540d1f8e0d16218a" + integrity sha512-FhlMa34NHp9K5MY1Uz8yb+ZvuX0pnvn3jScRSNAb75KHGB8d3rEU6hqMs3Z2vjuytcMfRg6c5CHMc3wtYyD2/A== + +"@types/chokidar@*": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@types/chokidar/-/chokidar-1.7.5.tgz#1fa78c8803e035bed6d98e6949e514b133b0c9b6" + integrity sha512-PDkSRY7KltW3M60hSBlerxI8SFPXsO3AL/aRVsO4Kh9IHRW74Ih75gUuTd/aE4LSSFqypb10UIX3QzOJwBQMGQ== + dependencies: + "@types/events" "*" + "@types/node" "*" + +"@types/debounce@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/debounce/-/debounce-1.0.0.tgz#417560200331e1bb84d72da85391102c2fcd61b7" + integrity sha1-QXVgIAMx4buE1y2oU5EQLC/NYbc= + +"@types/debug@^4.1.4", "@types/debug@^4.1.5": + version "4.1.5" + resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.5.tgz#b14efa8852b7768d898906613c23f688713e02cd" + integrity sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ== + +"@types/eslint-visitor-keys@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" + integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== + +"@types/eslint@4.16.1": + version "4.16.1" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-4.16.1.tgz#19730c9fcb66b6e44742d12b27a603fabfeb2f49" + integrity sha512-lRUXQAULl5geixTiP2K0iYvMUbCkEnuOwvLGjwff12I4ECxoW5QaWML5UUOZ1CvpQLILkddBdMPMZz4ByQizsg== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*": + version "0.0.41" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.41.tgz#fd90754150b57432b72bf560530500597ff04421" + integrity sha512-rIAmXyJlqw4KEBO7+u9gxZZSQHaCNnIzYrnNmYVpgfJhxTqO0brCX0SYpqUTkVI5mwwUwzmtspLBGBKroMeynA== + +"@types/events@*": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" + integrity sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA== + +"@types/fancy-log@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@types/fancy-log/-/fancy-log-1.3.0.tgz#a61ab476e5e628cd07a846330df53b85e05c8ce0" + integrity sha512-mQjDxyOM1Cpocd+vm1kZBP7smwKZ4TNokFeds9LV7OZibmPJFEzY3+xZMrKfUdNT71lv8GoCPD6upKwHxubClw== + +"@types/form-data@*": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-2.2.1.tgz#ee2b3b8eaa11c0938289953606b745b738c54b1e" + integrity sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ== + dependencies: + "@types/node" "*" + +"@types/fs-extra@^9.0.6": + version "9.0.6" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.6.tgz#488e56b77299899a608b8269719c1d133027a6ab" + integrity sha512-ecNRHw4clCkowNOBJH1e77nvbPxHYnWIXMv1IAoG/9+MYGkgoyr3Ppxr7XYFNL41V422EDhyV4/4SSK8L2mlig== + dependencies: + "@types/node" "*" + +"@types/glob-stream@*": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@types/glob-stream/-/glob-stream-6.1.0.tgz#7ede8a33e59140534f8d8adfb8ac9edfb31897bc" + integrity sha512-RHv6ZQjcTncXo3thYZrsbAVwoy4vSKosSWhuhuQxLOTv74OJuFQxXkmUuZCr3q9uNBEVCvIzmZL/FeRNbHZGUg== + dependencies: + "@types/glob" "*" + "@types/node" "*" + +"@types/glob@*", "@types/glob@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" + integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== + dependencies: + "@types/events" "*" + "@types/minimatch" "*" + "@types/node" "*" + +"@types/gulp-concat@^0.0.32": + version "0.0.32" + resolved "https://registry.yarnpkg.com/@types/gulp-concat/-/gulp-concat-0.0.32.tgz#72486028b1cf5faa94c8c1cf34c626531cecacd6" + integrity sha512-CUCFADlITzzBfBa2bdGzhKtvBr4eFh+evb+4igVbvPoO5RyPfHifmyQlZl6lM7q19+OKncRlFXDU7B4X9Ayo2g== + dependencies: + "@types/node" "*" + +"@types/gulp-filter@^3.0.32": + version "3.0.32" + resolved "https://registry.yarnpkg.com/@types/gulp-filter/-/gulp-filter-3.0.32.tgz#eeff3e9dbc092268fed01f2421ab00f6c8cb4848" + integrity sha512-JvY4qTxXehoK2yCUxYVxTMvckVbDM5TWHWeUoYJyX31gwFqw4YDD6JNzhuTxI3yHPUTY4BBRTqgm6puQEZVCNg== + dependencies: + "@types/minimatch" "*" + "@types/node" "*" + "@types/vinyl" "*" + +"@types/gulp-gzip@^0.0.31": + version "0.0.31" + resolved "https://registry.yarnpkg.com/@types/gulp-gzip/-/gulp-gzip-0.0.31.tgz#9358def25540442138fd61a7227f40d4c1e26760" + integrity sha512-KQjHz1FTqLse8/EiktfhN/vo33vamX4gVAQhMTp55STDBA7UToW5CJqYyP7iRorkHK9/aJ2nL2hLkNZkY4M8+w== + dependencies: + "@types/node" "*" + +"@types/gulp-json-editor@^2.2.31": + version "2.2.31" + resolved "https://registry.yarnpkg.com/@types/gulp-json-editor/-/gulp-json-editor-2.2.31.tgz#3c1a8950556c109a0e2d0ab11d5f2a2443665ed2" + integrity sha512-piis0ImYAy0dt18R4EtTbAY+RV8jwTq5VisnUV6OfP8kD4743aHGkAdAd08No4NY3rFa5mD6ytIu8L0YU7nL9w== + dependencies: + "@types/js-beautify" "*" + "@types/node" "*" + +"@types/gulp-rename@^0.0.33": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/gulp-rename/-/gulp-rename-0.0.33.tgz#38d146e97786569f74f5391a1b1f9b5198674b6c" + integrity sha512-FIZQvbZJj6V1gHPTzO+g/BCWpDur7fJrroae4gwV3LaoHBQ+MrR9sB+2HssK8fHv4WdY6hVNxkcft9bYatuPIA== + dependencies: + "@types/node" "*" + +"@types/gulp-sourcemaps@^0.0.32": + version "0.0.32" + resolved "https://registry.yarnpkg.com/@types/gulp-sourcemaps/-/gulp-sourcemaps-0.0.32.tgz#e79ee617e0cb15729874be4533fe59c07793a175" + integrity sha512-+7BAmptW2bxyJnJcCEuie7vLoop3FwWgCdBMzyv7MYXED/HeNMeQuX7uPCkp4vfU1TTu4CYFH0IckNPvo0VePA== + dependencies: + "@types/node" "*" + +"@types/gulp@^4.0.5": + version "4.0.5" + resolved "https://registry.yarnpkg.com/@types/gulp/-/gulp-4.0.5.tgz#f5f498d5bf9538364792de22490a12c0e6bc5eb4" + integrity sha512-nx1QjPTiRpvLfYsZ7MBu7bT6Cm7tAXyLbY0xbdx2IEMxCK2v2urIhJMQZHW0iV1TskM71Xl6p2uRRuWDbk+/7g== + dependencies: + "@types/chokidar" "*" + "@types/undertaker" "*" + "@types/vinyl-fs" "*" + +"@types/http-cache-semantics@*": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz#9140779736aa2655635ee756e2467d787cfe8a2a" + integrity sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A== + +"@types/js-beautify@*": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@types/js-beautify/-/js-beautify-1.8.0.tgz#0369d3d0e1f35a6aec07cb4da2ee2bcda111367c" + integrity sha512-/siF86XrwDKLuHe8l7h6NhrAWgLdgqbxmjZv9NvGWmgYRZoTipkjKiWb0SQHy/jcR+ee0GvbG6uGd+LEBMGNvA== + +"@types/json-schema@*", "@types/json-schema@^7.0.3": + version "7.0.4" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" + integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== + +"@types/keyv@*": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7" + integrity sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw== + dependencies: + "@types/node" "*" + +"@types/mime@0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-0.0.29.tgz#fbcfd330573b912ef59eeee14602bface630754b" + integrity sha1-+8/TMFc7kS71nu7hRgK/rOYwdUs= + +"@types/minimatch@*", "@types/minimatch@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + +"@types/minimist@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256" + integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== + +"@types/mkdirp@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-1.0.1.tgz#0930b948914a78587de35458b86c907b6e98bbf6" + integrity sha512-HkGSK7CGAXncr8Qn/0VqNtExEE+PHMWb+qlR1faHMao7ng6P3tAaoWWBMdva0gL5h4zprjIO89GJOLXsMcDm1Q== + dependencies: + "@types/node" "*" + +"@types/mocha@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44" + integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ== + +"@types/node-fetch@^2.5.0": + version "2.5.8" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.8.tgz#e199c835d234c7eb0846f6618012e558544ee2fb" + integrity sha512-fbjI6ja0N5ZA8TV53RUqzsKNkl9fv8Oj3T7zxW7FGv1GSH7gwJaNF8dzCjrqKaxKeUpTz4yT1DaJFq/omNpGfw== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + +"@types/node@*": + version "8.0.51" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.51.tgz#b31d716fb8d58eeb95c068a039b9b6292817d5fb" + integrity sha512-El3+WJk2D/ppWNd2X05aiP5l2k4EwF7KwheknQZls+I26eSICoWRhRIJ56jGgw2dqNGQ5LtNajmBU2ajS28EvQ== + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +"@types/node@^14.14.21": + version "14.14.22" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18" + integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw== + +"@types/p-limit@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@types/p-limit/-/p-limit-2.2.0.tgz#94a608e9b258a6c6156a13d1a14fd720dba70b97" + integrity sha512-fGFbybl1r0oE9mqgfc2EHHUin9ZL5rbQIexWI6jYRU1ADVn4I3LHzT+g/kpPpZsfp8PB94CQ655pfAjNF8LP6A== + dependencies: + p-limit "*" + +"@types/plist@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/plist/-/plist-3.0.2.tgz#61b3727bba0f5c462fe333542534a0c3e19ccb01" + integrity sha512-ULqvZNGMv0zRFvqn8/4LSPtnmN4MfhlPNtJCTpKuIIxGVGZ2rYWzFXrvEBoh9CVyqSE7D6YFRJ1hydLHI6kbWw== + dependencies: + "@types/node" "*" + xmlbuilder ">=11.0.1" + +"@types/pump@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/pump/-/pump-1.0.1.tgz#ae8157cefef04d1a4d24c1cc91d403c2f5da5cd0" + integrity sha1-roFXzv7wTRpNJMHMkdQDwvXaXNA= + dependencies: + "@types/node" "*" + +"@types/request@^2.47.0": + version "2.47.0" + resolved "https://registry.yarnpkg.com/@types/request/-/request-2.47.0.tgz#76a666cee4cb85dcffea6cd4645227926d9e114e" + integrity sha512-/KXM5oev+nNCLIgBjkwbk8VqxmzI56woD4VUxn95O+YeQ8hJzcSmIZ1IN3WexiqBb6srzDo2bdMbsXxgXNkz5Q== + dependencies: + "@types/caseless" "*" + "@types/form-data" "*" + "@types/node" "*" + "@types/tough-cookie" "*" + +"@types/responselike@*", "@types/responselike@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" + integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== + dependencies: + "@types/node" "*" + +"@types/rimraf@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.4.tgz#403887b0b53c6100a6c35d2ab24f6ccc042fec46" + integrity sha512-8gBudvllD2A/c0CcEX/BivIDorHFt5UI5m46TsNj8DjWCCTTZT74kEe4g+QsY7P/B9WdO98d82zZgXO/RQzu2Q== + dependencies: + "@types/glob" "*" + "@types/node" "*" + +"@types/through2@^2.0.34": + version "2.0.34" + resolved "https://registry.yarnpkg.com/@types/through2/-/through2-2.0.34.tgz#9c2a259a238dace2a05a2f8e94b786961bc27ac4" + integrity sha512-nhRG8+RuG/L+0fAZBQYaRflXKjTrHOKH8MFTChnf+dNVMxA3wHYYrfj0tztK0W51ABXjGfRCDc0vRkecCOrsow== + dependencies: + "@types/node" "*" + +"@types/through@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/through/-/through-0.0.29.tgz#72943aac922e179339c651fa34a4428a4d722f93" + integrity sha512-9a7C5VHh+1BKblaYiq+7Tfc+EOmjMdZaD1MYtkQjSoxgB69tBjW98ry6SKsi4zEIWztLOMRuL87A3bdT/Fc/4w== + dependencies: + "@types/node" "*" + +"@types/tough-cookie@*": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.2.tgz#e0d481d8bb282ad8a8c9e100ceb72c995fb5e709" + integrity sha512-vOVmaruQG5EatOU/jM6yU2uCp3Lz6mK1P5Ztu4iJjfM4SVHU9XYktPUQtKlIXuahqXHdEyUarMrBEwg5Cwu+bA== + +"@types/tunnel@^0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@types/tunnel/-/tunnel-0.0.1.tgz#0d72774768b73df26f25df9184273a42da72b19c" + integrity sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A== + dependencies: + "@types/node" "*" + +"@types/underscore@^1.8.9": + version "1.8.9" + resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.8.9.tgz#fef41f800cd23db1b4f262ddefe49cd952d82323" + integrity sha512-vfzZGgZKRFy7KEWcBGfIFk+h6B+thDCLfkD1exMBMRlUsx2icA+J6y4kAbZs/TjSTeY1duw89QUU133TSzr60Q== + +"@types/undertaker-registry@*": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/undertaker-registry/-/undertaker-registry-1.0.1.tgz#4306d4a03d7acedb974b66530832b90729e1d1da" + integrity sha512-Z4TYuEKn9+RbNVk1Ll2SS4x1JeLHecolIbM/a8gveaHsW0Hr+RQMraZACwTO2VD7JvepgA6UO1A1VrbktQrIbQ== + +"@types/undertaker@*": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@types/undertaker/-/undertaker-1.2.0.tgz#d39a81074b4f274eb656870fc904a70737e00f8e" + integrity sha512-bx/5nZCGkasXs6qaA3B6SVDjBZqdyk04UO12e0uEPSzjt5H8jEJw0DKe7O7IM0hM2bVHRh70pmOH7PEHqXwzOw== + dependencies: + "@types/events" "*" + "@types/undertaker-registry" "*" + +"@types/vinyl-fs@*": + version "2.4.9" + resolved "https://registry.yarnpkg.com/@types/vinyl-fs/-/vinyl-fs-2.4.9.tgz#d312c24b5ba8d2db456d23ee4a66f9d016af82ea" + integrity sha512-Q0EXd6c1fORjiOuK4ZaKdfFcMyFzJlTi56dqktwaWVLIDAzE49wUs3bKnYbZwzyMWoH+NcMWnRuR73S9A0jnRA== + dependencies: + "@types/events" "*" + "@types/glob-stream" "*" + "@types/node" "*" + "@types/vinyl" "*" + +"@types/vinyl@*": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-2.0.2.tgz#4f3b8dae8f5828d3800ef709b0cff488ee852de3" + integrity sha512-2iYpNuOl98SrLPBZfEN9Mh2JCJ2EI9HU35SfgBEb51DcmaHkhp8cKMblYeBqMQiwXMgAD3W60DbQ4i/UdLiXhw== + dependencies: + "@types/node" "*" + +"@types/xml2js@0.0.33": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/xml2js/-/xml2js-0.0.33.tgz#20c5dd6460245284d64a55690015b95e409fb7de" + integrity sha1-IMXdZGAkUoTWSlVpABW5XkCft94= + +"@typescript-eslint/experimental-utils@3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz#e179ffc81a80ebcae2ea04e0332f8b251345a686" + integrity sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/types" "3.10.1" + "@typescript-eslint/typescript-estree" "3.10.1" + eslint-scope "^5.0.0" + eslint-utils "^2.0.0" + +"@typescript-eslint/experimental-utils@~2.13.0": + version "2.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.13.0.tgz#958614faa6f77599ee2b241740e0ea402482533d" + integrity sha512-+Hss3clwa6aNiC8ZjA45wEm4FutDV5HsVXPl/rDug1THq6gEtOYRGLqS3JlTk7mSnL5TbJz0LpEbzbPnKvY6sw== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/typescript-estree" "2.13.0" + eslint-scope "^5.0.0" + +"@typescript-eslint/parser@^3.3.0": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.10.1.tgz#1883858e83e8b442627e1ac6f408925211155467" + integrity sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw== + dependencies: + "@types/eslint-visitor-keys" "^1.0.0" + "@typescript-eslint/experimental-utils" "3.10.1" + "@typescript-eslint/types" "3.10.1" + "@typescript-eslint/typescript-estree" "3.10.1" + eslint-visitor-keys "^1.1.0" + +"@typescript-eslint/types@3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.1.tgz#1d7463fa7c32d8a23ab508a803ca2fe26e758727" + integrity sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ== + +"@typescript-eslint/typescript-estree@2.13.0": + version "2.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.13.0.tgz#a2e746867da772c857c13853219fced10d2566bc" + integrity sha512-t21Mg5cc8T3ADEUGwDisHLIubgXKjuNRbkpzDMLb7/JMmgCe/gHM9FaaujokLey+gwTuLF5ndSQ7/EfQqrQx4g== + dependencies: + debug "^4.1.1" + eslint-visitor-keys "^1.1.0" + glob "^7.1.6" + is-glob "^4.0.1" + lodash.unescape "4.0.1" + semver "^6.3.0" + tsutils "^3.17.1" + +"@typescript-eslint/typescript-estree@3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz#fd0061cc38add4fad45136d654408569f365b853" + integrity sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w== + dependencies: + "@typescript-eslint/types" "3.10.1" + "@typescript-eslint/visitor-keys" "3.10.1" + debug "^4.1.1" + glob "^7.1.6" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^7.3.2" + tsutils "^3.17.1" + +"@typescript-eslint/visitor-keys@3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz#cd4274773e3eb63b2e870ac602274487ecd1e931" + integrity sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ== + dependencies: + eslint-visitor-keys "^1.1.0" + +ajv@^6.12.3: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +applicationinsights@1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.0.8.tgz#db6e3d983cf9f9405fe1ee5ba30ac6e1914537b5" + integrity sha512-KzOOGdphOS/lXWMFZe5440LUdFbrLpMvh2SaRxn7BmiI550KAoSb2gIhiq6kJZ9Ir3AxRRztjhzif+e5P5IXIg== + dependencies: + diagnostic-channel "0.2.0" + diagnostic-channel-publishers "0.2.1" + zone.js "0.7.6" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +asar@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/asar/-/asar-3.0.3.tgz#1fef03c2d6d2de0cbad138788e4f7ae03b129c7b" + integrity sha512-k7zd+KoR+n8pl71PvgElcoKHrVNiSXtw7odKbyNpmgKe7EGRF9Pnu3uLOukD37EvavKwVFxOUpqXTIZC5B5Pmw== + dependencies: + chromium-pickle-js "^0.2.0" + commander "^5.0.0" + glob "^7.1.6" + minimatch "^3.0.4" + optionalDependencies: + "@types/glob" "^7.1.1" + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + +azure-storage@^2.1.0: + version "2.10.3" + resolved "https://registry.yarnpkg.com/azure-storage/-/azure-storage-2.10.3.tgz#c5966bf929d87587d78f6847040ea9a4b1d4a50a" + integrity sha512-IGLs5Xj6kO8Ii90KerQrrwuJKexLgSwYC4oLWmc11mzKe7Jt2E5IVg+ZQ8K53YWZACtVTMBNO3iGuA+4ipjJxQ== + dependencies: + browserify-mime "~1.2.9" + extend "^3.0.2" + json-edm-parser "0.1.2" + md5.js "1.3.4" + readable-stream "~2.0.0" + request "^2.86.0" + underscore "~1.8.3" + uuid "^3.0.0" + validator "~9.4.1" + xml2js "0.2.8" + xmlbuilder "^9.0.7" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base64-js@^1.2.3: + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +bluebird@^3.5.0: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +browserify-mime@~1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/browserify-mime/-/browserify-mime-1.2.9.tgz#aeb1af28de6c0d7a6a2ce40adb68ff18422af31f" + integrity sha1-rrGvKN5sDXpqLOQK22j/GEIq8x8= + +buffer-alloc-unsafe@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" + integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== + +buffer-alloc@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" + integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== + dependencies: + buffer-alloc-unsafe "^1.1.0" + buffer-fill "^1.0.0" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= + +buffer-equal@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.0.tgz#59616b498304d556abd466966b22eeda3eca5fbe" + integrity sha1-WWFrSYME1Var1GaWayLu2j7KX74= + +buffer-fill@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" + integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= + +byline@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" + integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= + +cacheable-lookup@^5.0.3: + version "5.0.4" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" + integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== + +cacheable-request@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.1.tgz#062031c2856232782ed694a257fa35da93942a58" + integrity sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^4.0.0" + lowercase-keys "^2.0.0" + normalize-url "^4.1.0" + responselike "^2.0.0" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +cheerio@^1.0.0-rc.1: + version "1.0.0-rc.2" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db" + integrity sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs= + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.0" + entities "~1.1.1" + htmlparser2 "^3.9.1" + lodash "^4.15.0" + parse5 "^3.0.1" + +chromium-pickle-js@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz#04a106672c18b085ab774d983dfa3ea138f22205" + integrity sha1-BKEGZywYsIWrd02YPfo+oTjyIgU= + +clone-response@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + dependencies: + mimic-response "^1.0.0" + +colors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" + integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= + +colors@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + integrity sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q= + dependencies: + graceful-readlink ">= 1.0.0" + +commander@^2.8.1: + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== + +commander@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== + +commander@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.0.0.tgz#3e2bbfd8bb6724760980988fb5b22b7ee6b71ab2" + integrity sha512-ovx/7NkTrnPuIV8sqk/GjUIIM1+iUQeqA3ye2VNpq9sVoiZsooObWlQy+OPWGI17GDaEoybuAGJm6U8yC077BA== + +compare-version@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/compare-version/-/compare-version-0.1.2.tgz#0162ec2d9351f5ddd59a9202cba935366a725080" + integrity sha1-AWLsLZNR9d3VmpICy6k1NmpyUIA= + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cross-spawn@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +css-select@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-what@2.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.2.tgz#c0876d9d0480927d7d4920dcd72af3595649554d" + integrity sha512-wan8dMWQ0GUeF7DGEPVjhHemVW/vy6xUYmFzRY8RYqgA0JtXC9rJmbScBjqSu6dg9q0lwPQy6ZAmJVr3PPTvqQ== + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +debug@^2.6.8: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^4.1.1, debug@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + +defer-to-connect@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.0.tgz#83d6b199db041593ac84d781b5222308ccf4c2c1" + integrity sha512-bYL2d05vOSf1JEZNx5vSAtPuBMkX8K9EUutg7zlKvTqKXHt7RhWJFbmd7qakVuf13i+IkGmp6FwSsONOf6VYIg== + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +denodeify@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/denodeify/-/denodeify-1.2.1.tgz#3a36287f5034e699e7577901052c2e6c94251631" + integrity sha1-OjYof1A05pnnV3kBBSwubJQlFjE= + +diagnostic-channel-publishers@0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.2.1.tgz#8e2d607a8b6d79fe880b548bc58cc6beb288c4f3" + integrity sha1-ji1geottef6IC1SLxYzGvrKIxPM= + +diagnostic-channel@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" + integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= + dependencies: + semver "^5.3.0" + +dir-compare@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/dir-compare/-/dir-compare-2.4.0.tgz#785c41dc5f645b34343a4eafc50b79bac7f11631" + integrity sha512-l9hmu8x/rjVC9Z2zmGzkhOEowZvW7pmYws5CWHutg8u1JgvsKWMx7Q/UODeu4djLZ4FgW5besw5yvMQnBHzuCA== + dependencies: + buffer-equal "1.0.0" + colors "1.0.3" + commander "2.9.0" + minimatch "3.0.4" + +dom-serializer@0, dom-serializer@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + integrity sha1-BzxpdUbOB4DOI75KKOKT5AvDDII= + dependencies: + domelementtype "~1.1.1" + entities "~1.1.1" + +domelementtype@1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.2.1.tgz#578558ef23befac043a1abb0db07635509393479" + integrity sha512-SQVCLFS2E7G5CRCMdn6K9bIhRj1bS6QBWZfF0TUPh4V/BbqrQ619IdSS3/izn0FZ+9l+uODzaZjb08fjOfablA== + +domelementtype@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + integrity sha1-sXrtguirWeUt2cGbF1bg/BhyBMI= + +domelementtype@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + integrity sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs= + +domhandler@^2.3.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" + integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== + dependencies: + domelementtype "1" + +domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= + dependencies: + dom-serializer "0" + domelementtype "1" + +domutils@^1.5.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== + dependencies: + dom-serializer "0" + domelementtype "1" + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +electron-osx-sign@^0.4.16: + version "0.4.16" + resolved "https://registry.yarnpkg.com/electron-osx-sign/-/electron-osx-sign-0.4.16.tgz#0be8e579b2d9fa4c12d2a21f063898294b3434aa" + integrity sha512-ziMWfc3NmQlwnWLW6EaZq8nH2BWVng/atX5GWsGwhexJYpdW6hsg//MkAfRTRx1kR3Veiqkeiog1ibkbA4x0rg== + dependencies: + bluebird "^3.5.0" + compare-version "^0.1.2" + debug "^2.6.8" + isbinaryfile "^3.0.2" + minimist "^1.2.0" + plist "^3.0.1" + +end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +entities@^1.1.1, entities@~1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== + +esbuild@^0.12.6: + version "0.12.6" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.6.tgz#85bc755c7cf3005d4f34b4f10f98049ce0ee67ce" + integrity sha512-RDvVLvAjsq/kIZJoneMiUOH7EE7t2QaW7T3Q7EdQij14+bZbDq5sndb0tTanmHIFSqZVMBMMyqzVHkS3dJobeA== + +eslint-scope@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" + integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== + dependencies: + estraverse "^4.1.0" + +estraverse@^4.1.0, estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +events@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379" + integrity sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg== + +extend@^3.0.2, extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= + dependencies: + pend "~1.2.0" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" + integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +fs-extra@^9.0.1, fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob@^7.0.6: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +got@11.8.1: + version "11.8.1" + resolved "https://registry.yarnpkg.com/got/-/got-11.8.1.tgz#df04adfaf2e782babb3daabc79139feec2f7e85d" + integrity sha512-9aYdZL+6nHmvJwHALLwKSUZ0hMwGaJGYv3hoPLPgnT8BoBXm1SjnZeky+91tfwJaDzun2s4RsBRy48IEYv2q2Q== + dependencies: + "@sindresorhus/is" "^4.0.0" + "@szmarczak/http-timer" "^4.0.5" + "@types/cacheable-request" "^6.0.1" + "@types/responselike" "^1.0.0" + cacheable-lookup "^5.0.3" + cacheable-request "^7.0.1" + decompress-response "^6.0.0" + http2-wrapper "^1.0.0-beta.5.2" + lowercase-keys "^2.0.0" + p-cancelable "^2.0.0" + responselike "^2.0.0" + +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU= + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +htmlparser2@^3.9.1: + version "3.10.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.0.tgz#5f5e422dcf6119c0d983ed36260ce9ded0bee464" + integrity sha512-J1nEUGv+MkXS0weHNWVKJJ+UrLfePxRWpN3C9bEi9fLxL2+ggW94DQvgYVXsaT30PGwYRIZKNZXuyMhp3Di4bQ== + dependencies: + domelementtype "^1.3.0" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^3.0.6" + +http-cache-semantics@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" + integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +http2-wrapper@^1.0.0-beta.5.2: + version "1.0.0-beta.5.2" + resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.0-beta.5.2.tgz#8b923deb90144aea65cf834b016a340fc98556f3" + integrity sha512-xYz9goEyBnC8XwXDTuC/MZ6t+MrKVQZOk4s7+PaDkwIsQd8IwqvM+0M6bA/2lvG8GHXcPdf+MejTUeO2LCPCeQ== + dependencies: + quick-lru "^5.1.1" + resolve-alpn "^1.0.0" + +iconv-lite-umd@0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/iconv-lite-umd/-/iconv-lite-umd-0.6.8.tgz#5ad310ec126b260621471a2d586f7f37b9958ec0" + integrity sha512-zvXJ5gSwMC9JD3wDzH8CoZGc1pbiJn12Tqjk8BXYCnYz3hYL5GRjHW8LEykjXhV9WgNGI4rgpgHcbIiBfrRq6A== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@^2.0.4, inherits@~2.0.1: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-glob@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isbinaryfile@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.3.tgz#5d6def3edebf6e8ca8cae9c30183a804b5f8be80" + integrity sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw== + dependencies: + buffer-alloc "^1.2.0" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +jsbi@^3.1.3: + version "3.1.4" + resolved "https://registry.yarnpkg.com/jsbi/-/jsbi-3.1.4.tgz#9654dd02207a66a4911b4e4bb74265bc2cbc9dd0" + integrity sha512-52QRRFSsi9impURE8ZUbzAMCLjPm4THO7H2fcuIvaaeFTbSysvkodbQQXIVsNgq/ypDbq6dJiuGKL0vZ/i9hUg== + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + +json-edm-parser@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/json-edm-parser/-/json-edm-parser-0.1.2.tgz#1e60b0fef1bc0af67bc0d146dfdde5486cd615b4" + integrity sha1-HmCw/vG8CvZ7wNFG393lSGzWFbQ= + dependencies: + jsonparse "~1.2.0" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +jsonc-parser@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.3.0.tgz#7c7fc988ee1486d35734faaaa866fadb00fa91ee" + integrity sha512-b0EBt8SWFNnixVdvoR2ZtEGa9ZqLhbJnOjezn+WP+8kspFm+PFYDN8Z4Bc7pRlDjvuVcADSUkroIuTWWn/YiIA== + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonparse@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.2.0.tgz#5c0c5685107160e72fe7489bddea0b44c2bc67bd" + integrity sha1-XAxWhRBxYOcv50ib3eoLRMK8Z70= + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +keyv@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.0.3.tgz#4f3aa98de254803cafcd2896734108daa35e4254" + integrity sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA== + dependencies: + json-buffer "3.0.1" + +linkify-it@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.0.3.tgz#d94a4648f9b1c179d64fa97291268bdb6ce9434f" + integrity sha1-2UpGSPmxwXnWT6lykSaL22zpQ08= + dependencies: + uc.micro "^1.0.1" + +lodash.unescape@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" + integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw= + +lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.15: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +markdown-it@^8.3.1: + version "8.4.2" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.2.tgz#386f98998dc15a37722aa7722084f4020bdd9b54" + integrity sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ== + dependencies: + argparse "^1.0.7" + entities "~1.1.1" + linkify-it "^2.0.0" + mdurl "^1.0.1" + uc.micro "^1.0.5" + +md5.js@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" + integrity sha1-6b296UogpawYsENA/Fdk1bCdkB0= + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +mdurl@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" + integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= + +mime-db@1.45.0: + version "1.45.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" + integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w== + +mime-types@^2.1.12, mime-types@~2.1.19: + version "2.1.28" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd" + integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ== + dependencies: + mime-db "1.45.0" + +mime@^1.3.4: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== + +mime@^1.4.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-response@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== + +minimatch@3.0.4, minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.3.tgz#3db5c0765545ab8637be71f333a104a965a9ca3f" + integrity sha512-+bMdgqjMN/Z77a6NlY/I3U5LlRDbnmaAk6lDveAPKwSpcPM4tKAuYsvYF8xjhOPXhOYGe/73vVLVez5PW+jqhw== + +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +mute-stream@~0.0.4: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + +node-abort-controller@^1.0.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-1.1.0.tgz#8a734a631b022af29963be7245c1483cbb9e070d" + integrity sha512-dEYmUqjtbivotqjraOe8UvhT/poFfog1BQRNsZm/MSEDDESk2cQ1tvD8kGyuN07TM/zoW+n42odL8zTeJupYdQ== + +node-fetch@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + +normalize-url@^4.1.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" + integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== + +nth-check@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" + integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== + dependencies: + boolbase "~1.0.0" + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-tmpdir@^1.0.0, os-tmpdir@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +osenv@^0.1.3: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-cancelable@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.0.0.tgz#4a3740f5bdaf5ed5d7c3e34882c6fb5d6b266a6e" + integrity sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg== + +p-limit@*, p-limit@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +parse-semver@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/parse-semver/-/parse-semver-1.1.1.tgz#9a4afd6df063dc4826f93fba4a99cf223f666cb8" + integrity sha1-mkr9bfBj3Egm+T+6SpnPIj9mbLg= + dependencies: + semver "^5.1.0" + +parse5@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.3.tgz#042f792ffdd36851551cf4e9e066b3874ab45b5c" + integrity sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA== + dependencies: + "@types/node" "*" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +plist@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.1.tgz#a9b931d17c304e8912ef0ba3bdd6182baf2e1f8c" + integrity sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ== + dependencies: + base64-js "^1.2.3" + xmlbuilder "^9.0.7" + xmldom "0.1.x" + +priorityqueuejs@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/priorityqueuejs/-/priorityqueuejs-1.0.0.tgz#2ee4f23c2560913e08c07ce5ccdd6de3df2c5af8" + integrity sha1-LuTyPCVgkT4IwHzlzN1t498sWvg= + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M= + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + +psl@^1.1.28, psl@^1.1.33: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +q@^1.0.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +quick-lru@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" + integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== + +read@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" + integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= + dependencies: + mute-stream "~0.0.4" + +readable-stream@^3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.0.6.tgz#351302e4c68b5abd6a2ed55376a7f9a25be3057a" + integrity sha512-9E1oLoOWfhSXHGv6QlwXJim7uNzd9EVlWK+21tCU9Ju/kR0/p2AZYPz4qSchgO8PlLIH4FpZYfzwS+rEksZjIg== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@~2.0.0: + version "2.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" + integrity sha1-j5A0HmilPMySh4jaz80Rs265t44= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +request@^2.86.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +resolve-alpn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.0.0.tgz#745ad60b3d6aff4b4a48e01b8c0bdc70959e0e8c" + integrity sha512-rTuiIEqFmGxne4IovivKSDzld2lWW9QCjqv80SYjPgf+gS35eaCAjaP54CCwGAwBtnCsvNLYtqxe1Nw+i6JEmA== + +responselike@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.0.tgz#26391bcc3174f750f9a79eacc40a12a5c42d7723" + integrity sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw== + dependencies: + lowercase-keys "^2.0.0" + +safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sax@0.5.x: + version "0.5.8" + resolved "https://registry.yarnpkg.com/sax/-/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1" + integrity sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE= + +sax@>=0.6.0: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +semaphore@^1.0.5: + version "1.1.0" + resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" + integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== + +semver@^5.1.0, semver@^5.3.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" + integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.3.2: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +source-map@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +string_decoder@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + +tmp@0.0.29: + version "0.0.29" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.29.tgz#f25125ff0dd9da3ccb0c2dd371ee1288bb9128c0" + integrity sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA= + dependencies: + os-tmpdir "~1.0.1" + +tough-cookie@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" + integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.1.2" + +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tslib@^1.8.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" + integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== + +tslib@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" + integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== + +tsutils@^3.17.1: + version "3.17.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" + integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== + dependencies: + tslib "^1.8.1" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tunnel@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.4.tgz#2d3785a158c174c9a16dc2c046ec5fc5f1742213" + integrity sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM= + +tunnel@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" + integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +typed-rest-client@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/typed-rest-client/-/typed-rest-client-0.9.0.tgz#f768cc0dc3f4e950f06e04825c36b3e7834aa1f2" + integrity sha1-92jMDcP06VDwbgSCXDaz54NKofI= + dependencies: + tunnel "0.0.4" + underscore "1.8.3" + +typescript@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" + integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== + +typescript@^4.4.0-dev.20210528: + version "4.4.0-dev.20210528" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.0-dev.20210528.tgz#42453bc42e9d9df8ad0741c207c24d56407c0347" + integrity sha512-ACV+mYKC+PhWUXIDUL6qmFClIdrKc20KRxDePt8bniCgkKQD4XRYKl7m02paxJM3nTMRdlfjs0ncaslA5BA1GA== + +uc.micro@^1.0.1, uc.micro@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376" + integrity sha512-JoLI4g5zv5qNyT09f4YAvEZIIV1oOjqnewYg5D38dkQljIzpPT296dbIGvKro3digYI1bkb7W6EP1y4uDlmzLg== + +underscore@1.8.3, underscore@~1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" + integrity sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI= + +underscore@^1.8.3: + version "1.9.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" + integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== + +universal-user-agent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" + integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== + +universalify@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +url-join@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-1.1.0.tgz#741c6c2f4596c4830d6718460920d0c92202dc78" + integrity sha1-dBxsL0WWxIMNZxhGCSDQySIC3Hg= + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +uuid@^3.0.0, uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +uuid@^8.3.0: + version "8.3.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" + integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== + +validator@~9.4.1: + version "9.4.1" + resolved "https://registry.yarnpkg.com/validator/-/validator-9.4.1.tgz#abf466d398b561cd243050112c6ff1de6cc12663" + integrity sha512-YV5KjzvRmSyJ1ee/Dm5UED0G+1L4GZnLN3w6/T+zZm8scVua4sOhYKWTUrKa0H/tMiJyO9QLHMPN+9mB/aMunA== + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vsce@1.48.0: + version "1.48.0" + resolved "https://registry.yarnpkg.com/vsce/-/vsce-1.48.0.tgz#31c1a4c6909c3b8bdc48b3d32cc8c8e94c7113a2" + integrity sha512-1qJn6QLRTu26FIvvMbK/gzHLLdxJVTg9CUTSnCjJHObCCF5CQ0F3FUv7t+5cT7i0J5v5YljrsRY09u7dPBcEnA== + dependencies: + cheerio "^1.0.0-rc.1" + commander "^2.8.1" + denodeify "^1.2.1" + glob "^7.0.6" + lodash "^4.17.10" + markdown-it "^8.3.1" + mime "^1.3.4" + minimatch "^3.0.3" + osenv "^0.1.3" + parse-semver "^1.1.1" + read "^1.0.7" + semver "^5.1.0" + tmp "0.0.29" + url-join "^1.1.0" + vso-node-api "6.1.2-preview" + yauzl "^2.3.1" + yazl "^2.2.2" + +vscode-universal@deepak1556/universal#61454d96223b774c53cda10f72c2098c0ce02d58: + version "0.0.2" + resolved "https://codeload.github.com/deepak1556/universal/tar.gz/61454d96223b774c53cda10f72c2098c0ce02d58" + dependencies: + "@malept/cross-spawn-promise" "^1.1.0" + "@types/debug" "^4.1.5" + "@types/fs-extra" "^9.0.6" + "@types/node" "^14.14.21" + asar "^3.0.3" + debug "^4.3.1" + dir-compare "^2.4.0" + fs-extra "^9.0.1" + typescript "^4.1.3" + +vso-node-api@6.1.2-preview: + version "6.1.2-preview" + resolved "https://registry.yarnpkg.com/vso-node-api/-/vso-node-api-6.1.2-preview.tgz#aab3546df2451ecd894e071bb99b5df19c5fa78f" + integrity sha1-qrNUbfJFHs2JTgcbuZtd8Zxfp48= + dependencies: + q "^1.0.1" + tunnel "0.0.4" + typed-rest-client "^0.9.0" + underscore "^1.8.3" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +xml2js@0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.2.8.tgz#9b81690931631ff09d1957549faf54f4f980b3c2" + integrity sha1-m4FpCTFjH/CdGVdUn69U9PmAs8I= + dependencies: + sax "0.5.x" + +xml2js@^0.4.19: + version "0.4.23" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" + integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== + dependencies: + sax ">=0.6.0" + xmlbuilder "~11.0.0" + +xmlbuilder@>=11.0.1: + version "15.1.1" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-15.1.1.tgz#9dcdce49eea66d8d10b42cae94a79c3c8d0c2ec5" + integrity sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg== + +xmlbuilder@^9.0.7: + version "9.0.7" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" + integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= + +xmlbuilder@~11.0.0: + version "11.0.1" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" + integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== + +xmldom@0.1.x: + version "0.1.31" + resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff" + integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yauzl@^2.3.1: + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0" + +yazl@^2.2.2: + version "2.4.3" + resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.4.3.tgz#ec26e5cc87d5601b9df8432dbdd3cd2e5173a071" + integrity sha1-7CblzIfVYBud+EMtvdPNLlFzoHE= + dependencies: + buffer-crc32 "~0.2.3" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +zone.js@0.7.6: + version "0.7.6" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.7.6.tgz#fbbc39d3e0261d0986f1ba06306eb3aeb0d22009" + integrity sha1-+7w50+AmHQmG8boGMG6zrrDSIAk= diff --git a/lib/vscode/cglicenses.json b/cglicenses.json similarity index 78% rename from lib/vscode/cglicenses.json rename to cglicenses.json index 621c771c4c2a..7c42f531d52a 100644 --- a/lib/vscode/cglicenses.json +++ b/cglicenses.json @@ -54,35 +54,6 @@ "Copyright (c) Microsoft Corporation. All rights reserved." ] }, - { - // Reason: The npm package lacks a repoURL field - // So the license at https://github.com/floatdrop/pinkie/blob/master/license - // cannot be found by the OSS tool automatically. - "name": "pinkie", - "fullLicenseText": [ - "The MIT License (MIT)", - "", - "Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop)", - "", - "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." - ] - }, { "name": "big-integer", "prependLicenseText": [ @@ -134,6 +105,7 @@ { // Reason: Repository lacks license text. // https://github.com/LinusU/load-yaml-file/blob/master/package.json declares MIT. + // https://github.com/LinusU/load-yaml-file/issues/2 "name": "load-yaml-file", "fullLicenseText": [ "MIT License", @@ -149,6 +121,7 @@ { // Reason: Repository lacks license text. // https://github.com/othiym23/emitter-listener/blob/master/package.json declares BSD-2-Clause. + // https://github.com/othiym23/emitter-listener/issues/3 "name": "emitter-listener", "fullLicenseText": [ "BSD 2-Clause \"Simplified\" License", @@ -174,19 +147,5 @@ "(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS", "SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ] - }, - { - // Reason: Repository has been deleted (package.json declares MIT). - "name": "vscode-js-debug-cdp-proxy-api", - "fullLicenseText": [ - "MIT License", - "Copyright (c) Manuel Alabor", - "", - "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/cgmanifest.json b/cgmanifest.json new file mode 100644 index 000000000000..22cbc50562c5 --- /dev/null +++ b/cgmanifest.json @@ -0,0 +1,545 @@ +{ + "registrations": [ + { + "component": { + "type": "git", + "git": { + "name": "chromium", + "repositoryUrl": "https://chromium.googlesource.com/chromium/src", + "commitHash": "cd7a46bf02a768a1aabf9443f6ee469bc6e28e7c" + } + }, + "licenseDetail": [ + "BSD License", + "", + "Copyright 2015 The Chromium Authors. 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.", + "", + " * Neither the name Google Inc. nor the names of its contributors may be used to", + " endorse or promote products derived from this software without specific", + " prior written permission.", + "", + "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." + ], + "isOnlyProductionDependency": true, + "version": "89.0.4389.128" + }, + { + "component": { + "type": "git", + "git": { + "name": "nodejs", + "repositoryUrl": "https://github.com/nodejs/node", + "commitHash": "bd60e93357a118204ea238d94e7a9e4209d93062" + } + }, + "isOnlyProductionDependency": true, + "version": "14.16.0" + }, + { + "component": { + "type": "git", + "git": { + "name": "electron", + "repositoryUrl": "https://github.com/electron/electron", + "commitHash": "30f82dd1cb8140ccb5c6a4960eef8e3b8c15eeba" + } + }, + "isOnlyProductionDependency": true, + "license": "MIT", + "version": "12.0.9" + }, + { + "component": { + "type": "git", + "git": { + "name": "inno setup", + "repositoryUrl": "https://github.com/jrsoftware/issrc", + "commitHash": "03fe8f4edb3e96c7835c9483052625bbedb160f2" + } + }, + "isOnlyProductionDependency": true, + "licenseDetail": [ + "Inno Setup License", + "==================", + "", + "Except where otherwise noted, all of the documentation and software included in the Inno Setup", + "package is copyrighted by Jordan Russell.", + "", + "Copyright (C) 1997-2020 Jordan Russell. All rights reserved.", + "Portions Copyright (C) 2000-2020 Martijn Laan. All rights reserved.", + "", + "This software is provided \"as-is,\" without any express or implied warranty. In no event shall the", + "author be held liable for any damages arising from the use of this software.", + "", + "Permission is granted to anyone to use this software for any purpose, including commercial", + "applications, and to alter and redistribute it, provided that the following conditions are met:", + "", + "1. All redistributions of source code files must retain all copyright notices that are currently in", + " place, and this list of conditions without modification.", + "", + "2. All redistributions in binary form must retain all occurrences of the above copyright notice and", + " web site addresses that are currently in place (for example, in the About boxes).", + "", + "3. The origin of this software must not be misrepresented; you must not claim that you wrote the", + " original software. If you use this software to distribute a product, an acknowledgment in the", + " product documentation would be appreciated but is not required.", + "", + "4. Modified versions in source or binary form must be plainly marked as such, and must not be", + " misrepresented as being the original software.", + "", + "", + "Jordan Russell", + "jr-2010 AT jrsoftware.org", + "https://jrsoftware.org/" + ], + "version": "5.5.6" + }, + { + "component": { + "type": "git", + "git": { + "name": "spdlog original", + "repositoryUrl": "https://github.com/gabime/spdlog", + "commitHash": "4fba14c79f356ae48d6141c561bf9fd7ba33fabd" + } + }, + "isOnlyProductionDependency": true, + "license": "MIT", + "version": "0.14.0" + }, + { + "component": { + "type": "git", + "git": { + "name": "vscode-codicons", + "repositoryUrl": "https://github.com/microsoft/vscode-codicons", + "commitHash": "ccdcf91d57d3a5a1d6b620d95d518bab4d75984d" + } + }, + "license": "MIT and Creative Commons Attribution 4.0", + "version": "0.0.14" + }, + { + "component": { + "type": "npm", + "npm": { + "name": "mdn-data", + "version": "1.1.12" + } + }, + "repositoryUrl": "https://github.com/mdn/data", + "licenseDetail": [ + "Mozilla Public License Version 2.0", + "", + "Copyright (c) 2018 Mozilla Corporation", + "", + "==================================", + "", + "1. Definitions", + "--------------", + "", + "1.1. \"Contributor\"", + " means each individual or legal entity that creates, contributes to", + " the creation of, or owns Covered Software.", + "", + "1.2. \"Contributor Version\"", + " means the combination of the Contributions of others (if any) used", + " by a Contributor and that particular Contributor's Contribution.", + "", + "1.3. \"Contribution\"", + " means Covered Software of a particular Contributor.", + "", + "1.4. \"Covered Software\"", + " means Source Code Form to which the initial Contributor has attached", + " the notice in Exhibit A, the Executable Form of such Source Code", + " Form, and Modifications of such Source Code Form, in each case", + " including portions thereof.", + "", + "1.5. \"Incompatible With Secondary Licenses\"", + " means", + "", + " (a) that the initial Contributor has attached the notice described", + " in Exhibit B to the Covered Software; or", + "", + " (b) that the Covered Software was made available under the terms of", + " version 1.1 or earlier of the License, but not also under the", + " terms of a Secondary License.", + "", + "1.6. \"Executable Form\"", + " means any form of the work other than Source Code Form.", + "", + "1.7. \"Larger Work\"", + " means a work that combines Covered Software with other material, in", + " a separate file or files, that is not Covered Software.", + "", + "1.8. \"License\"", + " means this document.", + "", + "1.9. \"Licensable\"", + " means having the right to grant, to the maximum extent possible,", + " whether at the time of the initial grant or subsequently, any and", + " all of the rights conveyed by this License.", + "", + "1.10. \"Modifications\"", + " means any of the following:", + "", + " (a) any file in Source Code Form that results from an addition to,", + " deletion from, or modification of the contents of Covered", + " Software; or", + "", + " (b) any new file in Source Code Form that contains any Covered", + " Software.", + "", + "1.11. \"Patent Claims\" of a Contributor", + " means any patent claim(s), including without limitation, method,", + " process, and apparatus claims, in any patent Licensable by such", + " Contributor that would be infringed, but for the grant of the", + " License, by the making, using, selling, offering for sale, having", + " made, import, or transfer of either its Contributions or its", + " Contributor Version.", + "", + "1.12. \"Secondary License\"", + " means either the GNU General Public License, Version 2.0, the GNU", + " Lesser General Public License, Version 2.1, the GNU Affero General", + " Public License, Version 3.0, or any later versions of those", + " licenses.", + "", + "1.13. \"Source Code Form\"", + " means the form of the work preferred for making modifications.", + "", + "1.14. \"You\" (or \"Your\")", + " means an individual or a legal entity exercising rights under this", + " License. For legal entities, \"You\" includes any entity that", + " controls, is controlled by, or is under common control with You. For", + " purposes of this definition, \"control\" means (a) the power, direct", + " or indirect, to cause the direction or management of such entity,", + " whether by contract or otherwise, or (b) ownership of more than", + " fifty percent (50%) of the outstanding shares or beneficial", + " ownership of such entity.", + "", + "2. License Grants and Conditions", + "--------------------------------", + "", + "2.1. Grants", + "", + "Each Contributor hereby grants You a world-wide, royalty-free,", + "non-exclusive license:", + "", + "(a) under intellectual property rights (other than patent or trademark)", + " Licensable by such Contributor to use, reproduce, make available,", + " modify, display, perform, distribute, and otherwise exploit its", + " Contributions, either on an unmodified basis, with Modifications, or", + " as part of a Larger Work; and", + "", + "(b) under Patent Claims of such Contributor to make, use, sell, offer", + " for sale, have made, import, and otherwise transfer either its", + " Contributions or its Contributor Version.", + "", + "2.2. Effective Date", + "", + "The licenses granted in Section 2.1 with respect to any Contribution", + "become effective for each Contribution on the date the Contributor first", + "distributes such Contribution.", + "", + "2.3. Limitations on Grant Scope", + "", + "The licenses granted in this Section 2 are the only rights granted under", + "this License. No additional rights or licenses will be implied from the", + "distribution or licensing of Covered Software under this License.", + "Notwithstanding Section 2.1(b) above, no patent license is granted by a", + "Contributor:", + "", + "(a) for any code that a Contributor has removed from Covered Software;", + " or", + "", + "(b) for infringements caused by: (i) Your and any other third party's", + " modifications of Covered Software, or (ii) the combination of its", + " Contributions with other software (except as part of its Contributor", + " Version); or", + "", + "(c) under Patent Claims infringed by Covered Software in the absence of", + " its Contributions.", + "", + "This License does not grant any rights in the trademarks, service marks,", + "or logos of any Contributor (except as may be necessary to comply with", + "the notice requirements in Section 3.4).", + "", + "2.4. Subsequent Licenses", + "", + "No Contributor makes additional grants as a result of Your choice to", + "distribute the Covered Software under a subsequent version of this", + "License (see Section 10.2) or under the terms of a Secondary License (if", + "permitted under the terms of Section 3.3).", + "", + "2.5. Representation", + "", + "Each Contributor represents that the Contributor believes its", + "Contributions are its original creation(s) or it has sufficient rights", + "to grant the rights to its Contributions conveyed by this License.", + "", + "2.6. Fair Use", + "", + "This License is not intended to limit any rights You have under", + "applicable copyright doctrines of fair use, fair dealing, or other", + "equivalents.", + "", + "2.7. Conditions", + "", + "Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted", + "in Section 2.1.", + "", + "3. Responsibilities", + "-------------------", + "", + "3.1. Distribution of Source Form", + "", + "All distribution of Covered Software in Source Code Form, including any", + "Modifications that You create or to which You contribute, must be under", + "the terms of this License. You must inform recipients that the Source", + "Code Form of the Covered Software is governed by the terms of this", + "License, and how they can obtain a copy of this License. You may not", + "attempt to alter or restrict the recipients' rights in the Source Code", + "Form.", + "", + "3.2. Distribution of Executable Form", + "", + "If You distribute Covered Software in Executable Form then:", + "", + "(a) such Covered Software must also be made available in Source Code", + " Form, as described in Section 3.1, and You must inform recipients of", + " the Executable Form how they can obtain a copy of such Source Code", + " Form by reasonable means in a timely manner, at a charge no more", + " than the cost of distribution to the recipient; and", + "", + "(b) You may distribute such Executable Form under the terms of this", + " License, or sublicense it under different terms, provided that the", + " license for the Executable Form does not attempt to limit or alter", + " the recipients' rights in the Source Code Form under this License.", + "", + "3.3. Distribution of a Larger Work", + "", + "You may create and distribute a Larger Work under terms of Your choice,", + "provided that You also comply with the requirements of this License for", + "the Covered Software. If the Larger Work is a combination of Covered", + "Software with a work governed by one or more Secondary Licenses, and the", + "Covered Software is not Incompatible With Secondary Licenses, this", + "License permits You to additionally distribute such Covered Software", + "under the terms of such Secondary License(s), so that the recipient of", + "the Larger Work may, at their option, further distribute the Covered", + "Software under the terms of either this License or such Secondary", + "License(s).", + "", + "3.4. Notices", + "", + "You may not remove or alter the substance of any license notices", + "(including copyright notices, patent notices, disclaimers of warranty,", + "or limitations of liability) contained within the Source Code Form of", + "the Covered Software, except that You may alter any license notices to", + "the extent required to remedy known factual inaccuracies.", + "", + "3.5. Application of Additional Terms", + "", + "You may choose to offer, and to charge a fee for, warranty, support,", + "indemnity or liability obligations to one or more recipients of Covered", + "Software. However, You may do so only on Your own behalf, and not on", + "behalf of any Contributor. You must make it absolutely clear that any", + "such warranty, support, indemnity, or liability obligation is offered by", + "You alone, and You hereby agree to indemnify every Contributor for any", + "liability incurred by such Contributor as a result of warranty, support,", + "indemnity or liability terms You offer. You may include additional", + "disclaimers of warranty and limitations of liability specific to any", + "jurisdiction.", + "", + "4. Inability to Comply Due to Statute or Regulation", + "---------------------------------------------------", + "", + "If it is impossible for You to comply with any of the terms of this", + "License with respect to some or all of the Covered Software due to", + "statute, judicial order, or regulation then You must: (a) comply with", + "the terms of this License to the maximum extent possible; and (b)", + "describe the limitations and the code they affect. Such description must", + "be placed in a text file included with all distributions of the Covered", + "Software under this License. Except to the extent prohibited by statute", + "or regulation, such description must be sufficiently detailed for a", + "recipient of ordinary skill to be able to understand it.", + "", + "5. Termination", + "--------------", + "", + "5.1. The rights granted under this License will terminate automatically", + "if You fail to comply with any of its terms. However, if You become", + "compliant, then the rights granted under this License from a particular", + "Contributor are reinstated (a) provisionally, unless and until such", + "Contributor explicitly and finally terminates Your grants, and (b) on an", + "ongoing basis, if such Contributor fails to notify You of the", + "non-compliance by some reasonable means prior to 60 days after You have", + "come back into compliance. Moreover, Your grants from a particular", + "Contributor are reinstated on an ongoing basis if such Contributor", + "notifies You of the non-compliance by some reasonable means, this is the", + "first time You have received notice of non-compliance with this License", + "from such Contributor, and You become compliant prior to 30 days after", + "Your receipt of the notice.", + "", + "5.2. If You initiate litigation against any entity by asserting a patent", + "infringement claim (excluding declaratory judgment actions,", + "counter-claims, and cross-claims) alleging that a Contributor Version", + "directly or indirectly infringes any patent, then the rights granted to", + "You by any and all Contributors for the Covered Software under Section", + "2.1 of this License shall terminate.", + "", + "5.3. In the event of termination under Sections 5.1 or 5.2 above, all", + "end user license agreements (excluding distributors and resellers) which", + "have been validly granted by You or Your distributors under this License", + "prior to termination shall survive termination.", + "", + "************************************************************************", + "* *", + "* 6. Disclaimer of Warranty *", + "* ------------------------- *", + "* *", + "* Covered Software is provided under this License on an \"as is\" *", + "* basis, without warranty of any kind, either expressed, implied, or *", + "* statutory, including, without limitation, warranties that the *", + "* Covered Software is free of defects, merchantable, fit for a *", + "* particular purpose or non-infringing. The entire risk as to the *", + "* quality and performance of the Covered Software is with You. *", + "* Should any Covered Software prove defective in any respect, You *", + "* (not any Contributor) assume the cost of any necessary servicing, *", + "* repair, or correction. This disclaimer of warranty constitutes an *", + "* essential part of this License. No use of any Covered Software is *", + "* authorized under this License except under this disclaimer. *", + "* *", + "************************************************************************", + "", + "************************************************************************", + "* *", + "* 7. Limitation of Liability *", + "* -------------------------- *", + "* *", + "* Under no circumstances and under no legal theory, whether tort *", + "* (including negligence), contract, or otherwise, shall any *", + "* Contributor, or anyone who distributes Covered Software as *", + "* permitted above, be liable to You for any direct, indirect, *", + "* special, incidental, or consequential damages of any character *", + "* including, without limitation, damages for lost profits, loss of *", + "* goodwill, work stoppage, computer failure or malfunction, or any *", + "* and all other commercial damages or losses, even if such party *", + "* shall have been informed of the possibility of such damages. This *", + "* limitation of liability shall not apply to liability for death or *", + "* personal injury resulting from such party's negligence to the *", + "* extent applicable law prohibits such limitation. Some *", + "* jurisdictions do not allow the exclusion or limitation of *", + "* incidental or consequential damages, so this exclusion and *", + "* limitation may not apply to You. *", + "* *", + "************************************************************************", + "", + "8. Litigation", + "-------------", + "", + "Any litigation relating to this License may be brought only in the", + "courts of a jurisdiction where the defendant maintains its principal", + "place of business and such litigation shall be governed by laws of that", + "jurisdiction, without reference to its conflict-of-law provisions.", + "Nothing in this Section shall prevent a party's ability to bring", + "cross-claims or counter-claims.", + "", + "9. Miscellaneous", + "----------------", + "", + "This License represents the complete agreement concerning the subject", + "matter hereof. If any provision of this License is held to be", + "unenforceable, such provision shall be reformed only to the extent", + "necessary to make it enforceable. Any law or regulation which provides", + "that the language of a contract shall be construed against the drafter", + "shall not be used to construe this License against a Contributor.", + "", + "10. Versions of the License", + "---------------------------", + "", + "10.1. New Versions", + "", + "Mozilla Foundation is the license steward. Except as provided in Section", + "10.3, no one other than the license steward has the right to modify or", + "publish new versions of this License. Each version will be given a", + "distinguishing version number.", + "", + "10.2. Effect of New Versions", + "", + "You may distribute the Covered Software under the terms of the version", + "of the License under which You originally received the Covered Software,", + "or under the terms of any subsequent version published by the license", + "steward.", + "", + "10.3. Modified Versions", + "", + "If you create software not governed by this License, and you want to", + "create a new license for such software, you may create and use a", + "modified version of this License if you rename the license and remove", + "any references to the name of the license steward (except to note that", + "such modified license differs from this License).", + "", + "10.4. Distributing Source Code Form that is Incompatible With Secondary", + "Licenses", + "", + "If You choose to distribute Source Code Form that is Incompatible With", + "Secondary Licenses under the terms of this version of the License, the", + "notice described in Exhibit B of this License must be attached.", + "", + "Exhibit A - Source Code Form License Notice", + "-------------------------------------------", + "", + " This Source Code Form is subject to the terms of the Mozilla Public", + " License, v. 2.0. If a copy of the MPL was not distributed with this", + " file, You can obtain one at http://mozilla.org/MPL/2.0/.", + "", + "If it is not possible or desirable to put the notice in a particular", + "file, then You may include the notice in a location (such as a LICENSE", + "file in a relevant directory) where a recipient would be likely to look", + "for such a notice.", + "", + "You may add additional accurate notices of copyright ownership.", + "", + "Exhibit B - \"Incompatible With Secondary Licenses\" Notice", + "---------------------------------------------------------", + "", + " This Source Code Form is \"Incompatible With Secondary Licenses\", as", + " defined by the Mozilla Public License, v. 2.0." + ], + "license": "MPL" + }, + { + "component": { + "type": "git", + "git": { + "name": "ripgrep", + "repositoryUrl": "https://github.com/BurntSushi/ripgrep", + "commitHash": "973de50c9ef451da2cfcdfa86f2b2711d8d6ff48" + } + }, + "isOnlyProductionDependency": true, + "license": "MIT", + "version": "0.10.0" + } + ], + "version": 1 +} diff --git a/ci/README.md b/ci/README.md deleted file mode 100644 index 40f7f4b7b4bf..000000000000 --- a/ci/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# ci - -This directory contains scripts used for code-server's continuous integration infrastructure. - -Some of these scripts contain more detailed documentation and options -in header comments. - -Any file or directory in this subdirectory should be documented here. - -- [./ci/lib.sh](./lib.sh) - - Contains code duplicated across these scripts. - -## Publishing a release - -1. Run `yarn release:prep` and type in the new version i.e. 3.8.1 -2. GitHub actions will generate the `npm-package`, `release-packages` and `release-images` artifacts. - 1. You do not have to wait for these. -3. Run `yarn release:github-draft` to create a GitHub draft release from the template with - the updated version. - 1. Summarize the major changes in the release notes and link to the relevant issues. - 2. Change the @ to target the version branch. Example: `v3.9.0 @ Target: v3.9.0` -4. Wait for the artifacts in step 2 to build. -5. Run `yarn release:github-assets` to download the `release-packages` artifact. - - It will upload them to the draft release. -6. Run some basic sanity tests on one of the released packages. - - Especially make sure the terminal works fine. -7. Make sure the github release tag is the commit with the artifacts. -8. Publish the release and merge the PR. - 1. CI will automatically grab the artifacts and then: - 1. Publish the NPM package from `npm-package`. - 2. Publish the Docker Hub image from `release-images`. -9. Update the AUR package. - - Instructions on updating the AUR package are at [cdr/code-server-aur](https://github.com/cdr/code-server-aur). -10. Wait for the npm package to be published. -11. Update the [homebrew package](https://github.com/Homebrew/homebrew-core/blob/master/Formula/code-server.rb). - 1. Install [homebrew](https://brew.sh/) - 2. Run `brew bump-formula-pr --version=3.8.1 code-server` and update the version accordingly. This will bump the version and open a PR. Note: this will only work once the version is published on npm. - -## dev - -This directory contains scripts used for the development of code-server. - -- [./ci/dev/image](./dev/image) - - See [./docs/CONTRIBUTING.md](../docs/CONTRIBUTING.md) for docs on the development container. -- [./ci/dev/fmt.sh](./dev/fmt.sh) (`yarn fmt`) - - Runs formatters. -- [./ci/dev/lint.sh](./dev/lint.sh) (`yarn lint`) - - Runs linters. -- [./ci/dev/test-unit.sh](./dev/test-unit.sh) (`yarn test:unit`) - - Runs unit tests. -- [./ci/dev/test-e2e.sh](./dev/test-e2e.sh) (`yarn test:e2e`) - - Runs end-to-end tests. -- [./ci/dev/ci.sh](./dev/ci.sh) (`yarn ci`) - - Runs `yarn fmt`, `yarn lint` and `yarn test`. -- [./ci/dev/watch.ts](./dev/watch.ts) (`yarn watch`) - - Starts a process to build and launch code-server and restart on any code changes. - - Example usage in [./docs/CONTRIBUTING.md](../docs/CONTRIBUTING.md). -- [./ci/dev/gen_icons.sh](./ci/dev/gen_icons.sh) (`yarn icons`) - - Generates the various icons from a single `.svg` favicon in - `src/browser/media/favicon.svg`. - - Requires [imagemagick](https://imagemagick.org/index.php) - -## build - -This directory contains the scripts used to build and release code-server. -You can disable minification by setting `MINIFY=`. - -- [./ci/build/build-code-server.sh](./build/build-code-server.sh) (`yarn build`) - - Builds code-server into `./out` and bundles the frontend into `./dist`. -- [./ci/build/build-vscode.sh](./build/build-vscode.sh) (`yarn build:vscode`) - - Builds vscode into `./lib/vscode/out-vscode`. -- [./ci/build/build-release.sh](./build/build-release.sh) (`yarn release`) - - Bundles the output of the above two scripts into a single node module at `./release`. -- [./ci/build/build-standalone-release.sh](./build/build-standalone-release.sh) (`yarn release:standalone`) - - Requires a node module already built into `./release` with the above script. - - Will build a standalone release with node and node_modules bundled into `./release-standalone`. -- [./ci/build/clean.sh](./build/clean.sh) (`yarn clean`) - - Removes all build artifacts. - - Useful to do a clean build. -- [./ci/build/code-server.sh](./build/code-server.sh) - - Copied into standalone releases to run code-server with the bundled node binary. -- [./ci/build/test-standalone-release.sh](./build/test-standalone-release.sh) (`yarn test:standalone-release`) - - Ensures code-server in the `./release-standalone` directory works by installing an extension. -- [./ci/build/build-packages.sh](./build/build-packages.sh) (`yarn package`) - - Packages `./release-standalone` into a `.tar.gz` archive in `./release-packages`. - - If on linux, [nfpm](https://github.com/goreleaser/nfpm) is used to generate `.deb` and `.rpm`. -- [./ci/build/nfpm.yaml](./build/nfpm.yaml) - - Used to configure [nfpm](https://github.com/goreleaser/nfpm) to generate `.deb` and `.rpm`. -- [./ci/build/code-server-nfpm.sh](./build/code-server-nfpm.sh) - - Entrypoint script for code-server for `.deb` and `.rpm`. -- [./ci/build/code-server.service](./build/code-server.service) - - systemd user service packaged into the `.deb` and `.rpm`. -- [./ci/build/release-github-draft.sh](./build/release-github-draft.sh) (`yarn release:github-draft`) - - Uses [gh](https://github.com/cli/cli) to create a draft release with a template description. -- [./ci/build/release-github-assets.sh](./build/release-github-assets.sh) (`yarn release:github-assets`) - - Downloads the release-package artifacts for the current commit from CI. - - Uses [gh](https://github.com/cli/cli) to upload the artifacts to the release - specified in `package.json`. -- [./ci/build/npm-postinstall.sh](./build/npm-postinstall.sh) - - Post install script for the npm package. - - Bundled by`yarn release`. - -## release-image - -This directory contains the release docker container image. - -- [./release-image/build.sh](./release-image/build.sh) - - Builds the release container with the tag `codercom/code-server-$ARCH:$VERSION`. - - Assumes debian releases are ready in `./release-packages`. - -## images - -This directory contains the images for CI. - -## steps - -This directory contains the scripts used in CI. -Helps avoid clobbering the CI configuration. - -- [./steps/fmt.sh](./steps/fmt.sh) - - Runs `yarn fmt`. -- [./steps/lint.sh](./steps/lint.sh) - - Runs `yarn lint`. -- [./steps/test-unit.sh](./steps/test-unit.sh) - - Runs `yarn test:unit`. -- [./steps/test-e2e.sh](./steps/test-e2e.sh) - - Runs `yarn test:e2e`. -- [./steps/release.sh](./steps/release.sh) - - Runs the release process. - - Generates the npm package at `./release`. -- [./steps/release-packages.sh](./steps/release-packages.sh) - - Takes the output of the previous script and generates a standalone release and - release packages into `./release-packages`. -- [./steps/publish-npm.sh](./steps/publish-npm.sh) - - Grabs the `npm-package` release artifact for the current commit and publishes it on npm. -- [./steps/build-docker-image.sh](./steps/build-docker-image.sh) - - Builds the docker image and then saves it into `./release-images/code-server-$ARCH-$VERSION.tar`. -- [./steps/push-docker-manifest.sh](./steps/push-docker-manifest.sh) - - Loads all images in `./release-images` and then builds and pushes a multi architecture - docker manifest for the amd64 and arm64 images to `codercom/code-server:$VERSION` and - `codercom/code-server:latest`. diff --git a/ci/build/build-code-server.sh b/ci/build/build-code-server.sh deleted file mode 100755 index c465f7e4a0c4..000000000000 --- a/ci/build/build-code-server.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Builds code-server into out and the frontend into dist. - -# MINIFY controls whether parcel minifies dist. -MINIFY=${MINIFY-true} - -main() { - cd "$(dirname "${0}")/../.." - - tsc - - # If out/node/entry.js does not already have the shebang, - # we make sure to add it and make it executable. - if ! grep -q -m1 "^#!/usr/bin/env node" out/node/entry.js; then - sed -i.bak "1s;^;#!/usr/bin/env node\n;" out/node/entry.js && rm out/node/entry.js.bak - chmod +x out/node/entry.js - fi - - if ! [ -f ./lib/coder-cloud-agent ]; then - echo "Downloading the cloud agent..." - - # for arch; we do not use OS from lib.sh and get our own. - # lib.sh normalizes macos to darwin - but cloud-agent's binaries do not - source ./ci/lib.sh - OS="$(uname | tr '[:upper:]' '[:lower:]')" - - set +e - curl -fsSL "https://github.com/cdr/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent - chmod +x ./lib/coder-cloud-agent - set -e - fi - - parcel build \ - --public-url "." \ - --out-dir dist \ - $([[ $MINIFY ]] || echo --no-minify) \ - src/browser/register.ts \ - src/browser/serviceWorker.ts \ - src/browser/pages/login.ts \ - src/browser/pages/vscode.ts -} - -main "$@" diff --git a/ci/build/build-packages.sh b/ci/build/build-packages.sh deleted file mode 100755 index b83ed286f90d..000000000000 --- a/ci/build/build-packages.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Packages code-server for the current OS and architecture into ./release-packages. -# This script assumes that a standalone release is built already into ./release-standalone - -main() { - cd "$(dirname "${0}")/../.." - source ./ci/lib.sh - - # Allow us to override architecture - # we use this for our Linux ARM64 cross compile builds - if [ "$#" -eq 1 ] && [ "$1" ]; then - ARCH=$1 - fi - - mkdir -p release-packages - - release_archive - - if [[ $OS == "linux" ]]; then - release_nfpm - fi -} - -release_archive() { - local release_name="code-server-$VERSION-$OS-$ARCH" - if [[ $OS == "linux" ]]; then - tar -czf "release-packages/$release_name.tar.gz" --transform "s/^\.\/release-standalone/$release_name/" ./release-standalone - else - tar -czf "release-packages/$release_name.tar.gz" -s "/^release-standalone/$release_name/" release-standalone - fi - - echo "done (release-packages/$release_name)" - - release_gcp -} - -release_gcp() { - mkdir -p "release-gcp/$VERSION" - cp "release-packages/$release_name.tar.gz" "./release-gcp/$VERSION/$OS-$ARCH.tar.gz" - mkdir -p "release-gcp/latest" - cp "./release-packages/$release_name.tar.gz" "./release-gcp/latest/$OS-$ARCH.tar.gz" -} - -# Generates deb and rpm packages. -release_nfpm() { - local nfpm_config - nfpm_config="$(envsubst <./ci/build/nfpm.yaml)" - - # The underscores are convention for .deb. - nfpm pkg -f <(echo "$nfpm_config") --target "release-packages/code-server_${VERSION}_$ARCH.deb" - nfpm pkg -f <(echo "$nfpm_config") --target "release-packages/code-server-$VERSION-$ARCH.rpm" -} - -main "$@" diff --git a/ci/build/build-release.sh b/ci/build/build-release.sh deleted file mode 100755 index ffad55380418..000000000000 --- a/ci/build/build-release.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# This script requires vscode to be built with matching MINIFY. - -# MINIFY controls whether minified vscode is bundled. -MINIFY="${MINIFY-true}" - -# KEEP_MODULES controls whether the script cleans all node_modules requiring a yarn install -# to run first. -KEEP_MODULES="${KEEP_MODULES-0}" - -main() { - cd "$(dirname "${0}")/../.." - source ./ci/lib.sh - - VSCODE_SRC_PATH="lib/vscode" - VSCODE_OUT_PATH="$RELEASE_PATH/lib/vscode" - - mkdir -p "$RELEASE_PATH" - - bundle_code_server - bundle_vscode - - rsync README.md "$RELEASE_PATH" - rsync LICENSE.txt "$RELEASE_PATH" - rsync ./lib/vscode/ThirdPartyNotices.txt "$RELEASE_PATH" -} - -bundle_code_server() { - rsync out dist "$RELEASE_PATH" - - # For source maps and images. - mkdir -p "$RELEASE_PATH/src/browser" - rsync src/browser/media/ "$RELEASE_PATH/src/browser/media" - mkdir -p "$RELEASE_PATH/src/browser/pages" - rsync src/browser/pages/*.html "$RELEASE_PATH/src/browser/pages" - rsync src/browser/robots.txt "$RELEASE_PATH/src/browser" - - # Add typings for plugins - mkdir -p "$RELEASE_PATH/typings" - rsync typings/pluginapi.d.ts "$RELEASE_PATH/typings" - - # Adds the commit to package.json - jq --slurp '.[0] * .[1]' package.json <( - cat <"$RELEASE_PATH/package.json" - rsync yarn.lock "$RELEASE_PATH" - rsync ci/build/npm-postinstall.sh "$RELEASE_PATH/postinstall.sh" - - if [ "$KEEP_MODULES" = 1 ]; then - rsync node_modules/ "$RELEASE_PATH/node_modules" - mkdir -p "$RELEASE_PATH/lib" - rsync ./lib/coder-cloud-agent "$RELEASE_PATH/lib" - fi -} - -bundle_vscode() { - mkdir -p "$VSCODE_OUT_PATH" - rsync "$VSCODE_SRC_PATH/yarn.lock" "$VSCODE_OUT_PATH" - rsync "$VSCODE_SRC_PATH/out-vscode${MINIFY:+-min}/" "$VSCODE_OUT_PATH/out" - - rsync "$VSCODE_SRC_PATH/.build/extensions/" "$VSCODE_OUT_PATH/extensions" - if [ "$KEEP_MODULES" = 0 ]; then - rm -Rf "$VSCODE_OUT_PATH/extensions/node_modules" - else - rsync "$VSCODE_SRC_PATH/node_modules/" "$VSCODE_OUT_PATH/node_modules" - fi - rsync "$VSCODE_SRC_PATH/extensions/package.json" "$VSCODE_OUT_PATH/extensions" - rsync "$VSCODE_SRC_PATH/extensions/yarn.lock" "$VSCODE_OUT_PATH/extensions" - rsync "$VSCODE_SRC_PATH/extensions/postinstall.js" "$VSCODE_OUT_PATH/extensions" - - mkdir -p "$VSCODE_OUT_PATH/resources/"{linux,web} - rsync "$VSCODE_SRC_PATH/resources/linux/code.png" "$VSCODE_OUT_PATH/resources/linux/code.png" - rsync "$VSCODE_SRC_PATH/resources/web/callback.html" "$VSCODE_OUT_PATH/resources/web/callback.html" - - # Adds the commit and date to product.json - jq --slurp '.[0] * .[1]' "$VSCODE_SRC_PATH/product.json" <( - cat <"$VSCODE_OUT_PATH/product.json" - - # We remove the scripts field so that later on we can run - # yarn to fetch node_modules if necessary without build scripts running. - # We cannot use --no-scripts because we still want dependent package scripts to run. - jq 'del(.scripts)' <"$VSCODE_SRC_PATH/package.json" >"$VSCODE_OUT_PATH/package.json" - - pushd "$VSCODE_OUT_PATH" - symlink_asar - popd -} - -main "$@" diff --git a/ci/build/build-standalone-release.sh b/ci/build/build-standalone-release.sh deleted file mode 100755 index e85678a29310..000000000000 --- a/ci/build/build-standalone-release.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - cd "$(dirname "${0}")/../.." - source ./ci/lib.sh - - rsync "$RELEASE_PATH/" "$RELEASE_PATH-standalone" - RELEASE_PATH+=-standalone - - # We cannot find the path to node from $PATH because yarn shims a script to ensure - # we use the same version it's using so we instead run a script with yarn that - # will print the path to node. - local node_path - node_path="$(yarn -s node <<<'console.info(process.execPath)')" - - mkdir -p "$RELEASE_PATH/bin" - rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server" - rsync "$node_path" "$RELEASE_PATH/lib/node" - - ln -s "./bin/code-server" "$RELEASE_PATH/code-server" - ln -s "./lib/node" "$RELEASE_PATH/node" - - cd "$RELEASE_PATH" - yarn --production --frozen-lockfile -} - -main "$@" diff --git a/ci/build/build-vscode.sh b/ci/build/build-vscode.sh deleted file mode 100755 index faddf46e6c41..000000000000 --- a/ci/build/build-vscode.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Builds vscode into lib/vscode/out-vscode. - -# MINIFY controls whether a minified version of vscode is built. -MINIFY=${MINIFY-true} - -main() { - cd "$(dirname "${0}")/../.." - cd lib/vscode - - yarn gulp compile-build compile-extensions-build - yarn gulp optimize --gulpfile ./coder.js - if [[ $MINIFY ]]; then - yarn gulp minify --gulpfile ./coder.js - fi -} - -main "$@" diff --git a/ci/build/clean.sh b/ci/build/clean.sh deleted file mode 100755 index a31802155226..000000000000 --- a/ci/build/clean.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - cd "$(dirname "${0}")/../.." - source ./ci/lib.sh - - git clean -Xffd - - pushd lib/vscode - git clean -xffd - popd -} - -main "$@" diff --git a/ci/build/code-server-nfpm.sh b/ci/build/code-server-nfpm.sh deleted file mode 100755 index e12f493ba92c..000000000000 --- a/ci/build/code-server-nfpm.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -exec /usr/lib/code-server/bin/code-server "$@" diff --git a/ci/build/code-server-user.service b/ci/build/code-server-user.service deleted file mode 100644 index a2f48e938e55..000000000000 --- a/ci/build/code-server-user.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=code-server -After=network.target - -[Service] -Type=exec -ExecStart=/usr/bin/code-server -Restart=always - -[Install] -WantedBy=default.target diff --git a/ci/build/code-server.sh b/ci/build/code-server.sh deleted file mode 100755 index cb71c182775a..000000000000 --- a/ci/build/code-server.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -set -eu - -# This script is intended to be bundled into the standalone releases. -# Runs code-server with the bundled node binary. - -_realpath() { - # See https://github.com/cdr/code-server/issues/1537 on why no realpath or readlink -f. - - script="$1" - cd "$(dirname "$script")" - - while [ -L "$(basename "$script")" ]; do - if [ -L "./node" ] && [ -L "./code-server" ] \ - && [ -f "package.json" ] \ - && cat package.json | grep -q '^ "name": "code-server",$'; then - echo "***** Please use the script in bin/code-server instead!" >&2 - echo "***** This script will soon be removed!" >&2 - echo "***** See the release notes at https://github.com/cdr/code-server/releases/tag/v3.4.0" >&2 - fi - - script="$(readlink "$(basename "$script")")" - cd "$(dirname "$script")" - done - - echo "$PWD/$(basename "$script")" -} - -root() { - script="$(_realpath "$0")" - bin_dir="$(dirname "$script")" - dirname "$bin_dir" -} - -ROOT="$(root)" -exec "$ROOT/lib/node" "$ROOT" "$@" diff --git a/ci/build/code-server@.service b/ci/build/code-server@.service deleted file mode 100644 index bfb62d78dea0..000000000000 --- a/ci/build/code-server@.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=code-server -After=network.target - -[Service] -Type=exec -ExecStart=/usr/bin/code-server -Restart=always -User=%i - -[Install] -WantedBy=default.target diff --git a/ci/build/nfpm.yaml b/ci/build/nfpm.yaml deleted file mode 100644 index 7aa51f9ef87a..000000000000 --- a/ci/build/nfpm.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: "code-server" -arch: "${ARCH}" -platform: "linux" -version: "v${VERSION}" -section: "devel" -priority: "optional" -maintainer: "Anmol Sethi " -description: | - Run VS Code in the browser. -vendor: "Coder" -homepage: "https://github.com/cdr/code-server" -license: "MIT" - -contents: - - src: ./ci/build/code-server-nfpm.sh - dst: /usr/bin/code-server - - - src: ./ci/build/code-server@.service - dst: /usr/lib/systemd/system/code-server@.service - - - src: ./ci/build/code-server-user.service - dst: /usr/lib/systemd/user/code-server.service - - - src: ./release-standalone/* - dst: /usr/lib/code-server/ diff --git a/ci/build/npm-postinstall.sh b/ci/build/npm-postinstall.sh deleted file mode 100755 index bbe23322c0a2..000000000000 --- a/ci/build/npm-postinstall.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env sh -set -eu - -main() { - # Grabs the major version of node from $npm_config_user_agent which looks like - # yarn/1.21.1 npm/? node/v14.2.0 darwin x64 - major_node_version=$(echo "$npm_config_user_agent" | sed -n 's/.*node\/v\([^.]*\).*/\1/p') - if [ "$major_node_version" -lt 12 ]; then - echo "code-server currently requires at least node v12" - echo "We have detected that you are on node v$major_node_version" - echo "See https://github.com/cdr/code-server/issues/1633" - exit 1 - fi - - case "${npm_config_user_agent-}" in npm*) - # We are running under npm. - if [ "${npm_config_unsafe_perm-}" != "true" ]; then - echo "Please pass --unsafe-perm to npm to install code-server" - echo "Otherwise the postinstall script does not have permissions to run" - echo "See https://docs.npmjs.com/misc/config#unsafe-perm" - echo "See https://stackoverflow.com/questions/49084929/npm-sudo-global-installation-unsafe-perm" - exit 1 - fi - ;; - esac - - OS="$(uname | tr '[:upper:]' '[:lower:]')" - if curl -fsSL "https://storage.googleapis.com/coder-cloud-releases/agent/latest/$OS/cloud-agent" -o ./lib/coder-cloud-agent; then - chmod +x ./lib/coder-cloud-agent - else - echo "Failed to download cloud agent; --link will not work" - fi - - if ! vscode_yarn; then - echo "You may not have the required dependencies to build the native modules." - echo "Please see https://github.com/cdr/code-server/blob/master/docs/npm.md" - exit 1 - fi -} - -vscode_yarn() { - cd lib/vscode - yarn --production --frozen-lockfile - - # This is a copy of symlink_asar in ../lib.sh. Look there for details. - if [ ! -e node_modules.asar ]; then - if [ "${WINDIR-}" ]; then - mklink /J node_modules.asar node_modules - else - ln -s node_modules node_modules.asar - fi - fi - - cd extensions - yarn --production --frozen-lockfile - for ext in */; do - ext="${ext%/}" - echo "extensions/$ext: installing dependencies" - cd "$ext" - yarn --production --frozen-lockfile - cd "$OLDPWD" - done -} - -main "$@" diff --git a/ci/build/release-github-assets.sh b/ci/build/release-github-assets.sh deleted file mode 100755 index a025ee596d68..000000000000 --- a/ci/build/release-github-assets.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Downloads the release artifacts from CI for the current -# commit and then uploads them to the release with the version -# in package.json. -# You will need $GITHUB_TOKEN set. - -main() { - cd "$(dirname "$0")/../.." - source ./ci/lib.sh - - download_artifact release-packages ./release-packages - local assets=(./release-packages/code-server*"$VERSION"*{.tar.gz,.deb,.rpm}) - for i in "${!assets[@]}"; do - assets[$i]="--attach=${assets[$i]}" - done - EDITOR=true gh release upload "v$VERSION" "${assets[@]}" -} - -main "$@" diff --git a/ci/build/release-github-draft.sh b/ci/build/release-github-draft.sh deleted file mode 100755 index 4cd65d59121a..000000000000 --- a/ci/build/release-github-draft.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Creates a draft release with the template for the version in package.json - -main() { - cd "$(dirname "$0")/../.." - source ./ci/lib.sh - - gh release create "v$VERSION" \ - --notes-file - \ - --target "$(git rev-parse HEAD)" \ - --draft </dev/null; then - echo "gh could not be found." - echo "We use this with the release-github-draft.sh and release-github-assets.sh scripts." - echo -e "See docs here: https://github.com/cli/cli#installation" - exit - fi - - # Check that they have jq installed - if ! command -v jq &>/dev/null; then - echo "jq could not be found." - echo "We use this to parse the package.json and grab the current version of code-server." - echo -e "See docs here: https://stedolan.github.io/jq/download/" - exit - fi - - # Check that they have rg installed - if ! command -v rg &>/dev/null; then - echo "rg could not be found." - echo "We use this when updating files across the codebase." - echo -e "See docs here: https://github.com/BurntSushi/ripgrep#installation" - exit - fi - - # Check that they have node installed - if ! command -v node &>/dev/null; then - echo "node could not be found." - echo "That's surprising..." - echo "We use it in this script for getting the package.json version" - echo -e "See docs here: https://nodejs.org/en/download/" - exit - fi - - # Check that gh is authenticated - if ! gh auth status -h github.com &>/dev/null; then - echo "gh isn't authenticated to github.com." - echo "This is needed for our scripts that use gh." - echo -e "See docs regarding authentication: https://cli.github.com/manual/gh_auth_login" - exit - fi - - # Note: we need to set upstream as well or the gh pr create step will fail - # See: https://github.com/cli/cli/issues/575 - CURRENT_BRANCH=$(git branch | grep '\*' | cut -d' ' -f2-) - if [[ -z $(git config "branch.${CURRENT_BRANCH}.remote") ]]; then - echo "Doesn't look like you've pushed this branch to remote" - # Note: we need to set upstream as well or the gh pr create step will fail - # See: https://github.com/cli/cli/issues/575 - echo "Please set the upstream and then run the script" - exit 1 - fi - - # credit to jakwuh for this solution - # https://gist.github.com/DarrenN/8c6a5b969481725a4413#gistcomment-1971123 - CODE_SERVER_CURRENT_VERSION=$(node -pe "require('./package.json').version") - # Ask which version we should update to - # In the future, we'll automate this and determine the latest version automatically - echo "Current version: ${CODE_SERVER_CURRENT_VERSION}" - # The $'\n' adds a line break. See: https://stackoverflow.com/a/39581815/3015595 - read -r -p "What version of code-server do you want to update to?"$'\n' CODE_SERVER_VERSION_TO_UPDATE - - echo -e "Great! We'll prep a PR for updating to $CODE_SERVER_VERSION_TO_UPDATE\n" - $CMD rg -g '!yarn.lock' -g '!*.svg' --files-with-matches --fixed-strings "${CODE_SERVER_CURRENT_VERSION}" | $CMD xargs sd "$CODE_SERVER_CURRENT_VERSION" "$CODE_SERVER_VERSION_TO_UPDATE" - - # Ensure the tests are passing and code coverage is up-to-date - echo -e "Running unit tests and updating code coverage...\n" - $CMD yarn test:unit - - $CMD git commit -am "chore(release): bump version to $CODE_SERVER_VERSION_TO_UPDATE" - - # This runs from the root so that's why we use this path vs. ../../ - RELEASE_TEMPLATE_STRING=$(cat ./.github/PULL_REQUEST_TEMPLATE/release_template.md) - - echo -e "\nOpening a draft PR on GitHub" - # To read about these flags, visit the docs: https://cli.github.com/manual/gh_pr_create - $CMD gh pr create --base main --title "release: $CODE_SERVER_VERSION_TO_UPDATE" --body "$RELEASE_TEMPLATE_STRING" --reviewer @cdr/code-server-reviewers --repo cdr/code-server --draft - - # Open PR in browser - $CMD gh pr view --web -} - -main "$@" diff --git a/ci/build/test-standalone-release.sh b/ci/build/test-standalone-release.sh deleted file mode 100755 index 818aac8b99cf..000000000000 --- a/ci/build/test-standalone-release.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Makes sure the release works. -# This is to make sure we don't have Node version errors or any other -# compilation-related errors. -main() { - cd "$(dirname "${0}")/../.." - - local EXTENSIONS_DIR - EXTENSIONS_DIR="$(mktemp -d)" - - echo "Testing standalone release." - - # Note: using a basic theme extension because it doesn't update often and is more reliable for testing - ./release-standalone/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --install-extension wesbos.theme-cobalt2 - local installed_extensions - installed_extensions="$(./release-standalone/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --list-extensions 2>&1)" - # We use grep as wesbos.theme-cobalt2 may have dependency extensions that change. - if ! echo "$installed_extensions" | grep -q "wesbos.theme-cobalt2"; then - echo "Unexpected output from listing extensions:" - echo "$installed_extensions" - exit 1 - fi - - echo "Standalone release works correctly." -} - -main "$@" diff --git a/ci/dev/audit.sh b/ci/dev/audit.sh deleted file mode 100755 index 0142eac2a906..000000000000 --- a/ci/dev/audit.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - cd "$(dirname "$0")/../.." - - # Prevents integration with moderate or higher vulnerabilities - # Docs: https://github.com/IBM/audit-ci#options - yarn audit-ci --moderate -} - -main "$@" diff --git a/ci/dev/ci.sh b/ci/dev/ci.sh deleted file mode 100755 index daf4ecc69414..000000000000 --- a/ci/dev/ci.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - cd "$(dirname "$0")/../.." - - yarn fmt - yarn lint - yarn _audit - yarn test:unit -} - -main "$@" diff --git a/ci/dev/fmt.sh b/ci/dev/fmt.sh deleted file mode 100755 index 849440feee99..000000000000 --- a/ci/dev/fmt.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - cd "$(dirname "$0")/../.." - - local prettierExts - prettierExts=( - "*.js" - "*.ts" - "*.tsx" - "*.html" - "*.json" - "*.css" - "*.md" - "*.toml" - "*.yaml" - "*.yml" - "*.sh" - ) - prettier --write --loglevel=warn $( - git ls-files "${prettierExts[@]}" | grep -v "lib/vscode" | grep -v 'helm-chart' - ) - - doctoc --title '# FAQ' docs/FAQ.md >/dev/null - doctoc --title '# Setup Guide' docs/guide.md >/dev/null - doctoc --title '# Install' docs/install.md >/dev/null - doctoc --title '# npm Install Requirements' docs/npm.md >/dev/null - doctoc --title '# Contributing' docs/CONTRIBUTING.md >/dev/null - doctoc --title '# Maintaining' docs/MAINTAINING.md >/dev/null - doctoc --title '# Contributor Covenant Code of Conduct' docs/CODE_OF_CONDUCT.md >/dev/null - doctoc --title '# iPad' docs/ipad.md >/dev/null - doctoc --title '# Termux' docs/termux.md >/dev/null - - if [[ ${CI-} && $(git ls-files --other --modified --exclude-standard) ]]; then - echo "Files need generation or are formatted incorrectly:" - git -c color.ui=always status | grep --color=no '\[31m' - echo "Please run the following locally:" - echo " yarn fmt" - exit 1 - fi -} - -main "$@" diff --git a/ci/dev/gen_icons.sh b/ci/dev/gen_icons.sh deleted file mode 100755 index 7617d5e6dc13..000000000000 --- a/ci/dev/gen_icons.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -set -eu - -main() { - cd src/browser/media - - # We need .ico for backwards compatibility. - # The other two are the only icon sizes required by Chrome and - # we use them for stuff like apple-touch-icon as well. - # https://web.dev/add-manifest/ - # - # This should be enough and we can always add more if there are problems. - - # -background defaults to white but we want it transparent. - # https://imagemagick.org/script/command-line-options.php#background - convert -quiet -background transparent -resize 256x256 favicon.svg favicon.ico - # We do not generate the pwa-icon from the favicon as they are slightly different - # designs and sizes. - # See favicon.afdesign and #2401 for details on the differences. - convert -quiet -background transparent -resize 192x192 pwa-icon.png pwa-icon-192.png - convert -quiet -background transparent -resize 512x512 pwa-icon.png pwa-icon-512.png - - # We use -quiet above to avoid https://github.com/ImageMagick/ImageMagick/issues/884 - - # The following adds dark mode support for the favicon as favicon-dark-support.svg - # There is no similar capability for pwas or .ico so we can only add support to the svg. - favicon_dark_style="" - # See https://stackoverflow.com/a/22901380/4283659 - # This escapes all newlines so that sed will accept them. - favicon_dark_style="$(printf "%s\n" "$favicon_dark_style" | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/\\n/g')" - sed "$( - cat -n <favicon-dark-support.svg -} - -main "$@" diff --git a/ci/dev/lint.sh b/ci/dev/lint.sh deleted file mode 100755 index 1a0c7d208921..000000000000 --- a/ci/dev/lint.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - cd "$(dirname "$0")/../.." - - eslint --max-warnings=0 --fix $(git ls-files "*.ts" "*.tsx" "*.js" | grep -v "lib/vscode") - stylelint $(git ls-files "*.css" | grep -v "lib/vscode") - tsc --noEmit --skipLibCheck - shellcheck -e SC2046,SC2164,SC2154,SC1091,SC1090,SC2002 $(git ls-files "*.sh" | grep -v "lib/vscode") - if command -v helm && helm kubeval --help >/dev/null; then - helm kubeval ci/helm-chart - fi - - cd lib/vscode - # Run this periodically in vanilla VS code to make sure we don't add any more warnings. - yarn -s eslint --max-warnings=3 - cd "$OLDPWD" -} - -main "$@" diff --git a/ci/dev/postinstall.sh b/ci/dev/postinstall.sh deleted file mode 100755 index 0ffa772f3ebf..000000000000 --- a/ci/dev/postinstall.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - cd "$(dirname "$0")/../.." - source ./ci/lib.sh - - # This installs the dependencies needed for testing - cd test - yarn - cd .. - - cd lib/vscode - yarn ${CI+--frozen-lockfile} - - symlink_asar -} - -main "$@" diff --git a/ci/dev/test-e2e.sh b/ci/dev/test-e2e.sh deleted file mode 100755 index 171e60992b3f..000000000000 --- a/ci/dev/test-e2e.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - cd "$(dirname "$0")/../.." - cd test - # We set these environment variables because they're used in the e2e tests - # they don't have to be these values, but these are the defaults - PASSWORD=e45432jklfdsab CODE_SERVER_ADDRESS=http://localhost:8080 yarn folio --config=config.ts --reporter=list "$@" -} - -main "$@" diff --git a/ci/dev/test-unit.sh b/ci/dev/test-unit.sh deleted file mode 100755 index f2e76ee561ea..000000000000 --- a/ci/dev/test-unit.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - cd "$(dirname "$0")/../.." - cd test/unit/test-plugin - make -s out/index.js - # We must keep jest in a sub-directory. See ../../test/package.json for more - # information. We must also run it from the root otherwise coverage will not - # include our source files. - cd "$OLDPWD" - CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest "$@" -} - -main "$@" diff --git a/ci/dev/update-vscode.sh b/ci/dev/update-vscode.sh deleted file mode 100755 index 1b60d57c2df5..000000000000 --- a/ci/dev/update-vscode.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/usr/bin/env bash -# Description: This is a script to make the process of updating vscode versions easier -# Run it with `yarn update:vscode` and it will do the following: -# 1. Check that you have a remote called `vscode` -# 2. Ask you which version you want to upgrade to -# 3. Grab the exact version from the package.json i.e. 1.53.2 -# 4. Fetch the vscode remote branches to run the subtree update -# 5. Run the subtree update and pull in the vscode update -# 6. Commit the changes (including merge conflicts) -# 7. Open a draft PR - -set -euo pipefail - -# This function expects two arguments -# 1. the vscode version we're updating to -# 2. the list of merge conflict files -make_pr_body() { - local BODY="This PR updates vscode to $1 - -## TODOS - -- [ ] test editor locally -- [ ] test terminal locally -- [ ] make notes about any significant changes in docs/CONTRIBUTING.md#notes-about-changes - -## Files with conflicts (fix these) -$2" - echo "$BODY" -} - -main() { - cd "$(dirname "$0")/../.." - - # Check if the remote exists - # if it doesn't, we add it - if ! git config remote.vscode.url >/dev/null; then - echo "Could not find 'vscode' as a remote" - echo "Adding with: git remote add vscode https://github.com/microsoft/vscode.git" - git remote add vscode https://github.com/microsoft/vscode.git - fi - - # Ask which version we should update to - # In the future, we'll automate this and grab the latest version automatically - read -r -p "What version of VSCode would you like to update to? (i.e. 1.52) " VSCODE_VERSION_TO_UPDATE - - # Check that this version exists - if [[ -z $(git ls-remote --heads vscode release/"$VSCODE_VERSION_TO_UPDATE") ]]; then - echo "Oops, that doesn't look like a valid version." - echo "You entered: $VSCODE_VERSION_TO_UPDATE" - echo "Verify that this branches exists here: https://github.com/microsoft/vscode/branches/all?query=release%2F$VSCODE_VERSION_TO_UPDATE" - exit 1 - fi - - # Check that they have jq installed - if ! command -v jq &>/dev/null; then - echo "jq could not be found." - echo "We use this when looking up the exact version to update to in the package.json in VS Code." - echo -e "See docs here: https://stedolan.github.io/jq/download/" - exit 1 - fi - - # Note: `git subtree` returns 129 when installed, and prints help; - # but when uninstalled, returns 1. - set +e - git subtree &>/dev/null - if [ $? -ne 129 ]; then - echo "git-subtree could not be found." - echo "We use this to fetch and update the lib/vscode subtree." - echo -e "Please install git subtree." - exit 1 - fi - set -e - - # Grab the exact version from package.json - VSCODE_EXACT_VERSION=$(curl -s "https://raw.githubusercontent.com/microsoft/vscode/release/$VSCODE_VERSION_TO_UPDATE/package.json" | jq -r ".version") - - echo -e "Great! We'll prep a PR for updating to $VSCODE_EXACT_VERSION\n" - - # For some reason the subtree update doesn't work - # unless we fetch all the branches - echo -e "Fetching vscode branches..." - echo -e "Note: this might take a while" - git fetch vscode - - # Check if GitHub CLI is installed - if ! command -v gh &>/dev/null; then - echo "GitHub CLI could not be found." - echo "If you install it before you run this script next time, we'll open a draft PR for you!" - echo -e "See docs here: https://github.com/cli/cli#installation\n" - exit - fi - - # Push branch to remote if not already pushed - # If we don't do this, the opening a draft PR step won't work - # because it will stop and ask where you want to push the branch - CURRENT_BRANCH=$(git branch | grep '\*' | cut -d' ' -f2-) - if [[ -z $(git config "branch.${CURRENT_BRANCH}.remote") ]]; then - echo "Doesn't look like you've pushed this branch to remote" - echo -e "Pushing now using: git push origin $CURRENT_BRANCH\n" - # Note: we need to set upstream as well or the gh pr create step will fail - # See: https://github.com/cli/cli/issues/575 - echo "Please set the upstream and re-run the script" - exit 1 - fi - - echo "Going to try to update vscode for you..." - echo -e "Running: git subtree pull --prefix lib/vscode vscode release/${VSCODE_VERSION_TO_UPDATE} --squash\n" - # Try to run subtree update command - # Note: we add `|| true` because we want the script to keep running even if the squash fails - # We know the squash fails everytime because there will always be merge conflicts - git subtree pull --prefix lib/vscode vscode release/"${VSCODE_VERSION_TO_UPDATE}" --squash || true - - # Get the files with conflicts before we commit them - # so we can list them in the PR body as todo items - CONFLICTS=$(git diff --name-only --diff-filter=U | while read -r line; do echo "- [ ] $line"; done) - PR_BODY=$(make_pr_body "$VSCODE_EXACT_VERSION" "$CONFLICTS") - - echo -e "\nForcing a commit with conflicts" - echo "Note: this is intentional" - echo "If we don't do this, code review is impossible." - echo -e "For more info, see docs: docs/CONTRIBUTING.md#updating-vs-code\n" - # We need --no-verify to skip the husky pre-commit hook - # which fails because of the merge conflicts - git add . && git commit -am "chore(vscode): update to $VSCODE_EXACT_VERSION" --no-verify - - # Note: we can't open a draft PR unless their are changes. - # Hence why we do this after the subtree update. - echo "Opening a draft PR on GitHub" - # To read about these flags, visit the docs: https://cli.github.com/manual/gh_pr_create - gh pr create --base main --title "feat(vscode): update to version $VSCODE_EXACT_VERSION" --body "$PR_BODY" --reviewer @cdr/code-server-reviewers --repo cdr/code-server --draft -} - -main "$@" diff --git a/ci/dev/watch.ts b/ci/dev/watch.ts deleted file mode 100644 index 646da328b3f8..000000000000 --- a/ci/dev/watch.ts +++ /dev/null @@ -1,194 +0,0 @@ -import * as cp from "child_process" -import Bundler from "parcel-bundler" -import * as path from "path" - -async function main(): Promise { - try { - const watcher = new Watcher() - await watcher.watch() - } catch (error) { - console.error(error.message) - process.exit(1) - } -} - -class Watcher { - private readonly rootPath = path.resolve(__dirname, "../..") - private readonly vscodeSourcePath = path.join(this.rootPath, "lib/vscode") - - private static log(message: string, skipNewline = false): void { - process.stdout.write(message) - if (!skipNewline) { - process.stdout.write("\n") - } - } - - public async watch(): Promise { - let server: cp.ChildProcess | undefined - const restartServer = (): void => { - if (server) { - server.kill() - } - const s = cp.fork(path.join(this.rootPath, "out/node/entry.js"), process.argv.slice(2)) - console.log(`[server] spawned process ${s.pid}`) - s.on("exit", () => console.log(`[server] process ${s.pid} exited`)) - server = s - } - - const vscode = cp.spawn("yarn", ["watch"], { cwd: this.vscodeSourcePath }) - const tsc = cp.spawn("tsc", ["--watch", "--pretty", "--preserveWatchOutput"], { cwd: this.rootPath }) - const plugin = process.env.PLUGIN_DIR - ? cp.spawn("yarn", ["build", "--watch"], { cwd: process.env.PLUGIN_DIR }) - : undefined - const bundler = this.createBundler() - - const cleanup = (code?: number | null): void => { - Watcher.log("killing vs code watcher") - vscode.removeAllListeners() - vscode.kill() - - Watcher.log("killing tsc") - tsc.removeAllListeners() - tsc.kill() - - if (plugin) { - Watcher.log("killing plugin") - plugin.removeAllListeners() - plugin.kill() - } - - if (server) { - Watcher.log("killing server") - server.removeAllListeners() - server.kill() - } - - Watcher.log("killing bundler") - process.exit(code || 0) - } - - process.on("SIGINT", () => cleanup()) - process.on("SIGTERM", () => cleanup()) - - vscode.on("exit", (code) => { - Watcher.log("vs code watcher terminated unexpectedly") - cleanup(code) - }) - tsc.on("exit", (code) => { - Watcher.log("tsc terminated unexpectedly") - cleanup(code) - }) - if (plugin) { - plugin.on("exit", (code) => { - Watcher.log("plugin terminated unexpectedly") - cleanup(code) - }) - } - const bundle = bundler.bundle().catch(() => { - Watcher.log("parcel watcher terminated unexpectedly") - cleanup(1) - }) - bundler.on("buildEnd", () => { - console.log("[parcel] bundled") - }) - bundler.on("buildError", (error) => { - console.error("[parcel]", error) - }) - - vscode.stderr.on("data", (d) => process.stderr.write(d)) - tsc.stderr.on("data", (d) => process.stderr.write(d)) - if (plugin) { - plugin.stderr.on("data", (d) => process.stderr.write(d)) - } - - // From https://github.com/chalk/ansi-regex - const pattern = [ - "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", - "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))", - ].join("|") - const re = new RegExp(pattern, "g") - - /** - * Split stdout on newlines and strip ANSI codes. - */ - const onLine = (proc: cp.ChildProcess, callback: (strippedLine: string, originalLine: string) => void): void => { - let buffer = "" - if (!proc.stdout) { - throw new Error("no stdout") - } - proc.stdout.setEncoding("utf8") - proc.stdout.on("data", (d) => { - const data = buffer + d - const split = data.split("\n") - const last = split.length - 1 - - for (let i = 0; i < last; ++i) { - callback(split[i].replace(re, ""), split[i]) - } - - // The last item will either be an empty string (the data ended with a - // newline) or a partial line (did not end with a newline) and we must - // wait to parse it until we get a full line. - buffer = split[last] - }) - } - - let startingVscode = false - let startedVscode = false - onLine(vscode, (line, original) => { - console.log("[vscode]", original) - // Wait for watch-client since "Finished compilation" will appear multiple - // times before the client starts building. - if (!startingVscode && line.includes("Starting watch-client")) { - startingVscode = true - } else if (startingVscode && line.includes("Finished compilation")) { - if (startedVscode) { - bundle.then(restartServer) - } - startedVscode = true - } - }) - - onLine(tsc, (line, original) => { - // tsc outputs blank lines; skip them. - if (line !== "") { - console.log("[tsc]", original) - } - if (line.includes("Watching for file changes")) { - bundle.then(restartServer) - } - }) - - if (plugin) { - onLine(plugin, (line, original) => { - // tsc outputs blank lines; skip them. - if (line !== "") { - console.log("[plugin]", original) - } - if (line.includes("Watching for file changes")) { - bundle.then(restartServer) - } - }) - } - } - - private createBundler(out = "dist"): Bundler { - return new Bundler( - [ - path.join(this.rootPath, "src/browser/register.ts"), - path.join(this.rootPath, "src/browser/serviceWorker.ts"), - path.join(this.rootPath, "src/browser/pages/login.ts"), - path.join(this.rootPath, "src/browser/pages/vscode.ts"), - ], - { - outDir: path.join(this.rootPath, out), - cacheDir: path.join(this.rootPath, ".cache"), - minify: !!process.env.MINIFY, - logLevel: 1, - publicUrl: ".", - }, - ) - } -} - -main() diff --git a/ci/helm-chart/.helmignore b/ci/helm-chart/.helmignore deleted file mode 100644 index 0e8a0eb36f4c..000000000000 --- a/ci/helm-chart/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/ci/helm-chart/Chart.yaml b/ci/helm-chart/Chart.yaml deleted file mode 100644 index d9fac9a1c98c..000000000000 --- a/ci/helm-chart/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v2 -name: code-server -description: A Helm chart for cdr/code-server - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.0.3 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 3.9.3 diff --git a/ci/helm-chart/README.md b/ci/helm-chart/README.md deleted file mode 100644 index 7d045d44634a..000000000000 --- a/ci/helm-chart/README.md +++ /dev/null @@ -1,117 +0,0 @@ -# code-server - -![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.9.3](https://img.shields.io/badge/AppVersion-3.9.3-informational?style=flat-square) - -[code-server](https://github.com/cdr/code-server) code-server is VS Code running -on a remote server, accessible through the browser. - -This chart is community maintained by [@Matthew-Beckett](https://github.com/Matthew-Beckett) and [@alexgorbatchev](https://github.com/alexgorbatchev) - -## TL;DR; - -```console -$ git clone https://github.com/cdr/code-server -$ cd code-server -$ helm upgrade --install code-server ci/helm-chart -``` - -## Introduction - -This chart bootstraps a code-server deployment on a -[Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) -package manager. - -## Prerequisites - - - Kubernetes 1.6+ - -## Installing the Chart - -To install the chart with the release name `code-server`: - -```console -$ git clone https://github.com/cdr/code-server -$ cd code-server -$ helm upgrade --install code-server ci/helm-chart -``` - -The command deploys code-server on the Kubernetes cluster in the default -configuration. The [configuration](#configuration) section lists the parameters -that can be configured during installation. - -> **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `code-server` deployment: - -```console -$ helm delete code-server -``` - -The command removes all the Kubernetes components associated with the chart and -deletes the release. - -## Configuration - -The following table lists the configurable parameters of the code-server chart -and their default values. - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| affinity | object | `{}` | | -| extraArgs | list | `[]` | | -| extraConfigmapMounts | list | `[]` | | -| extraContainers | string | `""` | | -| extraSecretMounts | list | `[]` | | -| extraVars | list | `[]` | | -| extraVolumeMounts | list | `[]` | | -| fullnameOverride | string | `""` | | -| hostnameOverride | string | `""` | | -| image.pullPolicy | string | `"Always"` | | -| image.repository | string | `"codercom/code-server"` | | -| image.tag | string | `"3.9.3"` | | -| imagePullSecrets | list | `[]` | | -| ingress.enabled | bool | `false` | | -| nameOverride | string | `""` | | -| nodeSelector | object | `{}` | | -| persistence.accessMode | string | `"ReadWriteOnce"` | | -| persistence.annotations | object | `{}` | | -| persistence.enabled | bool | `true` | | -| persistence.size | string | `"1Gi"` | | -| podAnnotations | object | `{}` | | -| podSecurityContext | object | `{}` | | -| replicaCount | int | `1` | | -| resources | object | `{}` | | -| securityContext.enabled | bool | `true` | | -| securityContext.fsGroup | int | `1000` | | -| securityContext.runAsUser | int | `1000` | | -| service.port | int | `8443` | | -| service.type | string | `"ClusterIP"` | | -| serviceAccount.create | bool | `true` | | -| serviceAccount.name | string | `nil` | | -| tolerations | list | `[]` | | -| volumePermissions.enabled | bool | `true` | | -| volumePermissions.securityContext.runAsUser | int | `0` | | - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm -install`. For example, - -```console -$ helm upgrade --install code-server \ - ci/helm-chart \ - --set persistence.enabled=false -``` - -The above command sets the the persistence storage to false. - -Alternatively, a YAML file that specifies the values for the above parameters -can be provided while installing the chart. For example, - -```console -$ helm upgrade --install code-server ci/helm-chart -f values.yaml -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) diff --git a/ci/helm-chart/templates/NOTES.txt b/ci/helm-chart/templates/NOTES.txt deleted file mode 100644 index 17c25f646dc2..000000000000 --- a/ci/helm-chart/templates/NOTES.txt +++ /dev/null @@ -1,25 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "code-server.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "code-server.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "code-server.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "code-server.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl port-forward $POD_NAME 8080:80 -{{- end }} - -Administrator credentials: - - Password: echo $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "code-server.fullname" . }} -o jsonpath="{.data.password}" | base64 --decode) diff --git a/ci/helm-chart/templates/_helpers.tpl b/ci/helm-chart/templates/_helpers.tpl deleted file mode 100644 index bb36e8c21972..000000000000 --- a/ci/helm-chart/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "code-server.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "code-server.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "code-server.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "code-server.labels" -}} -helm.sh/chart: {{ include "code-server.chart" . }} -{{ include "code-server.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "code-server.selectorLabels" -}} -app.kubernetes.io/name: {{ include "code-server.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "code-server.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "code-server.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/ci/helm-chart/templates/deployment.yaml b/ci/helm-chart/templates/deployment.yaml deleted file mode 100644 index 9364a4706aa3..000000000000 --- a/ci/helm-chart/templates/deployment.yaml +++ /dev/null @@ -1,152 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "code-server.fullname" . }} - labels: - app.kubernetes.io/name: {{ include "code-server.name" . }} - helm.sh/chart: {{ include "code-server.chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} -spec: - replicas: 1 - strategy: - type: Recreate - selector: - matchLabels: - app.kubernetes.io/name: {{ include "code-server.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - template: - metadata: - labels: - app.kubernetes.io/name: {{ include "code-server.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - spec: - {{- if .Values.hostnameOverride }} - hostname: {{ .Values.hostnameOverride }} - {{- end }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }} - initContainers: - - name: init-chmod-data - image: busybox:latest - imagePullPolicy: IfNotPresent - command: - - sh - - -c - - | - chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }} /home/coder - securityContext: - runAsUser: {{ .Values.volumePermissions.securityContext.runAsUser }} - volumeMounts: - - name: data - mountPath: /home/coder - {{- end }} - containers: -{{- if .Values.extraContainers }} -{{ toYaml .Values.extraContainers | indent 8}} -{{- end }} - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.securityContext.enabled }} - securityContext: - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - env: - {{- if .Values.extraVars }} -{{ toYaml .Values.extraVars | indent 10 }} - {{- end }} - - name: PASSWORD - valueFrom: - secretKeyRef: - {{- if .Values.existingSecret }} - name: {{ .Values.existingSecret }} - {{- else }} - name: {{ template "code-server.fullname" . }} - {{- end }} - key: password - {{- if .Values.extraArgs }} - args: -{{ toYaml .Values.extraArgs | indent 10 }} - {{- end }} - volumeMounts: - - name: data - mountPath: /home/coder - {{- range .Values.extraConfigmapMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath | default "" }} - readOnly: {{ .readOnly }} - {{- end }} - {{- range .Values.extraSecretMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- range .Values.extraVolumeMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath | default "" }} - readOnly: {{ .readOnly }} - {{- end }} - ports: - - name: http - containerPort: 8080 - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ template "code-server.serviceAccountName" . }} - volumes: - - name: data - {{- if .Values.persistence.enabled }} - {{- if not .Values.persistence.hostPath }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim | default (include "code-server.fullname" .) }} - {{- else }} - hostPath: - path: {{ .Values.persistence.hostPath }} - type: Directory - {{- end -}} - {{- else }} - emptyDir: {} - {{- end -}} - {{- range .Values.extraSecretMounts }} - - name: {{ .name }} - secret: - secretName: {{ .secretName }} - defaultMode: {{ .defaultMode }} - {{- end }} - {{- range .Values.extraVolumeMounts }} - - name: {{ .name }} - {{- if .existingClaim }} - persistentVolumeClaim: - claimName: {{ .existingClaim }} - {{- else }} - hostPath: - path: {{ .hostPath }} - type: Directory - {{- end }} - {{- end }} diff --git a/ci/helm-chart/templates/ingress.yaml b/ci/helm-chart/templates/ingress.yaml deleted file mode 100644 index 07a3abd0b693..000000000000 --- a/ci/helm-chart/templates/ingress.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "code-server.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "code-server.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ . }} - backend: - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} diff --git a/ci/helm-chart/templates/pvc.yaml b/ci/helm-chart/templates/pvc.yaml deleted file mode 100644 index 2f1c87405886..000000000000 --- a/ci/helm-chart/templates/pvc.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if and (and .Values.persistence.enabled (not .Values.persistence.existingClaim)) (not .Values.persistence.hostPath) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ include "code-server.fullname" . }} - namespace: {{ .Release.Namespace }} -{{- with .Values.persistence.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} - labels: - app.kubernetes.io/name: {{ include "code-server.name" . }} - helm.sh/chart: {{ include "code-server.chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} -spec: - accessModes: - - {{ .Values.persistence.accessMode | quote }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} -{{- if .Values.persistence.storageClass }} -{{- if (eq "-" .Values.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.storageClass }}" -{{- end }} -{{- end }} -{{- end }} diff --git a/ci/helm-chart/templates/secrets.yaml b/ci/helm-chart/templates/secrets.yaml deleted file mode 100644 index 6c600417a516..000000000000 --- a/ci/helm-chart/templates/secrets.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "code-server.fullname" . }} - annotations: - "helm.sh/hook": "pre-install" - labels: - app.kubernetes.io/name: {{ include "code-server.name" . }} - helm.sh/chart: {{ include "code-server.chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} -type: Opaque -data: - {{ if .Values.password }} - password: "{{ .Values.password | b64enc }}" - {{ else }} - password: "{{ randAlphaNum 24 | b64enc }}" - {{ end }} diff --git a/ci/helm-chart/templates/service.yaml b/ci/helm-chart/templates/service.yaml deleted file mode 100644 index 038b6cd0d23f..000000000000 --- a/ci/helm-chart/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "code-server.fullname" . }} - labels: - app.kubernetes.io/name: {{ include "code-server.name" . }} - helm.sh/chart: {{ include "code-server.chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app.kubernetes.io/name: {{ include "code-server.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/ci/helm-chart/templates/serviceaccount.yaml b/ci/helm-chart/templates/serviceaccount.yaml deleted file mode 100644 index df9e1e37562b..000000000000 --- a/ci/helm-chart/templates/serviceaccount.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if or .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app.kubernetes.io/name: {{ include "code-server.name" . }} - helm.sh/chart: {{ include "code-server.chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} - name: {{ template "code-server.serviceAccountName" . }} -{{- end -}} diff --git a/ci/helm-chart/templates/tests/test-connection.yaml b/ci/helm-chart/templates/tests/test-connection.yaml deleted file mode 100644 index 2e67f56ec64c..000000000000 --- a/ci/helm-chart/templates/tests/test-connection.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "code-server.fullname" . }}-test-connection" - labels: - app.kubernetes.io/name: {{ include "code-server.name" . }} - helm.sh/chart: {{ include "code-server.chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "code-server.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/ci/helm-chart/values.yaml b/ci/helm-chart/values.yaml deleted file mode 100644 index 108fb0568990..000000000000 --- a/ci/helm-chart/values.yaml +++ /dev/null @@ -1,163 +0,0 @@ -# Default values for code-server. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: codercom/code-server - tag: '3.9.3' - pullPolicy: Always - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" -hostnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: {} - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - type: ClusterIP - port: 8080 - -ingress: - enabled: false - #annotations: - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - #hosts: - # - host: code-server.example.loc - # paths: - # - / - - #tls: - # - secretName: code-server - # hosts: - # - code-server.example.loc - -# Optional additional arguments -extraArgs: [] -# - --allow-http -# - --no-auth - -# Optional additional environment variables -extraVars: [] -# - name: DISABLE_TELEMETRY -# value: true - -## -## Init containers parameters: -## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup -## -volumePermissions: - enabled: true - securityContext: - runAsUser: 0 - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1000 - runAsUser: 1000 - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 1000Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -## Persist data to a persistent volume -persistence: - enabled: true - ## code-server data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - accessMode: ReadWriteOnce - size: 10Gi - annotations: {} - # existingClaim: "" - # hostPath: /data - -serviceAccount: - create: true - name: - -## Enable an Specify container in extraContainers. -##ย This is meant to allow adding code-server dependencies, like docker-dind. -extraContainers: | -#- name: docker-dind -# image: docker:19.03-dind -# imagePullPolicy: IfNotPresent -# resources: -# requests: -# cpu: 250m -# memory: 256M -# securityContext: -# privileged: true -# procMount: Default -# env: -# - name: DOCKER_TLS_CERTDIR -# value: "" -# - name: DOCKER_DRIVER -# value: "overlay2" - -## Additional code-server secret mounts -extraSecretMounts: [] - # - name: secret-files - # mountPath: /etc/secrets - # secretName: code-server-secret-files - # readOnly: true - -## Additional code-server volume mounts -extraVolumeMounts: [] - # - name: extra-volume - # mountPath: /mnt/volume - # readOnly: true - # existingClaim: volume-claim - # hostPath: "" - -extraConfigmapMounts: [] - # - name: certs-configmap - # mountPath: /etc/code-server/ssl/ - # subPath: certificates.crt # (optional) - # configMap: certs-configmap - # readOnly: true diff --git a/ci/lib.sh b/ci/lib.sh deleted file mode 100755 index dbde849be20c..000000000000 --- a/ci/lib.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -pushd() { - builtin pushd "$@" >/dev/null -} - -popd() { - builtin popd >/dev/null -} - -pkg_json_version() { - jq -r .version package.json -} - -vscode_version() { - jq -r .version lib/vscode/package.json -} - -os() { - local os - os=$(uname | tr '[:upper:]' '[:lower:]') - if [[ $os == "linux" ]]; then - # Alpine's ldd doesn't have a version flag but if you use an invalid flag - # (like --version) it outputs the version to stderr and exits with 1. - local ldd_output - ldd_output=$(ldd --version 2>&1 || true) - if echo "$ldd_output" | grep -iq musl; then - os="alpine" - fi - elif [[ $os == "darwin" ]]; then - os="macos" - fi - echo "$os" -} - -arch() { - case "$(uname -m)" in - aarch64) - echo arm64 - ;; - x86_64 | amd64) - echo amd64 - ;; - *) - echo "unknown architecture $(uname -a)" - exit 1 - ;; - esac -} - -# Grabs the most recent ci.yaml github workflow run that was successful and triggered from the same commit being pushd. -# This will contain the artifacts we want. -# https://developer.github.com/v3/actions/workflow-runs/#list-workflow-runs -get_artifacts_url() { - local artifacts_url - local workflow_runs_url="repos/:owner/:repo/actions/workflows/ci.yaml/runs?status=success&event=pull_request" - # For releases, we look for run based on the branch name v$code_server_version - # example: v3.9.3 - local version_branch="v$VERSION" - artifacts_url=$(gh api "$workflow_runs_url" | jq -r ".workflow_runs[] | select(.head_branch == \"$version_branch\") | .artifacts_url" | head -n 1) - if [[ -z "$artifacts_url" ]]; then - echo >&2 "ERROR: artifacts_url came back empty" - echo >&2 "We looked for a successful run triggered by a pull_request with for code-server version: $code_server_version and a branch named $version_branch" - echo >&2 "URL used for gh API call: $workflow_runs_url" - exit 1 - fi - - echo "$artifacts_url" -} - -# Grabs the artifact's download url. -# https://developer.github.com/v3/actions/artifacts/#list-workflow-run-artifacts -get_artifact_url() { - local artifact_name="$1" - gh api "$(get_artifacts_url)" | jq -r ".artifacts[] | select(.name == \"$artifact_name\") | .archive_download_url" | head -n 1 -} - -# Uses the above two functions to download a artifact into a directory. -download_artifact() { - local artifact_name="$1" - local dst="$2" - - local tmp_file - tmp_file="$(mktemp)" - - gh api "$(get_artifact_url "$artifact_name")" >"$tmp_file" - unzip -q -o "$tmp_file" -d "$dst" - rm "$tmp_file" -} - -rsync() { - command rsync -a --del "$@" -} - -VERSION="$(pkg_json_version)" -export VERSION -ARCH="$(arch)" -export ARCH -OS=$(os) -export OS - -# RELEASE_PATH is the destination directory for the release from the root. -# Defaults to release -RELEASE_PATH="${RELEASE_PATH-release}" - -# VS Code bundles some modules into an asar which is an archive format that -# works like tar. It then seems to get unpacked into node_modules.asar. -# -# I don't know why they do this but all the dependencies they bundle already -# exist in node_modules so just symlink it. We have to do this since not only VS -# Code itself but also extensions will look specifically in this directory for -# files (like the ripgrep binary or the oniguruma wasm). -symlink_asar() { - if [ ! -L node_modules.asar ]; then - if [ "${WINDIR-}" ]; then - # mklink takes the link name first. - mklink /J node_modules.asar node_modules - else - # ln takes the link name second. - ln -s node_modules node_modules.asar - fi - fi -} diff --git a/ci/release-image/Dockerfile b/ci/release-image/Dockerfile deleted file mode 100644 index 4b63701494a2..000000000000 --- a/ci/release-image/Dockerfile +++ /dev/null @@ -1,46 +0,0 @@ -FROM debian:10 - -RUN apt-get update \ - && apt-get install -y \ - curl \ - dumb-init \ - zsh \ - htop \ - locales \ - man \ - nano \ - git \ - procps \ - openssh-client \ - sudo \ - vim.tiny \ - lsb-release \ - && rm -rf /var/lib/apt/lists/* - -# https://wiki.debian.org/Locale#Manually -RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen \ - && locale-gen -ENV LANG=en_US.UTF-8 - -RUN adduser --gecos '' --disabled-password coder && \ - echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd - -RUN ARCH="$(dpkg --print-architecture)" && \ - curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.5/fixuid-0.5-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - && \ - chown root:root /usr/local/bin/fixuid && \ - chmod 4755 /usr/local/bin/fixuid && \ - mkdir -p /etc/fixuid && \ - printf "user: coder\ngroup: coder\n" > /etc/fixuid/config.yml - -COPY release-packages/code-server*.deb /tmp/ -COPY ci/release-image/entrypoint.sh /usr/bin/entrypoint.sh -RUN dpkg -i /tmp/code-server*$(dpkg --print-architecture).deb && rm /tmp/code-server*.deb - -EXPOSE 8080 -# This way, if someone sets $DOCKER_USER, docker-exec will still work as -# the uid will remain the same. note: only relevant if -u isn't passed to -# docker-run. -USER 1000 -ENV USER=coder -WORKDIR /home/coder -ENTRYPOINT ["/usr/bin/entrypoint.sh", "--bind-addr", "0.0.0.0:8080", "."] diff --git a/ci/release-image/build.sh b/ci/release-image/build.sh deleted file mode 100755 index 5969e15ae9a6..000000000000 --- a/ci/release-image/build.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - cd "$(dirname "$0")/../.." - source ./ci/lib.sh - - docker build -t "codercom/code-server-$ARCH:$VERSION" -f ./ci/release-image/Dockerfile . -} - -main "$@" diff --git a/ci/release-image/entrypoint.sh b/ci/release-image/entrypoint.sh deleted file mode 100755 index 1c8c8bfffb7a..000000000000 --- a/ci/release-image/entrypoint.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -eu - -# We do this first to ensure sudo works below when renaming the user. -# Otherwise the current container UID may not exist in the passwd database. -eval "$(fixuid -q)" - -if [ "${DOCKER_USER-}" ] && [ "$DOCKER_USER" != "$USER" ]; then - echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd >/dev/null - # Unfortunately we cannot change $HOME as we cannot move any bind mounts - # nor can we bind mount $HOME into a new home as that requires a privileged container. - sudo usermod --login "$DOCKER_USER" coder - sudo groupmod -n "$DOCKER_USER" coder - - USER="$DOCKER_USER" - - sudo sed -i "/coder/d" /etc/sudoers.d/nopasswd -fi - -dumb-init /usr/bin/code-server "$@" diff --git a/ci/steps/brew-bump.sh b/ci/steps/brew-bump.sh deleted file mode 100755 index 0d669f294442..000000000000 --- a/ci/steps/brew-bump.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - cd "$(dirname "$0")/../.." - # Only sourcing this so we get access to $VERSION - source ./ci/lib.sh - # Find the docs for bump-formula-pr here - # https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/bump-formula-pr.rb#L18 - brew bump-formula-pr --force --version="${VERSION}" code-server --no-browse --no-audit -} - -main "$@" diff --git a/ci/steps/build-docker-image.sh b/ci/steps/build-docker-image.sh deleted file mode 100755 index 8ae5855bdfc7..000000000000 --- a/ci/steps/build-docker-image.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - cd "$(dirname "$0")/../.." - source ./ci/lib.sh - - ./ci/release-image/build.sh - - mkdir -p release-images - docker save "codercom/code-server-$ARCH:$VERSION" >"release-images/code-server-$ARCH-$VERSION.tar" -} - -main "$@" diff --git a/ci/steps/publish-npm.sh b/ci/steps/publish-npm.sh deleted file mode 100755 index 934a5decd643..000000000000 --- a/ci/steps/publish-npm.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - cd "$(dirname "$0")/../.." - source ./ci/lib.sh - - if [[ ${CI-} ]]; then - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >~/.npmrc - fi - - download_artifact npm-package ./release-npm-package - # https://github.com/actions/upload-artifact/issues/38 - tar -xzf release-npm-package/package.tar.gz - yarn publish --non-interactive release -} - -main "$@" diff --git a/ci/steps/push-docker-manifest.sh b/ci/steps/push-docker-manifest.sh deleted file mode 100755 index 08d0fdacf2d1..000000000000 --- a/ci/steps/push-docker-manifest.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -main() { - cd "$(dirname "$0")/../.." - source ./ci/lib.sh - - download_artifact release-images ./release-images - if [[ ${CI-} ]]; then - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - fi - - for img in ./release-images/*; do - docker load -i "$img" - done - - # We have to ensure the amd64 and arm64 images exist on the remote registry - # in order to build the manifest. - # We don't put the arch in the tag to avoid polluting the main repository. - # These other repositories are private so they don't pollute our organization namespace. - docker push "codercom/code-server-amd64:$VERSION" - docker push "codercom/code-server-arm64:$VERSION" - - export DOCKER_CLI_EXPERIMENTAL=enabled - - docker manifest create "codercom/code-server:$VERSION" \ - "codercom/code-server-amd64:$VERSION" \ - "codercom/code-server-arm64:$VERSION" - docker manifest push --purge "codercom/code-server:$VERSION" - - docker manifest create "codercom/code-server:latest" \ - "codercom/code-server-amd64:$VERSION" \ - "codercom/code-server-arm64:$VERSION" - docker manifest push --purge "codercom/code-server:latest" -} - -main "$@" diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md deleted file mode 100644 index fe14b3a64000..000000000000 --- a/docs/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,79 +0,0 @@ - - - -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -- Using welcoming and inclusive language -- Being respectful of differing viewpoints and experiences -- Gracefully accepting constructive criticism -- Focusing on what is best for the community -- Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -- The use of sexualized language or imagery and unwelcome sexual attention or - advances -- Trolling, insulting/derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or electronic - address, without explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at opensource@coder.com. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md deleted file mode 100644 index 22f4feb861f4..000000000000 --- a/docs/CONTRIBUTING.md +++ /dev/null @@ -1,158 +0,0 @@ - - -# Contributing - -- [Pull Requests](#pull-requests) -- [Requirements](#requirements) -- [Development Workflow](#development-workflow) - - [Updating VS Code](#updating-vs-code) - - [Notes about Changes](#notes-about-changes) -- [Build](#build) -- [Structure](#structure) - - [Modifications to VS Code](#modifications-to-vs-code) - - [Currently Known Issues](#currently-known-issues) - - - -- [Detailed CI and build process docs](../ci) - -## Pull Requests - -Please create a [GitHub Issue](https://github.com/cdr/code-server/issues) for each issue -you'd like to address unless the proposed fix is minor. - -In your Pull Requests (PR), link to the issue that the PR solves. - -Please ensure that the base of your PR is the **master** branch. (Note: The default -GitHub branch is the latest release branch, though you should point all of your changes to be merged into -master). - -## Requirements - -The prerequisites for contributing to code-server are almost the same as those for -[VS Code](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites). -There are several differences, however. Here is what is needed: - -- `node` v12.x or greater -- `git` v2.x or greater -- [`yarn`](https://classic.yarnpkg.com/en/) - - used to install JS packages and run scripts -- [`nfpm`](https://classic.yarnpkg.com/en/) - - used to build `.deb` and `.rpm` packages -- [`jq`](https://stedolan.github.io/jq/) - - used to build code-server releases -- [`gnupg`](https://gnupg.org/index.html) - - all commits must be signed an verified - - see GitHub's ["Managing commit signature verification"](https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification) or follow [this tutorial](https://joeprevite.com/verify-commits-on-github) -- `build-essential` (Linux) - - `apt-get install -y build-essential` - used by VS Code -- `rsync` and `unzip` - - used for code-server releases - -## Development Workflow - -```shell -yarn -yarn watch -# Visit http://localhost:8080 once the build is completed. -``` - -`yarn watch` will live reload changes to the source. - -### Updating VS Code - -Updating VS Code requires `git subtree`. On some rpm-based Linux distros, `git subtree` is not included by default, and needs to be installed separately. -To install, run `dnf install git-subtree` or `yum install git-subtree` as necessary. - -To update VS Code, follow these steps: - -1. Run `yarn update:vscode`. -2. Enter a version. Ex. 1.53 -3. This will open a draft PR for you. -4. There will be merge conflicts. First commit them. - 1. We do this because if we don't, it will be impossible to review your PR. -5. Once they're all fixed, test code-server locally and make sure it all works. - -#### Notes about Changes - -- watch out for updates to `lib/vscode/src/vs/code/browser/workbench/workbench.html`. You may need to make changes to `src/browser/pages/vscode.html` - -## Build - -You can build using: - -```shell -yarn build -yarn build:vscode -yarn release -``` - -Run your build with: - -```shell -cd release -yarn --production -# Runs the built JavaScript with Node. -node . -``` - -Build the release packages (make sure that you run `yarn release` first): - -```shell -yarn release:standalone -yarn test:standalone-release -yarn package -``` - -NOTE: On Linux, the currently running distro will become the minimum supported version. -In our GitHub Actions CI, we use CentOS 7 for maximum compatibility. -If you need your builds to support older distros, run the build commands -inside a Docker container with all the build requirements installed. - -## Structure - -The `code-server` script serves an HTTP API for login and starting a remote VS Code process. - -The CLI code is in [src/node](../src/node) and the HTTP routes are implemented in -[src/node/routes](../src/node/routes). - -Most of the meaty parts are in the VS Code portion of the codebase under [lib/vscode](../lib/vscode), which we described next. - -### Modifications to VS Code - -In v1 of code-server, we had a patch of VS Code that split the codebase into a front-end -and a server. The front-end consisted of all UI code, while the server ran the extensions -and exposed an API to the front-end for file access and all UI needs. - -Over time, Microsoft added support to VS Code to run it on the web. They have made -the front-end open source, but not the server. As such, code-server v2 (and later) uses -the VS Code front-end and implements the server. We do this by using a git subtree to fork and modify VS Code. This code lives under [lib/vscode](../lib/vscode). - -Some noteworthy changes in our version of VS Code: - -- Adding our build file, which includes our code and VS Code's web code -- Allowing multiple extension directories (both user and built-in) -- Modifying the loader, websocket, webview, service worker, and asset requests to - use the URL of the page as a base (and TLS, if necessary for the websocket) -- Sending client-side telemetry through the server -- Allowing modification of the display language -- Making it possible for us to load code on the client -- Making it possible to install extensions of any kind -- Fixing issue with getting disconnected when your machine sleeps or hibernates -- Adding connection type to web socket query parameters - -As the web portion of VS Code matures, we'll be able to shrink and possibly -eliminate our modifications. In the meantime, upgrading the VS Code version requires -us to ensure that our changes are still applied and work as intended. In the future, -we'd like to run VS Code unit tests against our builds to ensure that features -work as expected. - -**Note**: We have [extension docs](../ci/README.md) on the CI and build system. - -If the functionality you're working on does NOT depend on code from VS Code, please -move it out and into code-server. - -### Currently Known Issues - -- Creating custom VS Code extensions and debugging them doesn't work -- Extension profiling and tips are currently disabled diff --git a/docs/FAQ.md b/docs/FAQ.md deleted file mode 100644 index b071cdb05881..000000000000 --- a/docs/FAQ.md +++ /dev/null @@ -1,463 +0,0 @@ - - -# FAQ - -- [Questions?](#questions) -- [iPad Status?](#ipad-status) -- [Community Projects (awesome-code-server)](#community-projects-awesome-code-server) -- [How can I reuse my VS Code configuration?](#how-can-i-reuse-my-vs-code-configuration) -- [Differences compared to VS Code?](#differences-compared-to-vs-code) - - [Installing an extension](#installing-an-extension) -- [How can I request a missing extension?](#how-can-i-request-a-missing-extension) -- [Installing an extension manually](#installing-an-extension-manually) -- [How do I configure the marketplace URL?](#how-do-i-configure-the-marketplace-url) -- [Where are extensions stored?](#where-are-extensions-stored) -- [How is this different from VS Code Codespaces?](#how-is-this-different-from-vs-code-codespaces) -- [How should I expose code-server to the internet?](#how-should-i-expose-code-server-to-the-internet) -- [Can I store my password hashed?](#can-i-store-my-password-hashed) -- [How do I securely access web services?](#how-do-i-securely-access-web-services) - - [Sub-paths](#sub-paths) - - [Sub-domains](#sub-domains) -- [Why does the code-server proxy strip `/proxy/` from the request path?](#why-does-the-code-server-proxy-strip-proxyport-from-the-request-path) - - [Proxying to Create React App](#proxying-to-create-react-app) -- [Multi-tenancy](#multi-tenancy) -- [Docker in code-server container?](#docker-in-code-server-container) -- [How can I disable telemetry?](#how-can-i-disable-telemetry) -- [How does code-server decide what workspace or folder to open?](#how-does-code-server-decide-what-workspace-or-folder-to-open) -- [How do I debug issues with code-server?](#how-do-i-debug-issues-with-code-server) -- [Heartbeat File](#heartbeat-file) -- [Healthz endpoint](#healthz-endpoint) -- [How does the config file work?](#how-does-the-config-file-work) -- [Isn't an install script piped into sh insecure?](#isnt-an-install-script-piped-into-sh-insecure) -- [How do I make my keyboard shortcuts work?](#how-do-i-make-my-keyboard-shortcuts-work) -- [How do I access my Documents/Downloads/Desktop folders in code-server on OSX?](#how-do-i-access-my-documentsdownloadsdesktop-folders-in-code-server-on-osx) -- [Differences compared to Theia?](#differences-compared-to-theia) -- [`$HTTP_PROXY`, `$HTTPS_PROXY`, `$NO_PROXY`](#http_proxy-https_proxy-no_proxy) -- [Enterprise](#enterprise) - - - -## Questions? - -Please file all questions and support requests at . - -## iPad Status? - -Please see [./ipad.md](./ipad.md). - -## Community Projects (awesome-code-server) - -Visit the [awesome-code-server](https://github.com/cdr/awesome-code-server) repository to view community projects and guides with code-server! Feel free to add your own! - -## How can I reuse my VS Code configuration? - -The very popular [Settings Sync](https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync) extension works. - -You can also pass `--user-data-dir ~/.vscode` to reuse your existing VS Code extensions and configuration. - -Or copy `~/.vscode` into `~/.local/share/code-server`. - -## Differences compared to VS Code? - -`code-server` takes the open source core of VS Code and allows you to run it in the browser. -However, it is not entirely equivalent to Microsoft's VS Code. - -While the core of VS Code is open source, the marketplace and many published Microsoft extensions are not. - -Furthermore, Microsoft prohibits the use of any non-Microsoft VS Code from accessing their marketplace. - -See the [TOS](https://cdn.vsassets.io/v/M146_20190123.39/_content/Microsoft-Visual-Studio-Marketplace-Terms-of-Use.pdf). - -> Marketplace Offerings are intended for use only with Visual Studio Products and Services -> and you may only install and use Marketplace Offerings with Visual Studio Products and Services. - -As a result, we cannot offer any extensions on the Microsoft marketplace. Instead, -we have created our own marketplace for open source extensions. -It works by scraping GitHub for VS Code extensions and building them. It's not perfect but getting -better by the day with more and more extensions. - -These are the closed source extensions presently unavailable: - -1. [Live Share](https://visualstudio.microsoft.com/services/live-share) - - We may implement something similar, see [#33](https://github.com/cdr/code-server/issues/33) -1. [Remote Extensions (SSH, Containers, WSL)](https://github.com/microsoft/vscode-remote-release) - - We may reimplement these at some point, see [#1315](https://github.com/cdr/code-server/issues/1315) - -For more about the closed source parts of VS Code, see [vscodium/vscodium](https://github.com/VSCodium/vscodium#why-does-this-exist). - -### Installing an extension - -Extensions can be installed from the marketplace using the extensions sidebar in -code-server or from the command line: - -```shell -code-server --install-extension -# example: code-server --install-extension wesbos.theme-cobalt2 -``` - -## How can I request a missing extension? - -We are currently in the process of transitioning to [Open VSX](https://open-vsx.org/). -Once -is implemented, we can fully make this transition. Therefore, we are no longer -accepting new requests for extension requests. - -Instead, we suggest one of the following: - -- [Switch to Open VSX](#how-do-i-configure-the-marketplace-url) now -- Download and [install the extension manually](#installing-an-extension-manually) - -## Installing an extension manually - -If an extension is not available from the marketplace or does not work, you can -grab its VSIX from its GitHub releases or build it yourself. - -Once you have downloaded the VSIX to the remote machine you can either: - -- Run the `Extensions: Install from VSIX` command in the Command Palette. -- Use `code-server --install-extension ` - -You can also download extensions from the command line. For instance, downloading off OpenVSX can be done like this: - -```shell -SERVICE_URL=https://open-vsx.org/vscode/gallery ITEM_URL=https://open-vsx.org/vscode/item code-server --install-extension -``` - -## How do I configure the marketplace URL? - -If you have your own marketplace that implements the VS Code Extension Gallery API, it is possible to -point code-server to it by setting `$SERVICE_URL` and `$ITEM_URL`. These correspond directly -to `serviceUrl` and `itemUrl` in VS Code's `product.json`. - -e.g. to use [open-vsx.org](https://open-vsx.org): - -```bash -export SERVICE_URL=https://open-vsx.org/vscode/gallery -export ITEM_URL=https://open-vsx.org/vscode/item -``` - -While you can technically use Microsoft's marketplace with these, please do not do so as it -is against their terms of use. See [above](#differences-compared-to-vs-code) and this -discussion regarding the use of the Microsoft URLs in forks: - - - -See also [VSCodium's docs](https://github.com/VSCodium/vscodium/blob/master/DOCS.md#extensions--marketplace). - -These variables are most valuable to our enterprise customers for whom we have a self hosted marketplace product. - -## Where are extensions stored? - -Defaults to `~/.local/share/code-server/extensions`. - -If the `XDG_DATA_HOME` environment variable is set the data directory will be -`$XDG_DATA_HOME/code-server/extensions`. In general we try to follow the XDG directory spec. - -You can install an extension on the CLI with: - -```bash -# From the Coder extension marketplace -code-server --install-extension ms-python.python - -# From a downloaded VSIX on the file system -code-server --install-extension downloaded-ms-python.python.vsix -``` - -## How is this different from VS Code Codespaces? - -VS Code Codespaces is a closed source and paid service by Microsoft. It also allows you to access -VS Code via the browser. - -However, code-server is free, open source and can be run on any machine without any limitations. - -While you can self host environments with VS Code Codespaces, you still need an Azure billing -account and you have to access VS Code via the Codespaces web dashboard instead of directly -connecting to your instance. - -## How should I expose code-server to the internet? - -Please follow [./guide.md](./guide.md) for our recommendations on setting up and using code-server. - -code-server only supports password authentication natively. - -**note**: code-server will rate limit password authentication attempts at 2 a minute and 12 an hour. - -If you want to use external authentication (i.e sign in with Google) you should handle this -with a reverse proxy using something like [oauth2_proxy](https://github.com/pusher/oauth2_proxy) -or [Cloudflare Access](https://teams.cloudflare.com/access). - -For HTTPS, you can use a self signed certificate by passing in just `--cert` or -pass in an existing certificate by providing the path to `--cert` and the path to -the key with `--cert-key`. - -The self signed certificate will be generated into -`~/.local/share/code-server/self-signed.crt`. - -If `code-server` has been passed a certificate it will also respond to HTTPS -requests and will redirect all HTTP requests to HTTPS. - -You can use [Let's Encrypt](https://letsencrypt.org/) to get a TLS certificate -for free. - -Again, please follow [./guide.md](./guide.md) for our recommendations on setting up and using code-server. - -## Can I store my password hashed? - -Yes you can! Set the value of `hashed-password` instead of `password`. Generate the hash with: - -``` -printf "thisismypassword" | sha256sum | cut -d' ' -f1 -``` - -Of course replace `thisismypassword` with your actual password. - -Example: - -```yaml -auth: password -hashed-password: 1da9133ab9dbd11d2937ec8d312e1e2569857059e73cc72df92e670928983ab5 # You got this from the command above -``` - -## How do I securely access web services? - -code-server is capable of proxying to any port using either a subdomain or a -subpath which means you can securely access these services using code-server's -built-in authentication. - -### Sub-paths - -Just browse to `/proxy//`. - -### Sub-domains - -You will need a DNS entry that points to your server for each port you want to -access. You can either set up a wildcard DNS entry for `*.` if your domain -name registrar supports it or you can create one for every port you want to -access (`3000.`, `8080.`, etc). - -You should also set up TLS certificates for these subdomains, either using a -wildcard certificate for `*.` or individual certificates for each port. - -Start code-server with the `--proxy-domain` flag set to your domain. - -``` -code-server --proxy-domain -``` - -Now you can browse to `.`. Note that this uses the host header so -ensure your reverse proxy forwards that information if you are using one. - -## Why does the code-server proxy strip `/proxy/` from the request path? - -HTTP servers should strive to use relative URLs to avoid needed to be coupled to the -absolute path at which they are served. This means you must use trailing slashes on all -paths with subpaths. See - -This is really the "correct" way things work and why the striping of the base path is the -default. If your application uses relative URLs and does not assume the absolute path at -which it is being served, it will just work no matter what port you decide to serve it off -or if you put it in behind code-server or any other proxy! - -However many people prefer the cleaner aesthetic of no trailing slashes. This couples you -to the base path as you cannot use relative redirects correctly anymore. See the above -link. - -For users who are ok with this tradeoff, use `/absproxy` instead and the path will be -passed as is. e.g. `/absproxy/3000/my-app-path` - -### Proxying to Create React App - -You must use `/absproxy/` with create-react-app. -See [#2565](https://github.com/cdr/code-server/issues/2565) and -[#2222](https://github.com/cdr/code-server/issues/2222). You will need to inform -create-react-app of the path at which you are serving via `$PUBLIC_URL` and webpack -via `$WDS_SOCKET_PATH`. - -e.g. - -```sh -PUBLIC_URL=/absproxy/3000 \ - WDS_SOCKET_PATH=$PUBLIC_URL/sockjs-node \ - BROWSER=none yarn start -``` - -Then visit `https://my-code-server-address.io/absproxy/3000` to see your app exposed through -code-server! - -Highly recommend using the subdomain approach instead to avoid this class of issue. - -## Multi-tenancy - -If you want to run multiple code-servers on shared infrastructure, we recommend using virtual -machines with a VM per user. This will easily allow users to run a docker daemon. If you want -to use kubernetes, you'll definitely want to use [kubevirt](https://kubevirt.io) or [sysbox](https://github.com/nestybox/sysbox) to give each -user a VM-like experience instead of just a container. - -## Docker in code-server container? - -If you'd like to access docker inside of code-server, mount the docker socket in from `/var/run/docker.sock`. -Install the docker CLI in the code-server container and you should be able to access the daemon! - -You can even make volume mounts work. Lets say you want to run a container and mount in -`/home/coder/myproject` into it from inside the `code-server` container. You need to make sure -the docker daemon's `/home/coder/myproject` is the same as the one mounted inside the `code-server` -container and the mount will just work. - -## How can I disable telemetry? - -Use the `--disable-telemetry` flag to completely disable telemetry. We use the -data collected only to improve code-server. - -## How does code-server decide what workspace or folder to open? - -code-server tries the following in order: - -1. The `workspace` query parameter. -2. The `folder` query parameter. -3. The workspace or directory passed on the command line. -4. The last opened workspace or directory. - -## How do I debug issues with code-server? - -First run code-server with at least `debug` logging (or `trace` to be really -thorough) by setting the `--log` flag or the `LOG_LEVEL` environment variable. -`-vvv` and `--verbose` are aliases for `--log trace`. - -``` -code-server --log debug -``` - -Once this is done, replicate the issue you're having then collect logging -information from the following places: - -1. The most recent files from `~/.local/share/code-server/coder-logs`. -2. The browser console. -3. The browser network tab. - -Additionally, collecting core dumps (you may need to enable them first) if -code-server crashes can be helpful. - -## Heartbeat File - -`code-server` touches `~/.local/share/code-server/heartbeat` once a minute as long -as there is an active browser connection. - -If you want to shutdown `code-server` if there hasn't been an active connection in X minutes -you can do so by continuously checking the last modified time on the heartbeat file and if it is -older than X minutes, kill `code-server`. - -[#1636](https://github.com/cdr/code-server/issues/1636) will make the experience here better. - -## Healthz endpoint - -`code-server` exposes an endpoint at `/healthz` which can be used to check -whether `code-server` is up without triggering a heartbeat. The response will -include a status (`alive` or `expired`) and a timestamp for the last heartbeat -(defaults to `0`). This endpoint does not require authentication. - -```json -{ - "status": "alive", - "lastHeartbeat": 1599166210566 -} -``` - -## How does the config file work? - -When `code-server` starts up, it creates a default config file in `~/.config/code-server/config.yaml` that looks -like this: - -```yaml -bind-addr: 127.0.0.1:8080 -auth: password -password: mewkmdasosafuio3422 # This is randomly generated for each config.yaml -cert: false -``` - -Each key in the file maps directly to a `code-server` flag. Run `code-server --help` to see -a listing of all the flags. - -The default config here says to listen on the loopback IP port 8080, enable password authorization -and no TLS. Any flags passed to `code-server` will take priority over the config file. - -The `--config` flag or `$CODE_SERVER_CONFIG` can be used to change the config file's location. - -The default location also respects `$XDG_CONFIG_HOME`. - -## Isn't an install script piped into sh insecure? - -Please give -[this wonderful blogpost](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verified-install) by -[sandstorm.io](https://sandstorm.io) a read. - -## How do I make my keyboard shortcuts work? - -Many shortcuts will not work by default as they'll be caught by the browser. - -If you use Chrome you can get around this by installing the PWA. - -Once you've entered the editor, click the "plus" icon present in the URL toolbar area. -This will install a Chrome PWA and now all keybindings will work! - -For other browsers you'll have to remap keybindings unfortunately. - -## How do I access my Documents/Downloads/Desktop folders in code-server on OSX? - -Newer versions of macOS require permission through a non-UNIX mechanism for access to the Desktop, Documents, Pictures, Downloads, and other folders. - -You may have to give Node "full disk access" since it doesn't implement any of the macOS permission request stuff natively. - -1. Find where Node is installed on your machine - - ```console - โžœ ~ which node - /usr/local/bin/node - ``` - -1. Grant Node Full Disk Access: - -Open System Preferences > Security & Privacy > Privacy (horizontal) tab > Full Disk Access (vertical) tab > Click the ๐Ÿ”’ to unlock > Click + and select the Node binary you located. - -See [#2794](https://github.com/cdr/code-server/issues/2794) for context on this. - -## Differences compared to Theia? - -[Theia](https://github.com/eclipse-theia/theia) is a browser IDE loosely based on VS Code. It uses the same -text editor library named [Monaco](https://github.com/Microsoft/monaco-editor) and the same -extension API but everything else is very different. It also uses [open-vsx.org](https://open-vsx.org) -for extensions which has an order of magnitude less extensions than our marketplace. -See [#1473](https://github.com/cdr/code-server/issues/1473). - -You can't just use your VS Code config in Theia like you can with code-server. - -To summarize, code-server is a patched fork of VS Code to run in the browser whereas -Theia takes some parts of VS Code but is an entirely different editor. - -## `$HTTP_PROXY`, `$HTTPS_PROXY`, `$NO_PROXY` - -code-server supports the standard environment variables to allow directing -server side requests through a proxy. - -```sh -export HTTP_PROXY=https://134.8.5.4 -export HTTPS_PROXY=https://134.8.5.4 -# Now all of code-server's server side requests will go through -# https://134.8.5.4 first. -code-server -``` - -- See [proxy-from-env](https://www.npmjs.com/package/proxy-from-env#environment-variables) - for a detailed reference on the various environment variables and their syntax. - - code-server only uses the `http` and `https` protocols. -- See [proxy-agent](https://www.npmjs.com/package/proxy-agent) for the various supported - proxy protocols. - -**note**: Only server side requests will be proxied! This includes fetching extensions, -requests made from extensions etc. To proxy requests from your browser you need to -configure your browser separately. Browser requests would cover exploring the extension -marketplace. - -## Enterprise - -Visit [our enterprise page](https://coder.com) for more information about our -enterprise offerings. diff --git a/docs/MAINTAINING.md b/docs/MAINTAINING.md deleted file mode 100644 index eb2be4af23c1..000000000000 --- a/docs/MAINTAINING.md +++ /dev/null @@ -1,65 +0,0 @@ - - -# Maintaining - -- [Maintaining](#maintaining) - - [Workflow](#workflow) - - [Milestones](#milestones) - - [Triage](#triage) - - [Project Boards](#project-boards) - - [Versioning](#versioning) - - - -# Maintaining - -Current maintainers: - -- @code-asher -- @oxy -- @jsjoeio - -This document is meant to serve current and future maintainers of code-server, but also share openly our workflow for maintaining the project. - -## Workflow - -The workflow used by code-server maintainers is one that aims to be easy to understood by the community and easy enough for new maintainers to jump in and start contributing on day one. - -### Milestones - -We operate mainly using [milestones](https://github.com/cdr/code-server/milestones). This was heavily inspired by our friends over at [vscode](https://github.com/microsoft/vscode). - -Here are the milestones we use and how we use them: - -- "Backlog" -> Work not yet planned for a specific release. -- "On Deck" -> Work under consideration for upcoming milestones. -- "Backlog Candidates" -> Work that is not yet accepted for the backlog. We wait for the community to weigh in. -- "<0.0.0>" -> Work to be done for that version. - -With this flow, any un-assigned issues are essentially in triage state and once triaged are either "Backlog" or "Backlog Candidates". They will eventually move to "On Deck" (or be closed). Lastly, they will end up on a version milestone where they will be worked on. - -### Triage - -We use the following process for triaging GitHub issues: - -1. a submitter creates an issue -1. add appropriate labels - 1. if we need to look into it further, add "needs-investigation" -1. add to milestone - 1. if it should be fixed soon, add to version milestone or "On Deck" - 1. if not urgent, add to "Backlog" - 1. otherwise, add to "Backlog Candidate" if it should be considered - -### Project Boards - -We use project boards for projects or goals that span multiple milestones. - -Think of this as a place to put miscellaneous things (like testing, clean up stuff, etc). As a maintainer, random todos may come up here and there. This gives you a place to add notes temporarily before opening a new issue. Given that our release milestones function off of issues, we believe tasks should have dedicated issues. - -It also gives us a way to separate the issue triage from bigger-picture, long-term work. - -## Versioning - -`` - -The code-server project follows traditional [semantic versioning](ttps://semver.org/), with the objective of minimizing major changes that break backward compatibility. We increment the patch level for all releases, except when the upstream Visual Studio Code project increments its minor version or we change the plugin API in a backward-compatible manner. In those cases, we increment the minor version rather than the patch level. diff --git a/docs/SECURITY.md b/docs/SECURITY.md deleted file mode 100644 index bb24654f3876..000000000000 --- a/docs/SECURITY.md +++ /dev/null @@ -1,13 +0,0 @@ -# Security Policy - -## Supported Versions - -Coder sponsors development and maintenance of the code-server project. We will fix security issues within 90 days of receiving a report, and publish the fix in a subsequent release. The code-server project does not provide backports or patch releases for security issues at this time. - -| Version | Supported | -| ------- | ------------------ | -| 3.9.3 | :white_check_mark: | - -## Reporting a Vulnerability - -To report a vulnerability, please send an email to security[@]coder.com and our security team will respond to you. diff --git a/docs/assets/screenshot.png b/docs/assets/screenshot.png deleted file mode 100644 index 77ab4611e9ed..000000000000 Binary files a/docs/assets/screenshot.png and /dev/null differ diff --git a/docs/guide.md b/docs/guide.md deleted file mode 100644 index 0c76092f3244..000000000000 --- a/docs/guide.md +++ /dev/null @@ -1,317 +0,0 @@ - - -# Setup Guide - -- [1. Acquire a remote machine](#1-acquire-a-remote-machine) - - [Requirements](#requirements) - - [Google Cloud](#google-cloud) -- [2. Install code-server](#2-install-code-server) -- [3. Expose code-server](#3-expose-code-server) - - [SSH forwarding](#ssh-forwarding) - - [Let's Encrypt](#lets-encrypt) - - [NGINX](#nginx) - - [Self Signed Certificate](#self-signed-certificate) - - [Change the password?](#change-the-password) - - [How do I securely access development web services?](#how-do-i-securely-access-development-web-services) - - - -This guide demonstrates how to setup and use `code-server`. -To reiterate, `code-server` lets you run VS Code on a remote server and then access it via a browser. - -Further docs are at: - -- [README](../README.md) for a general overview -- [INSTALL](../docs/install.md) for installation -- [FAQ](./FAQ.md) for common questions. -- [CONTRIBUTING](../docs/CONTRIBUTING.md) for development docs - -We highly recommend reading the [FAQ](./FAQ.md) on the [Differences compared to VS Code](./FAQ.md#differences-compared-to-vs-code) before beginning. - -We'll walk you through acquiring a remote machine to run `code-server` on -and then exposing `code-server` so you can securely access it. - -## 1. Acquire a remote machine - -First, you need a machine to run `code-server` on. You can use a physical -machine you have lying around or use a VM on GCP/AWS. - -### Requirements - -For a good experience, we recommend at least: - -- 1 GB of RAM -- 2 cores - -You can use whatever linux distribution floats your boat but in this guide we assume Debian on Google Cloud. - -### Google Cloud - -For demonstration purposes, this guide assumes you're using a VM on GCP but you should be -able to easily use any machine or VM provider. - -You can sign up at https://console.cloud.google.com/getting-started. You'll get a 12 month \$300 -free trial. - -Once you've signed up and created a GCP project, create a new Compute Engine VM Instance. - -1. Navigate to `Compute Engine -> VM Instances` on the sidebar. -2. Now click `Create Instance` to create a new instance. -3. Name it whatever you want. -4. Choose the region closest to you based on [gcping.com](http://www.gcping.com). -5. Any zone is fine. -6. We'd recommend a `E2` series instance from the General-purpose family. - - Change the type to custom and set at least 2 cores and 2 GB of ram. - - Add more vCPUs and memory as you prefer, you can edit after creating the instance as well. - - https://cloud.google.com/compute/docs/machine-types#general_purpose -7. We highly recommend switching the persistent disk to an SSD of at least 32 GB. - - Click `Change` under `Boot Disk` and change the type to `SSD Persistent Disk` and the size - to `32`. - - You can always grow your disk later. -8. Navigate to `Networking -> Network interfaces` and edit the existing interface - to use a static external IP. - - Click done to save network interface changes. -9. If you do not have a [project wide SSH key](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys#project-wide), navigate to `Security -> SSH Keys` and add your public key there. -10. Click create! - -Remember, you can shutdown your server when not in use to lower costs. - -We highly recommend learning to use the [`gcloud`](https://cloud.google.com/sdk/gcloud) cli -to avoid the slow dashboard. - -## 2. Install code-server - -We have a [script](../install.sh) to install `code-server` for Linux, macOS and FreeBSD. - -It tries to use the system package manager if possible. - -First run to print out the install process: - -```bash -curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run -``` - -Now to actually install: - -```bash -curl -fsSL https://code-server.dev/install.sh | sh -``` - -The install script will print out how to run and start using `code-server`. - -Docs on the install script, manual installation and docker image are at [./install.md](./install.md). - -## 3. Expose code-server - -**Never**, **ever** expose `code-server` directly to the internet without some form of authentication -and encryption as someone can completely takeover your machine with the terminal. - -By default, `code-server` will enable password authentication which will require you to copy the -password from the`code-server`config file to login. It will listen on`localhost` to avoid exposing -itself to the world. This is fine for testing but will not work if you want to access `code-server` -from a different machine. - -There are several approaches to securely operating and exposing `code-server`. - -**tip**: You can list the full set of `code-server` options with `code-server --help` - -### SSH forwarding - -We highly recommend this approach for not requiring any additional setup, you just need an -SSH server on your remote machine. The downside is you won't be able to access `code-server` -on any machine without an SSH client like on iPad. If that's important to you, skip to [Let's Encrypt](#lets-encrypt). - -First, ssh into your instance and edit your `code-server` config file to disable password authentication. - -```bash -# Replaces "auth: password" with "auth: none" in the code-server config. -sed -i.bak 's/auth: password/auth: none/' ~/.config/code-server/config.yaml -``` - -Restart `code-server` with (assuming you followed the guide): - -```bash -sudo systemctl restart code-server@$USER -``` - -Now forward local port 8080 to `127.0.0.1:8080` on the remote instance by running the following command on your local machine. - -Recommended reading: https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding. - -```bash -# -N disables executing a remote shell -ssh -N -L 8080:127.0.0.1:8080 [user]@ -``` - -Now if you access http://127.0.0.1:8080 locally, you should see `code-server`! - -If you want to make the SSH port forwarding persistent we recommend using -[mutagen](https://mutagen.io/documentation/introduction/installation). - -``` -# Same as the above SSH command but runs in the background continuously. -# Add `mutagen daemon start` to your ~/.bashrc to start the mutagen daemon when you open a shell. -mutagen forward create --name=code-server tcp:127.0.0.1:8080 :tcp:127.0.0.1:8080 -``` - -We also recommend adding the following lines to your `~/.ssh/config` to quickly detect bricked SSH connections: - -```bash -Host * -ServerAliveInterval 5 -ExitOnForwardFailure yes -``` - -You can also forward your SSH and GPG agent to the instance to securely access GitHub -and sign commits without copying your keys. - -1. https://developer.github.com/v3/guides/using-ssh-agent-forwarding/ -2. https://wiki.gnupg.org/AgentForwarding - -### Let's Encrypt - -[Let's Encrypt](https://letsencrypt.org) is a great option if you want to access `code-server` on an iPad -or do not want to use SSH forwarding. This does require that the remote machine be exposed to the internet. - -Assuming you have been following the guide, edit your instance and checkmark the allow HTTP/HTTPS traffic options. - -1. You'll need to buy a domain name. We recommend [Google Domains](https://domains.google.com). -2. Add an A record to your domain with your instance's IP. -3. Install caddy https://caddyserver.com/docs/download#debian-ubuntu-raspbian. - -```bash -sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https -curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/cfg/gpg/gpg.155B6D79CA56EA34.key' | sudo apt-key add - -curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/cfg/setup/config.deb.txt?distro=debian&version=any-version' | sudo tee -a /etc/apt/sources.list.d/caddy-stable.list -sudo apt update -sudo apt install caddy -``` - -4. Replace `/etc/caddy/Caddyfile` with sudo to look like this: - -``` -mydomain.com - -reverse_proxy 127.0.0.1:8080 -``` - -If you want to serve `code-server` from a sub-path, below is sample configuration for Caddy: - -``` -mydomain.com/code/* { - uri strip_prefix /code - reverse_proxy 127.0.0.1:8080 -} -``` - -Remember to replace `mydomain.com` with your domain name! - -5. Reload caddy with: - -```bash -sudo systemctl reload caddy -``` - -Visit `https://` to access `code-server`. Congratulations! - -In a future release we plan to integrate Let's Encrypt directly with `code-server` to avoid -the dependency on caddy. - -#### NGINX - -If you prefer to use NGINX instead of Caddy then please follow steps 1-2 above and then: - -3. Install `nginx`: - -```bash -sudo apt update -sudo apt install -y nginx certbot python3-certbot-nginx -``` - -4. Put the following config into `/etc/nginx/sites-available/code-server` with sudo: - -```nginx -server { - listen 80; - listen [::]:80; - server_name mydomain.com; - - location / { - proxy_pass http://localhost:8080/; - proxy_set_header Host $host; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection upgrade; - proxy_set_header Accept-Encoding gzip; - } -} -``` - -Remember to replace `mydomain.com` with your domain name! - -5. Enable the config: - -```bash -sudo ln -s ../sites-available/code-server /etc/nginx/sites-enabled/code-server -sudo certbot --non-interactive --redirect --agree-tos --nginx -d mydomain.com -m me@example.com -``` - -Make sure to substitute `me@example.com` with your actual email. - -Visit `https://` to access `code-server`. Congratulations! - -### Self Signed Certificate - -**note:** Self signed certificates do not work with iPad normally. See [./ipad.md](./ipad.md) for details. - -Recommended reading: https://security.stackexchange.com/a/8112. - -We recommend this as a last resort because self signed certificates do not work with iPads and can -cause other bizarre issues. Not to mention all the warnings when you access `code-server`. -Only use this if: - -1. You do not want to buy a domain or you cannot expose the remote machine to the internet. -2. You do not want to use SSH forwarding. - -ssh into your instance and edit your code-server config file to use a randomly generated self signed certificate: - -```bash -# Replaces "cert: false" with "cert: true" in the code-server config. -sed -i.bak 's/cert: false/cert: true/' ~/.config/code-server/config.yaml -# Replaces "bind-addr: 127.0.0.1:8080" with "bind-addr: 0.0.0.0:443" in the code-server config. -sed -i.bak 's/bind-addr: 127.0.0.1:8080/bind-addr: 0.0.0.0:443/' ~/.config/code-server/config.yaml -# Allows code-server to listen on port 443. -sudo setcap cap_net_bind_service=+ep /usr/lib/code-server/lib/node -``` - -Assuming you have been following the guide, restart `code-server` with: - -```bash -sudo systemctl restart code-server@$USER -``` - -Edit your instance and checkmark the allow HTTPS traffic option. - -Visit `https://` to access `code-server`. -You'll get a warning when accessing but if you click through you should be good. - -To avoid the warnings, you can use [mkcert](https://mkcert.dev) to create a self signed certificate -trusted by your OS and then pass it into `code-server` via the `cert` and `cert-key` config -fields. - -### Change the password? - -Edit the `password` field in the `code-server` config file at `~/.config/code-server/config.yaml` -and then restart `code-server` with: - -```bash -sudo systemctl restart code-server@$USER -``` - -Alternatively, you can specify the SHA-256 of your password at the `hashed-password` field in the config file. -The `hashed-password` field takes precedence over `password`. - -### How do I securely access development web services? - -If you're working on a web service and want to access it locally, `code-server` can proxy it for you. - -See the [FAQ](./FAQ.md#how-do-i-securely-access-web-services). diff --git a/docs/install.md b/docs/install.md deleted file mode 100644 index f9e77616ce1a..000000000000 --- a/docs/install.md +++ /dev/null @@ -1,225 +0,0 @@ - - -# Install - -- [Upgrading](#upgrading) -- [install.sh](#installsh) - - [Flags](#flags) - - [Detection Reference](#detection-reference) -- [Debian, Ubuntu](#debian-ubuntu) -- [Fedora, CentOS, RHEL, SUSE](#fedora-centos-rhel-suse) -- [Arch Linux](#arch-linux) -- [Termux](#termux) -- [yarn, npm](#yarn-npm) -- [macOS](#macos) -- [Standalone Releases](#standalone-releases) -- [Docker](#docker) -- [helm](#helm) -- [Cloud Providers](#cloud-providers) - - - -This document demonstrates how to install `code-server` on -various distros and operating systems. - -## Upgrading - -When upgrading you can just install the new version over the old one. code-server -maintains all user data in `~/.local/share/code-server` so that it is preserved in between -installations. - -## install.sh - -We have a [script](../install.sh) to install code-server for Linux, macOS and FreeBSD. - -It tries to use the system package manager if possible. - -First run to print out the install process: - -```bash -curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run -``` - -Now to actually install: - -```bash -curl -fsSL https://code-server.dev/install.sh | sh -``` - -The script will print out how to run and start using code-server. - -If you believe an install script used with `curl | sh` is insecure, please give -[this wonderful blogpost](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verified-install) by -[sandstorm.io](https://sandstorm.io) a read. - -If you'd still prefer manual installation despite the below [detection reference](#detection-reference) and `--dry-run` -then continue on for docs on manual installation. The [`install.sh`](../install.sh) script runs the _exact_ same -commands presented in the rest of this document. - -### Flags - -- `--dry-run` to echo the commands for the install process without running them. -- `--method` to choose the installation method. - - `--method=detect` to detect the package manager but fallback to `--method=standalone`. - - `--method=standalone` to install a standalone release archive into `~/.local`. -- `--prefix=/usr/local` to install a standalone release archive system wide. -- `--version=X.X.X` to install version `X.X.X` instead of latest. -- `--help` to see full usage docs. - -### Detection Reference - -- For Debian, Ubuntu and Raspbian it will install the latest deb package. -- For Fedora, CentOS, RHEL and openSUSE it will install the latest rpm package. -- For Arch Linux it will install the AUR package. -- For any unrecognized Linux operating system it will install the latest standalone release into `~/.local`. - - - Add `~/.local/bin` to your `$PATH` to run code-server. - -- For macOS it will install the Homebrew package. - - - If Homebrew is not installed it will install the latest standalone release into `~/.local`. - - Add `~/.local/bin` to your `$PATH` to run code-server. - -- For FreeBSD, it will install the [npm package](#yarn-npm) with `yarn` or `npm`. - -- If ran on an architecture with no releases, it will install the [npm package](#yarn-npm) with `yarn` or `npm`. - - We only have releases for amd64 and arm64 presently. - - The [npm package](#yarn-npm) builds the native modules on postinstall. - -## Debian, Ubuntu - -NOTE: The standalone arm64 .deb does not support Ubuntu <16.04. -Please upgrade or [build with yarn](#yarn-npm). - -```bash -curl -fOL https://github.com/cdr/code-server/releases/download/v3.9.3/code-server_3.9.3_amd64.deb -sudo dpkg -i code-server_3.9.3_amd64.deb -sudo systemctl enable --now code-server@$USER -# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml -``` - -## Fedora, CentOS, RHEL, SUSE - -NOTE: The standalone arm64 .rpm does not support CentOS 7. -Please upgrade or [build with yarn](#yarn-npm). - -```bash -curl -fOL https://github.com/cdr/code-server/releases/download/v3.9.3/code-server-3.9.3-amd64.rpm -sudo rpm -i code-server-3.9.3-amd64.rpm -sudo systemctl enable --now code-server@$USER -# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml -``` - -## Arch Linux - -```bash -# Installs code-server from the AUR using yay. -yay -S code-server -sudo systemctl enable --now code-server@$USER -# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml -``` - -```bash -# Installs code-server from the AUR with plain makepkg. -git clone https://aur.archlinux.org/code-server.git -cd code-server -makepkg -si -sudo systemctl enable --now code-server@$USER -# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml -``` - -## Termux - -Please see "Installation" in the [Termux docs](./termux.md#installation) - -## yarn, npm - -We recommend installing with `yarn` or `npm` when: - -1. You aren't on `amd64` or `arm64`. -2. If you're on Linux with glibc < v2.17 or glibcxx < v3.4.18 on amd64, or glibc < v2.23 or glibcxx < v3.4.21 on arm64. -3. You're running Alpine Linux, or are using a non-glibc libc. See [#1430](https://github.com/cdr/code-server/issues/1430#issuecomment-629883198) - -**note:** Installing via `yarn` or `npm` builds native modules on install and so requires C dependencies. -See [./npm.md](./npm.md) for installing these dependencies. - -You will need at least node v12 installed. See [#1633](https://github.com/cdr/code-server/issues/1633). - -```bash -yarn global add code-server -# Or: npm install -g code-server -code-server -# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml -``` - -## macOS - -```bash -brew install code-server -brew services start code-server -# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml -``` - -## Standalone Releases - -We publish self contained `.tar.gz` archives for every release on [github](https://github.com/cdr/code-server/releases). -They bundle the node binary and `node_modules`. - -These are created from the [npm package](#yarn-npm) and the rest of the releases are created from these. -Only requirement is glibc >= 2.17 && glibcxx >= v3.4.18 on Linux and for macOS there is no minimum system requirement. - -1. Download the latest release archive for your system from [github](https://github.com/cdr/code-server/releases). -2. Unpack the release. -3. You can run code-server by executing `./bin/code-server`. - -You can add the code-server `bin` directory to your `$PATH` to easily execute `code-server` -without the full path every time. - -Here is an example script for installing and using a standalone `code-server` release on Linux: - -```bash -mkdir -p ~/.local/lib ~/.local/bin -curl -fL https://github.com/cdr/code-server/releases/download/v3.9.3/code-server-3.9.3-linux-amd64.tar.gz \ - | tar -C ~/.local/lib -xz -mv ~/.local/lib/code-server-3.9.3-linux-amd64 ~/.local/lib/code-server-3.9.3 -ln -s ~/.local/lib/code-server-3.9.3/bin/code-server ~/.local/bin/code-server -PATH="~/.local/bin:$PATH" -code-server -# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml -``` - -## Docker - -```bash -# This will start a code-server container and expose it at http://127.0.0.1:8080. -# It will also mount your current directory into the container as `/home/coder/project` -# and forward your UID/GID so that all file system operations occur as your user outside -# the container. -# -# Your $HOME/.config is mounted at $HOME/.config within the container to ensure you can -# easily access/modify your code-server config in $HOME/.config/code-server/config.json -# outside the container. -mkdir -p ~/.config -docker run -it --name code-server -p 127.0.0.1:8080:8080 \ - -v "$HOME/.config:/home/coder/.config" \ - -v "$PWD:/home/coder/project" \ - -u "$(id -u):$(id -g)" \ - -e "DOCKER_USER=$USER" \ - codercom/code-server:latest -``` - -Our official image supports `amd64` and `arm64`. - -For `arm32` support there is a popular community maintained alternative: - -https://hub.docker.com/r/linuxserver/code-server - -## helm - -See [the chart](../ci/helm-chart). - -## Cloud Providers - -We maintain one-click apps and install scripts for different cloud providers such as DigitalOcean, Railway, Heroku, Azure, etc. Check out the repository: - -https://github.com/cdr/deploy-code-server diff --git a/docs/ipad.md b/docs/ipad.md deleted file mode 100644 index 5ffaa50d0c4b..000000000000 --- a/docs/ipad.md +++ /dev/null @@ -1,163 +0,0 @@ - - -# iPad - -- [Known Issues](#known-issues) -- [How to install PWA](#how-to-install-pwa) -- [How to access code-server with a self signed certificate on iPad?](#how-to-access-code-server-with-a-self-signed-certificate-on-ipad) - - [Servediter iPad App](#servediter-ipad-app) -- [Raspberry Pi USB-C Network](#raspberry-pi-usb-c-network) -- [Ctrl C Workaround](#ctrl-c-workaround) -- [Recommendations](#recommendations) -- [By 2022 iPad coding more desirable on Arm Macs](#by-2022-ipad-coding-more-desirable-on-arm-macs) - - - -## Known Issues - -- Getting self signed certificates certificates to work is involved, see below. -- Keyboard issues - - May disappear sometimes [#1313](https://github.com/cdr/code-server/issues/1313), [#979](https://github.com/cdr/code-server/issues/979) - - Some short cuts expectations may not be met - - `command + n` opens new browser window instead of new file and difficult to even set to another quick key - - In general it's just note worthy you most likely will need to edit keyboard shortcuts - - No escape key by default on Magic Keyboard but everyone sets the globe key to be an escape key - - Opinion: It's actually an awesome joy having the escape key at bottom of keyboard -- Trackpad scrolling does not work [#1455](https://github.com/cdr/code-server/issues/1455) - - [Bug tracking of a WebKit fix here](https://bugs.webkit.org/show_bug.cgi?id=210071#c13) - - [tracking of WebKit patch](https://trac.webkit.org/changeset/270712/webkit) - - Alternative: Install line-jump extension and use keyboard to nav by jumping large amount of lines - - Alternative: Just use touch scrolling -- See [issues tagged with the iPad label](https://github.com/cdr/code-server/issues?q=is%3Aopen+is%3Aissue+label%3AiPad) for more. -- `ctrl+c` does not stop a long-running process in the browser - - Tracking upstream issue here: [#114009](https://github.com/microsoft/vscode/issues/114009) - - See [workaround](#ctrl-c-workaround) - -## How to install PWA - -To install the code-server PWA, follow these steps: - -1. Open code-server in Safari -2. Click the Share icon -3. Click "Add to Home Screen" - -Now when you open code-server from the home screen, you will be using the PWA. -The advantages of this are more screen real estate and access to top-level keyboard shortcuts because it's running like an app. -An example shortcut is the `cmd+w` to close an active file in the workbench. You can add this to your `keybindings.json` by doing the following: - -1. Open up code-serer -2. `Command Palette > Open Keyboard Shortcuts (JSON)` -3. Add the following to your `keybindings.json` - -```json -{ - "key": "cmd+w", - "command": "workbench.action.closeActiveEditor" -} -``` - -Test out command by hitting `cmd+w` to close an active file - -## How to access code-server with a self signed certificate on iPad? - -Accessing a self signed certificate on iPad isn't as easy as accepting through all -the security warnings. Safari will prevent WebSocket connections unless the certificate -is installed as a profile on the device. - -The below assumes you are using the self signed certificate that code-server -generates for you. If not, that's fine but you'll have to make sure your certificate -abides by the following guidelines from Apple: https://support.apple.com/en-us/HT210176 - -**note**: Another undocumented requirement we noticed is that the certificate has to have `basicConstraints=CA:true`. - -The following instructions assume you have code-server installed and running -with a self signed certificate. If not, please first go through [./guide.md](./guide.md)! - -**warning**: Your iPad must access code-server via a domain name. It could be local -DNS like `mymacbookpro.local` but it must be a domain name. Otherwise Safari will -refuse to allow WebSockets to connect. - -1. Your certificate **must** have a subject alt name that matches the hostname - at which you will access code-server from your iPad. You can pass this to code-server - so that it generates the certificate correctly with `--cert-host`. -2. Share your self signed certificate with the iPad. - - code-server will print the location of the certificate it has generated in the logs. - -``` -[2020-10-30T08:55:45.139Z] info - Using generated certificate and key for HTTPS: ~/.local/share/code-server/mymbp_local.crt -``` - -- You can mail it to yourself or if you have a Mac, it's easiest to just Airdrop to the iPad. - -3. When opening the `*.crt` file, you'll be prompted to go into settings to install. -4. Go to `Settings -> General -> Profile`, select the profile and then hit `Install`. - - It should say the profile is verified. -5. Go to `Settings -> About -> Certificate Trust Settings` and enable full trust for - the certificate. [more apple support here](https://support.apple.com/en-us/HT204477) -6. Now you can access code-server! ๐Ÿป - -### Servediter iPad App - -If you are unable to get the self signed certificate working or you do not have a domain -name to use, you can use the Servediter iPad App instead! - -**note**: This is not an officially supported app by the code-server team! - -Download [Serveediter](https://apps.apple.com/us/app/servediter-for-code-server/id1504491325) from the -App Store and then input your server information. If you are running a local server or mabye a usb-c -connected Raspberry Pi, you will input your settings into "Self Hosted Server". - -## Raspberry Pi USB-C Network - -It is a bit out of scope for this project, however, great success is being reported using iPad on the go with just a single USB-C cable connected to a Raspberry Pi both powering and supplying direct network access. Many support articles already exist but the key steps boil down to turning on Network over USB-C on the Raspberry Pi itself and the rest of the steps are just like getting Code Server running any where else. - -Resources worthy of review: - -- [General intro to Pi as an iPad accessory](https://www.youtube.com/watch?v=IR6sDcKo3V8) -- [iPad with Pi FAQ](https://www.youtube.com/watch?v=SPSlyqo5Q2Q) -- [Technical guide to perform the steps](https://www.geeky-gadgets.com/connect-a-raspberry-pi-4-to-an-ipad-pro-21-01-2020/) - -> Here are my keys to success. I bought a 4" touch screen with fan included that attaches as a case to the Pi. I use the touch screen for anytime I have connection issues, otherwise I turn off the Pi screen. I gave my Pi a network name so I can easily connect at home on wifi or when on go with 1 usb-c cable that supplys both power and network connectivity. Lastly, not all usb-c cables are equal and not all will work so try different usb-c cables if you are going mad (confirm over wifi first then move to cable). -> -> -- [Acker Apple](http://github.com/ackerapple/) - -## Ctrl C Workaround - -There is currently an issue with `ctrl+c` not stopping a running process in the integrated terminal. We have filed an issue upstream and are tracking [here](https://github.com/microsoft/vscode/issues/114009). As a temporary workaround, it works if you manually define the shortcut like so: - -1. Open Command Palette -2. Look for "Preferences: Open Keyboard Shortcuts (JSON)" -3. Add this: - -```json -{ - "key": "ctrl+c", - "command": "workbench.action.terminal.sendSequence", - "args": { - "text": "\u0003" - }, - "when": "terminalFocus" -} -``` - -Source: [StackOverflow](https://stackoverflow.com/a/52735954/3015595) - -## Recommendations - -Once you have code-server accessible to your iPad a few things could help save you time: - -- Use multi task mode to make code changes and see browser at the same time - - Prevents iOs background dropping an App's state if you are full screen switching between code-server and browser -- Be sure you are using the debug/terminal that is built into VS Code so that you donโ€™t need another terminal app running - - Again, prevents switching between full screen app and losing your view to iOs background app memory management -- You should be of a mindset willing to deal and adapt with differences in having an imperfect experience, for the perceived joyful benefits of interacting with your computer in more intuitive ways - -## By 2022 iPad coding more desirable on Arm Macs - -> This section is generalized opinions intended to inform fellow Apple product consumers of perceived over time changes coming down the line - -The general feeling from overall Apple movements recently, is that the Mac arm processors are in fact helping support the direction of having Macs with touch screens. Many great YouTube videos of interest call out highly suggestive evidence. In the past Apple has hard declared reasons of body fatigue and such as why not to encourage nor further developments on the iPad touch experience mixed with a keyboard/mouse/trackpad. Regardless, products and software have been released further supporting just that very experience. - -The iPad coding experience has been a joy for some of us that are willing to trade an imperfect experience for a uniquely effective focus driven experience. Note worthy, some of us think it's a trashy waste of time. This experience is undoubtably going to get better just by the work that can be seen by all parties, even in our own code-server attempt to make it better. - -Lastly, it is note worthy that if you have decided to incorporate a Raspberry Pi into you iPad coding experience, they are Arm processors. You are perfectly lined up with the future of Macs as well. diff --git a/docs/npm.md b/docs/npm.md deleted file mode 100644 index 4ef945fe954d..000000000000 --- a/docs/npm.md +++ /dev/null @@ -1,60 +0,0 @@ - - -# npm Install Requirements - -- [Ubuntu, Debian](#ubuntu-debian) -- [Fedora, CentOS, RHEL](#fedora-centos-rhel) -- [Alpine](#alpine) -- [macOS](#macos) -- [FreeBSD](#freebsd) - - - -If you're installing the npm module you'll need certain dependencies to build the native modules used by VS Code. - -- Node.js: version `>= 12`, `<= 14` - -_Note: the Node.js version requirements are based on the VS Code Node.js requirements. See [here](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites)._ - -Related: - -- [#1633](https://github.com/cdr/code-server/issues/1633) - -## Ubuntu, Debian - -```bash -sudo apt-get install -y \ - build-essential \ - pkg-config \ - python3 -npm config set python python3 -``` - -## Fedora, CentOS, RHEL - -```bash -sudo yum groupinstall -y 'Development Tools' -sudo yum config-manager --set-enabled PowerTools # unnecessary on CentOS 7 -sudo yum install -y python2 -npm config set python python2 -``` - -## Alpine - -```bash -apk add alpine-sdk bash libstdc++ libc6-compat -npm config set python python3 -``` - -## macOS - -```bash -xcode-select --install -``` - -## FreeBSD - -```sh -pkg install -y git python npm-node12 yarn-node12 pkgconf -pkg install -y libinotify -``` diff --git a/docs/termux.md b/docs/termux.md deleted file mode 100644 index ff5f6ff8181f..000000000000 --- a/docs/termux.md +++ /dev/null @@ -1,61 +0,0 @@ - - -# Termux - -- [Termux](#termux) - - [Installation](#installation) - - [Upgrading](#upgrading) - - [Known Issues](#known-issues) - - [Search issue](#search-issue) - - [Backspace not working](#backspace-not-working) - - - -# Termux - -Termux is an Android terminal application and Linux environment, which can also run code-server from your phone. - -## Installation - -1. Install Termux from the [Google Play Store](https://play.google.com/store/apps/details?id=com.termux) -2. Make sure it's up-to-date by running `apt update && apt upgrade` -3. Install required packages: `apt install build-essential python git nodejs yarn` -4. Install code-server: `yarn global add code-server` -5. Run code-server: `code-server` and navigate to localhost:8080 in your browser - -## Upgrading - -To upgrade run: `yarn global upgrade code-server --latest` - -## Known Issues - -### Search issue - -There is a known issue with search not working on Android because it's missing `bin/rg`. To fix: - -1. Install `ripgrep` with `pkg` - ```sh - pkg install ripgrep - ``` -2. Make a soft link using `ln -s` - -```sh -# run this command inside the code-server directory -ln -s $PREFIX/bin/rg ./lib/vscode/node_modules/vscode-ripgrep/bin/rg -``` - -For more context, see [comment](https://github.com/cdr/code-server/issues/1730#issuecomment-721515979). - -### Backspace not working - -There is a known issue with the backspace key not working correctly when using the on-screen keyboard on Android. This is due to an upstream issue. Read more: - -- [Issues with Backspace in Codespaces on Android (Surface Duo)](https://github.com/microsoft/vscode/issues/107602) -- [Support mobile platforms](https://github.com/xtermjs/xterm.js/issues/1101) - -Workaround: use a Bluetooth keyboard. - -For more context, see issues: - -- [500 error: 3.9.2 not working on Android + Termux](https://github.com/cdr/code-server/issues/3036) -- [Document Android backspace issue](https://github.com/cdr/code-server/issues/3079) diff --git a/docs/triage.md b/docs/triage.md deleted file mode 100644 index e508df414c5e..000000000000 --- a/docs/triage.md +++ /dev/null @@ -1,37 +0,0 @@ -# Triage - -## Filter - -Triaging code-server issues is done with the following issue filter: - -``` -is:issue is:open no:project sort:created-asc -label:blocked -label:upstream -label:waiting-for-info -label:extension-request -``` - -This will show issues that: - -1. Are open. -2. Have no assigned project. -3. Are not `blocked` or tagged for work by `upstream` (VS Code core team) - - If an upstream issue is detrimental to the code-server experience we may fix it in - our patch instead of waiting for the VS Code team to fix it. - - Someone should periodically go through these issues to see if they can be unblocked - though! -4. Are not in `waiting-for-info`. -5. Are not extension requests. - -## Process - -1. If an issue is a question/discussion it should be converted into a GitHub discussion. -2. Next, give the issue the appropriate labels and feel free to create new ones if - necessary. - - There are no hard and set rules for labels. We don't have many so look through and - see how they've been used throughout the repository. They all also have descriptions. -3. If more information is required, please ask the submitter and tag as - `waiting-for-info` and wait. -4. Finally, the issue should be moved into the - [code-server](https://github.com/cdr/code-server/projects/1) project where we pick - out issues to fix and track their progress. - -We also use [milestones](https://github.com/cdr/code-server/milestones) to track what -issues are planned/or were closed for what release. diff --git a/lib/vscode/extensions/bat/.vscodeignore b/extensions/bat/.vscodeignore similarity index 100% rename from lib/vscode/extensions/bat/.vscodeignore rename to extensions/bat/.vscodeignore diff --git a/extensions/bat/cgmanifest.json b/extensions/bat/cgmanifest.json new file mode 100644 index 000000000000..7e0426c1387f --- /dev/null +++ b/extensions/bat/cgmanifest.json @@ -0,0 +1,17 @@ +{ + "registrations": [ + { + "component": { + "type": "git", + "git": { + "name": "mmims/language-batchfile", + "repositoryUrl": "https://github.com/mmims/language-batchfile", + "commitHash": "6154ae25a24e01ac9329e7bcf958e093cd8733a9" + } + }, + "license": "MIT", + "version": "0.7.6" + } + ], + "version": 1 +} \ No newline at end of file diff --git a/lib/vscode/extensions/bat/language-configuration.json b/extensions/bat/language-configuration.json similarity index 100% rename from lib/vscode/extensions/bat/language-configuration.json rename to extensions/bat/language-configuration.json diff --git a/lib/vscode/extensions/bat/package.json b/extensions/bat/package.json similarity index 100% rename from lib/vscode/extensions/bat/package.json rename to extensions/bat/package.json diff --git a/lib/vscode/extensions/bat/package.nls.json b/extensions/bat/package.nls.json similarity index 100% rename from lib/vscode/extensions/bat/package.nls.json rename to extensions/bat/package.nls.json diff --git a/lib/vscode/extensions/bat/snippets/batchfile.code-snippets b/extensions/bat/snippets/batchfile.code-snippets similarity index 100% rename from lib/vscode/extensions/bat/snippets/batchfile.code-snippets rename to extensions/bat/snippets/batchfile.code-snippets diff --git a/lib/vscode/extensions/bat/syntaxes/batchfile.tmLanguage.json b/extensions/bat/syntaxes/batchfile.tmLanguage.json similarity index 89% rename from lib/vscode/extensions/bat/syntaxes/batchfile.tmLanguage.json rename to extensions/bat/syntaxes/batchfile.tmLanguage.json index 9eff3c9de2ba..85e03dbc85b0 100644 --- a/lib/vscode/extensions/bat/syntaxes/batchfile.tmLanguage.json +++ b/extensions/bat/syntaxes/batchfile.tmLanguage.json @@ -4,9 +4,18 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/mmims/language-batchfile/commit/95ea8c699f7a8296b15767069868532d52631c46", + "version": "https://github.com/mmims/language-batchfile/commit/6154ae25a24e01ac9329e7bcf958e093cd8733a9", "name": "Batch File", "scopeName": "source.batchfile", + "injections": { + "L:meta.block.repeat.batchfile": { + "patterns": [ + { + "include": "#repeatParameter" + } + ] + } + }, "patterns": [ { "include": "#commands" @@ -46,7 +55,7 @@ "commands": { "patterns": [ { - "match": "(?<=^|[\\s@])(?i:adprep|append|arp|assoc|at|atmadm|attrib|auditpol|autochk|autoconv|autofmt|bcdboot|bcdedit|bdehdcfg|bitsadmin|bootcfg|brea|cacls|cd|certreq|certutil|change|chcp|chdir|chglogon|chgport|chgusr|chkdsk|chkntfs|choice|cipher|clip|cls|clscluadmin|cluster|cmd|cmdkey|cmstp|color|comp|compact|convert|copy|cprofile|cscript|csvde|date|dcdiag|dcgpofix|dcpromo|defra|del|dfscmd|dfsdiag|dfsrmig|diantz|dir|dirquota|diskcomp|diskcopy|diskpart|diskperf|diskraid|diskshadow|dispdiag|doin|dnscmd|doskey|driverquery|dsacls|dsadd|dsamain|dsdbutil|dsget|dsmgmt|dsmod|dsmove|dsquery|dsrm|edit|endlocal|eraseesentutl|eventcreate|eventquery|eventtriggers|evntcmd|expand|extract|fc|filescrn|find|findstr|finger|flattemp|fonde|forfiles|format|freedisk|fsutil|ftp|ftype|fveupdate|getmac|gettype|gpfixup|gpresult|gpupdate|graftabl|hashgen|hep|helpctr|hostname|icacls|iisreset|inuse|ipconfig|ipxroute|irftp|ismserv|jetpack|klist|ksetup|ktmutil|ktpass|label|ldifd|ldp|lodctr|logman|logoff|lpq|lpr|macfile|makecab|manage-bde|mapadmin|md|mkdir|mklink|mmc|mode|more|mount|mountvol|move|mqbup|mqsvc|mqtgsvc|msdt|msg|msiexec|msinfo32|mstsc|nbtstat|net computer|net group|net localgroup|net print|net session|net share|net start|net stop|net use|net user|net view|net|netcfg|netdiag|netdom|netsh|netstat|nfsadmin|nfsshare|nfsstat|nlb|nlbmgr|nltest|nslookup|ntackup|ntcmdprompt|ntdsutil|ntfrsutl|openfiles|pagefileconfig|path|pathping|pause|pbadmin|pentnt|perfmon|ping|pnpunatten|pnputil|popd|powercfg|powershell|powershell_ise|print|prncnfg|prndrvr|prnjobs|prnmngr|prnport|prnqctl|prompt|pubprn|pushd|pushprinterconnections|pwlauncher|qappsrv|qprocess|query|quser|qwinsta|rasdial|rcp|rd|rdpsign|regentc|recover|redircmp|redirusr|reg|regini|regsvr32|relog|ren|rename|rendom|repadmin|repair-bde|replace|reset session|rxec|risetup|rmdir|robocopy|route|rpcinfo|rpcping|rsh|runas|rundll32|rwinsta|scp|sc|schtasks|scwcmd|secedit|serverceipoptin|servrmanagercmd|serverweroptin|setspn|setx|sfc|shadow|shift|showmount|shutdown|sort|ssh|start|storrept|subst|sxstrace|ysocmgr|systeminfo|takeown|tapicfg|taskkill|tasklist|tcmsetup|telnet|tftp|time|timeout|title|tlntadmn|tpmvscmgr|tpmvscmgr|tacerpt|tracert|tree|tscon|tsdiscon|tsecimp|tskill|tsprof|type|typeperf|tzutil|uddiconfig|umount|unlodctr|ver|verifier|verif|vol|vssadmin|w32tm|waitfor|wbadmin|wdsutil|wecutil|wevtutil|where|whoami|winnt|winnt32|winpop|winrm|winrs|winsat|wlbs|mic|wscript|xcopy)(?=$|\\s)", + "match": "(?<=^|[\\s@])(?i:adprep|append|arp|assoc|at|atmadm|attrib|auditpol|autochk|autoconv|autofmt|bcdboot|bcdedit|bdehdcfg|bitsadmin|bootcfg|brea|cacls|cd|certreq|certutil|change|chcp|chdir|chglogon|chgport|chgusr|chkdsk|chkntfs|choice|cipher|clip|cls|clscluadmin|cluster|cmd|cmdkey|cmstp|color|comp|compact|convert|copy|cprofile|cscript|csvde|date|dcdiag|dcgpofix|dcpromo|defra|del|dfscmd|dfsdiag|dfsrmig|diantz|dir|dirquota|diskcomp|diskcopy|diskpart|diskperf|diskraid|diskshadow|dispdiag|doin|dnscmd|doskey|driverquery|dsacls|dsadd|dsamain|dsdbutil|dsget|dsmgmt|dsmod|dsmove|dsquery|dsrm|edit|endlocal|eraseesentutl|eventcreate|eventquery|eventtriggers|evntcmd|expand|extract|fc|filescrn|find|findstr|finger|flattemp|fonde|forfiles|format|freedisk|fsutil|ftp|ftype|fveupdate|getmac|gettype|gpfixup|gpresult|gpupdate|graftabl|hashgen|hep|helpctr|hostname|icacls|iisreset|inuse|ipconfig|ipxroute|irftp|ismserv|jetpack|klist|ksetup|ktmutil|ktpass|label|ldifd|ldp|lodctr|logman|logoff|lpq|lpr|macfile|makecab|manage-bde|mapadmin|md|mkdir|mklink|mmc|mode|more|mount|mountvol|move|mqbup|mqsvc|mqtgsvc|msdt|msg|msiexec|msinfo32|mstsc|nbtstat|net computer|net group|net localgroup|net print|net session|net share|net start|net stop|net use|net user|net view|net|netcfg|netdiag|netdom|netsh|netstat|nfsadmin|nfsshare|nfsstat|nlb|nlbmgr|nltest|nslookup|ntackup|ntcmdprompt|ntdsutil|ntfrsutl|openfiles|pagefileconfig|path|pathping|pause|pbadmin|pentnt|perfmon|ping|pnpunatten|pnputil|popd|powercfg|powershell|powershell_ise|print|prncnfg|prndrvr|prnjobs|prnmngr|prnport|prnqctl|prompt|pubprn|pushd|pushprinterconnections|pwlauncher|qappsrv|qprocess|query|quser|qwinsta|rasdial|rcp|rd|rdpsign|regentc|recover|redircmp|redirusr|reg|regini|regsvr32|relog|ren|rename|rendom|repadmin|repair-bde|replace|reset session|rxec|risetup|rmdir|robocopy|route|rpcinfo|rpcping|rsh|runas|rundll32|rwinsta|sc|schtasks|scp|scwcmd|secedit|serverceipoptin|servrmanagercmd|serverweroptin|setspn|setx|sfc|sftp|shadow|shift|showmount|shutdown|sort|ssh|ssh-add|ssh-agent|ssh-keygen|ssh-keyscan|start|storrept|subst|sxstrace|ysocmgr|systeminfo|takeown|tapicfg|taskkill|tasklist|tcmsetup|telnet|tftp|time|timeout|title|tlntadmn|tpmvscmgr|tpmvscmgr|tacerpt|tracert|tree|tscon|tsdiscon|tsecimp|tskill|tsprof|type|typeperf|tzutil|uddiconfig|umount|unlodctr|ver|verifier|verif|vol|vssadmin|w32tm|waitfor|wbadmin|wdsutil|wecutil|wevtutil|where|whoami|winnt|winnt32|winpop|winrm|winrs|winsat|wlbs|wmic|wscript|wsl|xcopy)(?=$|\\s)", "name": "keyword.command.batchfile" }, { @@ -285,7 +294,7 @@ "name": "keyword.operator.logical.batchfile" }, { - "match": "([^ ][^=]*)(=)", + "match": "([^ =]*)(=)", "captures": { "1": { "name": "variable.other.readwrite.batchfile" @@ -420,8 +429,38 @@ "name": "keyword.control.conditional.batchfile" }, { - "match": "(?<=^|\\s)(?i)for(?=\\s)", - "name": "keyword.control.repeat.batchfile" + "begin": "(?<=^|[\\s(&^])(?i)for(?=\\s)", + "beginCaptures": { + "0": { + "name": "keyword.control.repeat.batchfile" + } + }, + "name": "meta.block.repeat.batchfile", + "end": "\\n", + "patterns": [ + { + "begin": "(?<=[\\s^])(?i)in(?=\\s)", + "beginCaptures": { + "0": { + "name": "keyword.control.repeat.in.batchfile" + } + }, + "end": "(?<=[\\s)^])(?i)do(?=\\s)|\\n", + "endCaptures": { + "0": { + "name": "keyword.control.repeat.do.batchfile" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] } ] }, @@ -436,7 +475,7 @@ "labels": { "patterns": [ { - "match": "(?i)(?:^\\s*|(?<=goto)\\s*)(:)([^+=,;:\\s].*)$", + "match": "(?i)(?:^\\s*|(?<=call|goto)\\s*)(:)([^+=,;:\\s]\\S*)", "captures": { "1": { "name": "punctuation.separator.batchfile" @@ -512,6 +551,19 @@ } ] }, + "repeatParameter": { + "patterns": [ + { + "match": "(%%)(?:(?i:~[fdpnxsatz]*(?:\\$PATH:)?)?[a-zA-Z])", + "captures": { + "1": { + "name": "punctuation.definition.variable.batchfile" + } + }, + "name": "variable.parameter.repeat.batchfile" + } + ] + }, "strings": { "patterns": [ { @@ -546,15 +598,13 @@ "variables": { "patterns": [ { - "match": "(%)((~([fdpnxsatz]|\\$PATH:)*)?\\d|\\*)", + "match": "(%)(?:(?i:~[fdpnxsatz]*(?:\\$PATH:)?)?\\d|\\*)", "captures": { "1": { "name": "punctuation.definition.variable.batchfile" - }, - "2": { - "name": "variable.parameter.batchfile" } - } + }, + "name": "variable.parameter.batchfile" }, { "include": "#variable" diff --git a/lib/vscode/extensions/bat/yarn.lock b/extensions/bat/yarn.lock similarity index 100% rename from lib/vscode/extensions/bat/yarn.lock rename to extensions/bat/yarn.lock diff --git a/lib/vscode/extensions/cgmanifest.json b/extensions/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/cgmanifest.json rename to extensions/cgmanifest.json diff --git a/lib/vscode/extensions/clojure/.vscodeignore b/extensions/clojure/.vscodeignore similarity index 100% rename from lib/vscode/extensions/clojure/.vscodeignore rename to extensions/clojure/.vscodeignore diff --git a/lib/vscode/extensions/clojure/cgmanifest.json b/extensions/clojure/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/clojure/cgmanifest.json rename to extensions/clojure/cgmanifest.json diff --git a/lib/vscode/extensions/clojure/language-configuration.json b/extensions/clojure/language-configuration.json similarity index 100% rename from lib/vscode/extensions/clojure/language-configuration.json rename to extensions/clojure/language-configuration.json diff --git a/lib/vscode/extensions/clojure/package.json b/extensions/clojure/package.json similarity index 100% rename from lib/vscode/extensions/clojure/package.json rename to extensions/clojure/package.json diff --git a/lib/vscode/extensions/clojure/package.nls.json b/extensions/clojure/package.nls.json similarity index 100% rename from lib/vscode/extensions/clojure/package.nls.json rename to extensions/clojure/package.nls.json diff --git a/lib/vscode/extensions/clojure/syntaxes/clojure.tmLanguage.json b/extensions/clojure/syntaxes/clojure.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/clojure/syntaxes/clojure.tmLanguage.json rename to extensions/clojure/syntaxes/clojure.tmLanguage.json diff --git a/lib/vscode/extensions/clojure/yarn.lock b/extensions/clojure/yarn.lock similarity index 100% rename from lib/vscode/extensions/clojure/yarn.lock rename to extensions/clojure/yarn.lock diff --git a/lib/vscode/extensions/coffeescript/.vscodeignore b/extensions/coffeescript/.vscodeignore similarity index 100% rename from lib/vscode/extensions/coffeescript/.vscodeignore rename to extensions/coffeescript/.vscodeignore diff --git a/lib/vscode/extensions/coffeescript/cgmanifest.json b/extensions/coffeescript/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/coffeescript/cgmanifest.json rename to extensions/coffeescript/cgmanifest.json diff --git a/lib/vscode/extensions/coffeescript/language-configuration.json b/extensions/coffeescript/language-configuration.json similarity index 100% rename from lib/vscode/extensions/coffeescript/language-configuration.json rename to extensions/coffeescript/language-configuration.json diff --git a/lib/vscode/extensions/coffeescript/package.json b/extensions/coffeescript/package.json similarity index 100% rename from lib/vscode/extensions/coffeescript/package.json rename to extensions/coffeescript/package.json diff --git a/lib/vscode/extensions/coffeescript/package.nls.json b/extensions/coffeescript/package.nls.json similarity index 100% rename from lib/vscode/extensions/coffeescript/package.nls.json rename to extensions/coffeescript/package.nls.json diff --git a/lib/vscode/extensions/coffeescript/snippets/coffeescript.code-snippets b/extensions/coffeescript/snippets/coffeescript.code-snippets similarity index 100% rename from lib/vscode/extensions/coffeescript/snippets/coffeescript.code-snippets rename to extensions/coffeescript/snippets/coffeescript.code-snippets diff --git a/lib/vscode/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json b/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json rename to extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json diff --git a/lib/vscode/extensions/coffeescript/yarn.lock b/extensions/coffeescript/yarn.lock similarity index 100% rename from lib/vscode/extensions/coffeescript/yarn.lock rename to extensions/coffeescript/yarn.lock diff --git a/lib/vscode/extensions/configuration-editing/.vscodeignore b/extensions/configuration-editing/.vscodeignore similarity index 100% rename from lib/vscode/extensions/configuration-editing/.vscodeignore rename to extensions/configuration-editing/.vscodeignore diff --git a/lib/vscode/extensions/configuration-editing/build/inline-allOf.ts b/extensions/configuration-editing/build/inline-allOf.ts similarity index 100% rename from lib/vscode/extensions/configuration-editing/build/inline-allOf.ts rename to extensions/configuration-editing/build/inline-allOf.ts diff --git a/lib/vscode/extensions/configuration-editing/build/tsconfig.json b/extensions/configuration-editing/build/tsconfig.json similarity index 100% rename from lib/vscode/extensions/configuration-editing/build/tsconfig.json rename to extensions/configuration-editing/build/tsconfig.json diff --git a/lib/vscode/extensions/configuration-editing/extension-browser.webpack.config.js b/extensions/configuration-editing/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/configuration-editing/extension-browser.webpack.config.js rename to extensions/configuration-editing/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/configuration-editing/extension.webpack.config.js b/extensions/configuration-editing/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/configuration-editing/extension.webpack.config.js rename to extensions/configuration-editing/extension.webpack.config.js diff --git a/lib/vscode/extensions/configuration-editing/images/icon.png b/extensions/configuration-editing/images/icon.png similarity index 100% rename from lib/vscode/extensions/configuration-editing/images/icon.png rename to extensions/configuration-editing/images/icon.png diff --git a/extensions/configuration-editing/package.json b/extensions/configuration-editing/package.json new file mode 100644 index 000000000000..80e627e5f939 --- /dev/null +++ b/extensions/configuration-editing/package.json @@ -0,0 +1,148 @@ +{ + "name": "configuration-editing", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "publisher": "vscode", + "license": "MIT", + "engines": { + "vscode": "^1.0.0" + }, + "icon": "images/icon.png", + "activationEvents": [ + "onLanguage:json", + "onLanguage:jsonc" + ], + "main": "./out/configurationEditingMain", + "browser": "./dist/browser/configurationEditingMain", + "scripts": { + "compile": "gulp compile-extension:configuration-editing", + "watch": "gulp watch-extension:configuration-editing" + }, + "dependencies": { + "jsonc-parser": "^2.2.1", + "vscode-nls": "^4.1.1" + }, + "capabilities": { + "virtualWorkspaces": true, + "untrustedWorkspaces": { + "supported": true + } + }, + "contributes": { + "languages": [ + { + "id": "jsonc", + "extensions": [ + ".code-workspace", + "language-configuration.json", + "icon-theme.json", + "color-theme.json", + ".code-snippets" + ], + "filenames": [ + "settings.json", + "launch.json", + "tasks.json", + "keybindings.json", + "extensions.json", + "argv.json", + "profiles.json", + ".devcontainer.json" + ], + "filenamePatterns": [ + "**/.devcontainer/devcontainer.json" + ] + } + ], + "jsonValidation": [ + { + "fileMatch": "vscode://defaultsettings/keybindings.json", + "url": "vscode://schemas/keybindings" + }, + { + "fileMatch": "%APP_SETTINGS_HOME%/keybindings.json", + "url": "vscode://schemas/keybindings" + }, + { + "fileMatch": "vscode://defaultsettings/*.json", + "url": "vscode://schemas/settings/default" + }, + { + "fileMatch": "%APP_SETTINGS_HOME%/settings.json", + "url": "vscode://schemas/settings/user" + }, + { + "fileMatch": "%MACHINE_SETTINGS_HOME%/settings.json", + "url": "vscode://schemas/settings/machine" + }, + { + "fileMatch": "%APP_WORKSPACES_HOME%/*/workspace.json", + "url": "vscode://schemas/workspaceConfig" + }, + { + "fileMatch": "**/*.code-workspace", + "url": "vscode://schemas/workspaceConfig" + }, + { + "fileMatch": "**/argv.json", + "url": "vscode://schemas/argv" + }, + { + "fileMatch": "/.vscode/settings.json", + "url": "vscode://schemas/settings/folder" + }, + { + "fileMatch": "/.vscode/launch.json", + "url": "vscode://schemas/launch" + }, + { + "fileMatch": "/.vscode/tasks.json", + "url": "vscode://schemas/tasks" + }, + { + "fileMatch": "%APP_SETTINGS_HOME%/tasks.json", + "url": "vscode://schemas/tasks" + }, + { + "fileMatch": "%APP_SETTINGS_HOME%/snippets/*.json", + "url": "vscode://schemas/snippets" + }, + { + "fileMatch": "%APP_SETTINGS_HOME%/sync/snippets/preview/*.json", + "url": "vscode://schemas/snippets" + }, + { + "fileMatch": "**/*.code-snippets", + "url": "vscode://schemas/global-snippets" + }, + { + "fileMatch": "/.vscode/extensions.json", + "url": "vscode://schemas/extensions" + }, + { + "fileMatch": "/.devcontainer/devcontainer.json", + "url": "./schemas/devContainer.schema.generated.json" + }, + { + "fileMatch": "/.devcontainer.json", + "url": "./schemas/devContainer.schema.generated.json" + }, + { + "fileMatch": "%APP_SETTINGS_HOME%/globalStorage/ms-vscode-remote.remote-containers/nameConfigs/*.json", + "url": "./schemas/attachContainer.schema.json" + }, + { + "fileMatch": "%APP_SETTINGS_HOME%/globalStorage/ms-vscode-remote.remote-containers/imageConfigs/*.json", + "url": "./schemas/attachContainer.schema.json" + } + ] + }, + "devDependencies": { + "@types/node": "14.x" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/configuration-editing/package.nls.json b/extensions/configuration-editing/package.nls.json similarity index 100% rename from lib/vscode/extensions/configuration-editing/package.nls.json rename to extensions/configuration-editing/package.nls.json diff --git a/lib/vscode/extensions/configuration-editing/schemas/attachContainer.schema.json b/extensions/configuration-editing/schemas/attachContainer.schema.json similarity index 85% rename from lib/vscode/extensions/configuration-editing/schemas/attachContainer.schema.json rename to extensions/configuration-editing/schemas/attachContainer.schema.json index ec765b8fc24b..9cdd3a5f6d36 100644 --- a/lib/vscode/extensions/configuration-editing/schemas/attachContainer.schema.json +++ b/extensions/configuration-editing/schemas/attachContainer.schema.json @@ -54,6 +54,19 @@ "type": "string", "description": "Label that will be shown in the UI for this port.", "default": "Application" + }, + "requireLocalPort": { + "type": "boolean", + "markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.", + "default": false + }, + "protocol": { + "type": "string", + "enum": [ + "http", + "https" + ], + "description": "The protocol to use when forwarding this port." } }, "default": { @@ -80,7 +93,13 @@ "properties": { "onAutoForward": { "type": "string", - "enum": ["notify", "openBrowser", "openPreview", "silent", "ignore"], + "enum": [ + "notify", + "openBrowser", + "openPreview", + "silent", + "ignore" + ], "enumDescriptions": [ "Shows a notification when a port is automatically forwarded.", "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", @@ -100,9 +119,28 @@ "type": "string", "description": "Label that will be shown in the UI for this port.", "default": "Application" + }, + "requireLocalPort": { + "type": "boolean", + "markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.", + "default": false + }, + "protocol": { + "type": "string", + "enum": [ + "http", + "https" + ], + "description": "The protocol to use when forwarding this port." } }, - "defaultSnippets": [{ "body": { "onAutoForward": "ignore" } }], + "defaultSnippets": [ + { + "body": { + "onAutoForward": "ignore" + } + } + ], "markdownDescription": "Set default properties that are applied to all ports that don't get properties from the setting `remote.portsAttributes`. For example:\n\n```\n{\n \"onAutoForward\": \"ignore\"\n}\n```", "additionalProperties": false }, diff --git a/extensions/configuration-editing/schemas/devContainer.schema.generated.json b/extensions/configuration-editing/schemas/devContainer.schema.generated.json new file mode 100644 index 000000000000..095a0e355f13 --- /dev/null +++ b/extensions/configuration-editing/schemas/devContainer.schema.generated.json @@ -0,0 +1,1622 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Defines a dev container", + "allowComments": true, + "allowTrailingCommas": true, + "oneOf": [ + { + "type": "object", + "properties": { + "build": { + "type": "object", + "description": "Docker build-related options.", + "properties": { + "dockerfile": { + "type": "string", + "description": "The location of the Dockerfile that defines the contents of the container. The path is relative to the folder containing the `devcontainer.json` file." + }, + "context": { + "type": "string", + "description": "The location of the context folder for building the Docker image. The path is relative to the folder containing the `devcontainer.json` file." + }, + "target": { + "type": "string", + "description": "Target stage in a multi-stage build." + }, + "args": { + "type": "object", + "additionalProperties": { + "type": [ + "string" + ] + }, + "description": "Build arguments." + } + }, + "required": [ + "dockerfile" + ], + "additionalProperties": false + }, + "appPort": { + "type": [ + "integer", + "string", + "array" + ], + "description": "Application ports that are exposed by the container. This can be a single port or an array of ports. Each port can be a number or a string. A number is mapped to the same port on the host. A string is passed to Docker unchanged and can be used to map ports differently, e.g. \"8000:8010\".", + "items": { + "type": [ + "integer", + "string" + ] + } + }, + "containerEnv": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Container environment variables." + }, + "containerUser": { + "type": "string", + "description": "The user the container will be started with. The default is the user on the Docker image." + }, + "updateRemoteUserUID": { + "type": "boolean", + "description": "Controls whether on Linux the container's user should be updated with the local user's UID and GID. On by default." + }, + "mounts": { + "type": "array", + "description": "Mount points to set up when creating the container. See Docker's documentation for the --mount option for the supported syntax.", + "items": { + "type": "string" + } + }, + "runArgs": { + "type": "array", + "description": "The arguments required when starting in the container.", + "items": { + "type": "string" + } + }, + "shutdownAction": { + "type": "string", + "enum": [ + "none", + "stopContainer" + ], + "description": "Action to take when the VS Code window is closed. The default is to stop the container." + }, + "overrideCommand": { + "type": "boolean", + "description": "Whether to overwrite the command specified in the image. The default is true." + }, + "workspaceFolder": { + "type": "string", + "description": "The path of the workspace folder inside the container." + }, + "workspaceMount": { + "type": "string", + "description": "The --mount parameter for docker run. The default is to mount the project folder at /workspaces/$project." + }, + "name": { + "type": "string", + "description": "A name to show for the workspace folder." + }, + "extensions": { + "type": "array", + "description": "An array of extensions that should be installed into the container.", + "items": { + "type": "string", + "pattern": "^([a-z0-9A-Z][a-z0-9\\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\\-A-Z]*)(@(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)?$", + "errorMessage": "Expected format: '${publisher}.${name}' or '${publisher}.${name}@${version}'. Example: 'ms-dotnettools.csharp'." + } + }, + "settings": { + "$ref": "vscode://schemas/settings/machine", + "description": "Machine specific settings that should be copied into the container. These are only copied when connecting to the container for the first time, rebuilding the container then triggers it again." + }, + "forwardPorts": { + "type": "array", + "description": "Ports that are forwarded from the container to the local machine.", + "items": { + "type": "integer", + "maximum": 65535, + "minimum": 0 + } + }, + "portsAttributes": { + "type": "object", + "patternProperties": { + "(^\\d+(\\-\\d+)?$)|(.+)": { + "type": "object", + "description": "A port, range of ports (ex. \"40000-55000\"), or regular expression (ex. \".+\\\\/server.js\"). For a port number or range, the attributes will apply to that port number or range of port numbers. Attributes which use a regular expression will apply to ports whose associated process command line matches the expression.", + "properties": { + "onAutoForward": { + "type": "string", + "enum": [ + "notify", + "openBrowser", + "openPreview", + "silent", + "ignore" + ], + "enumDescriptions": [ + "Shows a notification when a port is automatically forwarded.", + "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", + "Opens a preview in the same window when the port is automatically forwarded.", + "Shows no notification and takes no action when this port is automatically forwarded.", + "This port will not be automatically forwarded." + ], + "description": "Defines the action that occurs when the port is discovered for automatic forwarding", + "default": "notify" + }, + "elevateIfNeeded": { + "type": "boolean", + "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", + "default": false + }, + "label": { + "type": "string", + "description": "Label that will be shown in the UI for this port.", + "default": "Application" + }, + "requireLocalPort": { + "type": "boolean", + "markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.", + "default": false + }, + "protocol": { + "type": "string", + "enum": [ + "http", + "https" + ], + "description": "The protocol to use when forwarding this port." + } + }, + "default": { + "label": "Application", + "onAutoForward": "notify" + }, + "additionalProperties": false + } + }, + "markdownDescription": "Set default properties that are applied when a specific port number is forwarded. For example:\n\n```\n\"3000\": {\n \"label\": \"Application\"\n},\n\"40000-55000\": {\n \"onAutoForward\": \"ignore\"\n},\n\".+\\\\/server.js\": {\n \"onAutoForward\": \"openPreview\"\n}\n```", + "defaultSnippets": [ + { + "body": { + "${1:3000}": { + "label": "${2:Application}", + "onAutoForward": "notify" + } + } + } + ], + "additionalProperties": false + }, + "otherPortsAttributes": { + "type": "object", + "properties": { + "onAutoForward": { + "type": "string", + "enum": [ + "notify", + "openBrowser", + "openPreview", + "silent", + "ignore" + ], + "enumDescriptions": [ + "Shows a notification when a port is automatically forwarded.", + "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", + "Opens a preview in the same window when the port is automatically forwarded.", + "Shows no notification and takes no action when this port is automatically forwarded.", + "This port will not be automatically forwarded." + ], + "description": "Defines the action that occurs when the port is discovered for automatic forwarding", + "default": "notify" + }, + "elevateIfNeeded": { + "type": "boolean", + "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", + "default": false + }, + "label": { + "type": "string", + "description": "Label that will be shown in the UI for this port.", + "default": "Application" + }, + "requireLocalPort": { + "type": "boolean", + "markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.", + "default": false + }, + "protocol": { + "type": "string", + "enum": [ + "http", + "https" + ], + "description": "The protocol to use when forwarding this port." + } + }, + "defaultSnippets": [ + { + "body": { + "onAutoForward": "ignore" + } + } + ], + "markdownDescription": "Set default properties that are applied to all ports that don't get properties from the setting `remote.portsAttributes`. For example:\n\n```\n{\n \"onAutoForward\": \"ignore\"\n}\n```", + "additionalProperties": false + }, + "remoteEnv": { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "null" + ] + }, + "description": "Remote environment variables. If these are used in the Integrated Terminal, make sure the 'Terminal > Integrated: Inherit Env' setting is enabled." + }, + "remoteUser": { + "type": "string", + "description": "The user VS Code Server will be started with. The default is the same user as the container." + }, + "initializeCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run locally before anything else. This command is run before \"onCreateCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "onCreateCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when creating the container. This command is run after \"initializeCommand\" and before \"updateContentCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "updateContentCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when creating the container and rerun when the workspace content was updated while creating the container. This command is run after \"onCreateCommand\" and before \"postCreateCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postCreateCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run after creating the container. This command is run after \"updateContentCommand\" and before \"postStartCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postStartCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run after starting the container. This command is run after \"postCreateCommand\" and before \"postAttachCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postAttachCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when attaching to the container. This command is run after \"postStartCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "waitFor": { + "type": "string", + "enum": [ + "initializeCommand", + "onCreateCommand", + "updateContentCommand", + "postCreateCommand", + "postStartCommand", + "postAttachCommand" + ], + "description": "The user command to wait for before continuing execution in the background while the UI is starting up. The default is \"updateContentCommand\"." + }, + "devPort": { + "type": "integer", + "description": "The port VS Code can use to connect to its backend." + }, + "userEnvProbe": { + "type": "string", + "enum": [ + "none", + "loginShell", + "loginInteractiveShell", + "interactiveShell" + ], + "description": "User environment probe to run. The default is none." + }, + "codespaces": { + "type": "object", + "additionalProperties": true, + "description": "Codespaces-specific configuration." + } + }, + "required": [ + "build" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "dockerFile": { + "type": "string", + "description": "The location of the Dockerfile that defines the contents of the container. The path is relative to the folder containing the `devcontainer.json` file." + }, + "context": { + "type": "string", + "description": "The location of the context folder for building the Docker image. The path is relative to the folder containing the `devcontainer.json` file." + }, + "build": { + "description": "Docker build-related options.", + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "Target stage in a multi-stage build." + }, + "args": { + "type": "object", + "additionalProperties": { + "type": [ + "string" + ] + }, + "description": "Build arguments." + } + }, + "additionalProperties": false + }, + "appPort": { + "type": [ + "integer", + "string", + "array" + ], + "description": "Application ports that are exposed by the container. This can be a single port or an array of ports. Each port can be a number or a string. A number is mapped to the same port on the host. A string is passed to Docker unchanged and can be used to map ports differently, e.g. \"8000:8010\".", + "items": { + "type": [ + "integer", + "string" + ] + } + }, + "containerEnv": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Container environment variables." + }, + "containerUser": { + "type": "string", + "description": "The user the container will be started with. The default is the user on the Docker image." + }, + "updateRemoteUserUID": { + "type": "boolean", + "description": "Controls whether on Linux the container's user should be updated with the local user's UID and GID. On by default." + }, + "mounts": { + "type": "array", + "description": "Mount points to set up when creating the container. See Docker's documentation for the --mount option for the supported syntax.", + "items": { + "type": "string" + } + }, + "runArgs": { + "type": "array", + "description": "The arguments required when starting in the container.", + "items": { + "type": "string" + } + }, + "shutdownAction": { + "type": "string", + "enum": [ + "none", + "stopContainer" + ], + "description": "Action to take when the VS Code window is closed. The default is to stop the container." + }, + "overrideCommand": { + "type": "boolean", + "description": "Whether to overwrite the command specified in the image. The default is true." + }, + "workspaceFolder": { + "type": "string", + "description": "The path of the workspace folder inside the container." + }, + "workspaceMount": { + "type": "string", + "description": "The --mount parameter for docker run. The default is to mount the project folder at /workspaces/$project." + }, + "name": { + "type": "string", + "description": "A name to show for the workspace folder." + }, + "extensions": { + "type": "array", + "description": "An array of extensions that should be installed into the container.", + "items": { + "type": "string", + "pattern": "^([a-z0-9A-Z][a-z0-9\\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\\-A-Z]*)(@(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)?$", + "errorMessage": "Expected format: '${publisher}.${name}' or '${publisher}.${name}@${version}'. Example: 'ms-dotnettools.csharp'." + } + }, + "settings": { + "$ref": "vscode://schemas/settings/machine", + "description": "Machine specific settings that should be copied into the container. These are only copied when connecting to the container for the first time, rebuilding the container then triggers it again." + }, + "forwardPorts": { + "type": "array", + "description": "Ports that are forwarded from the container to the local machine.", + "items": { + "type": "integer", + "maximum": 65535, + "minimum": 0 + } + }, + "portsAttributes": { + "type": "object", + "patternProperties": { + "(^\\d+(\\-\\d+)?$)|(.+)": { + "type": "object", + "description": "A port, range of ports (ex. \"40000-55000\"), or regular expression (ex. \".+\\\\/server.js\"). For a port number or range, the attributes will apply to that port number or range of port numbers. Attributes which use a regular expression will apply to ports whose associated process command line matches the expression.", + "properties": { + "onAutoForward": { + "type": "string", + "enum": [ + "notify", + "openBrowser", + "openPreview", + "silent", + "ignore" + ], + "enumDescriptions": [ + "Shows a notification when a port is automatically forwarded.", + "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", + "Opens a preview in the same window when the port is automatically forwarded.", + "Shows no notification and takes no action when this port is automatically forwarded.", + "This port will not be automatically forwarded." + ], + "description": "Defines the action that occurs when the port is discovered for automatic forwarding", + "default": "notify" + }, + "elevateIfNeeded": { + "type": "boolean", + "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", + "default": false + }, + "label": { + "type": "string", + "description": "Label that will be shown in the UI for this port.", + "default": "Application" + }, + "requireLocalPort": { + "type": "boolean", + "markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.", + "default": false + }, + "protocol": { + "type": "string", + "enum": [ + "http", + "https" + ], + "description": "The protocol to use when forwarding this port." + } + }, + "default": { + "label": "Application", + "onAutoForward": "notify" + }, + "additionalProperties": false + } + }, + "markdownDescription": "Set default properties that are applied when a specific port number is forwarded. For example:\n\n```\n\"3000\": {\n \"label\": \"Application\"\n},\n\"40000-55000\": {\n \"onAutoForward\": \"ignore\"\n},\n\".+\\\\/server.js\": {\n \"onAutoForward\": \"openPreview\"\n}\n```", + "defaultSnippets": [ + { + "body": { + "${1:3000}": { + "label": "${2:Application}", + "onAutoForward": "notify" + } + } + } + ], + "additionalProperties": false + }, + "otherPortsAttributes": { + "type": "object", + "properties": { + "onAutoForward": { + "type": "string", + "enum": [ + "notify", + "openBrowser", + "openPreview", + "silent", + "ignore" + ], + "enumDescriptions": [ + "Shows a notification when a port is automatically forwarded.", + "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", + "Opens a preview in the same window when the port is automatically forwarded.", + "Shows no notification and takes no action when this port is automatically forwarded.", + "This port will not be automatically forwarded." + ], + "description": "Defines the action that occurs when the port is discovered for automatic forwarding", + "default": "notify" + }, + "elevateIfNeeded": { + "type": "boolean", + "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", + "default": false + }, + "label": { + "type": "string", + "description": "Label that will be shown in the UI for this port.", + "default": "Application" + }, + "requireLocalPort": { + "type": "boolean", + "markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.", + "default": false + }, + "protocol": { + "type": "string", + "enum": [ + "http", + "https" + ], + "description": "The protocol to use when forwarding this port." + } + }, + "defaultSnippets": [ + { + "body": { + "onAutoForward": "ignore" + } + } + ], + "markdownDescription": "Set default properties that are applied to all ports that don't get properties from the setting `remote.portsAttributes`. For example:\n\n```\n{\n \"onAutoForward\": \"ignore\"\n}\n```", + "additionalProperties": false + }, + "remoteEnv": { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "null" + ] + }, + "description": "Remote environment variables. If these are used in the Integrated Terminal, make sure the 'Terminal > Integrated: Inherit Env' setting is enabled." + }, + "remoteUser": { + "type": "string", + "description": "The user VS Code Server will be started with. The default is the same user as the container." + }, + "initializeCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run locally before anything else. This command is run before \"onCreateCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "onCreateCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when creating the container. This command is run after \"initializeCommand\" and before \"updateContentCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "updateContentCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when creating the container and rerun when the workspace content was updated while creating the container. This command is run after \"onCreateCommand\" and before \"postCreateCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postCreateCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run after creating the container. This command is run after \"updateContentCommand\" and before \"postStartCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postStartCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run after starting the container. This command is run after \"postCreateCommand\" and before \"postAttachCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postAttachCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when attaching to the container. This command is run after \"postStartCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "waitFor": { + "type": "string", + "enum": [ + "initializeCommand", + "onCreateCommand", + "updateContentCommand", + "postCreateCommand", + "postStartCommand", + "postAttachCommand" + ], + "description": "The user command to wait for before continuing execution in the background while the UI is starting up. The default is \"updateContentCommand\"." + }, + "devPort": { + "type": "integer", + "description": "The port VS Code can use to connect to its backend." + }, + "userEnvProbe": { + "type": "string", + "enum": [ + "none", + "loginShell", + "loginInteractiveShell", + "interactiveShell" + ], + "description": "User environment probe to run. The default is none." + }, + "codespaces": { + "type": "object", + "additionalProperties": true, + "description": "Codespaces-specific configuration." + } + }, + "required": [ + "dockerFile" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "image": { + "type": "string", + "description": "The docker image that will be used to create the container." + }, + "appPort": { + "type": [ + "integer", + "string", + "array" + ], + "description": "Application ports that are exposed by the container. This can be a single port or an array of ports. Each port can be a number or a string. A number is mapped to the same port on the host. A string is passed to Docker unchanged and can be used to map ports differently, e.g. \"8000:8010\".", + "items": { + "type": [ + "integer", + "string" + ] + } + }, + "containerEnv": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Container environment variables." + }, + "containerUser": { + "type": "string", + "description": "The user the container will be started with. The default is the user on the Docker image." + }, + "updateRemoteUserUID": { + "type": "boolean", + "description": "Controls whether on Linux the container's user should be updated with the local user's UID and GID. On by default." + }, + "mounts": { + "type": "array", + "description": "Mount points to set up when creating the container. See Docker's documentation for the --mount option for the supported syntax.", + "items": { + "type": "string" + } + }, + "runArgs": { + "type": "array", + "description": "The arguments required when starting in the container.", + "items": { + "type": "string" + } + }, + "shutdownAction": { + "type": "string", + "enum": [ + "none", + "stopContainer" + ], + "description": "Action to take when the VS Code window is closed. The default is to stop the container." + }, + "overrideCommand": { + "type": "boolean", + "description": "Whether to overwrite the command specified in the image. The default is true." + }, + "workspaceFolder": { + "type": "string", + "description": "The path of the workspace folder inside the container." + }, + "workspaceMount": { + "type": "string", + "description": "The --mount parameter for docker run. The default is to mount the project folder at /workspaces/$project." + }, + "name": { + "type": "string", + "description": "A name to show for the workspace folder." + }, + "extensions": { + "type": "array", + "description": "An array of extensions that should be installed into the container.", + "items": { + "type": "string", + "pattern": "^([a-z0-9A-Z][a-z0-9\\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\\-A-Z]*)(@(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)?$", + "errorMessage": "Expected format: '${publisher}.${name}' or '${publisher}.${name}@${version}'. Example: 'ms-dotnettools.csharp'." + } + }, + "settings": { + "$ref": "vscode://schemas/settings/machine", + "description": "Machine specific settings that should be copied into the container. These are only copied when connecting to the container for the first time, rebuilding the container then triggers it again." + }, + "forwardPorts": { + "type": "array", + "description": "Ports that are forwarded from the container to the local machine.", + "items": { + "type": "integer", + "maximum": 65535, + "minimum": 0 + } + }, + "portsAttributes": { + "type": "object", + "patternProperties": { + "(^\\d+(\\-\\d+)?$)|(.+)": { + "type": "object", + "description": "A port, range of ports (ex. \"40000-55000\"), or regular expression (ex. \".+\\\\/server.js\"). For a port number or range, the attributes will apply to that port number or range of port numbers. Attributes which use a regular expression will apply to ports whose associated process command line matches the expression.", + "properties": { + "onAutoForward": { + "type": "string", + "enum": [ + "notify", + "openBrowser", + "openPreview", + "silent", + "ignore" + ], + "enumDescriptions": [ + "Shows a notification when a port is automatically forwarded.", + "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", + "Opens a preview in the same window when the port is automatically forwarded.", + "Shows no notification and takes no action when this port is automatically forwarded.", + "This port will not be automatically forwarded." + ], + "description": "Defines the action that occurs when the port is discovered for automatic forwarding", + "default": "notify" + }, + "elevateIfNeeded": { + "type": "boolean", + "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", + "default": false + }, + "label": { + "type": "string", + "description": "Label that will be shown in the UI for this port.", + "default": "Application" + }, + "requireLocalPort": { + "type": "boolean", + "markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.", + "default": false + }, + "protocol": { + "type": "string", + "enum": [ + "http", + "https" + ], + "description": "The protocol to use when forwarding this port." + } + }, + "default": { + "label": "Application", + "onAutoForward": "notify" + }, + "additionalProperties": false + } + }, + "markdownDescription": "Set default properties that are applied when a specific port number is forwarded. For example:\n\n```\n\"3000\": {\n \"label\": \"Application\"\n},\n\"40000-55000\": {\n \"onAutoForward\": \"ignore\"\n},\n\".+\\\\/server.js\": {\n \"onAutoForward\": \"openPreview\"\n}\n```", + "defaultSnippets": [ + { + "body": { + "${1:3000}": { + "label": "${2:Application}", + "onAutoForward": "notify" + } + } + } + ], + "additionalProperties": false + }, + "otherPortsAttributes": { + "type": "object", + "properties": { + "onAutoForward": { + "type": "string", + "enum": [ + "notify", + "openBrowser", + "openPreview", + "silent", + "ignore" + ], + "enumDescriptions": [ + "Shows a notification when a port is automatically forwarded.", + "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", + "Opens a preview in the same window when the port is automatically forwarded.", + "Shows no notification and takes no action when this port is automatically forwarded.", + "This port will not be automatically forwarded." + ], + "description": "Defines the action that occurs when the port is discovered for automatic forwarding", + "default": "notify" + }, + "elevateIfNeeded": { + "type": "boolean", + "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", + "default": false + }, + "label": { + "type": "string", + "description": "Label that will be shown in the UI for this port.", + "default": "Application" + }, + "requireLocalPort": { + "type": "boolean", + "markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.", + "default": false + }, + "protocol": { + "type": "string", + "enum": [ + "http", + "https" + ], + "description": "The protocol to use when forwarding this port." + } + }, + "defaultSnippets": [ + { + "body": { + "onAutoForward": "ignore" + } + } + ], + "markdownDescription": "Set default properties that are applied to all ports that don't get properties from the setting `remote.portsAttributes`. For example:\n\n```\n{\n \"onAutoForward\": \"ignore\"\n}\n```", + "additionalProperties": false + }, + "remoteEnv": { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "null" + ] + }, + "description": "Remote environment variables. If these are used in the Integrated Terminal, make sure the 'Terminal > Integrated: Inherit Env' setting is enabled." + }, + "remoteUser": { + "type": "string", + "description": "The user VS Code Server will be started with. The default is the same user as the container." + }, + "initializeCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run locally before anything else. This command is run before \"onCreateCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "onCreateCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when creating the container. This command is run after \"initializeCommand\" and before \"updateContentCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "updateContentCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when creating the container and rerun when the workspace content was updated while creating the container. This command is run after \"onCreateCommand\" and before \"postCreateCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postCreateCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run after creating the container. This command is run after \"updateContentCommand\" and before \"postStartCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postStartCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run after starting the container. This command is run after \"postCreateCommand\" and before \"postAttachCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postAttachCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when attaching to the container. This command is run after \"postStartCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "waitFor": { + "type": "string", + "enum": [ + "initializeCommand", + "onCreateCommand", + "updateContentCommand", + "postCreateCommand", + "postStartCommand", + "postAttachCommand" + ], + "description": "The user command to wait for before continuing execution in the background while the UI is starting up. The default is \"updateContentCommand\"." + }, + "devPort": { + "type": "integer", + "description": "The port VS Code can use to connect to its backend." + }, + "userEnvProbe": { + "type": "string", + "enum": [ + "none", + "loginShell", + "loginInteractiveShell", + "interactiveShell" + ], + "description": "User environment probe to run. The default is none." + }, + "codespaces": { + "type": "object", + "additionalProperties": true, + "description": "Codespaces-specific configuration." + } + }, + "required": [ + "image" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "dockerComposeFile": { + "type": [ + "string", + "array" + ], + "description": "The name of the docker-compose file(s) used to start the services.", + "items": { + "type": "string" + } + }, + "service": { + "type": "string", + "description": "The service you want to work on." + }, + "runServices": { + "type": "array", + "description": "An array of services that should be started and stopped.", + "items": { + "type": "string" + } + }, + "workspaceFolder": { + "type": "string", + "description": "The path of the workspace folder inside the container. This is typically the target path of a volume mount in the docker-compose.yml." + }, + "shutdownAction": { + "type": "string", + "enum": [ + "none", + "stopCompose" + ], + "description": "Action to take when the VS Code window is closed. The default is to stop the containers." + }, + "name": { + "type": "string", + "description": "A name to show for the workspace folder." + }, + "extensions": { + "type": "array", + "description": "An array of extensions that should be installed into the container.", + "items": { + "type": "string", + "pattern": "^([a-z0-9A-Z][a-z0-9\\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\\-A-Z]*)(@(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)?$", + "errorMessage": "Expected format: '${publisher}.${name}' or '${publisher}.${name}@${version}'. Example: 'ms-dotnettools.csharp'." + } + }, + "settings": { + "$ref": "vscode://schemas/settings/machine", + "description": "Machine specific settings that should be copied into the container. These are only copied when connecting to the container for the first time, rebuilding the container then triggers it again." + }, + "forwardPorts": { + "type": "array", + "description": "Ports that are forwarded from the container to the local machine.", + "items": { + "type": "integer", + "maximum": 65535, + "minimum": 0 + } + }, + "portsAttributes": { + "type": "object", + "patternProperties": { + "(^\\d+(\\-\\d+)?$)|(.+)": { + "type": "object", + "description": "A port, range of ports (ex. \"40000-55000\"), or regular expression (ex. \".+\\\\/server.js\"). For a port number or range, the attributes will apply to that port number or range of port numbers. Attributes which use a regular expression will apply to ports whose associated process command line matches the expression.", + "properties": { + "onAutoForward": { + "type": "string", + "enum": [ + "notify", + "openBrowser", + "openPreview", + "silent", + "ignore" + ], + "enumDescriptions": [ + "Shows a notification when a port is automatically forwarded.", + "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", + "Opens a preview in the same window when the port is automatically forwarded.", + "Shows no notification and takes no action when this port is automatically forwarded.", + "This port will not be automatically forwarded." + ], + "description": "Defines the action that occurs when the port is discovered for automatic forwarding", + "default": "notify" + }, + "elevateIfNeeded": { + "type": "boolean", + "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", + "default": false + }, + "label": { + "type": "string", + "description": "Label that will be shown in the UI for this port.", + "default": "Application" + }, + "requireLocalPort": { + "type": "boolean", + "markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.", + "default": false + }, + "protocol": { + "type": "string", + "enum": [ + "http", + "https" + ], + "description": "The protocol to use when forwarding this port." + } + }, + "default": { + "label": "Application", + "onAutoForward": "notify" + }, + "additionalProperties": false + } + }, + "markdownDescription": "Set default properties that are applied when a specific port number is forwarded. For example:\n\n```\n\"3000\": {\n \"label\": \"Application\"\n},\n\"40000-55000\": {\n \"onAutoForward\": \"ignore\"\n},\n\".+\\\\/server.js\": {\n \"onAutoForward\": \"openPreview\"\n}\n```", + "defaultSnippets": [ + { + "body": { + "${1:3000}": { + "label": "${2:Application}", + "onAutoForward": "notify" + } + } + } + ], + "additionalProperties": false + }, + "otherPortsAttributes": { + "type": "object", + "properties": { + "onAutoForward": { + "type": "string", + "enum": [ + "notify", + "openBrowser", + "openPreview", + "silent", + "ignore" + ], + "enumDescriptions": [ + "Shows a notification when a port is automatically forwarded.", + "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", + "Opens a preview in the same window when the port is automatically forwarded.", + "Shows no notification and takes no action when this port is automatically forwarded.", + "This port will not be automatically forwarded." + ], + "description": "Defines the action that occurs when the port is discovered for automatic forwarding", + "default": "notify" + }, + "elevateIfNeeded": { + "type": "boolean", + "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", + "default": false + }, + "label": { + "type": "string", + "description": "Label that will be shown in the UI for this port.", + "default": "Application" + }, + "requireLocalPort": { + "type": "boolean", + "markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.", + "default": false + }, + "protocol": { + "type": "string", + "enum": [ + "http", + "https" + ], + "description": "The protocol to use when forwarding this port." + } + }, + "defaultSnippets": [ + { + "body": { + "onAutoForward": "ignore" + } + } + ], + "markdownDescription": "Set default properties that are applied to all ports that don't get properties from the setting `remote.portsAttributes`. For example:\n\n```\n{\n \"onAutoForward\": \"ignore\"\n}\n```", + "additionalProperties": false + }, + "remoteEnv": { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "null" + ] + }, + "description": "Remote environment variables. If these are used in the Integrated Terminal, make sure the 'Terminal > Integrated: Inherit Env' setting is enabled." + }, + "remoteUser": { + "type": "string", + "description": "The user VS Code Server will be started with. The default is the same user as the container." + }, + "initializeCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run locally before anything else. This command is run before \"onCreateCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "onCreateCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when creating the container. This command is run after \"initializeCommand\" and before \"updateContentCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "updateContentCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when creating the container and rerun when the workspace content was updated while creating the container. This command is run after \"onCreateCommand\" and before \"postCreateCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postCreateCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run after creating the container. This command is run after \"updateContentCommand\" and before \"postStartCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postStartCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run after starting the container. This command is run after \"postCreateCommand\" and before \"postAttachCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postAttachCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when attaching to the container. This command is run after \"postStartCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "waitFor": { + "type": "string", + "enum": [ + "initializeCommand", + "onCreateCommand", + "updateContentCommand", + "postCreateCommand", + "postStartCommand", + "postAttachCommand" + ], + "description": "The user command to wait for before continuing execution in the background while the UI is starting up. The default is \"updateContentCommand\"." + }, + "devPort": { + "type": "integer", + "description": "The port VS Code can use to connect to its backend." + }, + "userEnvProbe": { + "type": "string", + "enum": [ + "none", + "loginShell", + "loginInteractiveShell", + "interactiveShell" + ], + "description": "User environment probe to run. The default is none." + }, + "codespaces": { + "type": "object", + "additionalProperties": true, + "description": "Codespaces-specific configuration." + } + }, + "required": [ + "dockerComposeFile", + "service", + "workspaceFolder" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A name to show for the workspace folder." + }, + "extensions": { + "type": "array", + "description": "An array of extensions that should be installed into the container.", + "items": { + "type": "string", + "pattern": "^([a-z0-9A-Z][a-z0-9\\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\\-A-Z]*)(@(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)?$", + "errorMessage": "Expected format: '${publisher}.${name}' or '${publisher}.${name}@${version}'. Example: 'ms-dotnettools.csharp'." + } + }, + "settings": { + "$ref": "vscode://schemas/settings/machine", + "description": "Machine specific settings that should be copied into the container. These are only copied when connecting to the container for the first time, rebuilding the container then triggers it again." + }, + "forwardPorts": { + "type": "array", + "description": "Ports that are forwarded from the container to the local machine.", + "items": { + "type": "integer", + "maximum": 65535, + "minimum": 0 + } + }, + "portsAttributes": { + "type": "object", + "patternProperties": { + "(^\\d+(\\-\\d+)?$)|(.+)": { + "type": "object", + "description": "A port, range of ports (ex. \"40000-55000\"), or regular expression (ex. \".+\\\\/server.js\"). For a port number or range, the attributes will apply to that port number or range of port numbers. Attributes which use a regular expression will apply to ports whose associated process command line matches the expression.", + "properties": { + "onAutoForward": { + "type": "string", + "enum": [ + "notify", + "openBrowser", + "openPreview", + "silent", + "ignore" + ], + "enumDescriptions": [ + "Shows a notification when a port is automatically forwarded.", + "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", + "Opens a preview in the same window when the port is automatically forwarded.", + "Shows no notification and takes no action when this port is automatically forwarded.", + "This port will not be automatically forwarded." + ], + "description": "Defines the action that occurs when the port is discovered for automatic forwarding", + "default": "notify" + }, + "elevateIfNeeded": { + "type": "boolean", + "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", + "default": false + }, + "label": { + "type": "string", + "description": "Label that will be shown in the UI for this port.", + "default": "Application" + }, + "requireLocalPort": { + "type": "boolean", + "markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.", + "default": false + }, + "protocol": { + "type": "string", + "enum": [ + "http", + "https" + ], + "description": "The protocol to use when forwarding this port." + } + }, + "default": { + "label": "Application", + "onAutoForward": "notify" + }, + "additionalProperties": false + } + }, + "markdownDescription": "Set default properties that are applied when a specific port number is forwarded. For example:\n\n```\n\"3000\": {\n \"label\": \"Application\"\n},\n\"40000-55000\": {\n \"onAutoForward\": \"ignore\"\n},\n\".+\\\\/server.js\": {\n \"onAutoForward\": \"openPreview\"\n}\n```", + "defaultSnippets": [ + { + "body": { + "${1:3000}": { + "label": "${2:Application}", + "onAutoForward": "notify" + } + } + } + ], + "additionalProperties": false + }, + "otherPortsAttributes": { + "type": "object", + "properties": { + "onAutoForward": { + "type": "string", + "enum": [ + "notify", + "openBrowser", + "openPreview", + "silent", + "ignore" + ], + "enumDescriptions": [ + "Shows a notification when a port is automatically forwarded.", + "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", + "Opens a preview in the same window when the port is automatically forwarded.", + "Shows no notification and takes no action when this port is automatically forwarded.", + "This port will not be automatically forwarded." + ], + "description": "Defines the action that occurs when the port is discovered for automatic forwarding", + "default": "notify" + }, + "elevateIfNeeded": { + "type": "boolean", + "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", + "default": false + }, + "label": { + "type": "string", + "description": "Label that will be shown in the UI for this port.", + "default": "Application" + }, + "requireLocalPort": { + "type": "boolean", + "markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.", + "default": false + }, + "protocol": { + "type": "string", + "enum": [ + "http", + "https" + ], + "description": "The protocol to use when forwarding this port." + } + }, + "defaultSnippets": [ + { + "body": { + "onAutoForward": "ignore" + } + } + ], + "markdownDescription": "Set default properties that are applied to all ports that don't get properties from the setting `remote.portsAttributes`. For example:\n\n```\n{\n \"onAutoForward\": \"ignore\"\n}\n```", + "additionalProperties": false + }, + "remoteEnv": { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "null" + ] + }, + "description": "Remote environment variables. If these are used in the Integrated Terminal, make sure the 'Terminal > Integrated: Inherit Env' setting is enabled." + }, + "remoteUser": { + "type": "string", + "description": "The user VS Code Server will be started with. The default is the same user as the container." + }, + "initializeCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run locally before anything else. This command is run before \"onCreateCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "onCreateCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when creating the container. This command is run after \"initializeCommand\" and before \"updateContentCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "updateContentCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when creating the container and rerun when the workspace content was updated while creating the container. This command is run after \"onCreateCommand\" and before \"postCreateCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postCreateCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run after creating the container. This command is run after \"updateContentCommand\" and before \"postStartCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postStartCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run after starting the container. This command is run after \"postCreateCommand\" and before \"postAttachCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "postAttachCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when attaching to the container. This command is run after \"postStartCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "waitFor": { + "type": "string", + "enum": [ + "initializeCommand", + "onCreateCommand", + "updateContentCommand", + "postCreateCommand", + "postStartCommand", + "postAttachCommand" + ], + "description": "The user command to wait for before continuing execution in the background while the UI is starting up. The default is \"updateContentCommand\"." + }, + "devPort": { + "type": "integer", + "description": "The port VS Code can use to connect to its backend." + }, + "userEnvProbe": { + "type": "string", + "enum": [ + "none", + "loginShell", + "loginInteractiveShell", + "interactiveShell" + ], + "description": "User environment probe to run. The default is none." + }, + "codespaces": { + "type": "object", + "additionalProperties": true, + "description": "Codespaces-specific configuration." + } + }, + "additionalProperties": false + } + ] +} \ No newline at end of file diff --git a/lib/vscode/extensions/configuration-editing/schemas/devContainer.schema.src.json b/extensions/configuration-editing/schemas/devContainer.schema.src.json similarity index 82% rename from lib/vscode/extensions/configuration-editing/schemas/devContainer.schema.src.json rename to extensions/configuration-editing/schemas/devContainer.schema.src.json index 2987aad16c5a..3d1536fa7437 100644 --- a/lib/vscode/extensions/configuration-editing/schemas/devContainer.schema.src.json +++ b/extensions/configuration-editing/schemas/devContainer.schema.src.json @@ -68,6 +68,16 @@ "type": "string", "description": "Label that will be shown in the UI for this port.", "default": "Application" + }, + "requireLocalPort": { + "type": "boolean", + "markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.", + "default": false + }, + "protocol": { + "type": "string", + "enum": ["http", "https"], + "description": "The protocol to use when forwarding this port." } }, "default": { @@ -120,6 +130,16 @@ "type": "string", "description": "Label that will be shown in the UI for this port.", "default": "Application" + }, + "requireLocalPort": { + "type": "boolean", + "markdownDescription": "When true, a modal dialog will show if the chosen local port isn't used for forwarding.", + "default": false + }, + "protocol": { + "type": "string", + "enum": ["http", "https"], + "description": "The protocol to use when forwarding this port." } }, "defaultSnippets": [ @@ -151,7 +171,27 @@ "string", "array" ], - "description": "A command to run locally before anything else. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "description": "A command to run locally before anything else. This command is run before \"onCreateCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "onCreateCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when creating the container. This command is run after \"initializeCommand\" and before \"updateContentCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "items": { + "type": "string" + } + }, + "updateContentCommand": { + "type": [ + "string", + "array" + ], + "description": "A command to run when creating the container and rerun when the workspace content was updated while creating the container. This command is run after \"onCreateCommand\" and before \"postCreateCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", "items": { "type": "string" } @@ -161,7 +201,7 @@ "string", "array" ], - "description": "A command to run after creating the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "description": "A command to run after creating the container. This command is run after \"updateContentCommand\" and before \"postStartCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", "items": { "type": "string" } @@ -171,7 +211,7 @@ "string", "array" ], - "description": "A command to run after starting the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "description": "A command to run after starting the container. This command is run after \"postCreateCommand\" and before \"postAttachCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", "items": { "type": "string" } @@ -181,11 +221,23 @@ "string", "array" ], - "description": "A command to run after attaching to the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", + "description": "A command to run when attaching to the container. This command is run after \"postStartCommand\". If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", "items": { "type": "string" } }, + "waitFor": { + "type": "string", + "enum": [ + "initializeCommand", + "onCreateCommand", + "updateContentCommand", + "postCreateCommand", + "postStartCommand", + "postAttachCommand" + ], + "description": "The user command to wait for before continuing execution in the background while the UI is starting up. The default is \"updateContentCommand\"." + }, "devPort": { "type": "integer", "description": "The port VS Code can use to connect to its backend." diff --git a/lib/vscode/extensions/configuration-editing/src/configurationEditingMain.ts b/extensions/configuration-editing/src/configurationEditingMain.ts similarity index 100% rename from lib/vscode/extensions/configuration-editing/src/configurationEditingMain.ts rename to extensions/configuration-editing/src/configurationEditingMain.ts diff --git a/lib/vscode/extensions/configuration-editing/src/extensionsProposals.ts b/extensions/configuration-editing/src/extensionsProposals.ts similarity index 100% rename from lib/vscode/extensions/configuration-editing/src/extensionsProposals.ts rename to extensions/configuration-editing/src/extensionsProposals.ts diff --git a/lib/vscode/extensions/configuration-editing/src/settingsDocumentHelper.ts b/extensions/configuration-editing/src/settingsDocumentHelper.ts similarity index 92% rename from lib/vscode/extensions/configuration-editing/src/settingsDocumentHelper.ts rename to extensions/configuration-editing/src/settingsDocumentHelper.ts index a21ec18e3103..3a469148da61 100644 --- a/lib/vscode/extensions/configuration-editing/src/settingsDocumentHelper.ts +++ b/extensions/configuration-editing/src/settingsDocumentHelper.ts @@ -6,7 +6,7 @@ import * as vscode from 'vscode'; import { getLocation, Location, parse } from 'jsonc-parser'; import * as nls from 'vscode-nls'; -import { provideInstalledExtensionProposals, provideWorkspaceTrustExtensionProposals } from './extensionsProposals'; +import { provideInstalledExtensionProposals } from './extensionsProposals'; const localize = nls.loadMessageBundle(); @@ -60,13 +60,9 @@ export class SettingsDocument { return provideInstalledExtensionProposals(alreadyConfigured, `: [\n\t"ui"\n]`, range, true); } - // extensions.supportUntrustedWorkspaces - if (location.path[0] === 'extensions.supportUntrustedWorkspaces' && location.path.length === 2 && location.isAtPropertyKey) { - let alreadyConfigured: string[] = []; - try { - alreadyConfigured = Object.keys(parse(this.document.getText())['extensions.supportUntrustedWorkspaces']); - } catch (e) {/* ignore error */ } - return provideWorkspaceTrustExtensionProposals(alreadyConfigured, range); + // remote.portsAttributes + if (location.path[0] === 'remote.portsAttributes' && location.path.length === 2 && location.isAtPropertyKey) { + return this.providePortsAttributesCompletionItem(range); } return this.provideLanguageOverridesCompletionItems(location, position); @@ -247,6 +243,31 @@ export class SettingsDocument { return Promise.resolve([]); } + private providePortsAttributesCompletionItem(range: vscode.Range): vscode.CompletionItem[] { + return [this.newSnippetCompletionItem( + { + label: '\"3000\"', + documentation: 'Single Port Attribute', + range, + snippet: '\n \"${1:3000}\": {\n \"label\": \"${2:Application}\",\n \"onAutoForward\": \"${3:openPreview}\"\n }\n' + }), + this.newSnippetCompletionItem( + { + label: '\"5000-6000\"', + documentation: 'Ranged Port Attribute', + range, + snippet: '\n \"${1:40000-55000}\": {\n \"onAutoForward\": \"${2:ignore}\"\n }\n' + }), + this.newSnippetCompletionItem( + { + label: '\".+\\\\/server.js\"', + documentation: 'Command Match Port Attribute', + range, + snippet: '\n \"${1:.+\\\\/server.js\}\": {\n \"label\": \"${2:Application}\",\n \"onAutoForward\": \"${3:openPreview}\"\n }\n' + }) + ]; + } + private newSimpleCompletionItem(text: string, range: vscode.Range, description?: string, insertText?: string): vscode.CompletionItem { const item = new vscode.CompletionItem(text); item.kind = vscode.CompletionItemKind.Value; diff --git a/lib/vscode/extensions/configuration-editing/src/typings/ref.d.ts b/extensions/configuration-editing/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/configuration-editing/src/typings/ref.d.ts rename to extensions/configuration-editing/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/configuration-editing/tsconfig.json b/extensions/configuration-editing/tsconfig.json similarity index 100% rename from lib/vscode/extensions/configuration-editing/tsconfig.json rename to extensions/configuration-editing/tsconfig.json diff --git a/extensions/configuration-editing/yarn.lock b/extensions/configuration-editing/yarn.lock new file mode 100644 index 000000000000..d7215349a938 --- /dev/null +++ b/extensions/configuration-editing/yarn.lock @@ -0,0 +1,18 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +jsonc-parser@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc" + integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w== + +vscode-nls@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.1.tgz#f9916b64e4947b20322defb1e676a495861f133c" + integrity sha512-4R+2UoUUU/LdnMnFjePxfLqNhBS8lrAFyX7pjb2ud/lqDkrUavFUTcG7wR0HBZFakae0Q6KLBFjMS6W93F403A== diff --git a/lib/vscode/extensions/cpp/.vscodeignore b/extensions/cpp/.vscodeignore similarity index 100% rename from lib/vscode/extensions/cpp/.vscodeignore rename to extensions/cpp/.vscodeignore diff --git a/lib/vscode/extensions/cpp/build/update-grammars.js b/extensions/cpp/build/update-grammars.js similarity index 100% rename from lib/vscode/extensions/cpp/build/update-grammars.js rename to extensions/cpp/build/update-grammars.js diff --git a/lib/vscode/extensions/cpp/cgmanifest.json b/extensions/cpp/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/cpp/cgmanifest.json rename to extensions/cpp/cgmanifest.json diff --git a/lib/vscode/extensions/cpp/language-configuration.json b/extensions/cpp/language-configuration.json similarity index 100% rename from lib/vscode/extensions/cpp/language-configuration.json rename to extensions/cpp/language-configuration.json diff --git a/lib/vscode/extensions/cpp/package.json b/extensions/cpp/package.json similarity index 100% rename from lib/vscode/extensions/cpp/package.json rename to extensions/cpp/package.json diff --git a/lib/vscode/extensions/cpp/package.nls.json b/extensions/cpp/package.nls.json similarity index 100% rename from lib/vscode/extensions/cpp/package.nls.json rename to extensions/cpp/package.nls.json diff --git a/lib/vscode/extensions/cpp/snippets/c.code-snippets b/extensions/cpp/snippets/c.code-snippets similarity index 100% rename from lib/vscode/extensions/cpp/snippets/c.code-snippets rename to extensions/cpp/snippets/c.code-snippets diff --git a/lib/vscode/extensions/cpp/snippets/cpp.code-snippets b/extensions/cpp/snippets/cpp.code-snippets similarity index 100% rename from lib/vscode/extensions/cpp/snippets/cpp.code-snippets rename to extensions/cpp/snippets/cpp.code-snippets diff --git a/lib/vscode/extensions/cpp/syntaxes/c.tmLanguage.json b/extensions/cpp/syntaxes/c.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/cpp/syntaxes/c.tmLanguage.json rename to extensions/cpp/syntaxes/c.tmLanguage.json diff --git a/lib/vscode/extensions/cpp/syntaxes/cpp.embedded.macro.tmLanguage.json b/extensions/cpp/syntaxes/cpp.embedded.macro.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/cpp/syntaxes/cpp.embedded.macro.tmLanguage.json rename to extensions/cpp/syntaxes/cpp.embedded.macro.tmLanguage.json diff --git a/lib/vscode/extensions/cpp/syntaxes/cpp.tmLanguage.json b/extensions/cpp/syntaxes/cpp.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/cpp/syntaxes/cpp.tmLanguage.json rename to extensions/cpp/syntaxes/cpp.tmLanguage.json diff --git a/lib/vscode/extensions/cpp/syntaxes/cuda-cpp.tmLanguage.json b/extensions/cpp/syntaxes/cuda-cpp.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/cpp/syntaxes/cuda-cpp.tmLanguage.json rename to extensions/cpp/syntaxes/cuda-cpp.tmLanguage.json diff --git a/lib/vscode/extensions/cpp/syntaxes/platform.tmLanguage.json b/extensions/cpp/syntaxes/platform.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/cpp/syntaxes/platform.tmLanguage.json rename to extensions/cpp/syntaxes/platform.tmLanguage.json diff --git a/lib/vscode/extensions/cpp/yarn.lock b/extensions/cpp/yarn.lock similarity index 100% rename from lib/vscode/extensions/cpp/yarn.lock rename to extensions/cpp/yarn.lock diff --git a/lib/vscode/extensions/csharp/.vscodeignore b/extensions/csharp/.vscodeignore similarity index 100% rename from lib/vscode/extensions/csharp/.vscodeignore rename to extensions/csharp/.vscodeignore diff --git a/extensions/csharp/cgmanifest.json b/extensions/csharp/cgmanifest.json new file mode 100644 index 000000000000..6156bbb50828 --- /dev/null +++ b/extensions/csharp/cgmanifest.json @@ -0,0 +1,18 @@ +{ + "registrations": [ + { + "component": { + "type": "git", + "git": { + "name": "dotnet/csharp-tmLanguage", + "repositoryUrl": "https://github.com/dotnet/csharp-tmLanguage", + "commitHash": "572697a2c2267430010b3534281f73337144e94f" + } + }, + "license": "MIT", + "version": "0.1.0", + "description": "The file syntaxes/csharp.tmLanguage.json was derived from https://github.com/dotnet/csharp-tmLanguage" + } + ], + "version": 1 +} \ No newline at end of file diff --git a/lib/vscode/extensions/csharp/language-configuration.json b/extensions/csharp/language-configuration.json similarity index 100% rename from lib/vscode/extensions/csharp/language-configuration.json rename to extensions/csharp/language-configuration.json diff --git a/lib/vscode/extensions/csharp/package.json b/extensions/csharp/package.json similarity index 100% rename from lib/vscode/extensions/csharp/package.json rename to extensions/csharp/package.json diff --git a/lib/vscode/extensions/csharp/package.nls.json b/extensions/csharp/package.nls.json similarity index 100% rename from lib/vscode/extensions/csharp/package.nls.json rename to extensions/csharp/package.nls.json diff --git a/lib/vscode/extensions/csharp/snippets/csharp.code-snippets b/extensions/csharp/snippets/csharp.code-snippets similarity index 100% rename from lib/vscode/extensions/csharp/snippets/csharp.code-snippets rename to extensions/csharp/snippets/csharp.code-snippets diff --git a/lib/vscode/extensions/csharp/syntaxes/csharp.tmLanguage.json b/extensions/csharp/syntaxes/csharp.tmLanguage.json similarity index 80% rename from lib/vscode/extensions/csharp/syntaxes/csharp.tmLanguage.json rename to extensions/csharp/syntaxes/csharp.tmLanguage.json index f67a94ba101d..8e26aaefa775 100644 --- a/lib/vscode/extensions/csharp/syntaxes/csharp.tmLanguage.json +++ b/extensions/csharp/syntaxes/csharp.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/dotnet/csharp-tmLanguage/commit/4d14854c9bfc9d84cce625d2bfebaac9741b9db8", + "version": "https://github.com/dotnet/csharp-tmLanguage/commit/572697a2c2267430010b3534281f73337144e94f", "name": "C#", "scopeName": "source.cs", "patterns": [ @@ -286,9 +286,6 @@ { "include": "#this-or-base-expression" }, - { - "include": "#switch-expression" - }, { "include": "#conditional-operator" }, @@ -619,7 +616,7 @@ ] }, "delegate-declaration": { - "begin": "(?x)\n(?:\\b(delegate)\\b)\\s+\n(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", + "begin": "(?x)\n(?:\\b(delegate)\\b)\\s+\n(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", "beginCaptures": { "1": { "name": "keyword.other.delegate.cs" @@ -970,7 +967,7 @@ ] }, "field-declaration": { - "begin": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)", + "begin": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)", "beginCaptures": { "1": { "patterns": [ @@ -1004,7 +1001,7 @@ ] }, "property-declaration": { - "begin": "(?x)\n\n# The negative lookahead below ensures that we don't match nested types\n# or other declarations as properties.\n(?![[:word:][:space:]]*\\b(?:class|interface|struct|enum|event)\\b)\n\n(?\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g)\\s*\n(?=\\{|=>|$)", + "begin": "(?x)\n\n# The negative lookahead below ensures that we don't match nested types\n# or other declarations as properties.\n(?![[:word:][:space:]]*\\b(?:class|interface|struct|enum|event)\\b)\n\n(?\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g)\\s*\n(?=\\{|=>|$)", "beginCaptures": { "1": { "patterns": [ @@ -1047,7 +1044,7 @@ ] }, "indexer-declaration": { - "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?this)\\s*\n(?=\\[)", + "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?this)\\s*\n(?=\\[)", "beginCaptures": { "1": { "patterns": [ @@ -1090,7 +1087,7 @@ ] }, "event-declaration": { - "begin": "(?x)\n\\b(event)\\b\\s*\n(?\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g(?:\\s*,\\s*\\g)*)\\s*\n(?=\\{|;|$)", + "begin": "(?x)\n\\b(event)\\b\\s*\n(?\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g(?:\\s*,\\s*\\g)*)\\s*\n(?=\\{|;|$)", "beginCaptures": { "1": { "name": "keyword.other.event.cs" @@ -1220,7 +1217,7 @@ ] }, "method-declaration": { - "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", + "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ @@ -1356,7 +1353,7 @@ ] }, "operator-declaration": { - "begin": "(?x)\n(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?(?:\\b(?:operator)))\\s*\n(?(?:\\+|-|\\*|/|%|&|\\||\\^|\\<\\<|\\>\\>|==|!=|\\>|\\<|\\>=|\\<=|!|~|\\+\\+|--|true|false))\\s*\n(?=\\()", + "begin": "(?x)\n(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?(?:\\b(?:operator)))\\s*\n(?(?:\\+|-|\\*|/|%|&|\\||\\^|\\<\\<|\\>\\>|==|!=|\\>|\\<|\\>=|\\<=|!|~|\\+\\+|--|true|false))\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ @@ -1389,7 +1386,7 @@ ] }, "conversion-operator-declaration": { - "begin": "(?x)\n(?(?:\\b(?:explicit|implicit)))\\s*\n(?(?:\\b(?:operator)))\\s*\n(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\()", + "begin": "(?x)\n(?(?:\\b(?:explicit|implicit)))\\s*\n(?(?:\\b(?:operator)))\\s*\n(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ @@ -1618,7 +1615,7 @@ "end": "(?=;)", "patterns": [ { - "include": "#statement" + "include": "#expression" } ] }, @@ -1721,178 +1718,6 @@ } ] }, - "switch-expression": { - "begin": "(?x) (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g)\\b\\s*", - "beginCaptures": { - "1": { - "patterns": [ - { - "include": "#type" - } - ] - }, - "2": { - "name": "entity.name.variable.local.cs" - } - }, - "end": "(?==>)", - "patterns": [ - { - "include": "#comment" - }, - { - "include": "#switch-when-clause" - } - ] - }, - "switch-property-expression": { - "begin": "(?x) # e.g. int x OR var x\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\\s*\n(\\{)", - "beginCaptures": { - "1": { - "patterns": [ - { - "include": "#type" - } - ] - }, - "6": { - "name": "punctuation.curlybrace.open.cs" - } - }, - "end": "\\}", - "endCaptures": { - "0": { - "name": "punctuation.curlybrace.close.cs" - } - }, - "patterns": [ - { - "include": "#expression" - }, - { - "include": "#punctuation-comma" - } - ] - }, - "switch-var-pattern": { - "begin": "(?x) # match foreach (var (x, y) in ...)\n(?:\\b(var)\\b\\s*)\n(?\\((?:[^\\(\\)]|\\g)+\\))\\s*", - "beginCaptures": { - "1": { - "name": "keyword.other.var.cs" - }, - "2": { - "patterns": [ - { - "include": "#tuple-declaration-deconstruction-element-list" - } - ] - } - }, - "end": "(?==>)", - "patterns": [ - { - "include": "#comment" - }, - { - "include": "#switch-when-clause" - } - ] - }, - "switch-when-clause": { - "begin": "(?)", - "patterns": [ - { - "include": "#comment" - }, - { - "include": "#expression" - }, - { - "include": "#punctuation-comma" - }, - { - "match": "\\(", - "captures": { - "0": { - "name": "punctuation.parenthesis.open.cs" - } - } - }, - { - "match": "\\)", - "captures": { - "0": { - "name": "punctuation.parenthesis.close.cs" - } - } - } - ] - }, "switch-label": { "patterns": [ { @@ -2040,7 +1865,7 @@ }, "patterns": [ { - "match": "(?x)\n(?:\n (\\bvar\\b)|\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g)\\s+\n\\b(in)\\b", + "match": "(?x)\n(?:\n (\\bvar\\b)|\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g)\\s+\n\\b(in)\\b", "captures": { "1": { "name": "keyword.other.var.cs" @@ -2159,7 +1984,7 @@ }, "patterns": [ { - "match": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?:(\\g)\\b)?", + "match": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?:(\\g)\\b)?", "captures": { "1": { "patterns": [ @@ -2319,37 +2144,31 @@ { "include": "#local-variable-declaration" }, - { - "include": "#local-function-declaration" - }, { "include": "#local-tuple-var-deconstruction" } ] }, "local-variable-declaration": { - "begin": "(?x)\n(?:\n (?:(\\busing)\\s+)?\n (?:(\\bref)\\s+(?:(\\breadonly)\\s+)?)?(\\bvar\\b)| # ref local\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref local\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g)\\s*\n(?!=>)\n(?=,|;|=|\\))", + "begin": "(?x)\n(?:\n (?:(\\bref)\\s+(?:(\\breadonly)\\s+)?)?(\\bvar\\b)| # ref local\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref local\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g)\\s*\n(?!=>)\n(?=,|;|=|\\))", "beginCaptures": { "1": { - "name": "keyword.other.using.cs" + "name": "storage.modifier.cs" }, "2": { "name": "storage.modifier.cs" }, "3": { - "name": "storage.modifier.cs" - }, - "4": { "name": "keyword.other.var.cs" }, - "5": { + "4": { "patterns": [ { "include": "#type" } ] }, - "10": { + "9": { "name": "entity.name.variable.local.cs" } }, @@ -2371,7 +2190,7 @@ ] }, "local-constant-declaration": { - "begin": "(?x)\n(?\\b(?:const)\\b)\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=)", + "begin": "(?x)\n(?\\b(?:const)\\b)\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=)", "beginCaptures": { "1": { "name": "storage.modifier.cs" @@ -2404,13 +2223,6 @@ } ] }, - "local-function-declaration": { - "patterns": [ - { - "include": "#method-declaration" - } - ] - }, "local-tuple-var-deconstruction": { "begin": "(?x) # e.g. var (x, y) = GetPoint();\n(?:\\b(var)\\b\\s*)\n(?\\((?:[^\\(\\)]|\\g)+\\))\\s*\n(?=;|=|\\))", "beginCaptures": { @@ -2520,7 +2332,7 @@ ] }, "declaration-expression-local": { - "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g)\\b\\s*\n(?=[,)\\]])", + "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g)\\b\\s*\n(?=[,)\\]])", "captures": { "1": { "name": "keyword.other.var.cs" @@ -2538,7 +2350,7 @@ } }, "declaration-expression-tuple": { - "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g)\\b\\s*\n(?=[,)])", + "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g)\\b\\s*\n(?=[,)])", "captures": { "1": { "name": "keyword.other.var.cs" @@ -2663,7 +2475,7 @@ }, "verbatim-interpolated-string": { "name": "string.quoted.double.cs", - "begin": "(?:\\$@|@\\$)\"", + "begin": "\\$@\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.cs" @@ -2900,7 +2712,7 @@ "patterns": [ { "name": "keyword.operator.assignment.compound.cs", - "match": "\\*=|/=|%=|\\+=|-=|\\?\\?=" + "match": "\\*=|/=|%=|\\+=|-=" }, { "name": "keyword.operator.assignment.compound.bitwise.cs", @@ -2948,26 +2760,6 @@ } ] }, - "switch-literal": { - "name": "constant.language.null.cs", - "match": "(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(\\))(?=\\s*@?[_[:alnum:]\\(])", + "match": "(?x)\n(\\()\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(\\))(?=\\s*@?[_[:alnum:]\\(])", "captures": { "1": { "name": "punctuation.parenthesis.open.cs" @@ -3055,7 +2847,7 @@ } }, "as-expression": { - "match": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?", + "match": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?", "captures": { "1": { "name": "keyword.other.as.cs" @@ -3070,7 +2862,7 @@ } }, "is-expression": { - "match": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?", + "match": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?", "captures": { "1": { "name": "keyword.other.is.cs" @@ -3096,7 +2888,7 @@ } }, "invocation-expression": { - "begin": "(?x)\n(?:(\\?)\\s*)? # preceding null-conditional operator?\n(?:(\\.)\\s*)? # preceding dot?\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # method name\n(?\\s*<([^<>]|\\g)+>\\s*)?\\s* # type arguments\n(?=\\() # open paren of argument list", + "begin": "(?x)\n(?:(\\?)\\s*)? # preceding null-conditional operator?\n(?:(\\.)\\s*)? # preceding dot?\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # method name\n(?\\s*<([^<>]|\\g)+>\\s*)?\\s* # type arguments\n(?=\\() # open paren of argument list", "beginCaptures": { "1": { "name": "keyword.operator.null-conditional.cs" @@ -3162,7 +2954,7 @@ } }, { - "match": "(?x)\n(\\.)?\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?\\s*<([^<>]|\\g)+>\\s*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)", + "match": "(?x)\n(\\.)?\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?\\s*<([^<>]|\\g)+>\\s*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)", "captures": { "1": { "name": "punctuation.accessor.cs" @@ -3200,7 +2992,7 @@ ] }, "object-creation-expression-with-parameters": { - "begin": "(?x)\n(new)\\s+\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\()", + "begin": "(?x)\n(new)\\s+\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\()", "beginCaptures": { "1": { "name": "keyword.other.new.cs" @@ -3221,7 +3013,7 @@ ] }, "object-creation-expression-with-no-parameters": { - "match": "(?x)\n(new)\\s+\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\{|$)", + "match": "(?x)\n(new)\\s+\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\{|$)", "captures": { "1": { "name": "keyword.other.new.cs" @@ -3236,7 +3028,7 @@ } }, "array-creation-expression": { - "begin": "(?x)\n\\b(new|stackalloc)\\b\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\\s*\n(?=\\[)", + "begin": "(?x)\n\\b(new|stackalloc)\\b\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\\s*\n(?=\\[)", "beginCaptures": { "1": { "name": "keyword.other.new.cs" @@ -3339,7 +3131,7 @@ ] }, "parameter": { - "match": "(?x)\n(?:(?:\\b(ref|params|out|in|this)\\b)\\s+)?\n(?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g)", + "match": "(?x)\n(?:(?:\\b(ref|params|out|in|this)\\b)\\s+)?\n(?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)", "captures": { "1": { "name": "storage.modifier.cs" @@ -3438,7 +3230,7 @@ ] }, "query-expression": { - "begin": "(?x)\n\\b(from)\\b\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\n\\s+(\\g)\\b\\s*\n\\b(in)\\b\\s*", + "begin": "(?x)\n\\b(from)\\b\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\n\\s+(\\g)\\b\\s*\n\\b(in)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.query.from.cs" @@ -3530,7 +3322,7 @@ ] }, "join-clause": { - "begin": "(?x)\n\\b(join)\\b\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\n\\s+(\\g)\\b\\s*\n\\b(in)\\b\\s*", + "begin": "(?x)\n\\b(join)\\b\\s*\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\n\\s+(\\g)\\b\\s*\n\\b(in)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.query.join.cs" @@ -3800,7 +3592,7 @@ ] }, "lambda-parameter": { - "match": "(?x)\n(?:\\b(ref|out|in)\\b)?\\s*\n(?:(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+)?\n(\\g)\\b\\s*\n(?=[,)])", + "match": "(?x)\n(?:\\b(ref|out|in)\\b)?\\s*\n(?:(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+)?\n(\\g)\\b\\s*\n(?=[,)])", "captures": { "1": { "name": "storage.modifier.cs" @@ -3880,7 +3672,7 @@ ] }, "tuple-element": { - "match": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\n(?:(?\\g)\\b)?", + "match": "(?x)\n(?\n (?:\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\n(?:(?\\g)\\b)?", "captures": { "1": { "patterns": [ diff --git a/lib/vscode/extensions/csharp/yarn.lock b/extensions/csharp/yarn.lock similarity index 100% rename from lib/vscode/extensions/csharp/yarn.lock rename to extensions/csharp/yarn.lock diff --git a/lib/vscode/extensions/css-language-features/.vscode/launch.json b/extensions/css-language-features/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/css-language-features/.vscode/launch.json rename to extensions/css-language-features/.vscode/launch.json diff --git a/lib/vscode/extensions/css-language-features/.vscode/settings.json b/extensions/css-language-features/.vscode/settings.json similarity index 100% rename from lib/vscode/extensions/css-language-features/.vscode/settings.json rename to extensions/css-language-features/.vscode/settings.json diff --git a/lib/vscode/extensions/css-language-features/.vscode/tasks.json b/extensions/css-language-features/.vscode/tasks.json similarity index 100% rename from lib/vscode/extensions/css-language-features/.vscode/tasks.json rename to extensions/css-language-features/.vscode/tasks.json diff --git a/lib/vscode/extensions/css-language-features/.vscodeignore b/extensions/css-language-features/.vscodeignore similarity index 100% rename from lib/vscode/extensions/css-language-features/.vscodeignore rename to extensions/css-language-features/.vscodeignore diff --git a/lib/vscode/extensions/css-language-features/CONTRIBUTING.md b/extensions/css-language-features/CONTRIBUTING.md similarity index 100% rename from lib/vscode/extensions/css-language-features/CONTRIBUTING.md rename to extensions/css-language-features/CONTRIBUTING.md diff --git a/lib/vscode/extensions/css-language-features/README.md b/extensions/css-language-features/README.md similarity index 100% rename from lib/vscode/extensions/css-language-features/README.md rename to extensions/css-language-features/README.md diff --git a/lib/vscode/extensions/css-language-features/client/src/browser/cssClientMain.ts b/extensions/css-language-features/client/src/browser/cssClientMain.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/client/src/browser/cssClientMain.ts rename to extensions/css-language-features/client/src/browser/cssClientMain.ts diff --git a/lib/vscode/extensions/css-language-features/client/src/cssClient.ts b/extensions/css-language-features/client/src/cssClient.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/client/src/cssClient.ts rename to extensions/css-language-features/client/src/cssClient.ts diff --git a/lib/vscode/extensions/css-language-features/client/src/customData.ts b/extensions/css-language-features/client/src/customData.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/client/src/customData.ts rename to extensions/css-language-features/client/src/customData.ts diff --git a/lib/vscode/extensions/css-language-features/client/src/node/cssClientMain.ts b/extensions/css-language-features/client/src/node/cssClientMain.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/client/src/node/cssClientMain.ts rename to extensions/css-language-features/client/src/node/cssClientMain.ts diff --git a/lib/vscode/extensions/css-language-features/client/src/node/nodeFs.ts b/extensions/css-language-features/client/src/node/nodeFs.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/client/src/node/nodeFs.ts rename to extensions/css-language-features/client/src/node/nodeFs.ts diff --git a/lib/vscode/extensions/css-language-features/client/src/requests.ts b/extensions/css-language-features/client/src/requests.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/client/src/requests.ts rename to extensions/css-language-features/client/src/requests.ts diff --git a/lib/vscode/extensions/css-language-features/client/src/typings/ref.d.ts b/extensions/css-language-features/client/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/client/src/typings/ref.d.ts rename to extensions/css-language-features/client/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/css-language-features/client/tsconfig.json b/extensions/css-language-features/client/tsconfig.json similarity index 100% rename from lib/vscode/extensions/css-language-features/client/tsconfig.json rename to extensions/css-language-features/client/tsconfig.json diff --git a/lib/vscode/extensions/css-language-features/extension-browser.webpack.config.js b/extensions/css-language-features/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/css-language-features/extension-browser.webpack.config.js rename to extensions/css-language-features/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/css-language-features/extension.webpack.config.js b/extensions/css-language-features/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/css-language-features/extension.webpack.config.js rename to extensions/css-language-features/extension.webpack.config.js diff --git a/lib/vscode/extensions/css-language-features/icons/css.png b/extensions/css-language-features/icons/css.png similarity index 100% rename from lib/vscode/extensions/css-language-features/icons/css.png rename to extensions/css-language-features/icons/css.png diff --git a/extensions/css-language-features/package.json b/extensions/css-language-features/package.json new file mode 100644 index 000000000000..207041a60943 --- /dev/null +++ b/extensions/css-language-features/package.json @@ -0,0 +1,862 @@ +{ + "name": "css-language-features", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "publisher": "vscode", + "license": "MIT", + "engines": { + "vscode": "^1.29.0" + }, + "icon": "icons/css.png", + "activationEvents": [ + "onLanguage:css", + "onLanguage:less", + "onLanguage:scss", + "onCommand:_css.applyCodeAction" + ], + "main": "./client/out/node/cssClientMain", + "browser": "./client/dist/browser/cssClientMain", + "enableProposedApi": true, + "capabilities": { + "virtualWorkspaces": true, + "untrustedWorkspaces": { + "supported": true + } + }, + "scripts": { + "compile": "gulp compile-extension:css-language-features-client compile-extension:css-language-features-server", + "watch": "gulp watch-extension:css-language-features-client watch-extension:css-language-features-server", + "test": "node ../../node_modules/mocha/bin/mocha", + "install-client-next": "yarn add vscode-languageclient@next" + }, + "categories": [ + "Programming Languages" + ], + "contributes": { + "configuration": [ + { + "order": 22, + "id": "css", + "title": "%css.title%", + "properties": { + "css.customData": { + "type": "array", + "markdownDescription": "%css.customData.desc%", + "default": [], + "items": { + "type": "string" + }, + "scope": "resource" + }, + "css.completion.triggerPropertyValueCompletion": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%css.completion.triggerPropertyValueCompletion.desc%" + }, + "css.completion.completePropertyWithSemicolon": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%css.completion.completePropertyWithSemicolon.desc%" + }, + "css.validate": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%css.validate.desc%" + }, + "css.hover.documentation": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%css.hover.documentation%" + }, + "css.hover.references": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%css.hover.references%" + }, + "css.lint.compatibleVendorPrefixes": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%css.lint.compatibleVendorPrefixes.desc%" + }, + "css.lint.vendorPrefix": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "description": "%css.lint.vendorPrefix.desc%" + }, + "css.lint.duplicateProperties": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%css.lint.duplicateProperties.desc%" + }, + "css.lint.emptyRules": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "description": "%css.lint.emptyRules.desc%" + }, + "css.lint.importStatement": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%css.lint.importStatement.desc%" + }, + "css.lint.boxModel": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "markdownDescription": "%css.lint.boxModel.desc%" + }, + "css.lint.universalSelector": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "markdownDescription": "%css.lint.universalSelector.desc%" + }, + "css.lint.zeroUnits": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%css.lint.zeroUnits.desc%" + }, + "css.lint.fontFaceProperties": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "markdownDescription": "%css.lint.fontFaceProperties.desc%" + }, + "css.lint.hexColorLength": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "error", + "description": "%css.lint.hexColorLength.desc%" + }, + "css.lint.argumentsInColorFunction": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "error", + "description": "%css.lint.argumentsInColorFunction.desc%" + }, + "css.lint.unknownProperties": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "description": "%css.lint.unknownProperties.desc%" + }, + "css.lint.validProperties": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + }, + "scope": "resource", + "default": [], + "description": "%css.lint.validProperties.desc%" + }, + "css.lint.ieHack": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%css.lint.ieHack.desc%" + }, + "css.lint.unknownVendorSpecificProperties": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%css.lint.unknownVendorSpecificProperties.desc%" + }, + "css.lint.propertyIgnoredDueToDisplay": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "markdownDescription": "%css.lint.propertyIgnoredDueToDisplay.desc%" + }, + "css.lint.important": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "markdownDescription": "%css.lint.important.desc%" + }, + "css.lint.float": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "markdownDescription": "%css.lint.float.desc%" + }, + "css.lint.idSelector": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%css.lint.idSelector.desc%" + }, + "css.lint.unknownAtRules": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "description": "%css.lint.unknownAtRules.desc%" + }, + "css.trace.server": { + "type": "string", + "scope": "window", + "enum": [ + "off", + "messages", + "verbose" + ], + "default": "off", + "description": "%css.trace.server.desc%" + } + } + }, + { + "id": "scss", + "order": 24, + "title": "%scss.title%", + "properties": { + "scss.completion.triggerPropertyValueCompletion": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%scss.completion.triggerPropertyValueCompletion.desc%" + }, + "scss.completion.completePropertyWithSemicolon": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%scss.completion.completePropertyWithSemicolon.desc%" + }, + "scss.validate": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%scss.validate.desc%" + }, + "scss.hover.documentation": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%scss.hover.documentation%" + }, + "scss.hover.references": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%scss.hover.references%" + }, + "scss.lint.compatibleVendorPrefixes": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%scss.lint.compatibleVendorPrefixes.desc%" + }, + "scss.lint.vendorPrefix": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "description": "%scss.lint.vendorPrefix.desc%" + }, + "scss.lint.duplicateProperties": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%scss.lint.duplicateProperties.desc%" + }, + "scss.lint.emptyRules": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "description": "%scss.lint.emptyRules.desc%" + }, + "scss.lint.importStatement": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%scss.lint.importStatement.desc%" + }, + "scss.lint.boxModel": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "markdownDescription": "%scss.lint.boxModel.desc%" + }, + "scss.lint.universalSelector": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "markdownDescription": "%scss.lint.universalSelector.desc%" + }, + "scss.lint.zeroUnits": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%scss.lint.zeroUnits.desc%" + }, + "scss.lint.fontFaceProperties": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "markdownDescription": "%scss.lint.fontFaceProperties.desc%" + }, + "scss.lint.hexColorLength": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "error", + "description": "%scss.lint.hexColorLength.desc%" + }, + "scss.lint.argumentsInColorFunction": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "error", + "description": "%scss.lint.argumentsInColorFunction.desc%" + }, + "scss.lint.unknownProperties": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "description": "%scss.lint.unknownProperties.desc%" + }, + "scss.lint.validProperties": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + }, + "scope": "resource", + "default": [], + "description": "%scss.lint.validProperties.desc%" + }, + "scss.lint.ieHack": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%scss.lint.ieHack.desc%" + }, + "scss.lint.unknownVendorSpecificProperties": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%scss.lint.unknownVendorSpecificProperties.desc%" + }, + "scss.lint.propertyIgnoredDueToDisplay": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "markdownDescription": "%scss.lint.propertyIgnoredDueToDisplay.desc%" + }, + "scss.lint.important": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "markdownDescription": "%scss.lint.important.desc%" + }, + "scss.lint.float": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "markdownDescription": "%scss.lint.float.desc%" + }, + "scss.lint.idSelector": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%scss.lint.idSelector.desc%" + }, + "scss.lint.unknownAtRules": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "description": "%scss.lint.unknownAtRules.desc%" + } + } + }, + { + "id": "less", + "order": 23, + "type": "object", + "title": "%less.title%", + "properties": { + "less.completion.triggerPropertyValueCompletion": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%less.completion.triggerPropertyValueCompletion.desc%" + }, + "less.completion.completePropertyWithSemicolon": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%less.completion.completePropertyWithSemicolon.desc%" + }, + "less.validate": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%less.validate.desc%" + }, + "less.hover.documentation": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%less.hover.documentation%" + }, + "less.hover.references": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%less.hover.references%" + }, + "less.lint.compatibleVendorPrefixes": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%less.lint.compatibleVendorPrefixes.desc%" + }, + "less.lint.vendorPrefix": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "description": "%less.lint.vendorPrefix.desc%" + }, + "less.lint.duplicateProperties": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%less.lint.duplicateProperties.desc%" + }, + "less.lint.emptyRules": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "description": "%less.lint.emptyRules.desc%" + }, + "less.lint.importStatement": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%less.lint.importStatement.desc%" + }, + "less.lint.boxModel": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "markdownDescription": "%less.lint.boxModel.desc%" + }, + "less.lint.universalSelector": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "markdownDescription": "%less.lint.universalSelector.desc%" + }, + "less.lint.zeroUnits": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%less.lint.zeroUnits.desc%" + }, + "less.lint.fontFaceProperties": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "markdownDescription": "%less.lint.fontFaceProperties.desc%" + }, + "less.lint.hexColorLength": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "error", + "description": "%less.lint.hexColorLength.desc%" + }, + "less.lint.argumentsInColorFunction": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "error", + "description": "%less.lint.argumentsInColorFunction.desc%" + }, + "less.lint.unknownProperties": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "description": "%less.lint.unknownProperties.desc%" + }, + "less.lint.validProperties": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + }, + "scope": "resource", + "default": [], + "description": "%less.lint.validProperties.desc%" + }, + "less.lint.ieHack": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%less.lint.ieHack.desc%" + }, + "less.lint.unknownVendorSpecificProperties": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%less.lint.unknownVendorSpecificProperties.desc%" + }, + "less.lint.propertyIgnoredDueToDisplay": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "markdownDescription": "%less.lint.propertyIgnoredDueToDisplay.desc%" + }, + "less.lint.important": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "markdownDescription": "%less.lint.important.desc%" + }, + "less.lint.float": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "markdownDescription": "%less.lint.float.desc%" + }, + "less.lint.idSelector": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "ignore", + "description": "%less.lint.idSelector.desc%" + }, + "less.lint.unknownAtRules": { + "type": "string", + "scope": "resource", + "enum": [ + "ignore", + "warning", + "error" + ], + "default": "warning", + "description": "%less.lint.unknownAtRules.desc%" + } + } + } + ], + "configurationDefaults": { + "[css]": { + "editor.suggest.insertMode": "replace" + }, + "[scss]": { + "editor.suggest.insertMode": "replace" + }, + "[less]": { + "editor.suggest.insertMode": "replace" + } + }, + "jsonValidation": [ + { + "fileMatch": "*.css-data.json", + "url": "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/master/docs/customData.schema.json" + }, + { + "fileMatch": "package.json", + "url": "./schemas/package.schema.json" + } + ] + }, + "dependencies": { + "vscode-languageclient": "^7.0.0", + "vscode-nls": "^5.0.0", + "vscode-uri": "^3.0.2" + }, + "devDependencies": { + "@types/node": "14.x" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/css-language-features/package.nls.json b/extensions/css-language-features/package.nls.json similarity index 100% rename from lib/vscode/extensions/css-language-features/package.nls.json rename to extensions/css-language-features/package.nls.json diff --git a/lib/vscode/extensions/css-language-features/schemas/package.schema.json b/extensions/css-language-features/schemas/package.schema.json similarity index 100% rename from lib/vscode/extensions/css-language-features/schemas/package.schema.json rename to extensions/css-language-features/schemas/package.schema.json diff --git a/lib/vscode/extensions/css-language-features/server/.vscode/launch.json b/extensions/css-language-features/server/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/css-language-features/server/.vscode/launch.json rename to extensions/css-language-features/server/.vscode/launch.json diff --git a/lib/vscode/extensions/css-language-features/server/.vscode/tasks.json b/extensions/css-language-features/server/.vscode/tasks.json similarity index 100% rename from lib/vscode/extensions/css-language-features/server/.vscode/tasks.json rename to extensions/css-language-features/server/.vscode/tasks.json diff --git a/lib/vscode/extensions/css-language-features/server/extension-browser.webpack.config.js b/extensions/css-language-features/server/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/css-language-features/server/extension-browser.webpack.config.js rename to extensions/css-language-features/server/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/css-language-features/server/extension.webpack.config.js b/extensions/css-language-features/server/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/css-language-features/server/extension.webpack.config.js rename to extensions/css-language-features/server/extension.webpack.config.js diff --git a/extensions/css-language-features/server/package.json b/extensions/css-language-features/server/package.json new file mode 100644 index 000000000000..62238cf5c40c --- /dev/null +++ b/extensions/css-language-features/server/package.json @@ -0,0 +1,30 @@ +{ + "name": "vscode-css-languageserver", + "description": "CSS/LESS/SCSS language server", + "version": "1.0.0", + "author": "Microsoft Corporation", + "license": "MIT", + "engines": { + "node": "*" + }, + "main": "./out/node/cssServerMain", + "browser": "./dist/browser/cssServerMain", + "dependencies": { + "vscode-css-languageservice": "^5.1.3", + "vscode-languageserver": "^7.0.0", + "vscode-uri": "^3.0.2" + }, + "devDependencies": { + "@types/mocha": "^8.2.0", + "@types/node": "14.x" + }, + "scripts": { + "compile": "gulp compile-extension:css-language-features-server", + "watch": "gulp watch-extension:css-language-features-server", + "install-service-next": "yarn add vscode-css-languageservice@next", + "install-service-local": "yarn link vscode-css-languageservice", + "install-server-next": "yarn add vscode-languageserver@next", + "install-server-local": "yarn link vscode-languageserver", + "test": "node ./test/index.js" + } +} diff --git a/lib/vscode/extensions/css-language-features/server/src/browser/cssServerMain.ts b/extensions/css-language-features/server/src/browser/cssServerMain.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/server/src/browser/cssServerMain.ts rename to extensions/css-language-features/server/src/browser/cssServerMain.ts diff --git a/lib/vscode/extensions/css-language-features/server/src/cssServer.ts b/extensions/css-language-features/server/src/cssServer.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/server/src/cssServer.ts rename to extensions/css-language-features/server/src/cssServer.ts diff --git a/lib/vscode/extensions/css-language-features/server/src/customData.ts b/extensions/css-language-features/server/src/customData.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/server/src/customData.ts rename to extensions/css-language-features/server/src/customData.ts diff --git a/lib/vscode/extensions/css-language-features/server/src/languageModelCache.ts b/extensions/css-language-features/server/src/languageModelCache.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/server/src/languageModelCache.ts rename to extensions/css-language-features/server/src/languageModelCache.ts diff --git a/lib/vscode/extensions/css-language-features/server/src/node/cssServerMain.ts b/extensions/css-language-features/server/src/node/cssServerMain.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/server/src/node/cssServerMain.ts rename to extensions/css-language-features/server/src/node/cssServerMain.ts diff --git a/lib/vscode/extensions/css-language-features/server/src/node/nodeFs.ts b/extensions/css-language-features/server/src/node/nodeFs.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/server/src/node/nodeFs.ts rename to extensions/css-language-features/server/src/node/nodeFs.ts diff --git a/lib/vscode/extensions/css-language-features/server/src/requests.ts b/extensions/css-language-features/server/src/requests.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/server/src/requests.ts rename to extensions/css-language-features/server/src/requests.ts diff --git a/lib/vscode/extensions/css-language-features/server/src/test/completion.test.ts b/extensions/css-language-features/server/src/test/completion.test.ts similarity index 96% rename from lib/vscode/extensions/css-language-features/server/src/test/completion.test.ts rename to extensions/css-language-features/server/src/test/completion.test.ts index 55eb64d9789c..ec336448a504 100644 --- a/lib/vscode/extensions/css-language-features/server/src/test/completion.test.ts +++ b/extensions/css-language-features/server/src/test/completion.test.ts @@ -24,10 +24,10 @@ suite('Completions', () => { return completion.label === expected.label; }); - assert.equal(matches.length, 1, `${expected.label} should only existing once: Actual: ${completions.items.map(c => c.label).join(', ')}`); + assert.strictEqual(matches.length, 1, `${expected.label} should only existing once: Actual: ${completions.items.map(c => c.label).join(', ')}`); let match = matches[0]; if (expected.resultText && TextEdit.is(match.textEdit)) { - assert.equal(TextDocument.applyEdits(document, [match.textEdit]), expected.resultText); + assert.strictEqual(TextDocument.applyEdits(document, [match.textEdit]), expected.resultText); } }; @@ -50,7 +50,7 @@ suite('Completions', () => { let list = await cssLanguageService.doComplete2(document, position, stylesheet, context); if (expected.count) { - assert.equal(list.items.length, expected.count); + assert.strictEqual(list.items.length, expected.count); } if (expected.items) { for (let item of expected.items) { diff --git a/lib/vscode/extensions/css-language-features/server/src/test/links.test.ts b/extensions/css-language-features/server/src/test/links.test.ts similarity index 89% rename from lib/vscode/extensions/css-language-features/server/src/test/links.test.ts rename to extensions/css-language-features/server/src/test/links.test.ts index f67b5e92f25c..bc4c6db6477a 100644 --- a/lib/vscode/extensions/css-language-features/server/src/test/links.test.ts +++ b/extensions/css-language-features/server/src/test/links.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import 'mocha'; import * as assert from 'assert'; -import { URI } from 'vscode-uri'; +import { URI } from 'vscode-uri'; import { resolve } from 'path'; import { TextDocument, DocumentLink } from 'vscode-languageserver-types'; import { WorkspaceFolder } from 'vscode-languageserver-protocol'; @@ -26,10 +26,10 @@ suite('Links', () => { return document.offsetAt(link.range.start) === expected.offset; }); - assert.equal(matches.length, 1, `${expected.offset} should only existing once: Actual: ${links.map(l => document.offsetAt(l.range.start)).join(', ')}`); + assert.strictEqual(matches.length, 1, `${expected.offset} should only existing once: Actual: ${links.map(l => document.offsetAt(l.range.start)).join(', ')}`); let match = matches[0]; - assert.equal(document.getText(match.range), expected.value); - assert.equal(match.target, expected.target); + assert.strictEqual(document.getText(match.range), expected.value); + assert.strictEqual(match.target, expected.target); }; async function assertLinks(value: string, expected: ItemDescription[], testUri: string, workspaceFolders?: WorkspaceFolder[], lang: string = 'css'): Promise { @@ -47,7 +47,7 @@ suite('Links', () => { const stylesheet = cssLanguageService.parseStylesheet(document); let links = await cssLanguageService.findDocumentLinks2(document, stylesheet, context)!; - assert.equal(links.length, expected.length); + assert.strictEqual(links.length, expected.length); for (let item of expected) { assertLink(links, item, document); diff --git a/lib/vscode/extensions/css-language-features/server/src/utils/documentContext.ts b/extensions/css-language-features/server/src/utils/documentContext.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/server/src/utils/documentContext.ts rename to extensions/css-language-features/server/src/utils/documentContext.ts diff --git a/lib/vscode/extensions/css-language-features/server/src/utils/runner.ts b/extensions/css-language-features/server/src/utils/runner.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/server/src/utils/runner.ts rename to extensions/css-language-features/server/src/utils/runner.ts diff --git a/lib/vscode/extensions/css-language-features/server/src/utils/strings.ts b/extensions/css-language-features/server/src/utils/strings.ts similarity index 100% rename from lib/vscode/extensions/css-language-features/server/src/utils/strings.ts rename to extensions/css-language-features/server/src/utils/strings.ts diff --git a/lib/vscode/extensions/css-language-features/server/test/index.js b/extensions/css-language-features/server/test/index.js similarity index 100% rename from lib/vscode/extensions/css-language-features/server/test/index.js rename to extensions/css-language-features/server/test/index.js diff --git a/lib/vscode/extensions/css-language-features/server/test/linksTestFixtures/.gitignore b/extensions/css-language-features/server/test/linksTestFixtures/.gitignore similarity index 100% rename from lib/vscode/extensions/css-language-features/server/test/linksTestFixtures/.gitignore rename to extensions/css-language-features/server/test/linksTestFixtures/.gitignore diff --git a/lib/vscode/extensions/css-language-features/server/test/linksTestFixtures/node_modules/foo/package.json b/extensions/css-language-features/server/test/linksTestFixtures/node_modules/foo/package.json similarity index 100% rename from lib/vscode/extensions/css-language-features/server/test/linksTestFixtures/node_modules/foo/package.json rename to extensions/css-language-features/server/test/linksTestFixtures/node_modules/foo/package.json diff --git a/lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/.foo.js b/extensions/css-language-features/server/test/pathCompletionFixtures/.foo.js similarity index 100% rename from lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/.foo.js rename to extensions/css-language-features/server/test/pathCompletionFixtures/.foo.js diff --git a/lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/about/about.css b/extensions/css-language-features/server/test/pathCompletionFixtures/about/about.css similarity index 100% rename from lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/about/about.css rename to extensions/css-language-features/server/test/pathCompletionFixtures/about/about.css diff --git a/lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/about/about.html b/extensions/css-language-features/server/test/pathCompletionFixtures/about/about.html similarity index 100% rename from lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/about/about.html rename to extensions/css-language-features/server/test/pathCompletionFixtures/about/about.html diff --git a/lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/index.html b/extensions/css-language-features/server/test/pathCompletionFixtures/index.html similarity index 100% rename from lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/index.html rename to extensions/css-language-features/server/test/pathCompletionFixtures/index.html diff --git a/lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/scss/_foo.scss b/extensions/css-language-features/server/test/pathCompletionFixtures/scss/_foo.scss similarity index 100% rename from lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/scss/_foo.scss rename to extensions/css-language-features/server/test/pathCompletionFixtures/scss/_foo.scss diff --git a/lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/scss/main.scss b/extensions/css-language-features/server/test/pathCompletionFixtures/scss/main.scss similarity index 100% rename from lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/scss/main.scss rename to extensions/css-language-features/server/test/pathCompletionFixtures/scss/main.scss diff --git a/lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/src/data/foo.asar b/extensions/css-language-features/server/test/pathCompletionFixtures/src/data/foo.asar similarity index 100% rename from lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/src/data/foo.asar rename to extensions/css-language-features/server/test/pathCompletionFixtures/src/data/foo.asar diff --git a/lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/src/feature.js b/extensions/css-language-features/server/test/pathCompletionFixtures/src/feature.js similarity index 100% rename from lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/src/feature.js rename to extensions/css-language-features/server/test/pathCompletionFixtures/src/feature.js diff --git a/lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/src/test.js b/extensions/css-language-features/server/test/pathCompletionFixtures/src/test.js similarity index 100% rename from lib/vscode/extensions/css-language-features/server/test/pathCompletionFixtures/src/test.js rename to extensions/css-language-features/server/test/pathCompletionFixtures/src/test.js diff --git a/lib/vscode/extensions/css-language-features/server/tsconfig.json b/extensions/css-language-features/server/tsconfig.json similarity index 100% rename from lib/vscode/extensions/css-language-features/server/tsconfig.json rename to extensions/css-language-features/server/tsconfig.json diff --git a/extensions/css-language-features/server/yarn.lock b/extensions/css-language-features/server/yarn.lock new file mode 100644 index 000000000000..c734be9d5baa --- /dev/null +++ b/extensions/css-language-features/server/yarn.lock @@ -0,0 +1,63 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/mocha@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44" + integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ== + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +vscode-css-languageservice@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-5.1.3.tgz#a7b2f21ed48842af5d9a98223bcae09e33d707d5" + integrity sha512-c8xiUhrDBNG6iS92FEE+K3IWOHAqVvzsqjjLSaXHyF5Qdn/6VhUweGNjtZ2CBSfs+Vkmz7pJzLQ7Io1x5deumA== + dependencies: + vscode-languageserver-textdocument "^1.0.1" + vscode-languageserver-types "^3.16.0" + vscode-nls "^5.0.0" + vscode-uri "^3.0.2" + +vscode-jsonrpc@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" + integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== + +vscode-languageserver-protocol@3.16.0: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" + integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== + dependencies: + vscode-jsonrpc "6.0.0" + vscode-languageserver-types "3.16.0" + +vscode-languageserver-textdocument@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz#178168e87efad6171b372add1dea34f53e5d330f" + integrity sha512-UIcJDjX7IFkck7cSkNNyzIz5FyvpQfY7sdzVy+wkKN/BLaD4DQ0ppXQrKePomCxTS7RrolK1I0pey0bG9eh8dA== + +vscode-languageserver-types@3.16.0, vscode-languageserver-types@^3.16.0: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" + integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== + +vscode-languageserver@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz#49b068c87cfcca93a356969d20f5d9bdd501c6b0" + integrity sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw== + dependencies: + vscode-languageserver-protocol "3.16.0" + +vscode-nls@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840" + integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA== + +vscode-uri@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.2.tgz#ecfd1d066cb8ef4c3a208decdbab9a8c23d055d0" + integrity sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA== diff --git a/lib/vscode/extensions/css-language-features/test/mocha.opts b/extensions/css-language-features/test/mocha.opts similarity index 100% rename from lib/vscode/extensions/css-language-features/test/mocha.opts rename to extensions/css-language-features/test/mocha.opts diff --git a/extensions/css-language-features/yarn.lock b/extensions/css-language-features/yarn.lock new file mode 100644 index 000000000000..2e524319229d --- /dev/null +++ b/extensions/css-language-features/yarn.lock @@ -0,0 +1,89 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +semver@^7.3.4: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + +vscode-jsonrpc@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" + integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== + +vscode-languageclient@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-7.0.0.tgz#b505c22c21ffcf96e167799757fca07a6bad0fb2" + integrity sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg== + dependencies: + minimatch "^3.0.4" + semver "^7.3.4" + vscode-languageserver-protocol "3.16.0" + +vscode-languageserver-protocol@3.16.0: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" + integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== + dependencies: + vscode-jsonrpc "6.0.0" + vscode-languageserver-types "3.16.0" + +vscode-languageserver-types@3.16.0: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" + integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== + +vscode-nls@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840" + integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA== + +vscode-uri@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.2.tgz#ecfd1d066cb8ef4c3a208decdbab9a8c23d055d0" + integrity sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== diff --git a/lib/vscode/extensions/css/.vscode/launch.json b/extensions/css/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/css/.vscode/launch.json rename to extensions/css/.vscode/launch.json diff --git a/lib/vscode/extensions/css/.vscodeignore b/extensions/css/.vscodeignore similarity index 100% rename from lib/vscode/extensions/css/.vscodeignore rename to extensions/css/.vscodeignore diff --git a/lib/vscode/extensions/css/cgmanifest.json b/extensions/css/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/css/cgmanifest.json rename to extensions/css/cgmanifest.json diff --git a/lib/vscode/extensions/css/language-configuration.json b/extensions/css/language-configuration.json similarity index 100% rename from lib/vscode/extensions/css/language-configuration.json rename to extensions/css/language-configuration.json diff --git a/lib/vscode/extensions/css/package.json b/extensions/css/package.json similarity index 100% rename from lib/vscode/extensions/css/package.json rename to extensions/css/package.json diff --git a/lib/vscode/extensions/css/package.nls.json b/extensions/css/package.nls.json similarity index 100% rename from lib/vscode/extensions/css/package.nls.json rename to extensions/css/package.nls.json diff --git a/lib/vscode/extensions/css/syntaxes/css.tmLanguage.json b/extensions/css/syntaxes/css.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/css/syntaxes/css.tmLanguage.json rename to extensions/css/syntaxes/css.tmLanguage.json diff --git a/lib/vscode/extensions/css/yarn.lock b/extensions/css/yarn.lock similarity index 100% rename from lib/vscode/extensions/css/yarn.lock rename to extensions/css/yarn.lock diff --git a/lib/vscode/extensions/julia/.vscodeignore b/extensions/dart/.vscodeignore similarity index 100% rename from lib/vscode/extensions/julia/.vscodeignore rename to extensions/dart/.vscodeignore diff --git a/extensions/dart/cgmanifest.json b/extensions/dart/cgmanifest.json new file mode 100644 index 000000000000..52c4a994d19d --- /dev/null +++ b/extensions/dart/cgmanifest.json @@ -0,0 +1,46 @@ +{ + "registrations": [ + { + "component": { + "type": "git", + "git": { + "name": "dart-lang/dart-syntax-highlight", + "repositoryUrl": "https://github.com/dart-lang/dart-syntax-highlight", + "commitHash": "65f211722c85e9fdf0aa658d5663e6ccaf2ebe25" + } + }, + "licenseDetail": [ + "Copyright 2020, the Dart project authors.", + "", + "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.", + " * Neither the name of Google LLC nor the names of its", + " contributors may be used to endorse or promote products derived", + " from this software without specific prior written permission.", + "", + "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", + "OWNER 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." + ], + "license": "BSD", + "version": "0.0.0" + } + ], + "version": 1 +} diff --git a/extensions/dart/language-configuration.json b/extensions/dart/language-configuration.json new file mode 100644 index 000000000000..9d44a40ee84b --- /dev/null +++ b/extensions/dart/language-configuration.json @@ -0,0 +1,29 @@ +{ + "comments": { + "lineComment": "//", + "blockComment": [ "/*", "*/" ] + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + { "open": "{", "close": "}" }, + { "open": "[", "close": "]" }, + { "open": "(", "close": ")" }, + { "open": "'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "\"", "close": "\"", "notIn": ["string"] }, + { "open": "`", "close": "`", "notIn": ["string", "comment"] }, + { "open": "/**", "close": " */", "notIn": ["string"] } + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["<", ">"], + ["'", "'"], + ["\"", "\""], + ["`", "`"] + ] +} diff --git a/extensions/dart/package.json b/extensions/dart/package.json new file mode 100644 index 000000000000..92863ffb2b7f --- /dev/null +++ b/extensions/dart/package.json @@ -0,0 +1,35 @@ +{ + "name": "dart", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "publisher": "vscode", + "license": "MIT", + "engines": { + "vscode": "0.10.x" + }, + "scripts": { + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin dart-lang/dart-syntax-highlight grammars/dart.json ./syntaxes/dart.tmLanguage.json" + }, + "contributes": { + "languages": [ + { + "id": "dart", + "extensions": [ + ".dart" + ], + "aliases": [ + "Dart" + ], + "configuration": "./language-configuration.json" + } + ], + "grammars": [ + { + "language": "dart", + "scopeName": "source.dart", + "path": "./syntaxes/dart.tmLanguage.json" + } + ] + } +} diff --git a/extensions/dart/package.nls.json b/extensions/dart/package.nls.json new file mode 100644 index 000000000000..71e6b91e93ae --- /dev/null +++ b/extensions/dart/package.nls.json @@ -0,0 +1,4 @@ +{ + "displayName": "Dart Language Basics", + "description": "Provides syntax highlighting & bracket matching in Dart files." +} diff --git a/extensions/dart/syntaxes/dart.tmLanguage.json b/extensions/dart/syntaxes/dart.tmLanguage.json new file mode 100644 index 000000000000..fc2fae5bc4c3 --- /dev/null +++ b/extensions/dart/syntaxes/dart.tmLanguage.json @@ -0,0 +1,439 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/dart-lang/dart-syntax-highlight/blob/master/grammars/dart.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/dart-lang/dart-syntax-highlight/commit/65f211722c85e9fdf0aa658d5663e6ccaf2ebe25", + "name": "Dart", + "scopeName": "source.dart", + "patterns": [ + { + "name": "meta.preprocessor.script.dart", + "match": "^(#!.*)$" + }, + { + "name": "meta.declaration.dart", + "begin": "^\\w*\\b(library|import|part of|part|export)\\b", + "beginCaptures": { + "0": { + "name": "keyword.other.import.dart" + } + }, + "end": ";", + "endCaptures": { + "0": { + "name": "punctuation.terminator.dart" + } + }, + "patterns": [ + { + "include": "#strings" + }, + { + "include": "#comments" + }, + { + "name": "keyword.other.import.dart", + "match": "\\b(as|show|hide)\\b" + } + ] + }, + { + "include": "#comments" + }, + { + "include": "#punctuation" + }, + { + "include": "#annotations" + }, + { + "include": "#keywords" + }, + { + "include": "#constants-and-special-vars" + }, + { + "include": "#strings" + } + ], + "repository": { + "dartdoc": { + "patterns": [ + { + "match": "(\\[.*?\\])", + "captures": { + "0": { + "name": "variable.name.source.dart" + } + } + }, + { + "match": "^ {4,}(?![ \\*]).*", + "captures": { + "0": { + "name": "variable.name.source.dart" + } + } + }, + { + "contentName": "variable.other.source.dart", + "begin": "```.*?$", + "end": "```" + }, + { + "match": "(`.*?`)", + "captures": { + "0": { + "name": "variable.other.source.dart" + } + } + }, + { + "match": "(`.*?`)", + "captures": { + "0": { + "name": "variable.other.source.dart" + } + } + }, + { + "match": "(\\* (( ).*))$", + "captures": { + "2": { + "name": "variable.other.source.dart" + } + } + }, + { + "match": "(\\* .*)$" + } + ] + }, + "comments": { + "patterns": [ + { + "name": "comment.block.empty.dart", + "match": "/\\*\\*/", + "captures": { + "0": { + "name": "punctuation.definition.comment.dart" + } + } + }, + { + "include": "#comments-doc-oldschool" + }, + { + "include": "#comments-doc" + }, + { + "include": "#comments-inline" + } + ] + }, + "comments-doc-oldschool": { + "patterns": [ + { + "name": "comment.block.documentation.dart", + "begin": "/\\*\\*", + "end": "\\*/", + "patterns": [ + { + "include": "#comments-doc-oldschool" + }, + { + "include": "#comments-block" + }, + { + "include": "#dartdoc" + } + ] + } + ] + }, + "comments-doc": { + "patterns": [ + { + "name": "comment.block.documentation.dart", + "begin": "///", + "while": "^\\s*///", + "patterns": [ + { + "include": "#dartdoc" + } + ] + } + ] + }, + "comments-inline": { + "patterns": [ + { + "include": "#comments-block" + }, + { + "match": "((//).*)$", + "captures": { + "1": { + "name": "comment.line.double-slash.dart" + } + } + } + ] + }, + "comments-block": { + "patterns": [ + { + "name": "comment.block.dart", + "begin": "/\\*", + "end": "\\*/", + "patterns": [ + { + "include": "#comments-block" + } + ] + } + ] + }, + "annotations": { + "patterns": [ + { + "name": "storage.type.annotation.dart", + "match": "@[a-zA-Z]+" + } + ] + }, + "constants-and-special-vars": { + "patterns": [ + { + "name": "constant.language.dart", + "match": "(?)", + "captures": { + "1": { + "name": "entity.name.function.dart" + } + } + } + ] + }, + "keywords": { + "patterns": [ + { + "name": "keyword.cast.dart", + "match": "(?>>?|~|\\^|\\||&)" + }, + { + "name": "keyword.operator.assignment.bitwise.dart", + "match": "((&|\\^|\\||<<|>>>?)=)" + }, + { + "name": "keyword.operator.closure.dart", + "match": "(=>)" + }, + { + "name": "keyword.operator.comparison.dart", + "match": "(==|!=|<=?|>=?)" + }, + { + "name": "keyword.operator.assignment.arithmetic.dart", + "match": "(([+*/%-]|\\~)=)" + }, + { + "name": "keyword.operator.assignment.dart", + "match": "(=)" + }, + { + "name": "keyword.operator.increment-decrement.dart", + "match": "(\\-\\-|\\+\\+)" + }, + { + "name": "keyword.operator.arithmetic.dart", + "match": "(\\-|\\+|\\*|\\/|\\~\\/|%)" + }, + { + "name": "keyword.operator.logical.dart", + "match": "(!|&&|\\|\\|)" + }, + { + "name": "storage.modifier.dart", + "match": "(? `${SETTING_SECTION}.${s}`), +); + +const enum State { + Disabled = 'disabled', + OnlyWithFlag = 'onlyWithFlag', + Smart = 'smart', + Always = 'always', +} + +let currentState: Promise<{ context: vscode.ExtensionContext; state: State | null }>; +let statusItem: vscode.StatusBarItem | undefined; // and there is no status bar item +let server: Promise | undefined; // auto attach server +let isTemporarilyDisabled = false; // whether the auto attach server is disabled temporarily, reset whenever the state changes + +export function activate(context: vscode.ExtensionContext): void { + currentState = Promise.resolve({ context, state: null }); + + context.subscriptions.push( + vscode.commands.registerCommand(TOGGLE_COMMAND, toggleAutoAttachSetting.bind(null, context)), + ); + + context.subscriptions.push( + vscode.workspace.onDidChangeConfiguration(e => { + // Whenever a setting is changed, disable auto attach, and re-enable + // it (if necessary) to refresh variables. + if ( + e.affectsConfiguration(`${SETTING_SECTION}.${SETTING_STATE}`) || + [...SETTINGS_CAUSE_REFRESH].some(setting => e.affectsConfiguration(setting)) + ) { + updateAutoAttach(State.Disabled); + updateAutoAttach(readCurrentState()); + } + }), + ); + + updateAutoAttach(readCurrentState()); +} + +export async function deactivate(): Promise { + await destroyAttachServer(); +} + +function getDefaultScope(info: ReturnType) { + if (!info) { + return vscode.ConfigurationTarget.Global; + } else if (info.workspaceFolderValue) { + return vscode.ConfigurationTarget.WorkspaceFolder; + } else if (info.workspaceValue) { + return vscode.ConfigurationTarget.Workspace; + } else if (info.globalValue) { + return vscode.ConfigurationTarget.Global; + } + + return vscode.ConfigurationTarget.Global; +} + +type PickResult = { state: State } | { setTempDisabled: boolean } | { scope: vscode.ConfigurationTarget } | undefined; +type PickItem = vscode.QuickPickItem & ({ state: State } | { setTempDisabled: boolean }); + +async function toggleAutoAttachSetting(context: vscode.ExtensionContext, scope?: vscode.ConfigurationTarget): Promise { + const section = vscode.workspace.getConfiguration(SETTING_SECTION); + scope = scope || getDefaultScope(section.inspect(SETTING_STATE)); + + const isGlobalScope = scope === vscode.ConfigurationTarget.Global; + const quickPick = vscode.window.createQuickPick(); + const current = readCurrentState(); + + const items: PickItem[] = [State.Always, State.Smart, State.OnlyWithFlag, State.Disabled].map(state => ({ + state, + label: TEXT_STATE_LABEL[state], + description: TEXT_STATE_DESCRIPTION[state], + alwaysShow: true, + })); + + if (current !== State.Disabled) { + items.unshift({ + setTempDisabled: !isTemporarilyDisabled, + label: isTemporarilyDisabled ? TEXT_TEMP_ENABLE : TEXT_TEMP_DISABLE, + alwaysShow: true, + }); + } + + quickPick.items = items; + quickPick.activeItems = isTemporarilyDisabled + ? [items[0]] + : quickPick.items.filter(i => 'state' in i && i.state === current); + quickPick.title = isGlobalScope ? TEXT_TOGGLE_GLOBAL : TEXT_TOGGLE_WORKSPACE; + quickPick.buttons = [ + { + iconPath: new vscode.ThemeIcon(isGlobalScope ? 'folder' : 'globe'), + tooltip: isGlobalScope ? TEXT_TOGGLE_WORKSPACE : TEXT_TOGGLE_GLOBAL, + }, + ]; + + quickPick.show(); + + let result = await new Promise(resolve => { + quickPick.onDidAccept(() => resolve(quickPick.selectedItems[0])); + quickPick.onDidHide(() => resolve(undefined)); + quickPick.onDidTriggerButton(() => { + resolve({ + scope: isGlobalScope + ? vscode.ConfigurationTarget.Workspace + : vscode.ConfigurationTarget.Global, + }); + }); + }); + + quickPick.dispose(); + + if (!result) { + return; + } + + if ('scope' in result) { + return await toggleAutoAttachSetting(context, result.scope); + } + + if ('state' in result) { + if (result.state !== current) { + section.update(SETTING_STATE, result.state, scope); + } else if (isTemporarilyDisabled) { + result = { setTempDisabled: false }; + } + } + + if ('setTempDisabled' in result) { + updateStatusBar(context, current, true); + isTemporarilyDisabled = result.setTempDisabled; + if (result.setTempDisabled) { + await destroyAttachServer(); + } else { + await createAttachServer(context); // unsets temp disabled var internally + } + updateStatusBar(context, current, false); + } +} + +function readCurrentState(): State { + const section = vscode.workspace.getConfiguration(SETTING_SECTION); + return section.get(SETTING_STATE) ?? State.Disabled; +} + +async function clearJsDebugAttachState(context: vscode.ExtensionContext) { + await context.workspaceState.update(STORAGE_IPC, undefined); + await vscode.commands.executeCommand('extension.js-debug.clearAutoAttachVariables'); + await destroyAttachServer(); +} + +/** + * Turns auto attach on, and returns the server auto attach is listening on + * if it's successful. + */ +async function createAttachServer(context: vscode.ExtensionContext) { + const ipcAddress = await getIpcAddress(context); + if (!ipcAddress) { + return undefined; + } + + server = createServerInner(ipcAddress).catch(err => { + console.error(err); + return undefined; + }); + + return await server; +} + +const createServerInner = async (ipcAddress: string) => { + try { + return await createServerInstance(ipcAddress); + } catch (e) { + // On unix/linux, the file can 'leak' if the process exits unexpectedly. + // If we see this, try to delete the file and then listen again. + await fs.unlink(ipcAddress).catch(() => undefined); + return await createServerInstance(ipcAddress); + } +}; + +const createServerInstance = (ipcAddress: string) => + new Promise((resolve, reject) => { + const s = createServer(socket => { + let data: Buffer[] = []; + socket.on('data', async chunk => { + if (chunk[chunk.length - 1] !== 0) { + // terminated with NUL byte + data.push(chunk); + return; + } + + data.push(chunk.slice(0, -1)); + + try { + await vscode.commands.executeCommand( + 'extension.js-debug.autoAttachToProcess', + JSON.parse(Buffer.concat(data).toString()), + ); + socket.write(Buffer.from([0])); + } catch (err) { + socket.write(Buffer.from([1])); + console.error(err); + } + }); + }) + .on('error', reject) + .listen(ipcAddress, () => resolve(s)); + }); + +/** + * Destroys the auto-attach server, if it's running. + */ +async function destroyAttachServer() { + const instance = await server; + if (instance) { + await new Promise(r => instance.close(r)); + } +} + +interface CachedIpcState { + ipcAddress: string; + jsDebugPath: string; + settingsValue: string; +} + +/** + * Map of logic that happens when auto attach states are entered and exited. + * All state transitions are queued and run in order; promises are awaited. + */ +const transitions: { [S in State]: (context: vscode.ExtensionContext) => Promise } = { + async [State.Disabled](context) { + await clearJsDebugAttachState(context); + }, + + async [State.OnlyWithFlag](context) { + await createAttachServer(context); + }, + + async [State.Smart](context) { + await createAttachServer(context); + }, + + async [State.Always](context) { + await createAttachServer(context); + }, +}; + +/** + * Ensures the status bar text reflects the current state. + */ +function updateStatusBar(context: vscode.ExtensionContext, state: State, busy = false) { + if (state === State.Disabled && !busy) { + statusItem?.hide(); + return; + } + + if (!statusItem) { + statusItem = vscode.window.createStatusBarItem('status.debug.autoAttach', vscode.StatusBarAlignment.Left); + statusItem.name = localize('status.name.auto.attach', "Debug Auto Attach"); + statusItem.command = TOGGLE_COMMAND; + statusItem.tooltip = localize('status.tooltip.auto.attach', "Automatically attach to node.js processes in debug mode"); + context.subscriptions.push(statusItem); + } + + let text = busy ? '$(loading) ' : ''; + text += isTemporarilyDisabled ? TEXT_TEMP_DISABLE_LABEL : TEXT_STATUSBAR_LABEL[state]; + statusItem.text = text; + statusItem.show(); +} + +/** + * Updates the auto attach feature based on the user or workspace setting + */ +function updateAutoAttach(newState: State) { + currentState = currentState.then(async ({ context, state: oldState }) => { + if (newState === oldState) { + return { context, state: oldState }; + } + + if (oldState !== null) { + updateStatusBar(context, oldState, true); + } + + await transitions[newState](context); + isTemporarilyDisabled = false; + updateStatusBar(context, newState, false); + return { context, state: newState }; + }); +} + +/** + * Gets the IPC address for the server to listen on for js-debug sessions. This + * is cached such that we can reuse the address of previous activations. + */ +async function getIpcAddress(context: vscode.ExtensionContext) { + // Iff the `cachedData` is present, the js-debug registered environment + // variables for this workspace--cachedData is set after successfully + // invoking the attachment command. + const cachedIpc = context.workspaceState.get(STORAGE_IPC); + + // We invalidate the IPC data if the js-debug path changes, since that + // indicates the extension was updated or reinstalled and the + // environment variables will have been lost. + // todo: make a way in the API to read environment data directly without activating js-debug? + const jsDebugPath = + vscode.extensions.getExtension('ms-vscode.js-debug-nightly')?.extensionPath || + vscode.extensions.getExtension('ms-vscode.js-debug')?.extensionPath; + + const settingsValue = getJsDebugSettingKey(); + if (cachedIpc?.jsDebugPath === jsDebugPath && cachedIpc?.settingsValue === settingsValue) { + return cachedIpc.ipcAddress; + } + + const result = await vscode.commands.executeCommand<{ ipcAddress: string }>( + 'extension.js-debug.setAutoAttachVariables', + cachedIpc?.ipcAddress, + ); + if (!result) { + return; + } + + const ipcAddress = result.ipcAddress; + await context.workspaceState.update(STORAGE_IPC, { + ipcAddress, + jsDebugPath, + settingsValue, + } as CachedIpcState); + + return ipcAddress; +} + +function getJsDebugSettingKey() { + let o: { [key: string]: unknown } = {}; + const config = vscode.workspace.getConfiguration(SETTING_SECTION); + for (const setting of SETTINGS_CAUSE_REFRESH) { + o[setting] = config.get(setting); + } + + return JSON.stringify(o); +} diff --git a/lib/vscode/extensions/debug-auto-launch/src/typings/ref.d.ts b/extensions/debug-auto-launch/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/debug-auto-launch/src/typings/ref.d.ts rename to extensions/debug-auto-launch/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/debug-auto-launch/tsconfig.json b/extensions/debug-auto-launch/tsconfig.json similarity index 100% rename from lib/vscode/extensions/debug-auto-launch/tsconfig.json rename to extensions/debug-auto-launch/tsconfig.json diff --git a/extensions/debug-auto-launch/yarn.lock b/extensions/debug-auto-launch/yarn.lock new file mode 100644 index 000000000000..f7a30098ef45 --- /dev/null +++ b/extensions/debug-auto-launch/yarn.lock @@ -0,0 +1,13 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +vscode-nls@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" + integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== diff --git a/lib/vscode/extensions/debug-server-ready/.vscode/launch.json b/extensions/debug-server-ready/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/debug-server-ready/.vscode/launch.json rename to extensions/debug-server-ready/.vscode/launch.json diff --git a/lib/vscode/extensions/debug-server-ready/.vscodeignore b/extensions/debug-server-ready/.vscodeignore similarity index 100% rename from lib/vscode/extensions/debug-server-ready/.vscodeignore rename to extensions/debug-server-ready/.vscodeignore diff --git a/lib/vscode/extensions/debug-server-ready/extension.webpack.config.js b/extensions/debug-server-ready/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/debug-server-ready/extension.webpack.config.js rename to extensions/debug-server-ready/extension.webpack.config.js diff --git a/lib/vscode/extensions/debug-server-ready/media/icon.png b/extensions/debug-server-ready/media/icon.png similarity index 100% rename from lib/vscode/extensions/debug-server-ready/media/icon.png rename to extensions/debug-server-ready/media/icon.png diff --git a/extensions/debug-server-ready/package.json b/extensions/debug-server-ready/package.json new file mode 100644 index 000000000000..e5c69df006bf --- /dev/null +++ b/extensions/debug-server-ready/package.json @@ -0,0 +1,160 @@ +{ + "name": "debug-server-ready", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "publisher": "vscode", + "license": "MIT", + "engines": { + "vscode": "^1.32.0" + }, + "icon": "media/icon.png", + "activationEvents": [ + "onDebugResolve" + ], + "capabilities": { + "virtualWorkspaces": false, + "untrustedWorkspaces": { + "supported": true + } + }, + "enableProposedApi": true, + "main": "./out/extension", + "scripts": { + "compile": "gulp compile-extension:debug-server-ready", + "watch": "gulp watch-extension:debug-server-ready" + }, + "contributes": { + "debuggers": [ + { + "type": "*", + "configurationAttributes": { + "launch": { + "properties": { + "serverReadyAction": { + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "markdownDescription": "%debug.server.ready.serverReadyAction.description%", + "default": { + "action": "openExternally" + }, + "properties": { + "action": { + "type": "string", + "enum": [ + "openExternally" + ], + "enumDescriptions": [ + "%debug.server.ready.action.openExternally.description%" + ], + "markdownDescription": "%debug.server.ready.action.description%", + "default": "openExternally" + }, + "pattern": { + "type": "string", + "markdownDescription": "%debug.server.ready.pattern.description%", + "default": "listening on port ([0-9]+)" + }, + "uriFormat": { + "type": "string", + "markdownDescription": "%debug.server.ready.uriFormat.description%", + "default": "http://localhost:%s" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "markdownDescription": "%debug.server.ready.serverReadyAction.description%", + "default": { + "action": "debugWithEdge", + "pattern": "listening on port ([0-9]+)", + "uriFormat": "http://localhost:%s", + "webRoot": "${workspaceFolder}" + }, + "properties": { + "action": { + "type": "string", + "enum": [ + "debugWithChrome", + "debugWithEdge" + ], + "enumDescriptions": [ + "%debug.server.ready.action.debugWithChrome.description%" + ], + "markdownDescription": "%debug.server.ready.action.description%", + "default": "debugWithEdge" + }, + "pattern": { + "type": "string", + "markdownDescription": "%debug.server.ready.pattern.description%", + "default": "listening on port ([0-9]+)" + }, + "uriFormat": { + "type": "string", + "markdownDescription": "%debug.server.ready.uriFormat.description%", + "default": "http://localhost:%s" + }, + "webRoot": { + "type": "string", + "markdownDescription": "%debug.server.ready.webRoot.description%", + "default": "${workspaceFolder}" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "markdownDescription": "%debug.server.ready.serverReadyAction.description%", + "default": { + "action": "startDebugging", + "name": "" + }, + "required": [ + "name" + ], + "properties": { + "action": { + "type": "string", + "enum": [ + "startDebugging" + ], + "enumDescriptions": [ + "%debug.server.ready.action.startDebugging.description%" + ], + "markdownDescription": "%debug.server.ready.action.description%", + "default": "startDebugging" + }, + "pattern": { + "type": "string", + "markdownDescription": "%debug.server.ready.pattern.description%", + "default": "listening on port ([0-9]+)" + }, + "name": { + "type": "string", + "markdownDescription": "%debug.server.ready.debugConfigName.description%", + "default": "Launch Browser" + } + } + } + ] + } + } + } + } + } + ] + }, + "dependencies": { + "vscode-nls": "^4.0.0" + }, + "devDependencies": { + "@types/node": "14.x" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/debug-server-ready/package.nls.json b/extensions/debug-server-ready/package.nls.json similarity index 100% rename from lib/vscode/extensions/debug-server-ready/package.nls.json rename to extensions/debug-server-ready/package.nls.json diff --git a/extensions/debug-server-ready/src/extension.ts b/extensions/debug-server-ready/src/extension.ts new file mode 100644 index 000000000000..7d6c59ea45ab --- /dev/null +++ b/extensions/debug-server-ready/src/extension.ts @@ -0,0 +1,248 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import * as util from 'util'; +import * as nls from 'vscode-nls'; + +const localize = nls.loadMessageBundle(); + +const PATTERN = 'listening on.* (https?://\\S+|[0-9]+)'; // matches "listening on port 3000" or "Now listening on: https://localhost:5001" +const URI_PORT_FORMAT = 'http://localhost:%s'; +const URI_FORMAT = '%s'; +const WEB_ROOT = '${workspaceFolder}'; + +interface ServerReadyAction { + pattern: string; + action?: 'openExternally' | 'debugWithChrome' | 'debugWithEdge' | 'startDebugging'; + uriFormat?: string; + webRoot?: string; + name?: string; +} + +class ServerReadyDetector extends vscode.Disposable { + + private static detectors = new Map(); + private static terminalDataListener: vscode.Disposable | undefined; + + private hasFired = false; + private shellPid?: number; + private regexp: RegExp; + private disposables: vscode.Disposable[] = []; + + static start(session: vscode.DebugSession): ServerReadyDetector | undefined { + if (session.configuration.serverReadyAction) { + let detector = ServerReadyDetector.detectors.get(session); + if (!detector) { + detector = new ServerReadyDetector(session); + ServerReadyDetector.detectors.set(session, detector); + } + return detector; + } + return undefined; + } + + static stop(session: vscode.DebugSession): void { + let detector = ServerReadyDetector.detectors.get(session); + if (detector) { + ServerReadyDetector.detectors.delete(session); + detector.dispose(); + } + } + + static rememberShellPid(session: vscode.DebugSession, pid: number) { + let detector = ServerReadyDetector.detectors.get(session); + if (detector) { + detector.shellPid = pid; + } + } + + static async startListeningTerminalData() { + if (!this.terminalDataListener) { + this.terminalDataListener = vscode.window.onDidWriteTerminalData(async e => { + + // first find the detector with a matching pid + const pid = await e.terminal.processId; + for (let [, detector] of this.detectors) { + if (detector.shellPid === pid) { + detector.detectPattern(e.data); + return; + } + } + + // if none found, try all detectors until one matches + for (let [, detector] of this.detectors) { + if (detector.detectPattern(e.data)) { + return; + } + } + }); + } + } + + private constructor(private session: vscode.DebugSession) { + super(() => this.internalDispose()); + + this.regexp = new RegExp(session.configuration.serverReadyAction.pattern || PATTERN, 'i'); + } + + private internalDispose() { + this.disposables.forEach(d => d.dispose()); + this.disposables = []; + } + + detectPattern(s: string): boolean { + if (!this.hasFired) { + const matches = this.regexp.exec(s); + if (matches && matches.length >= 1) { + this.openExternalWithString(this.session, matches.length > 1 ? matches[1] : ''); + this.hasFired = true; + this.internalDispose(); + return true; + } + } + return false; + } + + private openExternalWithString(session: vscode.DebugSession, captureString: string) { + + const args: ServerReadyAction = session.configuration.serverReadyAction; + + let uri; + if (captureString === '') { + // nothing captured by reg exp -> use the uriFormat as the target uri without substitution + // verify that format does not contain '%s' + const format = args.uriFormat || ''; + if (format.indexOf('%s') >= 0) { + const errMsg = localize('server.ready.nocapture.error', "Format uri ('{0}') uses a substitution placeholder but pattern did not capture anything.", format); + vscode.window.showErrorMessage(errMsg, { modal: true }).then(_ => undefined); + return; + } + uri = format; + } else { + // if no uriFormat is specified guess the appropriate format based on the captureString + const format = args.uriFormat || (/^[0-9]+$/.test(captureString) ? URI_PORT_FORMAT : URI_FORMAT); + // verify that format only contains a single '%s' + const s = format.split('%s'); + if (s.length !== 2) { + const errMsg = localize('server.ready.placeholder.error', "Format uri ('{0}') must contain exactly one substitution placeholder.", format); + vscode.window.showErrorMessage(errMsg, { modal: true }).then(_ => undefined); + return; + } + uri = util.format(format, captureString); + } + + this.openExternalWithUri(session, uri); + } + + private openExternalWithUri(session: vscode.DebugSession, uri: string) { + + const args: ServerReadyAction = session.configuration.serverReadyAction; + switch (args.action || 'openExternally') { + + case 'openExternally': + vscode.env.openExternal(vscode.Uri.parse(uri)); + break; + + case 'debugWithChrome': + this.debugWithBrowser('pwa-chrome', session, uri); + break; + + case 'debugWithEdge': + this.debugWithBrowser('pwa-msedge', session, uri); + break; + + case 'startDebugging': + vscode.debug.startDebugging(session.workspaceFolder, args.name || 'unspecified'); + break; + + default: + // not supported + break; + } + } + + private debugWithBrowser(type: string, session: vscode.DebugSession, uri: string) { + return vscode.debug.startDebugging(session.workspaceFolder, { + type, + name: 'Browser Debug', + request: 'launch', + url: uri, + webRoot: session.configuration.serverReadyAction.webRoot || WEB_ROOT + }); + } +} + +export function activate(context: vscode.ExtensionContext) { + + context.subscriptions.push(vscode.debug.onDidChangeActiveDebugSession(session => { + if (session && session.configuration.serverReadyAction) { + const detector = ServerReadyDetector.start(session); + if (detector) { + ServerReadyDetector.startListeningTerminalData(); + } + } + })); + + context.subscriptions.push(vscode.debug.onDidTerminateDebugSession(session => { + ServerReadyDetector.stop(session); + })); + + const trackers = new Set(); + + context.subscriptions.push(vscode.debug.registerDebugConfigurationProvider('*', { + resolveDebugConfigurationWithSubstitutedVariables(_folder: vscode.WorkspaceFolder | undefined, debugConfiguration: vscode.DebugConfiguration) { + if (debugConfiguration.type && debugConfiguration.serverReadyAction) { + if (!trackers.has(debugConfiguration.type)) { + trackers.add(debugConfiguration.type); + startTrackerForType(context, debugConfiguration.type); + } + } + return debugConfiguration; + } + })); +} + +function startTrackerForType(context: vscode.ExtensionContext, type: string) { + + // scan debug console output for a PORT message + context.subscriptions.push(vscode.debug.registerDebugAdapterTrackerFactory(type, { + createDebugAdapterTracker(session: vscode.DebugSession) { + const detector = ServerReadyDetector.start(session); + if (detector) { + let runInTerminalRequestSeq: number | undefined; + return { + onDidSendMessage: m => { + if (m.type === 'event' && m.event === 'output' && m.body) { + switch (m.body.category) { + case 'console': + case 'stderr': + case 'stdout': + if (m.body.output) { + detector.detectPattern(m.body.output); + } + break; + default: + break; + } + } + if (m.type === 'request' && m.command === 'runInTerminal' && m.arguments) { + if (m.arguments.kind === 'integrated') { + runInTerminalRequestSeq = m.seq; // remember this to find matching response + } + } + }, + onWillReceiveMessage: m => { + if (runInTerminalRequestSeq && m.type === 'response' && m.command === 'runInTerminal' && m.body && runInTerminalRequestSeq === m.request_seq) { + runInTerminalRequestSeq = undefined; + ServerReadyDetector.rememberShellPid(session, m.body.shellProcessId); + } + } + }; + } + return undefined; + } + })); +} diff --git a/lib/vscode/extensions/debug-server-ready/src/typings/ref.d.ts b/extensions/debug-server-ready/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/debug-server-ready/src/typings/ref.d.ts rename to extensions/debug-server-ready/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/debug-server-ready/tsconfig.json b/extensions/debug-server-ready/tsconfig.json similarity index 100% rename from lib/vscode/extensions/debug-server-ready/tsconfig.json rename to extensions/debug-server-ready/tsconfig.json diff --git a/extensions/debug-server-ready/yarn.lock b/extensions/debug-server-ready/yarn.lock new file mode 100644 index 000000000000..f7a30098ef45 --- /dev/null +++ b/extensions/debug-server-ready/yarn.lock @@ -0,0 +1,13 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +vscode-nls@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" + integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== diff --git a/lib/vscode/extensions/docker/.vscodeignore b/extensions/docker/.vscodeignore similarity index 100% rename from lib/vscode/extensions/docker/.vscodeignore rename to extensions/docker/.vscodeignore diff --git a/lib/vscode/extensions/docker/cgmanifest.json b/extensions/docker/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/docker/cgmanifest.json rename to extensions/docker/cgmanifest.json diff --git a/lib/vscode/extensions/docker/language-configuration.json b/extensions/docker/language-configuration.json similarity index 100% rename from lib/vscode/extensions/docker/language-configuration.json rename to extensions/docker/language-configuration.json diff --git a/lib/vscode/extensions/docker/package.json b/extensions/docker/package.json similarity index 100% rename from lib/vscode/extensions/docker/package.json rename to extensions/docker/package.json diff --git a/lib/vscode/extensions/docker/package.nls.json b/extensions/docker/package.nls.json similarity index 100% rename from lib/vscode/extensions/docker/package.nls.json rename to extensions/docker/package.nls.json diff --git a/lib/vscode/extensions/docker/syntaxes/docker.tmLanguage.json b/extensions/docker/syntaxes/docker.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/docker/syntaxes/docker.tmLanguage.json rename to extensions/docker/syntaxes/docker.tmLanguage.json diff --git a/lib/vscode/extensions/docker/yarn.lock b/extensions/docker/yarn.lock similarity index 100% rename from lib/vscode/extensions/docker/yarn.lock rename to extensions/docker/yarn.lock diff --git a/lib/vscode/extensions/emmet/.vscode/launch.json b/extensions/emmet/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/emmet/.vscode/launch.json rename to extensions/emmet/.vscode/launch.json diff --git a/lib/vscode/extensions/emmet/.vscode/settings.json b/extensions/emmet/.vscode/settings.json similarity index 100% rename from lib/vscode/extensions/emmet/.vscode/settings.json rename to extensions/emmet/.vscode/settings.json diff --git a/lib/vscode/extensions/emmet/.vscodeignore b/extensions/emmet/.vscodeignore similarity index 100% rename from lib/vscode/extensions/emmet/.vscodeignore rename to extensions/emmet/.vscodeignore diff --git a/lib/vscode/extensions/emmet/CONTRIBUTING.md b/extensions/emmet/CONTRIBUTING.md similarity index 100% rename from lib/vscode/extensions/emmet/CONTRIBUTING.md rename to extensions/emmet/CONTRIBUTING.md diff --git a/lib/vscode/extensions/emmet/README.md b/extensions/emmet/README.md similarity index 100% rename from lib/vscode/extensions/emmet/README.md rename to extensions/emmet/README.md diff --git a/lib/vscode/extensions/emmet/cgmanifest.json b/extensions/emmet/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/emmet/cgmanifest.json rename to extensions/emmet/cgmanifest.json diff --git a/lib/vscode/extensions/emmet/extension-browser.webpack.config.js b/extensions/emmet/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/emmet/extension-browser.webpack.config.js rename to extensions/emmet/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/emmet/extension.webpack.config.js b/extensions/emmet/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/emmet/extension.webpack.config.js rename to extensions/emmet/extension.webpack.config.js diff --git a/lib/vscode/extensions/emmet/images/icon.png b/extensions/emmet/images/icon.png similarity index 100% rename from lib/vscode/extensions/emmet/images/icon.png rename to extensions/emmet/images/icon.png diff --git a/extensions/emmet/package.json b/extensions/emmet/package.json new file mode 100644 index 000000000000..77b08c02ac92 --- /dev/null +++ b/extensions/emmet/package.json @@ -0,0 +1,468 @@ +{ + "name": "emmet", + "displayName": "Emmet", + "description": "%description%", + "version": "1.0.0", + "publisher": "vscode", + "license": "MIT", + "engines": { + "vscode": "^1.13.0" + }, + "icon": "images/icon.png", + "categories": [ + "Other" + ], + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + }, + "activationEvents": [ + "onStartupFinished", + "onCommand:emmet.expandAbbreviation", + "onLanguage:html", + "onLanguage:css", + "onLanguage:scss", + "onLanguage:less" + ], + "main": "./out/node/emmetNodeMain", + "browser": "./dist/browser/emmetBrowserMain", + "contributes": { + "configuration": { + "type": "object", + "title": "Emmet", + "properties": { + "emmet.showExpandedAbbreviation": { + "type": [ + "string" + ], + "enum": [ + "never", + "always", + "inMarkupAndStylesheetFilesOnly" + ], + "default": "always", + "markdownDescription": "%emmetShowExpandedAbbreviation%" + }, + "emmet.showAbbreviationSuggestions": { + "type": "boolean", + "default": true, + "markdownDescription": "%emmetShowAbbreviationSuggestions%" + }, + "emmet.includeLanguages": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "default": {}, + "markdownDescription": "%emmetIncludeLanguages%" + }, + "emmet.variables": { + "type": "object", + "properties": { + "lang": { + "type": "string", + "default": "en" + }, + "charset": { + "type": "string", + "default": "UTF-8" + } + }, + "default": {}, + "markdownDescription": "%emmetVariables%" + }, + "emmet.syntaxProfiles": { + "type": "object", + "default": {}, + "markdownDescription": "%emmetSyntaxProfiles%" + }, + "emmet.excludeLanguages": { + "type": "array", + "default": [ + "markdown" + ], + "markdownDescription": "%emmetExclude%" + }, + "emmet.extensionsPath": { + "type": "array", + "items": { + "type": "string", + "markdownDescription": "%emmetExtensionsPathItem%" + }, + "default": [], + "markdownDescription": "%emmetExtensionsPath%" + }, + "emmet.triggerExpansionOnTab": { + "type": "boolean", + "default": false, + "markdownDescription": "%emmetTriggerExpansionOnTab%" + }, + "emmet.preferences": { + "type": "object", + "default": {}, + "markdownDescription": "%emmetPreferences%", + "properties": { + "css.intUnit": { + "type": "string", + "default": "px", + "markdownDescription": "%emmetPreferencesIntUnit%" + }, + "css.floatUnit": { + "type": "string", + "default": "em", + "markdownDescription": "%emmetPreferencesFloatUnit%" + }, + "css.propertyEnd": { + "type": "string", + "default": ";", + "markdownDescription": "%emmetPreferencesCssAfter%" + }, + "sass.propertyEnd": { + "type": "string", + "default": "", + "markdownDescription": "%emmetPreferencesSassAfter%" + }, + "stylus.propertyEnd": { + "type": "string", + "default": "", + "markdownDescription": "%emmetPreferencesStylusAfter%" + }, + "css.valueSeparator": { + "type": "string", + "default": ": ", + "markdownDescription": "%emmetPreferencesCssBetween%" + }, + "sass.valueSeparator": { + "type": "string", + "default": ": ", + "markdownDescription": "%emmetPreferencesSassBetween%" + }, + "stylus.valueSeparator": { + "type": "string", + "default": " ", + "markdownDescription": "%emmetPreferencesStylusBetween%" + }, + "bem.elementSeparator": { + "type": "string", + "default": "__", + "markdownDescription": "%emmetPreferencesBemElementSeparator%" + }, + "bem.modifierSeparator": { + "type": "string", + "default": "_", + "markdownDescription": "%emmetPreferencesBemModifierSeparator%" + }, + "filter.commentBefore": { + "type": "string", + "default": "", + "markdownDescription": "%emmetPreferencesFilterCommentBefore%" + }, + "filter.commentAfter": { + "type": "string", + "default": "\n", + "markdownDescription": "%emmetPreferencesFilterCommentAfter%" + }, + "filter.commentTrigger": { + "type": "array", + "default": [ + "id", + "class" + ], + "markdownDescription": "%emmetPreferencesFilterCommentTrigger%" + }, + "format.noIndentTags": { + "type": "array", + "default": [ + "html" + ], + "markdownDescription": "%emmetPreferencesFormatNoIndentTags%" + }, + "format.forceIndentationForTags": { + "type": "array", + "default": [ + "body" + ], + "markdownDescription": "%emmetPreferencesFormatForceIndentTags%" + }, + "profile.allowCompactBoolean": { + "type": "boolean", + "default": false, + "markdownDescription": "%emmetPreferencesAllowCompactBoolean%" + }, + "css.webkitProperties": { + "type": "string", + "default": null, + "markdownDescription": "%emmetPreferencesCssWebkitProperties%" + }, + "css.mozProperties": { + "type": "string", + "default": null, + "markdownDescription": "%emmetPreferencesCssMozProperties%" + }, + "css.oProperties": { + "type": "string", + "default": null, + "markdownDescription": "%emmetPreferencesCssOProperties%" + }, + "css.msProperties": { + "type": "string", + "default": null, + "markdownDescription": "%emmetPreferencesCssMsProperties%" + }, + "css.fuzzySearchMinScore": { + "type": "number", + "default": 0.3, + "markdownDescription": "%emmetPreferencesCssFuzzySearchMinScore%" + }, + "output.inlineBreak": { + "type": "number", + "default": 0, + "markdownDescription": "%emmetPreferencesOutputInlineBreak%" + }, + "output.reverseAttributes": { + "type": "boolean", + "default": false, + "markdownDescription": "%emmetPreferencesOutputReverseAttributes%" + }, + "output.selfClosingStyle": { + "type": "string", + "enum": [ + "html", + "xhtml", + "xml" + ], + "default": "html", + "markdownDescription": "%emmetPreferencesOutputSelfClosingStyle%" + }, + "css.color.short": { + "type": "boolean", + "default": true, + "markdownDescription": "%emmetPreferencesCssColorShort%" + } + } + }, + "emmet.showSuggestionsAsSnippets": { + "type": "boolean", + "default": false, + "markdownDescription": "%emmetShowSuggestionsAsSnippets%" + }, + "emmet.optimizeStylesheetParsing": { + "type": "boolean", + "default": true, + "markdownDescription": "%emmetOptimizeStylesheetParsing%" + } + } + }, + "commands": [ + { + "command": "editor.emmet.action.wrapWithAbbreviation", + "title": "%command.wrapWithAbbreviation%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.removeTag", + "title": "%command.removeTag%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.updateTag", + "title": "%command.updateTag%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.matchTag", + "title": "%command.matchTag%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.balanceIn", + "title": "%command.balanceIn%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.balanceOut", + "title": "%command.balanceOut%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.prevEditPoint", + "title": "%command.prevEditPoint%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.nextEditPoint", + "title": "%command.nextEditPoint%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.mergeLines", + "title": "%command.mergeLines%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.selectPrevItem", + "title": "%command.selectPrevItem%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.selectNextItem", + "title": "%command.selectNextItem%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.splitJoinTag", + "title": "%command.splitJoinTag%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.toggleComment", + "title": "%command.toggleComment%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.evaluateMathExpression", + "title": "%command.evaluateMathExpression%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.updateImageSize", + "title": "%command.updateImageSize%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.incrementNumberByOneTenth", + "title": "%command.incrementNumberByOneTenth%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.incrementNumberByOne", + "title": "%command.incrementNumberByOne%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.incrementNumberByTen", + "title": "%command.incrementNumberByTen%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.decrementNumberByOneTenth", + "title": "%command.decrementNumberByOneTenth%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.decrementNumberByOne", + "title": "%command.decrementNumberByOne%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.decrementNumberByTen", + "title": "%command.decrementNumberByTen%", + "category": "Emmet" + }, + { + "command": "editor.emmet.action.reflectCSSValue", + "title": "%command.reflectCSSValue%", + "category": "Emmet" + }, + { + "command": "workbench.action.showEmmetCommands", + "title": "%command.showEmmetCommands%", + "category": "" + } + ], + "menus": { + "commandPalette": [ + { + "command": "editor.emmet.action.wrapWithAbbreviation" + }, + { + "command": "editor.emmet.action.removeTag" + }, + { + "command": "editor.emmet.action.updateTag" + }, + { + "command": "editor.emmet.action.matchTag" + }, + { + "command": "editor.emmet.action.balanceIn" + }, + { + "command": "editor.emmet.action.balanceOut" + }, + { + "command": "editor.emmet.action.prevEditPoint" + }, + { + "command": "editor.emmet.action.nextEditPoint" + }, + { + "command": "editor.emmet.action.mergeLines" + }, + { + "command": "editor.emmet.action.selectPrevItem" + }, + { + "command": "editor.emmet.action.selectNextItem" + }, + { + "command": "editor.emmet.action.splitJoinTag" + }, + { + "command": "editor.emmet.action.toggleComment" + }, + { + "command": "editor.emmet.action.evaluateMathExpression" + }, + { + "command": "editor.emmet.action.updateImageSize", + "when": "resourceScheme =~ /^file$/" + }, + { + "command": "editor.emmet.action.incrementNumberByOneTenth" + }, + { + "command": "editor.emmet.action.incrementNumberByOne" + }, + { + "command": "editor.emmet.action.incrementNumberByTen" + }, + { + "command": "editor.emmet.action.decrementNumberByOneTenth" + }, + { + "command": "editor.emmet.action.decrementNumberByOne" + }, + { + "command": "editor.emmet.action.decrementNumberByTen" + }, + { + "command": "editor.emmet.action.reflectCSSValue" + } + ] + } + }, + "scripts": { + "watch": "gulp watch-extension:emmet", + "compile": "gulp compile-extension:emmet", + "deps": "yarn add vscode-emmet-helper" + }, + "devDependencies": { + "@types/node": "14.x" + }, + "dependencies": { + "@emmetio/abbreviation": "^2.2.0", + "@emmetio/css-parser": "ramya-rao-a/css-parser#vscode", + "@emmetio/html-matcher": "^0.3.3", + "@emmetio/math-expression": "^1.0.4", + "image-size": "^0.5.2", + "vscode-emmet-helper": "^2.3.0", + "vscode-languageserver-textdocument": "^1.0.1" + }, + "capabilities": { + "virtualWorkspaces": true, + "untrustedWorkspaces": { + "supported": true + } + } +} diff --git a/lib/vscode/extensions/emmet/package.nls.json b/extensions/emmet/package.nls.json similarity index 100% rename from lib/vscode/extensions/emmet/package.nls.json rename to extensions/emmet/package.nls.json diff --git a/lib/vscode/extensions/emmet/src/abbreviationActions.ts b/extensions/emmet/src/abbreviationActions.ts similarity index 97% rename from lib/vscode/extensions/emmet/src/abbreviationActions.ts rename to extensions/emmet/src/abbreviationActions.ts index bbdec7b28f6b..f5bccfc5b9dd 100644 --- a/lib/vscode/extensions/emmet/src/abbreviationActions.ts +++ b/extensions/emmet/src/abbreviationActions.ts @@ -6,7 +6,7 @@ import * as vscode from 'vscode'; import * as nls from 'vscode-nls'; import { Node, HtmlNode, Rule, Property, Stylesheet } from 'EmmetFlatNode'; -import { getEmmetHelper, getFlatNode, getMappingForIncludedLanguages, validate, getEmmetConfiguration, isStyleSheet, getEmmetMode, parsePartialStylesheet, isStyleAttribute, getEmbeddedCssNodeIfAny, allowedMimeTypesInScriptTag, toLSTextDocument, isOffsetInsideOpenOrCloseTag } from './util'; +import { getEmmetHelper, getFlatNode, getHtmlFlatNode, getMappingForIncludedLanguages, validate, getEmmetConfiguration, isStyleSheet, getEmmetMode, parsePartialStylesheet, isStyleAttribute, getEmbeddedCssNodeIfAny, allowedMimeTypesInScriptTag, toLSTextDocument, isOffsetInsideOpenOrCloseTag } from './util'; import { getRootNode as parseDocument } from './parseDocument'; const localize = nls.loadMessageBundle(); @@ -56,7 +56,8 @@ export async function wrapWithAbbreviation(args: any): Promise { let { start, end } = rangeToReplace; const startOffset = document.offsetAt(start); - const startNode = getFlatNode(rootNode, startOffset, true); + const documentText = document.getText(); + const startNode = getHtmlFlatNode(documentText, rootNode, startOffset, true); if (startNode && isOffsetInsideOpenOrCloseTag(startNode, startOffset)) { start = document.positionAt(startNode.start); const nodeEndPosition = document.positionAt(startNode.end); @@ -64,7 +65,7 @@ export async function wrapWithAbbreviation(args: any): Promise { } const endOffset = document.offsetAt(end); - const endNode = getFlatNode(rootNode, endOffset, true); + const endNode = getHtmlFlatNode(documentText, rootNode, endOffset, true); if (endNode && isOffsetInsideOpenOrCloseTag(endNode, endOffset)) { const nodeStartPosition = document.positionAt(endNode.start); start = nodeStartPosition.isBefore(start) ? nodeStartPosition : start; @@ -665,6 +666,8 @@ function expandAbbr(input: ExpandAbbreviationInput): string | undefined { const expandOptions = helper.getExpandOptions(input.syntax, getEmmetConfiguration(input.syntax), input.filter); if (input.textToWrap) { + // escape ${ sections, fixes #122231 + input.textToWrap = input.textToWrap.map(e => e.replace(/\$\{/g, '\\\$\{')); if (input.filter && input.filter.includes('t')) { input.textToWrap = input.textToWrap.map(line => { return line.replace(trimRegex, '').trim(); diff --git a/lib/vscode/extensions/emmet/src/balance.ts b/extensions/emmet/src/balance.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/balance.ts rename to extensions/emmet/src/balance.ts diff --git a/lib/vscode/extensions/emmet/src/browser/emmetBrowserMain.ts b/extensions/emmet/src/browser/emmetBrowserMain.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/browser/emmetBrowserMain.ts rename to extensions/emmet/src/browser/emmetBrowserMain.ts diff --git a/lib/vscode/extensions/emmet/src/bufferStream.ts b/extensions/emmet/src/bufferStream.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/bufferStream.ts rename to extensions/emmet/src/bufferStream.ts diff --git a/lib/vscode/extensions/emmet/src/defaultCompletionProvider.ts b/extensions/emmet/src/defaultCompletionProvider.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/defaultCompletionProvider.ts rename to extensions/emmet/src/defaultCompletionProvider.ts diff --git a/lib/vscode/extensions/emmet/src/editPoint.ts b/extensions/emmet/src/editPoint.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/editPoint.ts rename to extensions/emmet/src/editPoint.ts diff --git a/lib/vscode/extensions/emmet/src/emmetCommon.ts b/extensions/emmet/src/emmetCommon.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/emmetCommon.ts rename to extensions/emmet/src/emmetCommon.ts diff --git a/lib/vscode/extensions/emmet/src/evaluateMathExpression.ts b/extensions/emmet/src/evaluateMathExpression.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/evaluateMathExpression.ts rename to extensions/emmet/src/evaluateMathExpression.ts diff --git a/lib/vscode/extensions/emmet/src/imageSizeHelper.ts b/extensions/emmet/src/imageSizeHelper.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/imageSizeHelper.ts rename to extensions/emmet/src/imageSizeHelper.ts diff --git a/lib/vscode/extensions/emmet/src/incrementDecrement.ts b/extensions/emmet/src/incrementDecrement.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/incrementDecrement.ts rename to extensions/emmet/src/incrementDecrement.ts diff --git a/lib/vscode/extensions/emmet/src/locateFile.ts b/extensions/emmet/src/locateFile.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/locateFile.ts rename to extensions/emmet/src/locateFile.ts diff --git a/lib/vscode/extensions/emmet/src/matchTag.ts b/extensions/emmet/src/matchTag.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/matchTag.ts rename to extensions/emmet/src/matchTag.ts diff --git a/lib/vscode/extensions/emmet/src/mergeLines.ts b/extensions/emmet/src/mergeLines.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/mergeLines.ts rename to extensions/emmet/src/mergeLines.ts diff --git a/lib/vscode/extensions/emmet/src/node/emmetNodeMain.ts b/extensions/emmet/src/node/emmetNodeMain.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/node/emmetNodeMain.ts rename to extensions/emmet/src/node/emmetNodeMain.ts diff --git a/lib/vscode/extensions/emmet/src/parseDocument.ts b/extensions/emmet/src/parseDocument.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/parseDocument.ts rename to extensions/emmet/src/parseDocument.ts diff --git a/lib/vscode/extensions/emmet/src/reflectCssValue.ts b/extensions/emmet/src/reflectCssValue.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/reflectCssValue.ts rename to extensions/emmet/src/reflectCssValue.ts diff --git a/lib/vscode/extensions/emmet/src/removeTag.ts b/extensions/emmet/src/removeTag.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/removeTag.ts rename to extensions/emmet/src/removeTag.ts diff --git a/lib/vscode/extensions/emmet/src/selectItem.ts b/extensions/emmet/src/selectItem.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/selectItem.ts rename to extensions/emmet/src/selectItem.ts diff --git a/lib/vscode/extensions/emmet/src/selectItemHTML.ts b/extensions/emmet/src/selectItemHTML.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/selectItemHTML.ts rename to extensions/emmet/src/selectItemHTML.ts diff --git a/lib/vscode/extensions/emmet/src/selectItemStylesheet.ts b/extensions/emmet/src/selectItemStylesheet.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/selectItemStylesheet.ts rename to extensions/emmet/src/selectItemStylesheet.ts diff --git a/lib/vscode/extensions/emmet/src/splitJoinTag.ts b/extensions/emmet/src/splitJoinTag.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/splitJoinTag.ts rename to extensions/emmet/src/splitJoinTag.ts diff --git a/lib/vscode/extensions/emmet/src/test/abbreviationAction.test.ts b/extensions/emmet/src/test/abbreviationAction.test.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/test/abbreviationAction.test.ts rename to extensions/emmet/src/test/abbreviationAction.test.ts diff --git a/lib/vscode/extensions/emmet/src/test/completion.test.ts b/extensions/emmet/src/test/completion.test.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/test/completion.test.ts rename to extensions/emmet/src/test/completion.test.ts diff --git a/lib/vscode/extensions/emmet/src/test/cssAbbreviationAction.test.ts b/extensions/emmet/src/test/cssAbbreviationAction.test.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/test/cssAbbreviationAction.test.ts rename to extensions/emmet/src/test/cssAbbreviationAction.test.ts diff --git a/lib/vscode/extensions/emmet/src/test/editPointSelectItemBalance.test.ts b/extensions/emmet/src/test/editPointSelectItemBalance.test.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/test/editPointSelectItemBalance.test.ts rename to extensions/emmet/src/test/editPointSelectItemBalance.test.ts diff --git a/lib/vscode/extensions/emmet/src/test/evaluateMathExpression.test.ts b/extensions/emmet/src/test/evaluateMathExpression.test.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/test/evaluateMathExpression.test.ts rename to extensions/emmet/src/test/evaluateMathExpression.test.ts diff --git a/lib/vscode/extensions/emmet/src/test/incrementDecrement.test.ts b/extensions/emmet/src/test/incrementDecrement.test.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/test/incrementDecrement.test.ts rename to extensions/emmet/src/test/incrementDecrement.test.ts diff --git a/lib/vscode/extensions/emmet/src/test/index.ts b/extensions/emmet/src/test/index.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/test/index.ts rename to extensions/emmet/src/test/index.ts diff --git a/lib/vscode/extensions/emmet/src/test/partialParsingStylesheet.test.ts b/extensions/emmet/src/test/partialParsingStylesheet.test.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/test/partialParsingStylesheet.test.ts rename to extensions/emmet/src/test/partialParsingStylesheet.test.ts diff --git a/lib/vscode/extensions/emmet/src/test/reflectCssValue.test.ts b/extensions/emmet/src/test/reflectCssValue.test.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/test/reflectCssValue.test.ts rename to extensions/emmet/src/test/reflectCssValue.test.ts diff --git a/lib/vscode/extensions/emmet/src/test/tagActions.test.ts b/extensions/emmet/src/test/tagActions.test.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/test/tagActions.test.ts rename to extensions/emmet/src/test/tagActions.test.ts diff --git a/lib/vscode/extensions/emmet/src/test/testUtils.ts b/extensions/emmet/src/test/testUtils.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/test/testUtils.ts rename to extensions/emmet/src/test/testUtils.ts diff --git a/lib/vscode/extensions/emmet/src/test/toggleComment.test.ts b/extensions/emmet/src/test/toggleComment.test.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/test/toggleComment.test.ts rename to extensions/emmet/src/test/toggleComment.test.ts diff --git a/lib/vscode/extensions/emmet/src/test/updateImageSize.test.ts b/extensions/emmet/src/test/updateImageSize.test.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/test/updateImageSize.test.ts rename to extensions/emmet/src/test/updateImageSize.test.ts diff --git a/lib/vscode/extensions/emmet/src/test/wrapWithAbbreviation.test.ts b/extensions/emmet/src/test/wrapWithAbbreviation.test.ts similarity index 84% rename from lib/vscode/extensions/emmet/src/test/wrapWithAbbreviation.test.ts rename to extensions/emmet/src/test/wrapWithAbbreviation.test.ts index 020f01912913..978d154ae97f 100644 --- a/lib/vscode/extensions/emmet/src/test/wrapWithAbbreviation.test.ts +++ b/extensions/emmet/src/test/wrapWithAbbreviation.test.ts @@ -13,6 +13,7 @@ const htmlContentsForBlockWrapTests = ` `; @@ -20,6 +21,7 @@ const htmlContentsForInlineWrapTests = ` `; @@ -31,6 +33,9 @@ const wrapBlockElementExpected = `
  • $hithere
  • +
    +
  • \${hithere}
  • +
    `; @@ -38,6 +43,7 @@ const wrapInlineElementExpected = ` `; @@ -49,6 +55,9 @@ const wrapSnippetExpected = `
  • $hithere
  • + +
  • \${hithere}
  • +
    `; @@ -64,6 +73,11 @@ const wrapMultiLineAbbrExpected = `
  • $hithere
  • +
      +
    • +
    • \${hithere}
    • + +
    `; @@ -77,15 +91,18 @@ const wrapInlineElementExpectedFormatFalse = `

  • $hithere
  • +

    +
  • \${hithere}
  • +

    `; suite('Tests for Wrap with Abbreviations', () => { teardown(closeAllEditors); - const multiCursors = [new Selection(2, 6, 2, 6), new Selection(3, 6, 3, 6)]; - const multiCursorsWithSelection = [new Selection(2, 2, 2, 28), new Selection(3, 2, 3, 33)]; - const multiCursorsWithFullLineSelection = [new Selection(2, 0, 2, 28), new Selection(3, 0, 4, 0)]; + const multiCursors = [new Selection(2, 6, 2, 6), new Selection(3, 6, 3, 6), new Selection(4, 6, 4, 6)]; + const multiCursorsWithSelection = [new Selection(2, 2, 2, 28), new Selection(3, 2, 3, 33), new Selection(4, 6, 4, 36)]; + const multiCursorsWithFullLineSelection = [new Selection(2, 0, 2, 28), new Selection(3, 0, 3, 33), new Selection(4, 0, 4, 36)]; const oldValueForSyntaxProfiles = workspace.getConfiguration('emmet').inspect('syntaxProfile'); @@ -202,6 +219,79 @@ suite('Tests for Wrap with Abbreviations', () => { return testWrapWithAbbreviation([new Selection(3, 2, 3, 2)], 'div', expectedContents, contents); }); + test('Wrap with abbreviation inner node in cdata', () => { + const contents = ` + +

    Test 2

    + ]]> + hello + + `; + const expectedContents = ` + +
    +

    Test 2

    +
    + ]]> + hello + + `; + return testWrapWithAbbreviation([new Selection(6, 5, 6, 5)], 'div', expectedContents, contents); + }); + + test('Wrap with abbreviation inner node in script in cdata', () => { + const contents = ` + + `; + const expectedContents = ` + + `; + return testWrapWithAbbreviation([new Selection(4, 10, 4, 10)], 'div', expectedContents, contents); + }); + + test('Wrap with abbreviation inner node in cdata one-liner', () => { + const contents = ` + + `; + // this result occurs because no selection on the open/close p tag was given + const expectedContents = ` + + `; + return testWrapWithAbbreviation([new Selection(2, 15, 2, 15)], 'div', expectedContents, contents); + }); + test('Wrap with multiline abbreviation doesnt add extra spaces', () => { // Issue #29898 const contents = ` @@ -343,11 +433,12 @@ suite('Tests for Wrap with Abbreviations', () => {
  • img
  • $hithere
  • +
  • \${hithere}
  • `; - return testWrapWithAbbreviation([new Selection(2, 2, 3, 33)], '.hello', wrapMultiLineJsxExpected, htmlContentsForBlockWrapTests, 'jsx'); + return testWrapWithAbbreviation([new Selection(2, 2, 4, 36)], '.hello', wrapMultiLineJsxExpected, htmlContentsForBlockWrapTests, 'jsx'); }); test('Wrap individual line with abbreviation uses className for jsx files', () => { @@ -359,10 +450,13 @@ suite('Tests for Wrap with Abbreviations', () => {
  • $hithere
  • +
    +
  • \${hithere}
  • +
    `; - return testWrapIndividualLinesWithAbbreviation([new Selection(2, 2, 3, 33)], '.hello$*', wrapIndividualLinesJsxExpected, htmlContentsForBlockWrapTests, 'jsx'); + return testWrapIndividualLinesWithAbbreviation([new Selection(2, 2, 4, 36)], '.hello$*', wrapIndividualLinesJsxExpected, htmlContentsForBlockWrapTests, 'jsx'); }); test('Wrap with abbreviation merge overlapping computed ranges', () => { diff --git a/lib/vscode/extensions/emmet/src/toggleComment.ts b/extensions/emmet/src/toggleComment.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/toggleComment.ts rename to extensions/emmet/src/toggleComment.ts diff --git a/lib/vscode/extensions/emmet/src/typings/EmmetFlatNode.d.ts b/extensions/emmet/src/typings/EmmetFlatNode.d.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/typings/EmmetFlatNode.d.ts rename to extensions/emmet/src/typings/EmmetFlatNode.d.ts diff --git a/lib/vscode/extensions/emmet/src/typings/EmmetNode.d.ts b/extensions/emmet/src/typings/EmmetNode.d.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/typings/EmmetNode.d.ts rename to extensions/emmet/src/typings/EmmetNode.d.ts diff --git a/lib/vscode/extensions/emmet/src/typings/emmetio__css-parser.d.ts b/extensions/emmet/src/typings/emmetio__css-parser.d.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/typings/emmetio__css-parser.d.ts rename to extensions/emmet/src/typings/emmetio__css-parser.d.ts diff --git a/lib/vscode/extensions/emmet/src/typings/emmetio__html-matcher.d.ts b/extensions/emmet/src/typings/emmetio__html-matcher.d.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/typings/emmetio__html-matcher.d.ts rename to extensions/emmet/src/typings/emmetio__html-matcher.d.ts diff --git a/lib/vscode/extensions/emmet/src/typings/image-size.d.ts b/extensions/emmet/src/typings/image-size.d.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/typings/image-size.d.ts rename to extensions/emmet/src/typings/image-size.d.ts diff --git a/lib/vscode/extensions/emmet/src/typings/refs.d.ts b/extensions/emmet/src/typings/refs.d.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/typings/refs.d.ts rename to extensions/emmet/src/typings/refs.d.ts diff --git a/lib/vscode/extensions/emmet/src/updateImageSize.ts b/extensions/emmet/src/updateImageSize.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/updateImageSize.ts rename to extensions/emmet/src/updateImageSize.ts diff --git a/lib/vscode/extensions/emmet/src/updateTag.ts b/extensions/emmet/src/updateTag.ts similarity index 100% rename from lib/vscode/extensions/emmet/src/updateTag.ts rename to extensions/emmet/src/updateTag.ts diff --git a/extensions/emmet/src/util.ts b/extensions/emmet/src/util.ts new file mode 100644 index 000000000000..cb4a876bdcb3 --- /dev/null +++ b/extensions/emmet/src/util.ts @@ -0,0 +1,729 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import parse from '@emmetio/html-matcher'; +import parseStylesheet from '@emmetio/css-parser'; +import { Node as FlatNode, HtmlNode as HtmlFlatNode, Property as FlatProperty, Rule as FlatRule, CssToken as FlatCssToken, Stylesheet as FlatStylesheet } from 'EmmetFlatNode'; +import { DocumentStreamReader } from './bufferStream'; +import * as EmmetHelper from 'vscode-emmet-helper'; +import { TextDocument as LSTextDocument } from 'vscode-languageserver-textdocument'; +import { getRootNode } from './parseDocument'; + +let _emmetHelper: typeof EmmetHelper; +let _currentExtensionsPath: string[] | undefined; + +let _homeDir: vscode.Uri | undefined; + + +export function setHomeDir(homeDir: vscode.Uri) { + _homeDir = homeDir; +} + +export function getEmmetHelper() { + // Lazy load vscode-emmet-helper instead of importing it + // directly to reduce the start-up time of the extension + if (!_emmetHelper) { + _emmetHelper = require('vscode-emmet-helper'); + } + return _emmetHelper; +} + +/** + * Update Emmet Helper to use user snippets from the extensionsPath setting + */ +export function updateEmmetExtensionsPath(forceRefresh: boolean = false) { + const helper = getEmmetHelper(); + let extensionsPath = vscode.workspace.getConfiguration('emmet').get('extensionsPath'); + if (!extensionsPath) { + extensionsPath = []; + } + if (forceRefresh || _currentExtensionsPath !== extensionsPath) { + _currentExtensionsPath = extensionsPath; + const rootPath = vscode.workspace.workspaceFolders?.length ? vscode.workspace.workspaceFolders[0].uri : undefined; + const fileSystem = vscode.workspace.fs; + helper.updateExtensionsPath(extensionsPath, fileSystem, rootPath, _homeDir).catch(err => { + if (Array.isArray(extensionsPath) && extensionsPath.length) { + vscode.window.showErrorMessage(err.message); + } + }); + } +} + +/** + * Migrate old configuration(string) for extensionsPath to new type(string[]) + * https://github.com/microsoft/vscode/issues/117517 + */ +export function migrateEmmetExtensionsPath() { + // Get the detail info of emmet.extensionsPath setting + let config = vscode.workspace.getConfiguration().inspect('emmet.extensionsPath'); + + // Update Global setting if the value type is string or the value is null + if (typeof config?.globalValue === 'string') { + vscode.workspace.getConfiguration().update('emmet.extensionsPath', [config.globalValue], true); + } else if (config?.globalValue === null) { + vscode.workspace.getConfiguration().update('emmet.extensionsPath', [], true); + } + // Update Workspace setting if the value type is string or the value is null + if (typeof config?.workspaceValue === 'string') { + vscode.workspace.getConfiguration().update('emmet.extensionsPath', [config.workspaceValue], false); + } else if (config?.workspaceValue === null) { + vscode.workspace.getConfiguration().update('emmet.extensionsPath', [], false); + } + // Update WorkspaceFolder setting if the value type is string or the value is null + if (typeof config?.workspaceFolderValue === 'string') { + vscode.workspace.getConfiguration().update('emmet.extensionsPath', [config.workspaceFolderValue]); + } else if (config?.workspaceFolderValue === null) { + vscode.workspace.getConfiguration().update('emmet.extensionsPath', []); + } +} + +/** + * Mapping between languages that support Emmet and completion trigger characters + */ +export const LANGUAGE_MODES: { [id: string]: string[] } = { + 'html': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + 'jade': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + 'slim': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + 'haml': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + 'xml': ['.', '}', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + 'xsl': ['!', '.', '}', '*', '$', '/', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + 'css': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + 'scss': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + 'sass': [':', '!', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + 'less': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + 'stylus': [':', '!', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + 'javascriptreact': ['!', '.', '}', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + 'typescriptreact': ['!', '.', '}', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] +}; + +export function isStyleSheet(syntax: string): boolean { + let stylesheetSyntaxes = ['css', 'scss', 'sass', 'less', 'stylus']; + return stylesheetSyntaxes.includes(syntax); +} + +export function validate(allowStylesheet: boolean = true): boolean { + let editor = vscode.window.activeTextEditor; + if (!editor) { + vscode.window.showInformationMessage('No editor is active'); + return false; + } + if (!allowStylesheet && isStyleSheet(editor.document.languageId)) { + return false; + } + return true; +} + +export function getMappingForIncludedLanguages(): any { + // Explicitly map languages that have built-in grammar in VS Code to their parent language + // to get emmet completion support + // For other languages, users will have to use `emmet.includeLanguages` or + // language specific extensions can provide emmet completion support + const MAPPED_MODES: Object = { + 'handlebars': 'html', + 'php': 'html' + }; + + const finalMappedModes = Object.create(null); + let includeLanguagesConfig = vscode.workspace.getConfiguration('emmet')['includeLanguages']; + let includeLanguages = Object.assign({}, MAPPED_MODES, includeLanguagesConfig ? includeLanguagesConfig : {}); + Object.keys(includeLanguages).forEach(syntax => { + if (typeof includeLanguages[syntax] === 'string' && LANGUAGE_MODES[includeLanguages[syntax]]) { + finalMappedModes[syntax] = includeLanguages[syntax]; + } + }); + return finalMappedModes; +} + +/** +* Get the corresponding emmet mode for given vscode language mode +* E.g.: jsx for typescriptreact/javascriptreact or pug for jade +* If the language is not supported by emmet or has been excluded via `excludeLanguages` setting, +* then nothing is returned +* +* @param excludedLanguages Array of language ids that user has chosen to exclude for emmet +*/ +export function getEmmetMode(language: string, excludedLanguages: string[]): string | undefined { + if (!language || excludedLanguages.indexOf(language) > -1) { + return; + } + if (/\b(typescriptreact|javascriptreact|jsx-tags)\b/.test(language)) { // treat tsx like jsx + return 'jsx'; + } + if (language === 'sass-indented') { // map sass-indented to sass + return 'sass'; + } + if (language === 'jade') { + return 'pug'; + } + const syntaxes = getSyntaxes(); + if (syntaxes.markup.includes(language) || syntaxes.stylesheet.includes(language)) { + return language; + } + return; +} + +const closeBrace = 125; +const openBrace = 123; +const slash = 47; +const star = 42; + +/** + * Traverse the given document backward & forward from given position + * to find a complete ruleset, then parse just that to return a Stylesheet + * @param document vscode.TextDocument + * @param position vscode.Position + */ +export function parsePartialStylesheet(document: vscode.TextDocument, position: vscode.Position): FlatStylesheet | undefined { + const isCSS = document.languageId === 'css'; + const positionOffset = document.offsetAt(position); + let startOffset = 0; + let endOffset = document.getText().length; + const limitCharacter = positionOffset - 5000; + const limitOffset = limitCharacter > 0 ? limitCharacter : startOffset; + const stream = new DocumentStreamReader(document, positionOffset); + + function findOpeningCommentBeforePosition(pos: number): number | undefined { + const text = document.getText().substring(0, pos); + let offset = text.lastIndexOf('/*'); + if (offset === -1) { + return; + } + return offset; + } + + function findClosingCommentAfterPosition(pos: number): number | undefined { + const text = document.getText().substring(pos); + let offset = text.indexOf('*/'); + if (offset === -1) { + return; + } + offset += 2 + pos; + return offset; + } + + function consumeLineCommentBackwards() { + const posLineNumber = document.positionAt(stream.pos).line; + if (!isCSS && currentLine !== posLineNumber) { + currentLine = posLineNumber; + const startLineComment = document.lineAt(currentLine).text.indexOf('//'); + if (startLineComment > -1) { + stream.pos = document.offsetAt(new vscode.Position(currentLine, startLineComment)); + } + } + } + + function consumeBlockCommentBackwards() { + if (stream.peek() === slash) { + if (stream.backUp(1) === star) { + stream.pos = findOpeningCommentBeforePosition(stream.pos) ?? startOffset; + } else { + stream.next(); + } + } + } + + function consumeCommentForwards() { + if (stream.eat(slash)) { + if (stream.eat(slash) && !isCSS) { + const posLineNumber = document.positionAt(stream.pos).line; + stream.pos = document.offsetAt(new vscode.Position(posLineNumber + 1, 0)); + } else if (stream.eat(star)) { + stream.pos = findClosingCommentAfterPosition(stream.pos) ?? endOffset; + } + } + } + + // Go forward until we find a closing brace. + while (!stream.eof() && !stream.eat(closeBrace)) { + if (stream.peek() === slash) { + consumeCommentForwards(); + } else { + stream.next(); + } + } + + if (!stream.eof()) { + endOffset = stream.pos; + } + + stream.pos = positionOffset; + let openBracesToFind = 1; + let currentLine = position.line; + let exit = false; + + // Go back until we found an opening brace. If we find a closing one, consume its pair and continue. + while (!exit && openBracesToFind > 0 && !stream.sof()) { + consumeLineCommentBackwards(); + + switch (stream.backUp(1)) { + case openBrace: + openBracesToFind--; + break; + case closeBrace: + if (isCSS) { + stream.next(); + startOffset = stream.pos; + exit = true; + } else { + openBracesToFind++; + } + break; + case slash: + consumeBlockCommentBackwards(); + break; + default: + break; + } + + if (position.line - document.positionAt(stream.pos).line > 100 + || stream.pos <= limitOffset) { + exit = true; + } + } + + // We are at an opening brace. We need to include its selector. + currentLine = document.positionAt(stream.pos).line; + openBracesToFind = 0; + let foundSelector = false; + while (!exit && !stream.sof() && !foundSelector && openBracesToFind >= 0) { + consumeLineCommentBackwards(); + + const ch = stream.backUp(1); + if (/\s/.test(String.fromCharCode(ch))) { + continue; + } + + switch (ch) { + case slash: + consumeBlockCommentBackwards(); + break; + case closeBrace: + openBracesToFind++; + break; + case openBrace: + openBracesToFind--; + break; + default: + if (!openBracesToFind) { + foundSelector = true; + } + break; + } + + if (!stream.sof() && foundSelector) { + startOffset = stream.pos; + } + } + + try { + const buffer = ' '.repeat(startOffset) + document.getText().substring(startOffset, endOffset); + return parseStylesheet(buffer); + } catch (e) { + return; + } +} + +/** + * Returns node corresponding to given position in the given root node + */ +export function getFlatNode(root: FlatNode | undefined, offset: number, includeNodeBoundary: boolean): FlatNode | undefined { + if (!root) { + return; + } + + function getFlatNodeChild(child: FlatNode | undefined): FlatNode | undefined { + if (!child) { + return; + } + const nodeStart = child.start; + const nodeEnd = child.end; + if ((nodeStart < offset && nodeEnd > offset) + || (includeNodeBoundary && nodeStart <= offset && nodeEnd >= offset)) { + return getFlatNodeChildren(child.children) ?? child; + } + else if ('close' in child) { + // We have an HTML node in this case. + // In case this node is an invalid unpaired HTML node, + // we still want to search its children + const htmlChild = child; + if (htmlChild.open && !htmlChild.close) { + return getFlatNodeChildren(htmlChild.children); + } + } + return; + } + + function getFlatNodeChildren(children: FlatNode[]): FlatNode | undefined { + for (let i = 0; i < children.length; i++) { + const foundChild = getFlatNodeChild(children[i]); + if (foundChild) { + return foundChild; + } + } + return; + } + + return getFlatNodeChildren(root.children); +} + +export const allowedMimeTypesInScriptTag = ['text/html', 'text/plain', 'text/x-template', 'text/template', 'text/ng-template']; + +/** + * Finds the HTML node within an HTML document at a given position + * If position is inside a script tag of type template, then it will be parsed to find the inner HTML node as well + */ +export function getHtmlFlatNode(documentText: string, root: FlatNode | undefined, offset: number, includeNodeBoundary: boolean): HtmlFlatNode | undefined { + let currentNode: HtmlFlatNode | undefined = getFlatNode(root, offset, includeNodeBoundary); + if (!currentNode) { return; } + + // If the currentNode is a script one, first set up its subtree and then find HTML node. + if (currentNode.name === 'script' && currentNode.children.length === 0) { + const scriptNodeBody = setupScriptNodeSubtree(documentText, currentNode); + if (scriptNodeBody) { + currentNode = getHtmlFlatNode(scriptNodeBody, currentNode, offset, includeNodeBoundary) ?? currentNode; + } + } + else if (currentNode.type === 'cdata') { + const cdataBody = setupCdataNodeSubtree(documentText, currentNode); + currentNode = getHtmlFlatNode(cdataBody, currentNode, offset, includeNodeBoundary) ?? currentNode; + } + return currentNode; +} + +export function setupScriptNodeSubtree(documentText: string, scriptNode: HtmlFlatNode): string { + const isTemplateScript = scriptNode.name === 'script' && + (scriptNode.attributes && + scriptNode.attributes.some(x => x.name.toString() === 'type' + && allowedMimeTypesInScriptTag.includes(x.value.toString()))); + if (isTemplateScript + && scriptNode.open) { + // blank out the rest of the document and generate the subtree. + const beforePadding = ' '.repeat(scriptNode.open.end); + const endToUse = scriptNode.close ? scriptNode.close.start : scriptNode.end; + const scriptBodyText = beforePadding + documentText.substring(scriptNode.open.end, endToUse); + const innerRoot: HtmlFlatNode = parse(scriptBodyText); + innerRoot.children.forEach(child => { + scriptNode.children.push(child); + child.parent = scriptNode; + }); + return scriptBodyText; + } + return ''; +} + +export function setupCdataNodeSubtree(documentText: string, cdataNode: HtmlFlatNode): string { + // blank out the rest of the document and generate the subtree. + const cdataStart = ''; + const startToUse = cdataNode.start + cdataStart.length; + const endToUse = cdataNode.end - cdataEnd.length; + const beforePadding = ' '.repeat(startToUse); + const cdataBody = beforePadding + documentText.substring(startToUse, endToUse); + const innerRoot: HtmlFlatNode = parse(cdataBody); + innerRoot.children.forEach(child => { + cdataNode.children.push(child); + child.parent = cdataNode; + }); + return cdataBody; +} + +export function isOffsetInsideOpenOrCloseTag(node: FlatNode, offset: number): boolean { + const htmlNode = node as HtmlFlatNode; + if ((htmlNode.open && offset > htmlNode.open.start && offset < htmlNode.open.end) + || (htmlNode.close && offset > htmlNode.close.start && offset < htmlNode.close.end)) { + return true; + } + + return false; +} + +export function offsetRangeToSelection(document: vscode.TextDocument, start: number, end: number): vscode.Selection { + const startPos = document.positionAt(start); + const endPos = document.positionAt(end); + return new vscode.Selection(startPos, endPos); +} + +export function offsetRangeToVsRange(document: vscode.TextDocument, start: number, end: number): vscode.Range { + const startPos = document.positionAt(start); + const endPos = document.positionAt(end); + return new vscode.Range(startPos, endPos); +} + +/** + * Returns the deepest non comment node under given node + */ +export function getDeepestFlatNode(node: FlatNode | undefined): FlatNode | undefined { + if (!node || !node.children || node.children.length === 0 || !node.children.find(x => x.type !== 'comment')) { + return node; + } + for (let i = node.children.length - 1; i >= 0; i--) { + if (node.children[i].type !== 'comment') { + return getDeepestFlatNode(node.children[i]); + } + } + return undefined; +} + +export function findNextWord(propertyValue: string, pos: number): [number | undefined, number | undefined] { + + let foundSpace = pos === -1; + let foundStart = false; + let foundEnd = false; + + let newSelectionStart; + let newSelectionEnd; + while (pos < propertyValue.length - 1) { + pos++; + if (!foundSpace) { + if (propertyValue[pos] === ' ') { + foundSpace = true; + } + continue; + } + if (foundSpace && !foundStart && propertyValue[pos] === ' ') { + continue; + } + if (!foundStart) { + newSelectionStart = pos; + foundStart = true; + continue; + } + if (propertyValue[pos] === ' ') { + newSelectionEnd = pos; + foundEnd = true; + break; + } + } + + if (foundStart && !foundEnd) { + newSelectionEnd = propertyValue.length; + } + + return [newSelectionStart, newSelectionEnd]; +} + +export function findPrevWord(propertyValue: string, pos: number): [number | undefined, number | undefined] { + + let foundSpace = pos === propertyValue.length; + let foundStart = false; + let foundEnd = false; + + let newSelectionStart; + let newSelectionEnd; + while (pos > -1) { + pos--; + if (!foundSpace) { + if (propertyValue[pos] === ' ') { + foundSpace = true; + } + continue; + } + if (foundSpace && !foundEnd && propertyValue[pos] === ' ') { + continue; + } + if (!foundEnd) { + newSelectionEnd = pos + 1; + foundEnd = true; + continue; + } + if (propertyValue[pos] === ' ') { + newSelectionStart = pos + 1; + foundStart = true; + break; + } + } + + if (foundEnd && !foundStart) { + newSelectionStart = 0; + } + + return [newSelectionStart, newSelectionEnd]; +} + +export function getNodesInBetween(node1: FlatNode, node2: FlatNode): FlatNode[] { + // Same node + if (sameNodes(node1, node2)) { + return [node1]; + } + + // Not siblings + if (!sameNodes(node1.parent, node2.parent)) { + // node2 is ancestor of node1 + if (node2.start < node1.start) { + return [node2]; + } + + // node1 is ancestor of node2 + if (node2.start < node1.end) { + return [node1]; + } + + // Get the highest ancestor of node1 that should be commented + while (node1.parent && node1.parent.end < node2.start) { + node1 = node1.parent; + } + + // Get the highest ancestor of node2 that should be commented + while (node2.parent && node2.parent.start > node1.start) { + node2 = node2.parent; + } + } + + const siblings: FlatNode[] = []; + let currentNode: FlatNode | undefined = node1; + const position = node2.end; + while (currentNode && position > currentNode.start) { + siblings.push(currentNode); + currentNode = currentNode.nextSibling; + } + return siblings; +} + +export function sameNodes(node1: FlatNode | undefined, node2: FlatNode | undefined): boolean { + // return true if they're both undefined + if (!node1 && !node2) { + return true; + } + // return false if only one of them is undefined + if (!node1 || !node2) { + return false; + } + return node1.start === node2.start && node1.end === node2.end; +} + +export function getEmmetConfiguration(syntax: string) { + const emmetConfig = vscode.workspace.getConfiguration('emmet'); + const syntaxProfiles = Object.assign({}, emmetConfig['syntaxProfiles'] || {}); + const preferences = Object.assign({}, emmetConfig['preferences'] || {}); + // jsx, xml and xsl syntaxes need to have self closing tags unless otherwise configured by user + if (syntax === 'jsx' || syntax === 'xml' || syntax === 'xsl') { + syntaxProfiles[syntax] = syntaxProfiles[syntax] || {}; + if (typeof syntaxProfiles[syntax] === 'object' + && !syntaxProfiles[syntax].hasOwnProperty('self_closing_tag') // Old Emmet format + && !syntaxProfiles[syntax].hasOwnProperty('selfClosingStyle') // Emmet 2.0 format + ) { + syntaxProfiles[syntax] = { + ...syntaxProfiles[syntax], + selfClosingStyle: syntax === 'jsx' ? 'xhtml' : 'xml' + }; + } + } + + return { + preferences, + showExpandedAbbreviation: emmetConfig['showExpandedAbbreviation'], + showAbbreviationSuggestions: emmetConfig['showAbbreviationSuggestions'], + syntaxProfiles, + variables: emmetConfig['variables'], + excludeLanguages: emmetConfig['excludeLanguages'], + showSuggestionsAsSnippets: emmetConfig['showSuggestionsAsSnippets'] + }; +} + +/** + * Itereates by each child, as well as nested child's children, in their order + * and invokes `fn` for each. If `fn` function returns `false`, iteration stops + */ +export function iterateCSSToken(token: FlatCssToken, fn: (x: any) => any): boolean { + for (let i = 0, il = token.size; i < il; i++) { + if (fn(token.item(i)) === false || iterateCSSToken(token.item(i), fn) === false) { + return false; + } + } + return true; +} + +/** + * Returns `name` CSS property from given `rule` + */ +export function getCssPropertyFromRule(rule: FlatRule, name: string): FlatProperty | undefined { + return rule.children.find(node => node.type === 'property' && node.name === name) as FlatProperty; +} + +/** + * Returns css property under caret in given editor or `null` if such node cannot + * be found + */ +export function getCssPropertyFromDocument(editor: vscode.TextEditor, position: vscode.Position): FlatProperty | null { + const document = editor.document; + const rootNode = getRootNode(document, true); + const offset = document.offsetAt(position); + const node = getFlatNode(rootNode, offset, true); + + if (isStyleSheet(editor.document.languageId)) { + return node && node.type === 'property' ? node : null; + } + + const htmlNode = node; + if (htmlNode + && htmlNode.name === 'style' + && htmlNode.open && htmlNode.close + && htmlNode.open.end < offset + && htmlNode.close.start > offset) { + const buffer = ' '.repeat(htmlNode.start) + + document.getText().substring(htmlNode.start, htmlNode.end); + const innerRootNode = parseStylesheet(buffer); + const innerNode = getFlatNode(innerRootNode, offset, true); + return (innerNode && innerNode.type === 'property') ? innerNode : null; + } + + return null; +} + + +export function getEmbeddedCssNodeIfAny(document: vscode.TextDocument, currentNode: FlatNode | undefined, position: vscode.Position): FlatNode | undefined { + if (!currentNode) { + return; + } + const currentHtmlNode = currentNode; + if (currentHtmlNode && currentHtmlNode.open && currentHtmlNode.close) { + const offset = document.offsetAt(position); + if (currentHtmlNode.open.end < offset && offset <= currentHtmlNode.close.start) { + if (currentHtmlNode.name === 'style') { + const buffer = ' '.repeat(currentHtmlNode.open.end) + document.getText().substring(currentHtmlNode.open.end, currentHtmlNode.close.start); + return parseStylesheet(buffer); + } + } + } + return; +} + +export function isStyleAttribute(currentNode: FlatNode | undefined, offset: number): boolean { + if (!currentNode) { + return false; + } + const currentHtmlNode = currentNode; + const index = (currentHtmlNode.attributes || []).findIndex(x => x.name.toString() === 'style'); + if (index === -1) { + return false; + } + const styleAttribute = currentHtmlNode.attributes[index]; + return offset >= styleAttribute.value.start && offset <= styleAttribute.value.end; +} + +export function isNumber(obj: any): obj is number { + return typeof obj === 'number'; +} + +export function toLSTextDocument(doc: vscode.TextDocument): LSTextDocument { + return LSTextDocument.create(doc.uri.toString(), doc.languageId, doc.version, doc.getText()); +} + +export function getPathBaseName(path: string): string { + const pathAfterSlashSplit = path.split('/').pop(); + const pathAfterBackslashSplit = pathAfterSlashSplit ? pathAfterSlashSplit.split('\\').pop() : ''; + return pathAfterBackslashSplit ?? ''; +} + +export function getSyntaxes() { + /** + * List of all known syntaxes, from emmetio/emmet + */ + return { + markup: ['html', 'xml', 'xsl', 'jsx', 'js', 'pug', 'slim', 'haml'], + stylesheet: ['css', 'sass', 'scss', 'less', 'sss', 'stylus'] + }; +} diff --git a/lib/vscode/extensions/emmet/test-workspace/.vscode/settings.json b/extensions/emmet/test-workspace/.vscode/settings.json similarity index 100% rename from lib/vscode/extensions/emmet/test-workspace/.vscode/settings.json rename to extensions/emmet/test-workspace/.vscode/settings.json diff --git a/lib/vscode/extensions/emmet/tsconfig.json b/extensions/emmet/tsconfig.json similarity index 100% rename from lib/vscode/extensions/emmet/tsconfig.json rename to extensions/emmet/tsconfig.json diff --git a/extensions/emmet/yarn.lock b/extensions/emmet/yarn.lock new file mode 100644 index 000000000000..2d35a2c78aba --- /dev/null +++ b/extensions/emmet/yarn.lock @@ -0,0 +1,109 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@emmetio/abbreviation@^2.2.0", "@emmetio/abbreviation@^2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@emmetio/abbreviation/-/abbreviation-2.2.2.tgz#746762fd9e7a8c2ea604f580c62e3cfe250e6989" + integrity sha512-TtE/dBnkTCct8+LntkqVrwqQao6EnPAs1YN3cUgxOxTaBlesBCY37ROUAVZrRlG64GNnVShdl/b70RfAI3w5lw== + dependencies: + "@emmetio/scanner" "^1.0.0" + +"@emmetio/css-abbreviation@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@emmetio/css-abbreviation/-/css-abbreviation-2.1.4.tgz#90362e8a1122ce3b76f6c3157907d30182f53f54" + integrity sha512-qk9L60Y+uRtM5CPbB0y+QNl/1XKE09mSO+AhhSauIfr2YOx/ta3NJw2d8RtCFxgzHeRqFRr8jgyzThbu+MZ4Uw== + dependencies: + "@emmetio/scanner" "^1.0.0" + +"@emmetio/css-parser@ramya-rao-a/css-parser#vscode": + version "0.4.0" + resolved "https://codeload.github.com/ramya-rao-a/css-parser/tar.gz/370c480ac103bd17c7bcfb34bf5d577dc40d3660" + dependencies: + "@emmetio/stream-reader" "^2.2.0" + "@emmetio/stream-reader-utils" "^0.1.0" + +"@emmetio/html-matcher@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@emmetio/html-matcher/-/html-matcher-0.3.3.tgz#0bbdadc0882e185950f03737dc6dbf8f7bd90728" + integrity sha1-C72twIguGFlQ8Dc33G2/j3vZByg= + dependencies: + "@emmetio/stream-reader" "^2.0.0" + "@emmetio/stream-reader-utils" "^0.1.0" + +"@emmetio/math-expression@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@emmetio/math-expression/-/math-expression-1.0.4.tgz#cb657ed944f82b3728f863bf5ece1b1ff3ae7497" + integrity sha512-1m7y8/VeXCAfgFoPGTerbqCIadApcIINujd3TaM/LRLPPKiod8aT1PPmh542spnsUSsSnZJjbuF7xiO4WFA42g== + dependencies: + "@emmetio/scanner" "^1.0.0" + +"@emmetio/scanner@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@emmetio/scanner/-/scanner-1.0.0.tgz#065b2af6233fe7474d44823e3deb89724af42b5f" + integrity sha512-8HqW8EVqjnCmWXVpqAOZf+EGESdkR27odcMMMGefgKXtar00SoYNSryGv//TELI4T3QFsECo78p+0lmalk/CFA== + +"@emmetio/stream-reader-utils@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@emmetio/stream-reader-utils/-/stream-reader-utils-0.1.0.tgz#244cb02c77ec2e74f78a9bd318218abc9c500a61" + integrity sha1-JEywLHfsLnT3ipvTGCGKvJxQCmE= + +"@emmetio/stream-reader@^2.0.0", "@emmetio/stream-reader@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@emmetio/stream-reader/-/stream-reader-2.2.0.tgz#46cffea119a0a003312a21c2d9b5628cb5fcd442" + integrity sha1-Rs/+oRmgoAMxKiHC2bVijLX81EI= + +"@types/node@14.x": + version "14.17.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.1.tgz#5e07e0cb2ff793aa7a1b41deae76221e6166049f" + integrity sha512-/tpUyFD7meeooTRwl3sYlihx2BrJE7q9XF71EguPFIySj9B7qgnRtHsHTho+0AUm4m1SvWGm6uSncrR94q6Vtw== + +emmet@^2.3.0: + version "2.3.4" + resolved "https://registry.yarnpkg.com/emmet/-/emmet-2.3.4.tgz#5ba0d7a5569a68c7697dfa890c772e4f3179d123" + integrity sha512-3IqSwmO+N2ZGeuhDyhV/TIOJFUbkChi53bcasSNRE7Yd+4eorbbYz4e53TpMECt38NtYkZNupQCZRlwdAYA42A== + dependencies: + "@emmetio/abbreviation" "^2.2.2" + "@emmetio/css-abbreviation" "^2.1.4" + +image-size@^0.5.2: + version "0.5.5" + resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" + integrity sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w= + +jsonc-parser@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.3.1.tgz#59549150b133f2efacca48fe9ce1ec0659af2342" + integrity sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg== + +vscode-emmet-helper@^2.3.0: + version "2.6.4" + resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-2.6.4.tgz#bea47f17649bba26b412f3d1fac18aaee43eba25" + integrity sha512-fP0nunW1RUWEKGf4gqiYLOVNFFGXSRHjCl0pikxtwCFlty8WwimM+RBJ5o0aIiwerrYD30HqeaVyvDW027Sseg== + dependencies: + emmet "^2.3.0" + jsonc-parser "^2.3.0" + vscode-languageserver-textdocument "^1.0.1" + vscode-languageserver-types "^3.15.1" + vscode-nls "^5.0.0" + vscode-uri "^2.1.2" + +vscode-languageserver-textdocument@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz#178168e87efad6171b372add1dea34f53e5d330f" + integrity sha512-UIcJDjX7IFkck7cSkNNyzIz5FyvpQfY7sdzVy+wkKN/BLaD4DQ0ppXQrKePomCxTS7RrolK1I0pey0bG9eh8dA== + +vscode-languageserver-types@^3.15.1: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" + integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== + +vscode-nls@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840" + integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA== + +vscode-uri@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.1.2.tgz#c8d40de93eb57af31f3c715dd650e2ca2c096f1c" + integrity sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A== diff --git a/lib/vscode/extensions/extension-editing/.vscodeignore b/extensions/extension-editing/.vscodeignore similarity index 100% rename from lib/vscode/extensions/extension-editing/.vscodeignore rename to extensions/extension-editing/.vscodeignore diff --git a/lib/vscode/extensions/extension-editing/extension-browser.webpack.config.js b/extensions/extension-editing/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/extension-editing/extension-browser.webpack.config.js rename to extensions/extension-editing/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/extension-editing/extension.webpack.config.js b/extensions/extension-editing/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/extension-editing/extension.webpack.config.js rename to extensions/extension-editing/extension.webpack.config.js diff --git a/lib/vscode/extensions/extension-editing/images/icon.png b/extensions/extension-editing/images/icon.png similarity index 100% rename from lib/vscode/extensions/extension-editing/images/icon.png rename to extensions/extension-editing/images/icon.png diff --git a/extensions/extension-editing/package.json b/extensions/extension-editing/package.json new file mode 100644 index 000000000000..710f3d7be706 --- /dev/null +++ b/extensions/extension-editing/package.json @@ -0,0 +1,78 @@ +{ + "name": "extension-editing", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "publisher": "vscode", + "license": "MIT", + "engines": { + "vscode": "^1.4.0" + }, + "icon": "images/icon.png", + "activationEvents": [ + "onLanguage:json", + "onLanguage:markdown", + "onLanguage:typescript" + ], + "main": "./out/extensionEditingMain", + "browser": "./dist/browser/extensionEditingBrowserMain", + "capabilities": { + "virtualWorkspaces": true, + "untrustedWorkspaces": { + "supported": true + } + }, + "scripts": { + "compile": "gulp compile-extension:extension-editing", + "watch": "gulp watch-extension:extension-editing" + }, + "dependencies": { + "jsonc-parser": "^2.2.1", + "markdown-it": "^12.0.4", + "parse5": "^3.0.2", + "vscode-nls": "^4.1.1" + }, + "contributes": { + "jsonValidation": [ + { + "fileMatch": "package.json", + "url": "vscode://schemas/vscode-extensions" + }, + { + "fileMatch": "*language-configuration.json", + "url": "vscode://schemas/language-configuration" + }, + { + "fileMatch": [ + "*icon-theme.json", + "!*product-icon-theme.json" + ], + "url": "vscode://schemas/icon-theme" + }, + { + "fileMatch": "*product-icon-theme.json", + "url": "vscode://schemas/product-icon-theme" + }, + { + "fileMatch": "*color-theme.json", + "url": "vscode://schemas/color-theme" + } + ], + "languages": [ + { + "id": "ignore", + "filenames": [ + ".vscodeignore" + ] + } + ] + }, + "devDependencies": { + "@types/markdown-it": "0.0.2", + "@types/node": "14.x" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/extension-editing/package.nls.json b/extensions/extension-editing/package.nls.json similarity index 100% rename from lib/vscode/extensions/extension-editing/package.nls.json rename to extensions/extension-editing/package.nls.json diff --git a/lib/vscode/extensions/extension-editing/src/extensionEditingBrowserMain.ts b/extensions/extension-editing/src/extensionEditingBrowserMain.ts similarity index 100% rename from lib/vscode/extensions/extension-editing/src/extensionEditingBrowserMain.ts rename to extensions/extension-editing/src/extensionEditingBrowserMain.ts diff --git a/lib/vscode/extensions/extension-editing/src/extensionEditingMain.ts b/extensions/extension-editing/src/extensionEditingMain.ts similarity index 100% rename from lib/vscode/extensions/extension-editing/src/extensionEditingMain.ts rename to extensions/extension-editing/src/extensionEditingMain.ts diff --git a/lib/vscode/extensions/extension-editing/src/extensionLinter.ts b/extensions/extension-editing/src/extensionLinter.ts similarity index 100% rename from lib/vscode/extensions/extension-editing/src/extensionLinter.ts rename to extensions/extension-editing/src/extensionLinter.ts diff --git a/lib/vscode/extensions/extension-editing/src/packageDocumentHelper.ts b/extensions/extension-editing/src/packageDocumentHelper.ts similarity index 100% rename from lib/vscode/extensions/extension-editing/src/packageDocumentHelper.ts rename to extensions/extension-editing/src/packageDocumentHelper.ts diff --git a/lib/vscode/extensions/extension-editing/src/typings/ref.d.ts b/extensions/extension-editing/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/extension-editing/src/typings/ref.d.ts rename to extensions/extension-editing/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/extension-editing/tsconfig.json b/extensions/extension-editing/tsconfig.json similarity index 100% rename from lib/vscode/extensions/extension-editing/tsconfig.json rename to extensions/extension-editing/tsconfig.json diff --git a/extensions/extension-editing/yarn.lock b/extensions/extension-editing/yarn.lock new file mode 100644 index 000000000000..01c08624126a --- /dev/null +++ b/extensions/extension-editing/yarn.lock @@ -0,0 +1,78 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/markdown-it@0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.2.tgz#5d9ad19e6e6508cdd2f2596df86fd0aade598660" + integrity sha1-XZrRnm5lCM3S8llt+G/Qqt5ZhmA= + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +"@types/node@^6.0.46": + version "6.0.78" + resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.78.tgz#5d4a3f579c1524e01ee21bf474e6fba09198f470" + integrity sha512-+vD6E8ixntRzzZukoF3uP1iV+ZjVN3koTcaeK+BEoc/kSfGbLDIGC7RmCaUgVpUfN6cWvfczFRERCyKM9mkvXg== + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +entities@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" + integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== + +jsonc-parser@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc" + integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w== + +linkify-it@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.2.tgz#f55eeb8bc1d3ae754049e124ab3bb56d97797fb8" + integrity sha512-gDBO4aHNZS6coiZCKVhSNh43F9ioIL4JwRjLZPkoLIY4yZFwg264Y5lu2x6rb1Js42Gh6Yqm2f6L2AJcnkzinQ== + dependencies: + uc.micro "^1.0.1" + +markdown-it@^12.0.4: + version "12.0.4" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.4.tgz#eec8247d296327eac3ba9746bdeec9cfcc751e33" + integrity sha512-34RwOXZT8kyuOJy25oJNJoulO8L0bTHYWXcdZBYZqFnjIy3NgjeoM3FmPXIOFQ26/lSHYMr8oc62B6adxXcb3Q== + dependencies: + argparse "^2.0.1" + entities "~2.1.0" + linkify-it "^3.0.1" + mdurl "^1.0.1" + uc.micro "^1.0.5" + +mdurl@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" + integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= + +parse5@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.2.tgz#05eff57f0ef4577fb144a79f8b9a967a6cc44510" + integrity sha1-Be/1fw70V3+xRKefi5qWemzERRA= + dependencies: + "@types/node" "^6.0.46" + +uc.micro@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192" + integrity sha1-ftUNXg+an7ClczeSWfKndFjVAZI= + +uc.micro@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" + integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== + +vscode-nls@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.1.tgz#f9916b64e4947b20322defb1e676a495861f133c" + integrity sha512-4R+2UoUUU/LdnMnFjePxfLqNhBS8lrAFyX7pjb2ud/lqDkrUavFUTcG7wR0HBZFakae0Q6KLBFjMS6W93F403A== diff --git a/lib/vscode/extensions/fsharp/.vscodeignore b/extensions/fsharp/.vscodeignore similarity index 100% rename from lib/vscode/extensions/fsharp/.vscodeignore rename to extensions/fsharp/.vscodeignore diff --git a/lib/vscode/extensions/fsharp/cgmanifest.json b/extensions/fsharp/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/fsharp/cgmanifest.json rename to extensions/fsharp/cgmanifest.json diff --git a/lib/vscode/extensions/fsharp/language-configuration.json b/extensions/fsharp/language-configuration.json similarity index 100% rename from lib/vscode/extensions/fsharp/language-configuration.json rename to extensions/fsharp/language-configuration.json diff --git a/lib/vscode/extensions/fsharp/package.json b/extensions/fsharp/package.json similarity index 100% rename from lib/vscode/extensions/fsharp/package.json rename to extensions/fsharp/package.json diff --git a/lib/vscode/extensions/fsharp/package.nls.json b/extensions/fsharp/package.nls.json similarity index 100% rename from lib/vscode/extensions/fsharp/package.nls.json rename to extensions/fsharp/package.nls.json diff --git a/lib/vscode/extensions/fsharp/snippets/fsharp.code-snippets b/extensions/fsharp/snippets/fsharp.code-snippets similarity index 100% rename from lib/vscode/extensions/fsharp/snippets/fsharp.code-snippets rename to extensions/fsharp/snippets/fsharp.code-snippets diff --git a/lib/vscode/extensions/fsharp/syntaxes/fsharp.tmLanguage.json b/extensions/fsharp/syntaxes/fsharp.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/fsharp/syntaxes/fsharp.tmLanguage.json rename to extensions/fsharp/syntaxes/fsharp.tmLanguage.json diff --git a/lib/vscode/extensions/fsharp/yarn.lock b/extensions/fsharp/yarn.lock similarity index 100% rename from lib/vscode/extensions/fsharp/yarn.lock rename to extensions/fsharp/yarn.lock diff --git a/lib/vscode/extensions/git/.vscodeignore b/extensions/git/.vscodeignore similarity index 100% rename from lib/vscode/extensions/git/.vscodeignore rename to extensions/git/.vscodeignore diff --git a/lib/vscode/extensions/git/README.md b/extensions/git/README.md similarity index 100% rename from lib/vscode/extensions/git/README.md rename to extensions/git/README.md diff --git a/lib/vscode/extensions/git/build/update-emoji.js b/extensions/git/build/update-emoji.js similarity index 100% rename from lib/vscode/extensions/git/build/update-emoji.js rename to extensions/git/build/update-emoji.js diff --git a/lib/vscode/extensions/git/build/update-grammars.js b/extensions/git/build/update-grammars.js similarity index 100% rename from lib/vscode/extensions/git/build/update-grammars.js rename to extensions/git/build/update-grammars.js diff --git a/lib/vscode/extensions/git/cgmanifest.json b/extensions/git/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/git/cgmanifest.json rename to extensions/git/cgmanifest.json diff --git a/lib/vscode/extensions/git/extension.webpack.config.js b/extensions/git/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/git/extension.webpack.config.js rename to extensions/git/extension.webpack.config.js diff --git a/lib/vscode/extensions/git/languages/diff.language-configuration.json b/extensions/git/languages/diff.language-configuration.json similarity index 100% rename from lib/vscode/extensions/git/languages/diff.language-configuration.json rename to extensions/git/languages/diff.language-configuration.json diff --git a/lib/vscode/extensions/git/languages/git-commit.language-configuration.json b/extensions/git/languages/git-commit.language-configuration.json similarity index 100% rename from lib/vscode/extensions/git/languages/git-commit.language-configuration.json rename to extensions/git/languages/git-commit.language-configuration.json diff --git a/lib/vscode/extensions/git/languages/git-rebase.language-configuration.json b/extensions/git/languages/git-rebase.language-configuration.json similarity index 100% rename from lib/vscode/extensions/git/languages/git-rebase.language-configuration.json rename to extensions/git/languages/git-rebase.language-configuration.json diff --git a/lib/vscode/extensions/git/languages/ignore.language-configuration.json b/extensions/git/languages/ignore.language-configuration.json similarity index 100% rename from lib/vscode/extensions/git/languages/ignore.language-configuration.json rename to extensions/git/languages/ignore.language-configuration.json diff --git a/extensions/git/package.json b/extensions/git/package.json new file mode 100644 index 000000000000..55f83ea6a896 --- /dev/null +++ b/extensions/git/package.json @@ -0,0 +1,2395 @@ +{ + "name": "git", + "displayName": "%displayName%", + "description": "%description%", + "publisher": "vscode", + "license": "MIT", + "version": "1.0.0", + "engines": { + "vscode": "^1.5.0" + }, + "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", + "enableProposedApi": true, + "categories": [ + "Other" + ], + "activationEvents": [ + "*", + "onFileSystem:git" + ], + "main": "./out/main", + "icon": "resources/icons/git.png", + "scripts": { + "compile": "gulp compile-extension:git", + "watch": "gulp watch-extension:git", + "update-emoji": "node ./build/update-emoji.js", + "update-grammar": "node ./build/update-grammars.js", + "test": "node ../../node_modules/mocha/bin/mocha" + }, + "capabilities": { + "virtualWorkspaces": true, + "untrustedWorkspaces": { + "supported": true + } + }, + "contributes": { + "commands": [ + { + "command": "git.setLogLevel", + "title": "%command.setLogLevel%", + "category": "Git" + }, + { + "command": "git.clone", + "title": "%command.clone%", + "category": "Git" + }, + { + "command": "git.cloneRecursive", + "title": "%command.cloneRecursive%", + "category": "Git" + }, + { + "command": "git.init", + "title": "%command.init%", + "category": "Git", + "icon": "$(add)" + }, + { + "command": "git.openRepository", + "title": "%command.openRepository%", + "category": "Git" + }, + { + "command": "git.close", + "title": "%command.close%", + "category": "Git" + }, + { + "command": "git.refresh", + "title": "%command.refresh%", + "category": "Git", + "icon": "$(refresh)" + }, + { + "command": "git.openChange", + "title": "%command.openChange%", + "category": "Git", + "icon": "$(compare-changes)" + }, + { + "command": "git.openAllChanges", + "title": "%command.openAllChanges%", + "category": "Git" + }, + { + "command": "git.openFile", + "title": "%command.openFile%", + "category": "Git", + "icon": "$(go-to-file)" + }, + { + "command": "git.openFile2", + "title": "%command.openFile%", + "category": "Git", + "icon": "$(go-to-file)" + }, + { + "command": "git.openHEADFile", + "title": "%command.openHEADFile%", + "category": "Git" + }, + { + "command": "git.stage", + "title": "%command.stage%", + "category": "Git", + "icon": "$(add)" + }, + { + "command": "git.stageAll", + "title": "%command.stageAll%", + "category": "Git", + "icon": "$(add)" + }, + { + "command": "git.stageAllTracked", + "title": "%command.stageAllTracked%", + "category": "Git", + "icon": "$(add)" + }, + { + "command": "git.stageAllUntracked", + "title": "%command.stageAllUntracked%", + "category": "Git", + "icon": "$(add)" + }, + { + "command": "git.stageAllMerge", + "title": "%command.stageAllMerge%", + "category": "Git", + "icon": "$(add)" + }, + { + "command": "git.stageSelectedRanges", + "title": "%command.stageSelectedRanges%", + "category": "Git" + }, + { + "command": "git.revertSelectedRanges", + "title": "%command.revertSelectedRanges%", + "category": "Git" + }, + { + "command": "git.stageChange", + "title": "%command.stageChange%", + "category": "Git", + "icon": "$(add)" + }, + { + "command": "git.revertChange", + "title": "%command.revertChange%", + "category": "Git", + "icon": "$(discard)" + }, + { + "command": "git.unstage", + "title": "%command.unstage%", + "category": "Git", + "icon": "$(remove)" + }, + { + "command": "git.unstageAll", + "title": "%command.unstageAll%", + "category": "Git", + "icon": "$(remove)" + }, + { + "command": "git.unstageSelectedRanges", + "title": "%command.unstageSelectedRanges%", + "category": "Git" + }, + { + "command": "git.clean", + "title": "%command.clean%", + "category": "Git", + "icon": "$(discard)" + }, + { + "command": "git.cleanAll", + "title": "%command.cleanAll%", + "category": "Git", + "icon": "$(discard)" + }, + { + "command": "git.cleanAllTracked", + "title": "%command.cleanAllTracked%", + "category": "Git", + "icon": "$(discard)" + }, + { + "command": "git.cleanAllUntracked", + "title": "%command.cleanAllUntracked%", + "category": "Git", + "icon": "$(discard)" + }, + { + "command": "git.rename", + "title": "%command.rename%", + "category": "Git", + "icon": "$(discard)" + }, + { + "command": "git.commit", + "title": "%command.commit%", + "category": "Git", + "icon": "$(check)" + }, + { + "command": "git.commitStaged", + "title": "%command.commitStaged%", + "category": "Git" + }, + { + "command": "git.commitEmpty", + "title": "%command.commitEmpty%", + "category": "Git" + }, + { + "command": "git.commitStagedSigned", + "title": "%command.commitStagedSigned%", + "category": "Git" + }, + { + "command": "git.commitStagedAmend", + "title": "%command.commitStagedAmend%", + "category": "Git" + }, + { + "command": "git.commitAll", + "title": "%command.commitAll%", + "category": "Git" + }, + { + "command": "git.commitAllSigned", + "title": "%command.commitAllSigned%", + "category": "Git" + }, + { + "command": "git.commitAllAmend", + "title": "%command.commitAllAmend%", + "category": "Git" + }, + { + "command": "git.commitNoVerify", + "title": "%command.commitNoVerify%", + "category": "Git", + "icon": "$(check)" + }, + { + "command": "git.commitStagedNoVerify", + "title": "%command.commitStagedNoVerify%", + "category": "Git" + }, + { + "command": "git.commitEmptyNoVerify", + "title": "%command.commitEmptyNoVerify%", + "category": "Git" + }, + { + "command": "git.commitStagedSignedNoVerify", + "title": "%command.commitStagedSignedNoVerify%", + "category": "Git" + }, + { + "command": "git.commitStagedAmendNoVerify", + "title": "%command.commitStagedAmendNoVerify%", + "category": "Git" + }, + { + "command": "git.commitAllNoVerify", + "title": "%command.commitAllNoVerify%", + "category": "Git" + }, + { + "command": "git.commitAllSignedNoVerify", + "title": "%command.commitAllSignedNoVerify%", + "category": "Git" + }, + { + "command": "git.commitAllAmendNoVerify", + "title": "%command.commitAllAmendNoVerify%", + "category": "Git" + }, + { + "command": "git.restoreCommitTemplate", + "title": "%command.restoreCommitTemplate%", + "category": "Git" + }, + { + "command": "git.undoCommit", + "title": "%command.undoCommit%", + "category": "Git" + }, + { + "command": "git.checkout", + "title": "%command.checkout%", + "category": "Git" + }, + { + "command": "git.checkoutDetached", + "title": "%command.checkoutDetached%", + "category": "Git" + }, + { + "command": "git.branch", + "title": "%command.branch%", + "category": "Git" + }, + { + "command": "git.branchFrom", + "title": "%command.branchFrom%", + "category": "Git" + }, + { + "command": "git.deleteBranch", + "title": "%command.deleteBranch%", + "category": "Git" + }, + { + "command": "git.renameBranch", + "title": "%command.renameBranch%", + "category": "Git" + }, + { + "command": "git.merge", + "title": "%command.merge%", + "category": "Git" + }, + { + "command": "git.rebase", + "title": "%command.rebase%", + "category": "Git" + }, + { + "command": "git.createTag", + "title": "%command.createTag%", + "category": "Git" + }, + { + "command": "git.deleteTag", + "title": "%command.deleteTag%", + "category": "Git" + }, + { + "command": "git.fetch", + "title": "%command.fetch%", + "category": "Git" + }, + { + "command": "git.fetchPrune", + "title": "%command.fetchPrune%", + "category": "Git" + }, + { + "command": "git.fetchAll", + "title": "%command.fetchAll%", + "category": "Git" + }, + { + "command": "git.pull", + "title": "%command.pull%", + "category": "Git" + }, + { + "command": "git.pullRebase", + "title": "%command.pullRebase%", + "category": "Git" + }, + { + "command": "git.pullFrom", + "title": "%command.pullFrom%", + "category": "Git" + }, + { + "command": "git.push", + "title": "%command.push%", + "category": "Git" + }, + { + "command": "git.pushForce", + "title": "%command.pushForce%", + "category": "Git" + }, + { + "command": "git.pushTo", + "title": "%command.pushTo%", + "category": "Git" + }, + { + "command": "git.pushToForce", + "title": "%command.pushToForce%", + "category": "Git" + }, + { + "command": "git.pushTags", + "title": "%command.pushTags%", + "category": "Git" + }, + { + "command": "git.pushWithTags", + "title": "%command.pushFollowTags%", + "category": "Git" + }, + { + "command": "git.pushWithTagsForce", + "title": "%command.pushFollowTagsForce%", + "category": "Git" + }, + { + "command": "git.cherryPick", + "title": "%command.cherryPick%", + "category": "Git" + }, + { + "command": "git.addRemote", + "title": "%command.addRemote%", + "category": "Git" + }, + { + "command": "git.removeRemote", + "title": "%command.removeRemote%", + "category": "Git" + }, + { + "command": "git.sync", + "title": "%command.sync%", + "category": "Git" + }, + { + "command": "git.syncRebase", + "title": "%command.syncRebase%", + "category": "Git" + }, + { + "command": "git.publish", + "title": "%command.publish%", + "category": "Git" + }, + { + "command": "git.showOutput", + "title": "%command.showOutput%", + "category": "Git" + }, + { + "command": "git.ignore", + "title": "%command.ignore%", + "category": "Git" + }, + { + "command": "git.revealInExplorer", + "title": "%command.revealInExplorer%", + "category": "Git" + }, + { + "command": "git.stashIncludeUntracked", + "title": "%command.stashIncludeUntracked%", + "category": "Git" + }, + { + "command": "git.stash", + "title": "%command.stash%", + "category": "Git" + }, + { + "command": "git.stashPop", + "title": "%command.stashPop%", + "category": "Git" + }, + { + "command": "git.stashPopLatest", + "title": "%command.stashPopLatest%", + "category": "Git" + }, + { + "command": "git.stashApply", + "title": "%command.stashApply%", + "category": "Git" + }, + { + "command": "git.stashApplyLatest", + "title": "%command.stashApplyLatest%", + "category": "Git" + }, + { + "command": "git.stashDrop", + "title": "%command.stashDrop%", + "category": "Git" + }, + { + "command": "git.timeline.openDiff", + "title": "%command.timelineOpenDiff%", + "icon": "$(compare-changes)", + "category": "Git" + }, + { + "command": "git.timeline.copyCommitId", + "title": "%command.timelineCopyCommitId%", + "category": "Git" + }, + { + "command": "git.timeline.copyCommitMessage", + "title": "%command.timelineCopyCommitMessage%", + "category": "Git" + }, + { + "command": "git.timeline.selectForCompare", + "title": "%command.timelineSelectForCompare%", + "category": "Git" + }, + { + "command": "git.timeline.compareWithSelected", + "title": "%command.timelineCompareWithSelected%", + "category": "Git" + }, + { + "command": "git.rebaseAbort", + "title": "%command.rebaseAbort%", + "category": "Git" + } + ], + "keybindings": [ + { + "command": "git.stageSelectedRanges", + "key": "ctrl+k ctrl+alt+s", + "mac": "cmd+k cmd+alt+s", + "when": "isInDiffEditor" + }, + { + "command": "git.unstageSelectedRanges", + "key": "ctrl+k ctrl+n", + "mac": "cmd+k cmd+n", + "when": "isInDiffEditor" + }, + { + "command": "git.revertSelectedRanges", + "key": "ctrl+k ctrl+r", + "mac": "cmd+k cmd+r", + "when": "isInDiffEditor" + } + ], + "menus": { + "commandPalette": [ + { + "command": "git.setLogLevel", + "when": "config.git.enabled && !git.missing" + }, + { + "command": "git.clone", + "when": "config.git.enabled && !git.missing" + }, + { + "command": "git.cloneRecursive", + "when": "config.git.enabled && !git.missing" + }, + { + "command": "git.init", + "when": "config.git.enabled && !git.missing" + }, + { + "command": "git.openRepository", + "when": "config.git.enabled && !git.missing" + }, + { + "command": "git.close", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.refresh", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.openFile", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.openHEADFile", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.openChange", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.stage", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.stageAll", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.stageAllTracked", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.stageAllUntracked", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.stageAllMerge", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.stageSelectedRanges", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.stageChange", + "when": "false" + }, + { + "command": "git.revertSelectedRanges", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.revertChange", + "when": "false" + }, + { + "command": "git.openFile2", + "when": "false" + }, + { + "command": "git.unstage", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.unstageAll", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.unstageSelectedRanges", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.clean", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.cleanAll", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.cleanAllTracked", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.cleanAllUntracked", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.rename", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && resourceScheme == file" + }, + { + "command": "git.commit", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.commitStaged", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.commitEmpty", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.commitStagedSigned", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.commitStagedAmend", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.commitAll", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.commitAllSigned", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.commitAllAmend", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.rebaseAbort", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && gitRebaseInProgress" + }, + { + "command": "git.commitNoVerify", + "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" + }, + { + "command": "git.commitStagedNoVerify", + "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" + }, + { + "command": "git.commitEmptyNoVerify", + "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" + }, + { + "command": "git.commitStagedSignedNoVerify", + "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" + }, + { + "command": "git.commitStagedAmendNoVerify", + "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" + }, + { + "command": "git.commitAllNoVerify", + "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" + }, + { + "command": "git.commitAllSignedNoVerify", + "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" + }, + { + "command": "git.commitAllAmendNoVerify", + "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" + }, + { + "command": "git.restoreCommitTemplate", + "when": "false" + }, + { + "command": "git.revealInExplorer", + "when": "false" + }, + { + "command": "git.undoCommit", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.checkout", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.branch", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.branchFrom", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.deleteBranch", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.renameBranch", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.cherryPick", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.pull", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.pullFrom", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.pullRebase", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.merge", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.rebase", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.createTag", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.deleteTag", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.fetch", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.fetchPrune", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.fetchAll", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.push", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.pushForce", + "when": "config.git.enabled && !git.missing && config.git.allowForcePush && gitOpenRepositoryCount != 0" + }, + { + "command": "git.pushTo", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.pushToForce", + "when": "config.git.enabled && !git.missing && config.git.allowForcePush && gitOpenRepositoryCount != 0" + }, + { + "command": "git.pushWithTags", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.pushWithTagsForce", + "when": "config.git.enabled && !git.missing && config.git.allowForcePush && gitOpenRepositoryCount != 0" + }, + { + "command": "git.pushTags", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.addRemote", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.removeRemote", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.sync", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.syncRebase", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.publish", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.showOutput", + "when": "config.git.enabled" + }, + { + "command": "git.ignore", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.stashIncludeUntracked", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.stash", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.stashPop", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.stashPopLatest", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.stashApply", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.stashApplyLatest", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.stashDrop", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + }, + { + "command": "git.timeline.openDiff", + "when": "false" + }, + { + "command": "git.timeline.copyCommitId", + "when": "false" + }, + { + "command": "git.timeline.copyCommitMessage", + "when": "false" + }, + { + "command": "git.timeline.selectForCompare", + "when": "false" + }, + { + "command": "git.timeline.compareWithSelected", + "when": "false" + } + ], + "scm/title": [ + { + "command": "git.commit", + "group": "navigation", + "when": "scmProvider == git" + }, + { + "command": "git.refresh", + "group": "navigation", + "when": "scmProvider == git" + }, + { + "command": "git.pull", + "group": "1_header@1", + "when": "scmProvider == git" + }, + { + "command": "git.push", + "group": "1_header@2", + "when": "scmProvider == git" + }, + { + "command": "git.clone", + "group": "1_header@3", + "when": "scmProvider == git" + }, + { + "command": "git.checkout", + "group": "1_header@4", + "when": "scmProvider == git" + }, + { + "submenu": "git.commit", + "group": "2_main@1", + "when": "scmProvider == git" + }, + { + "submenu": "git.changes", + "group": "2_main@2", + "when": "scmProvider == git" + }, + { + "submenu": "git.pullpush", + "group": "2_main@3", + "when": "scmProvider == git" + }, + { + "submenu": "git.branch", + "group": "2_main@4", + "when": "scmProvider == git" + }, + { + "submenu": "git.remotes", + "group": "2_main@5", + "when": "scmProvider == git" + }, + { + "submenu": "git.stash", + "group": "2_main@6", + "when": "scmProvider == git" + }, + { + "submenu": "git.tags", + "group": "2_main@7", + "when": "scmProvider == git" + }, + { + "command": "git.showOutput", + "group": "3_footer", + "when": "scmProvider == git" + } + ], + "scm/sourceControl": [ + { + "command": "git.close", + "group": "navigation", + "when": "scmProvider == git" + } + ], + "scm/resourceGroup/context": [ + { + "command": "git.stageAllMerge", + "when": "scmProvider == git && scmResourceGroup == merge", + "group": "1_modification" + }, + { + "command": "git.stageAllMerge", + "when": "scmProvider == git && scmResourceGroup == merge", + "group": "inline@2" + }, + { + "command": "git.unstageAll", + "when": "scmProvider == git && scmResourceGroup == index", + "group": "1_modification" + }, + { + "command": "git.unstageAll", + "when": "scmProvider == git && scmResourceGroup == index", + "group": "inline@2" + }, + { + "command": "git.cleanAll", + "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed", + "group": "1_modification" + }, + { + "command": "git.stageAll", + "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed", + "group": "1_modification" + }, + { + "command": "git.cleanAll", + "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed", + "group": "inline@2" + }, + { + "command": "git.stageAll", + "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed", + "group": "inline@2" + }, + { + "command": "git.cleanAllTracked", + "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed", + "group": "1_modification" + }, + { + "command": "git.stageAllTracked", + "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed", + "group": "1_modification" + }, + { + "command": "git.cleanAllTracked", + "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed", + "group": "inline@2" + }, + { + "command": "git.stageAllTracked", + "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed", + "group": "inline@2" + }, + { + "command": "git.cleanAllUntracked", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "1_modification" + }, + { + "command": "git.stageAllUntracked", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "1_modification" + }, + { + "command": "git.cleanAllUntracked", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "inline@2" + }, + { + "command": "git.stageAllUntracked", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "inline@2" + } + ], + "scm/resourceFolder/context": [ + { + "command": "git.stage", + "when": "scmProvider == git && scmResourceGroup == merge", + "group": "1_modification" + }, + { + "command": "git.stage", + "when": "scmProvider == git && scmResourceGroup == merge", + "group": "inline@2" + }, + { + "command": "git.unstage", + "when": "scmProvider == git && scmResourceGroup == index", + "group": "1_modification" + }, + { + "command": "git.unstage", + "when": "scmProvider == git && scmResourceGroup == index", + "group": "inline@2" + }, + { + "command": "git.stage", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "1_modification" + }, + { + "command": "git.clean", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "1_modification" + }, + { + "command": "git.clean", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "inline@2" + }, + { + "command": "git.stage", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "inline@2" + }, + { + "command": "git.ignore", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "1_modification@3" + }, + { + "command": "git.stage", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "1_modification" + }, + { + "command": "git.stage", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "inline@2" + }, + { + "command": "git.clean", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "1_modification" + }, + { + "command": "git.clean", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "inline@2" + }, + { + "command": "git.ignore", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "1_modification@3" + } + ], + "scm/resourceState/context": [ + { + "command": "git.stage", + "when": "scmProvider == git && scmResourceGroup == merge", + "group": "1_modification" + }, + { + "command": "git.openFile", + "when": "scmProvider == git && scmResourceGroup == merge", + "group": "navigation" + }, + { + "command": "git.stage", + "when": "scmProvider == git && scmResourceGroup == merge", + "group": "inline@2" + }, + { + "command": "git.revealInExplorer", + "when": "scmProvider == git && scmResourceGroup == merge", + "group": "2_view" + }, + { + "command": "git.openFile2", + "when": "scmProvider == git && scmResourceGroup == merge && config.git.showInlineOpenFileAction && config.git.openDiffOnClick", + "group": "inline@1" + }, + { + "command": "git.openChange", + "when": "scmProvider == git && scmResourceGroup == merge && config.git.showInlineOpenFileAction && !config.git.openDiffOnClick", + "group": "inline@1" + }, + { + "command": "git.openChange", + "when": "scmProvider == git && scmResourceGroup == index", + "group": "navigation" + }, + { + "command": "git.openFile", + "when": "scmProvider == git && scmResourceGroup == index", + "group": "navigation" + }, + { + "command": "git.openHEADFile", + "when": "scmProvider == git && scmResourceGroup == index", + "group": "navigation" + }, + { + "command": "git.unstage", + "when": "scmProvider == git && scmResourceGroup == index", + "group": "1_modification" + }, + { + "command": "git.unstage", + "when": "scmProvider == git && scmResourceGroup == index", + "group": "inline@2" + }, + { + "command": "git.revealInExplorer", + "when": "scmProvider == git && scmResourceGroup == index", + "group": "2_view" + }, + { + "command": "git.openFile2", + "when": "scmProvider == git && scmResourceGroup == index && config.git.showInlineOpenFileAction && config.git.openDiffOnClick", + "group": "inline@1" + }, + { + "command": "git.openChange", + "when": "scmProvider == git && scmResourceGroup == index && config.git.showInlineOpenFileAction && !config.git.openDiffOnClick", + "group": "inline@1" + }, + { + "command": "git.openChange", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "navigation" + }, + { + "command": "git.openHEADFile", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "navigation" + }, + { + "command": "git.openFile", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "navigation" + }, + { + "command": "git.stage", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "1_modification" + }, + { + "command": "git.clean", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "1_modification" + }, + { + "command": "git.clean", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "inline@2" + }, + { + "command": "git.stage", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "inline@2" + }, + { + "command": "git.openFile2", + "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.showInlineOpenFileAction && config.git.openDiffOnClick", + "group": "inline@1" + }, + { + "command": "git.openChange", + "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.showInlineOpenFileAction && !config.git.openDiffOnClick", + "group": "inline@1" + }, + { + "command": "git.ignore", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "1_modification@3" + }, + { + "command": "git.revealInExplorer", + "when": "scmProvider == git && scmResourceGroup == workingTree", + "group": "2_view" + }, + { + "command": "git.openChange", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "navigation" + }, + { + "command": "git.openHEADFile", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "navigation" + }, + { + "command": "git.openFile", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "navigation" + }, + { + "command": "git.stage", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "1_modification" + }, + { + "command": "git.clean", + "when": "scmProvider == git && scmResourceGroup == untracked && !gitFreshRepository", + "group": "1_modification" + }, + { + "command": "git.clean", + "when": "scmProvider == git && scmResourceGroup == untracked && !gitFreshRepository", + "group": "inline@2" + }, + { + "command": "git.stage", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "inline@2" + }, + { + "command": "git.openFile2", + "when": "scmProvider == git && scmResourceGroup == untracked && config.git.showInlineOpenFileAction && config.git.openDiffOnClick", + "group": "inline@1" + }, + { + "command": "git.openChange", + "when": "scmProvider == git && scmResourceGroup == untracked && config.git.showInlineOpenFileAction && !config.git.openDiffOnClick", + "group": "inline@1" + }, + { + "command": "git.ignore", + "when": "scmProvider == git && scmResourceGroup == untracked", + "group": "1_modification@3" + } + ], + "editor/title": [ + { + "command": "git.openFile", + "group": "navigation", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" + }, + { + "command": "git.openFile", + "group": "navigation", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInNotebookTextDiffEditor && resourceScheme =~ /^git$|^file$/" + }, + { + "command": "git.openChange", + "group": "navigation", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && resourceScheme == file" + }, + { + "command": "git.stageSelectedRanges", + "group": "2_git@1", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" + }, + { + "command": "git.unstageSelectedRanges", + "group": "2_git@2", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" + }, + { + "command": "git.revertSelectedRanges", + "group": "2_git@3", + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" + } + ], + "editor/context": [ + { + "command": "git.stageSelectedRanges", + "group": "2_git@1", + "when": "isInDiffRightEditor && !isInEmbeddedDiffEditor && config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" + }, + { + "command": "git.unstageSelectedRanges", + "group": "2_git@2", + "when": "isInDiffRightEditor && !isInEmbeddedDiffEditor && config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" + }, + { + "command": "git.revertSelectedRanges", + "group": "2_git@3", + "when": "isInDiffRightEditor && !isInEmbeddedDiffEditor && config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" + } + ], + "scm/change/title": [ + { + "command": "git.stageChange", + "when": "config.git.enabled && !git.missing && originalResourceScheme == git" + }, + { + "command": "git.revertChange", + "when": "config.git.enabled && !git.missing && originalResourceScheme == git" + } + ], + "timeline/item/context": [ + { + "command": "git.timeline.openDiff", + "group": "1_actions", + "when": "config.git.enabled && !git.missing && timelineItem =~ /git:file\\b/ && !listMultiSelection" + }, + { + "command": "git.timeline.compareWithSelected", + "group": "3_compare@1", + "when": "config.git.enabled && !git.missing && git.timeline.selectedForCompare && timelineItem =~ /git:file\\b/ && !listMultiSelection" + }, + { + "command": "git.timeline.selectForCompare", + "group": "3_compare@2", + "when": "config.git.enabled && !git.missing && timelineItem =~ /git:file\\b/ && !listMultiSelection" + }, + { + "command": "git.timeline.copyCommitId", + "group": "5_copy@1", + "when": "config.git.enabled && !git.missing && timelineItem =~ /git:file:commit\\b/ && !listMultiSelection" + }, + { + "command": "git.timeline.copyCommitMessage", + "group": "5_copy@2", + "when": "config.git.enabled && !git.missing && timelineItem =~ /git:file:commit\\b/ && !listMultiSelection" + } + ], + "git.commit": [ + { + "command": "git.commit", + "group": "1_commit@1" + }, + { + "command": "git.commitStaged", + "group": "1_commit@2" + }, + { + "command": "git.commitAll", + "group": "1_commit@3" + }, + { + "command": "git.undoCommit", + "group": "1_commit@4" + }, + { + "command": "git.rebaseAbort", + "group": "1_commit@5" + }, + { + "command": "git.commitNoVerify", + "group": "1_commit@6", + "when": "config.git.allowNoVerifyCommit" + }, + { + "command": "git.commitStagedNoVerify", + "group": "1_commit@7", + "when": "config.git.allowNoVerifyCommit" + }, + { + "command": "git.commitAllNoVerify", + "group": "1_commit@8", + "when": "config.git.allowNoVerifyCommit" + }, + { + "command": "git.commitStagedAmend", + "group": "2_amend@1" + }, + { + "command": "git.commitAllAmend", + "group": "2_amend@2" + }, + { + "command": "git.commitStagedAmendNoVerify", + "group": "2_amend@3", + "when": "config.git.allowNoVerifyCommit" + }, + { + "command": "git.commitAllAmendNoVerify", + "group": "2_amend@4", + "when": "config.git.allowNoVerifyCommit" + }, + { + "command": "git.commitStagedSigned", + "group": "3_signoff@1" + }, + { + "command": "git.commitAllSigned", + "group": "3_signoff@2" + }, + { + "command": "git.commitStagedSignedNoVerify", + "group": "3_signoff@3", + "when": "config.git.allowNoVerifyCommit" + }, + { + "command": "git.commitAllSignedNoVerify", + "group": "3_signoff@4", + "when": "config.git.allowNoVerifyCommit" + } + ], + "git.changes": [ + { + "command": "git.stageAll", + "group": "changes@1" + }, + { + "command": "git.unstageAll", + "group": "changes@2" + }, + { + "command": "git.cleanAll", + "group": "changes@3" + } + ], + "git.pullpush": [ + { + "command": "git.sync", + "group": "1_sync@1" + }, + { + "command": "git.syncRebase", + "when": "gitState == idle", + "group": "1_sync@2" + }, + { + "command": "git.pull", + "group": "2_pull@1" + }, + { + "command": "git.pullRebase", + "group": "2_pull@2" + }, + { + "command": "git.pullFrom", + "group": "2_pull@3" + }, + { + "command": "git.push", + "group": "3_push@1" + }, + { + "command": "git.pushForce", + "when": "config.git.allowForcePush", + "group": "3_push@2" + }, + { + "command": "git.pushTo", + "group": "3_push@3" + }, + { + "command": "git.pushToForce", + "when": "config.git.allowForcePush", + "group": "3_push@4" + }, + { + "command": "git.fetch", + "group": "4_fetch@1" + }, + { + "command": "git.fetchPrune", + "group": "4_fetch@2" + }, + { + "command": "git.fetchAll", + "group": "4_fetch@3" + } + ], + "git.branch": [ + { + "command": "git.merge", + "group": "branch@1" + }, + { + "command": "git.rebase", + "group": "branch@2" + }, + { + "command": "git.branch", + "group": "branch@3" + }, + { + "command": "git.branchFrom", + "group": "branch@4" + }, + { + "command": "git.renameBranch", + "group": "branch@5" + }, + { + "command": "git.deleteBranch", + "group": "branch@6" + }, + { + "command": "git.publish", + "group": "branch@7" + } + ], + "git.remotes": [ + { + "command": "git.addRemote", + "group": "remote@1" + }, + { + "command": "git.removeRemote", + "group": "remote@2" + } + ], + "git.stash": [ + { + "command": "git.stash", + "group": "stash@1" + }, + { + "command": "git.stashIncludeUntracked", + "group": "stash@2" + }, + { + "command": "git.stashApplyLatest", + "group": "stash@3" + }, + { + "command": "git.stashApply", + "group": "stash@4" + }, + { + "command": "git.stashPopLatest", + "group": "stash@5" + }, + { + "command": "git.stashPop", + "group": "stash@6" + }, + { + "command": "git.stashDrop", + "group": "stash@7" + } + ], + "git.tags": [ + { + "command": "git.createTag", + "group": "tags@1" + }, + { + "command": "git.deleteTag", + "group": "tags@2" + } + ] + }, + "submenus": [ + { + "id": "git.commit", + "label": "%submenu.commit%" + }, + { + "id": "git.changes", + "label": "%submenu.changes%" + }, + { + "id": "git.pullpush", + "label": "%submenu.pullpush%" + }, + { + "id": "git.branch", + "label": "%submenu.branch%" + }, + { + "id": "git.remotes", + "label": "%submenu.remotes%" + }, + { + "id": "git.stash", + "label": "%submenu.stash%" + }, + { + "id": "git.tags", + "label": "%submenu.tags%" + } + ], + "configuration": { + "title": "Git", + "properties": { + "git.enabled": { + "type": "boolean", + "scope": "resource", + "description": "%config.enabled%", + "default": true + }, + "git.path": { + "type": [ + "string", + "null", + "array" + ], + "markdownDescription": "%config.path%", + "default": null, + "scope": "machine" + }, + "git.autoRepositoryDetection": { + "type": [ + "boolean", + "string" + ], + "enum": [ + true, + false, + "subFolders", + "openEditors" + ], + "enumDescriptions": [ + "%config.autoRepositoryDetection.true%", + "%config.autoRepositoryDetection.false%", + "%config.autoRepositoryDetection.subFolders%", + "%config.autoRepositoryDetection.openEditors%" + ], + "description": "%config.autoRepositoryDetection%", + "default": true + }, + "git.autorefresh": { + "type": "boolean", + "description": "%config.autorefresh%", + "default": true + }, + "git.autofetch": { + "type": ["boolean", "string"], + "enum": [true, false, "all"], + "scope": "resource", + "markdownDescription": "%config.autofetch%", + "default": false, + "tags": [ + "usesOnlineServices" + ] + }, + "git.autofetchPeriod": { + "type": "number", + "scope": "resource", + "markdownDescription": "%config.autofetchPeriod%", + "default": 180 + }, + "git.branchValidationRegex": { + "type": "string", + "description": "%config.branchValidationRegex%", + "default": "" + }, + "git.branchWhitespaceChar": { + "type": "string", + "description": "%config.branchWhitespaceChar%", + "default": "-" + }, + "git.confirmSync": { + "type": "boolean", + "description": "%config.confirmSync%", + "default": true + }, + "git.countBadge": { + "type": "string", + "enum": [ + "all", + "tracked", + "off" + ], + "enumDescriptions": [ + "%config.countBadge.all%", + "%config.countBadge.tracked%", + "%config.countBadge.off%" + ], + "description": "%config.countBadge%", + "default": "all", + "scope": "resource" + }, + "git.checkoutType": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "local", + "tags", + "remote" + ], + "enumDescriptions": [ + "%config.checkoutType.local%", + "%config.checkoutType.tags%", + "%config.checkoutType.remote%" + ] + }, + "uniqueItems": true, + "markdownDescription": "%config.checkoutType%", + "default": [ + "local", + "remote", + "tags" + ] + }, + "git.ignoreLegacyWarning": { + "type": "boolean", + "description": "%config.ignoreLegacyWarning%", + "default": false + }, + "git.ignoreMissingGitWarning": { + "type": "boolean", + "description": "%config.ignoreMissingGitWarning%", + "default": false + }, + "git.ignoreWindowsGit27Warning": { + "type": "boolean", + "description": "%config.ignoreWindowsGit27Warning%", + "default": false + }, + "git.ignoreLimitWarning": { + "type": "boolean", + "description": "%config.ignoreLimitWarning%", + "default": false + }, + "git.ignoreRebaseWarning": { + "type": "boolean", + "description": "%config.ignoreRebaseWarning%", + "default": false + }, + "git.defaultCloneDirectory": { + "type": [ + "string", + "null" + ], + "default": null, + "scope": "machine", + "description": "%config.defaultCloneDirectory%" + }, + "git.enableSmartCommit": { + "type": "boolean", + "scope": "resource", + "description": "%config.enableSmartCommit%", + "default": false + }, + "git.smartCommitChanges": { + "type": "string", + "enum": [ + "all", + "tracked" + ], + "enumDescriptions": [ + "%config.smartCommitChanges.all%", + "%config.smartCommitChanges.tracked%" + ], + "scope": "resource", + "description": "%config.smartCommitChanges%", + "default": "all" + }, + "git.suggestSmartCommit": { + "type": "boolean", + "scope": "resource", + "description": "%config.suggestSmartCommit%", + "default": true + }, + "git.enableCommitSigning": { + "type": "boolean", + "scope": "resource", + "description": "%config.enableCommitSigning%", + "default": false + }, + "git.confirmEmptyCommits": { + "type": "boolean", + "scope": "resource", + "description": "%config.confirmEmptyCommits%", + "default": true + }, + "git.decorations.enabled": { + "type": "boolean", + "default": true, + "description": "%config.decorations.enabled%" + }, + "git.enableStatusBarSync": { + "type": "boolean", + "default": true, + "description": "%config.enableStatusBarSync%", + "scope": "resource" + }, + "git.followTagsWhenSync": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%config.followTagsWhenSync%" + }, + "git.promptToSaveFilesBeforeStash": { + "type": "string", + "enum": [ + "always", + "staged", + "never" + ], + "enumDescriptions": [ + "%config.promptToSaveFilesBeforeStash.always%", + "%config.promptToSaveFilesBeforeStash.staged%", + "%config.promptToSaveFilesBeforeStash.never%" + ], + "scope": "resource", + "default": "always", + "description": "%config.promptToSaveFilesBeforeStash%" + }, + "git.promptToSaveFilesBeforeCommit": { + "type": "string", + "enum": [ + "always", + "staged", + "never" + ], + "enumDescriptions": [ + "%config.promptToSaveFilesBeforeCommit.always%", + "%config.promptToSaveFilesBeforeCommit.staged%", + "%config.promptToSaveFilesBeforeCommit.never%" + ], + "scope": "resource", + "default": "always", + "description": "%config.promptToSaveFilesBeforeCommit%" + }, + "git.postCommitCommand": { + "type": "string", + "enum": [ + "none", + "push", + "sync" + ], + "enumDescriptions": [ + "%config.postCommitCommand.none%", + "%config.postCommitCommand.push%", + "%config.postCommitCommand.sync%" + ], + "markdownDescription": "%config.postCommitCommand%", + "scope": "resource", + "default": "none" + }, + "git.openAfterClone": { + "type": "string", + "enum": [ + "always", + "alwaysNewWindow", + "whenNoFolderOpen", + "prompt" + ], + "enumDescriptions": [ + "%config.openAfterClone.always%", + "%config.openAfterClone.alwaysNewWindow%", + "%config.openAfterClone.whenNoFolderOpen%", + "%config.openAfterClone.prompt%" + ], + "default": "prompt", + "description": "%config.openAfterClone%" + }, + "git.showInlineOpenFileAction": { + "type": "boolean", + "default": true, + "description": "%config.showInlineOpenFileAction%" + }, + "git.showPushSuccessNotification": { + "type": "boolean", + "description": "%config.showPushSuccessNotification%", + "default": false + }, + "git.inputValidation": { + "type": "string", + "enum": [ + "always", + "warn", + "off" + ], + "default": "warn", + "description": "%config.inputValidation%" + }, + "git.inputValidationLength": { + "type": "number", + "default": 72, + "description": "%config.inputValidationLength%" + }, + "git.inputValidationSubjectLength": { + "type": [ + "number", + "null" + ], + "default": 50, + "description": "%config.inputValidationSubjectLength%" + }, + "git.detectSubmodules": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%config.detectSubmodules%" + }, + "git.detectSubmodulesLimit": { + "type": "number", + "scope": "resource", + "default": 10, + "description": "%config.detectSubmodulesLimit%" + }, + "git.alwaysShowStagedChangesResourceGroup": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%config.alwaysShowStagedChangesResourceGroup%" + }, + "git.alwaysSignOff": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%config.alwaysSignOff%" + }, + "git.ignoreSubmodules": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%config.ignoreSubmodules%" + }, + "git.ignoredRepositories": { + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "scope": "window", + "description": "%config.ignoredRepositories%" + }, + "git.scanRepositories": { + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "scope": "resource", + "description": "%config.scanRepositories%" + }, + "git.showProgress": { + "type": "boolean", + "description": "%config.showProgress%", + "default": true, + "scope": "resource" + }, + "git.rebaseWhenSync": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%config.rebaseWhenSync%" + }, + "git.fetchOnPull": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%config.fetchOnPull%" + }, + "git.pruneOnFetch": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%config.pruneOnFetch%" + }, + "git.pullTags": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%config.pullTags%" + }, + "git.autoStash": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%config.autoStash%" + }, + "git.allowForcePush": { + "type": "boolean", + "default": false, + "description": "%config.allowForcePush%" + }, + "git.useForcePushWithLease": { + "type": "boolean", + "default": true, + "description": "%config.useForcePushWithLease%" + }, + "git.confirmForcePush": { + "type": "boolean", + "default": true, + "description": "%config.confirmForcePush%" + }, + "git.allowNoVerifyCommit": { + "type": "boolean", + "default": false, + "description": "%config.allowNoVerifyCommit%" + }, + "git.confirmNoVerifyCommit": { + "type": "boolean", + "default": true, + "description": "%config.confirmNoVerifyCommit%" + }, + "git.openDiffOnClick": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%config.openDiffOnClick%" + }, + "git.supportCancellation": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%config.supportCancellation%" + }, + "git.branchSortOrder": { + "type": "string", + "enum": [ + "committerdate", + "alphabetically" + ], + "default": "committerdate", + "description": "%config.branchSortOrder%" + }, + "git.untrackedChanges": { + "type": "string", + "enum": [ + "mixed", + "separate", + "hidden" + ], + "enumDescriptions": [ + "%config.untrackedChanges.mixed%", + "%config.untrackedChanges.separate%", + "%config.untrackedChanges.hidden%" + ], + "default": "mixed", + "description": "%config.untrackedChanges%", + "scope": "resource" + }, + "git.requireGitUserConfig": { + "type": "boolean", + "description": "%config.requireGitUserConfig%", + "default": true + }, + "git.showCommitInput": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%config.showCommitInput%" + }, + "git.terminalAuthentication": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%config.terminalAuthentication%" + }, + "git.useCommitInputAsStashMessage": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%config.useCommitInputAsStashMessage%" + }, + "git.githubAuthentication": { + "deprecationMessage": "This setting is now deprecated, please use `github.gitAuthentication` instead." + }, + "git.timeline.date": { + "enum": [ + "committed", + "authored" + ], + "enumDescriptions": [ + "%config.timeline.date.committed%", + "%config.timeline.date.authored%" + ], + "default": "committed", + "description": "%config.timeline.date%", + "scope": "window" + }, + "git.timeline.showAuthor": { + "type": "boolean", + "default": true, + "description": "%config.timeline.showAuthor%", + "scope": "window" + } + } + }, + "colors": [ + { + "id": "gitDecoration.addedResourceForeground", + "description": "%colors.added%", + "defaults": { + "light": "#587c0c", + "dark": "#81b88b", + "highContrast": "#1b5225" + } + }, + { + "id": "gitDecoration.modifiedResourceForeground", + "description": "%colors.modified%", + "defaults": { + "light": "#895503", + "dark": "#E2C08D", + "highContrast": "#E2C08D" + } + }, + { + "id": "gitDecoration.deletedResourceForeground", + "description": "%colors.deleted%", + "defaults": { + "light": "#ad0707", + "dark": "#c74e39", + "highContrast": "#c74e39" + } + }, + { + "id": "gitDecoration.renamedResourceForeground", + "description": "%colors.renamed%", + "defaults": { + "light": "#007100", + "dark": "#73C991", + "highContrast": "#73C991" + } + }, + { + "id": "gitDecoration.untrackedResourceForeground", + "description": "%colors.untracked%", + "defaults": { + "light": "#007100", + "dark": "#73C991", + "highContrast": "#73C991" + } + }, + { + "id": "gitDecoration.ignoredResourceForeground", + "description": "%colors.ignored%", + "defaults": { + "light": "#8E8E90", + "dark": "#8C8C8C", + "highContrast": "#A7A8A9" + } + }, + { + "id": "gitDecoration.stageModifiedResourceForeground", + "description": "%colors.stageModified%", + "defaults": { + "light": "#895503", + "dark": "#E2C08D", + "highContrast": "#E2C08D" + } + }, + { + "id": "gitDecoration.stageDeletedResourceForeground", + "description": "%colors.stageDeleted%", + "defaults": { + "light": "#ad0707", + "dark": "#c74e39", + "highContrast": "#c74e39" + } + }, + { + "id": "gitDecoration.conflictingResourceForeground", + "description": "%colors.conflict%", + "defaults": { + "light": "#ad0707", + "dark": "#e4676b", + "highContrast": "#c74e39" + } + }, + { + "id": "gitDecoration.submoduleResourceForeground", + "description": "%colors.submodule%", + "defaults": { + "light": "#1258a7", + "dark": "#8db9e2", + "highContrast": "#8db9e2" + } + } + ], + "languages": [ + { + "id": "git-commit", + "aliases": [ + "Git Commit Message", + "git-commit" + ], + "filenames": [ + "COMMIT_EDITMSG", + "MERGE_MSG" + ], + "configuration": "./languages/git-commit.language-configuration.json" + }, + { + "id": "git-rebase", + "aliases": [ + "Git Rebase Message", + "git-rebase" + ], + "filenames": [ + "git-rebase-todo" + ], + "configuration": "./languages/git-rebase.language-configuration.json" + }, + { + "id": "diff", + "aliases": [ + "Diff", + "diff" + ], + "extensions": [ + ".diff", + ".patch", + ".rej" + ], + "configuration": "./languages/diff.language-configuration.json" + }, + { + "id": "ignore", + "aliases": [ + "Ignore", + "ignore" + ], + "extensions": [ + ".gitignore_global", + ".gitignore" + ], + "configuration": "./languages/ignore.language-configuration.json" + } + ], + "grammars": [ + { + "language": "git-commit", + "scopeName": "text.git-commit", + "path": "./syntaxes/git-commit.tmLanguage.json" + }, + { + "language": "git-rebase", + "scopeName": "text.git-rebase", + "path": "./syntaxes/git-rebase.tmLanguage.json" + }, + { + "language": "diff", + "scopeName": "source.diff", + "path": "./syntaxes/diff.tmLanguage.json" + }, + { + "language": "ignore", + "scopeName": "source.ignore", + "path": "./syntaxes/ignore.tmLanguage.json" + } + ], + "configurationDefaults": { + "[git-commit]": { + "editor.rulers": [ + 72 + ], + "workbench.editor.restoreViewState": false + }, + "[git-rebase]": { + "workbench.editor.restoreViewState": false + } + }, + "viewsWelcome": [ + { + "view": "scm", + "contents": "%view.workbench.scm.disabled%", + "when": "!config.git.enabled" + }, + { + "view": "scm", + "contents": "%view.workbench.scm.missing%", + "when": "config.git.enabled && git.missing" + }, + { + "view": "scm", + "contents": "%view.workbench.scm.empty%", + "when": "config.git.enabled && workbenchState == empty", + "enablement": "git.state == initialized", + "group": "2_open@1" + }, + { + "view": "scm", + "contents": "%view.workbench.scm.folder%", + "when": "config.git.enabled && workbenchState == folder", + "enablement": "git.state == initialized", + "group": "5_scm@1" + }, + { + "view": "scm", + "contents": "%view.workbench.scm.workspace%", + "when": "config.git.enabled && workbenchState == workspace && workspaceFolderCount != 0", + "enablement": "git.state == initialized", + "group": "5_scm@1" + }, + { + "view": "scm", + "contents": "%view.workbench.scm.emptyWorkspace%", + "when": "config.git.enabled && workbenchState == workspace && workspaceFolderCount == 0", + "enablement": "git.state == initialized", + "group": "2_open@1" + }, + { + "view": "explorer", + "contents": "%view.workbench.cloneRepository%", + "when": "config.git.enabled", + "enablement": "git.state == initialized", + "group": "5_scm@1" + }, + { + "view": "explorer", + "contents": "%view.workbench.learnMore%", + "when": "config.git.enabled", + "enablement": "git.state == initialized", + "group": "5_scm@10" + } + ] + }, + "dependencies": { + "byline": "^5.0.0", + "file-type": "^7.2.0", + "iconv-lite-umd": "0.6.8", + "jschardet": "2.3.0", + "vscode-extension-telemetry": "0.1.7", + "vscode-nls": "^4.0.0", + "vscode-uri": "^2.0.0", + "which": "^1.3.0" + }, + "devDependencies": { + "@types/byline": "4.2.31", + "@types/file-type": "^5.2.1", + "@types/mocha": "^8.2.0", + "@types/node": "14.x", + "@types/which": "^1.0.28" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/git/package.nls.json b/extensions/git/package.nls.json similarity index 100% rename from lib/vscode/extensions/git/package.nls.json rename to extensions/git/package.nls.json diff --git a/lib/vscode/extensions/git/resources/emojis.json b/extensions/git/resources/emojis.json similarity index 100% rename from lib/vscode/extensions/git/resources/emojis.json rename to extensions/git/resources/emojis.json diff --git a/lib/vscode/extensions/git/resources/icons/dark/status-added.svg b/extensions/git/resources/icons/dark/status-added.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/dark/status-added.svg rename to extensions/git/resources/icons/dark/status-added.svg diff --git a/lib/vscode/extensions/git/resources/icons/dark/status-conflict.svg b/extensions/git/resources/icons/dark/status-conflict.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/dark/status-conflict.svg rename to extensions/git/resources/icons/dark/status-conflict.svg diff --git a/lib/vscode/extensions/git/resources/icons/dark/status-copied.svg b/extensions/git/resources/icons/dark/status-copied.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/dark/status-copied.svg rename to extensions/git/resources/icons/dark/status-copied.svg diff --git a/lib/vscode/extensions/git/resources/icons/dark/status-deleted.svg b/extensions/git/resources/icons/dark/status-deleted.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/dark/status-deleted.svg rename to extensions/git/resources/icons/dark/status-deleted.svg diff --git a/lib/vscode/extensions/git/resources/icons/dark/status-ignored.svg b/extensions/git/resources/icons/dark/status-ignored.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/dark/status-ignored.svg rename to extensions/git/resources/icons/dark/status-ignored.svg diff --git a/lib/vscode/extensions/git/resources/icons/dark/status-modified.svg b/extensions/git/resources/icons/dark/status-modified.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/dark/status-modified.svg rename to extensions/git/resources/icons/dark/status-modified.svg diff --git a/lib/vscode/extensions/git/resources/icons/dark/status-renamed.svg b/extensions/git/resources/icons/dark/status-renamed.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/dark/status-renamed.svg rename to extensions/git/resources/icons/dark/status-renamed.svg diff --git a/lib/vscode/extensions/git/resources/icons/dark/status-untracked.svg b/extensions/git/resources/icons/dark/status-untracked.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/dark/status-untracked.svg rename to extensions/git/resources/icons/dark/status-untracked.svg diff --git a/lib/vscode/extensions/git/resources/icons/git.png b/extensions/git/resources/icons/git.png similarity index 100% rename from lib/vscode/extensions/git/resources/icons/git.png rename to extensions/git/resources/icons/git.png diff --git a/lib/vscode/extensions/git/resources/icons/light/status-added.svg b/extensions/git/resources/icons/light/status-added.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/light/status-added.svg rename to extensions/git/resources/icons/light/status-added.svg diff --git a/lib/vscode/extensions/git/resources/icons/light/status-conflict.svg b/extensions/git/resources/icons/light/status-conflict.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/light/status-conflict.svg rename to extensions/git/resources/icons/light/status-conflict.svg diff --git a/lib/vscode/extensions/git/resources/icons/light/status-copied.svg b/extensions/git/resources/icons/light/status-copied.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/light/status-copied.svg rename to extensions/git/resources/icons/light/status-copied.svg diff --git a/lib/vscode/extensions/git/resources/icons/light/status-deleted.svg b/extensions/git/resources/icons/light/status-deleted.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/light/status-deleted.svg rename to extensions/git/resources/icons/light/status-deleted.svg diff --git a/lib/vscode/extensions/git/resources/icons/light/status-ignored.svg b/extensions/git/resources/icons/light/status-ignored.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/light/status-ignored.svg rename to extensions/git/resources/icons/light/status-ignored.svg diff --git a/lib/vscode/extensions/git/resources/icons/light/status-modified.svg b/extensions/git/resources/icons/light/status-modified.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/light/status-modified.svg rename to extensions/git/resources/icons/light/status-modified.svg diff --git a/lib/vscode/extensions/git/resources/icons/light/status-renamed.svg b/extensions/git/resources/icons/light/status-renamed.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/light/status-renamed.svg rename to extensions/git/resources/icons/light/status-renamed.svg diff --git a/lib/vscode/extensions/git/resources/icons/light/status-untracked.svg b/extensions/git/resources/icons/light/status-untracked.svg similarity index 100% rename from lib/vscode/extensions/git/resources/icons/light/status-untracked.svg rename to extensions/git/resources/icons/light/status-untracked.svg diff --git a/lib/vscode/extensions/git/src/api/api1.ts b/extensions/git/src/api/api1.ts similarity index 100% rename from lib/vscode/extensions/git/src/api/api1.ts rename to extensions/git/src/api/api1.ts diff --git a/lib/vscode/extensions/git/src/api/extension.ts b/extensions/git/src/api/extension.ts similarity index 100% rename from lib/vscode/extensions/git/src/api/extension.ts rename to extensions/git/src/api/extension.ts diff --git a/lib/vscode/extensions/git/src/api/git.d.ts b/extensions/git/src/api/git.d.ts similarity index 100% rename from lib/vscode/extensions/git/src/api/git.d.ts rename to extensions/git/src/api/git.d.ts diff --git a/lib/vscode/extensions/git/src/askpass-empty.sh b/extensions/git/src/askpass-empty.sh similarity index 100% rename from lib/vscode/extensions/git/src/askpass-empty.sh rename to extensions/git/src/askpass-empty.sh diff --git a/lib/vscode/extensions/git/src/askpass-main.ts b/extensions/git/src/askpass-main.ts similarity index 100% rename from lib/vscode/extensions/git/src/askpass-main.ts rename to extensions/git/src/askpass-main.ts diff --git a/lib/vscode/extensions/git/src/askpass.sh b/extensions/git/src/askpass.sh similarity index 100% rename from lib/vscode/extensions/git/src/askpass.sh rename to extensions/git/src/askpass.sh diff --git a/lib/vscode/extensions/git/src/askpass.ts b/extensions/git/src/askpass.ts similarity index 100% rename from lib/vscode/extensions/git/src/askpass.ts rename to extensions/git/src/askpass.ts diff --git a/lib/vscode/extensions/git/src/autofetch.ts b/extensions/git/src/autofetch.ts similarity index 100% rename from lib/vscode/extensions/git/src/autofetch.ts rename to extensions/git/src/autofetch.ts diff --git a/lib/vscode/extensions/git/src/commands.ts b/extensions/git/src/commands.ts similarity index 100% rename from lib/vscode/extensions/git/src/commands.ts rename to extensions/git/src/commands.ts diff --git a/lib/vscode/extensions/git/src/decorationProvider.ts b/extensions/git/src/decorationProvider.ts similarity index 100% rename from lib/vscode/extensions/git/src/decorationProvider.ts rename to extensions/git/src/decorationProvider.ts diff --git a/lib/vscode/extensions/git/src/decorators.ts b/extensions/git/src/decorators.ts similarity index 100% rename from lib/vscode/extensions/git/src/decorators.ts rename to extensions/git/src/decorators.ts diff --git a/lib/vscode/extensions/git/src/emoji.ts b/extensions/git/src/emoji.ts similarity index 100% rename from lib/vscode/extensions/git/src/emoji.ts rename to extensions/git/src/emoji.ts diff --git a/lib/vscode/extensions/git/src/encoding.ts b/extensions/git/src/encoding.ts similarity index 100% rename from lib/vscode/extensions/git/src/encoding.ts rename to extensions/git/src/encoding.ts diff --git a/lib/vscode/extensions/git/src/fileSystemProvider.ts b/extensions/git/src/fileSystemProvider.ts similarity index 100% rename from lib/vscode/extensions/git/src/fileSystemProvider.ts rename to extensions/git/src/fileSystemProvider.ts diff --git a/lib/vscode/extensions/git/src/git.ts b/extensions/git/src/git.ts similarity index 100% rename from lib/vscode/extensions/git/src/git.ts rename to extensions/git/src/git.ts diff --git a/lib/vscode/extensions/git/src/ipc/ipcClient.ts b/extensions/git/src/ipc/ipcClient.ts similarity index 100% rename from lib/vscode/extensions/git/src/ipc/ipcClient.ts rename to extensions/git/src/ipc/ipcClient.ts diff --git a/lib/vscode/extensions/git/src/ipc/ipcServer.ts b/extensions/git/src/ipc/ipcServer.ts similarity index 100% rename from lib/vscode/extensions/git/src/ipc/ipcServer.ts rename to extensions/git/src/ipc/ipcServer.ts diff --git a/lib/vscode/extensions/git/src/log.ts b/extensions/git/src/log.ts similarity index 100% rename from lib/vscode/extensions/git/src/log.ts rename to extensions/git/src/log.ts diff --git a/lib/vscode/extensions/git/src/main.ts b/extensions/git/src/main.ts similarity index 100% rename from lib/vscode/extensions/git/src/main.ts rename to extensions/git/src/main.ts diff --git a/lib/vscode/extensions/git/src/model.ts b/extensions/git/src/model.ts similarity index 100% rename from lib/vscode/extensions/git/src/model.ts rename to extensions/git/src/model.ts diff --git a/lib/vscode/extensions/git/src/protocolHandler.ts b/extensions/git/src/protocolHandler.ts similarity index 100% rename from lib/vscode/extensions/git/src/protocolHandler.ts rename to extensions/git/src/protocolHandler.ts diff --git a/lib/vscode/extensions/git/src/pushError.ts b/extensions/git/src/pushError.ts similarity index 100% rename from lib/vscode/extensions/git/src/pushError.ts rename to extensions/git/src/pushError.ts diff --git a/lib/vscode/extensions/git/src/remoteProvider.ts b/extensions/git/src/remoteProvider.ts similarity index 100% rename from lib/vscode/extensions/git/src/remoteProvider.ts rename to extensions/git/src/remoteProvider.ts diff --git a/lib/vscode/extensions/git/src/remoteSource.ts b/extensions/git/src/remoteSource.ts similarity index 100% rename from lib/vscode/extensions/git/src/remoteSource.ts rename to extensions/git/src/remoteSource.ts diff --git a/lib/vscode/extensions/git/src/repository.ts b/extensions/git/src/repository.ts similarity index 100% rename from lib/vscode/extensions/git/src/repository.ts rename to extensions/git/src/repository.ts diff --git a/lib/vscode/extensions/git/src/staging.ts b/extensions/git/src/staging.ts similarity index 100% rename from lib/vscode/extensions/git/src/staging.ts rename to extensions/git/src/staging.ts diff --git a/lib/vscode/extensions/git/src/statusbar.ts b/extensions/git/src/statusbar.ts similarity index 100% rename from lib/vscode/extensions/git/src/statusbar.ts rename to extensions/git/src/statusbar.ts diff --git a/lib/vscode/extensions/git/src/terminal.ts b/extensions/git/src/terminal.ts similarity index 100% rename from lib/vscode/extensions/git/src/terminal.ts rename to extensions/git/src/terminal.ts diff --git a/lib/vscode/extensions/git/src/test/git.test.ts b/extensions/git/src/test/git.test.ts similarity index 90% rename from lib/vscode/extensions/git/src/test/git.test.ts rename to extensions/git/src/test/git.test.ts index 4c74e26321b9..c0d0d2003c96 100644 --- a/lib/vscode/extensions/git/src/test/git.test.ts +++ b/extensions/git/src/test/git.test.ts @@ -12,19 +12,19 @@ suite('git', () => { suite('GitStatusParser', () => { test('empty parser', () => { const parser = new GitStatusParser(); - assert.deepEqual(parser.status, []); + assert.deepStrictEqual(parser.status, []); }); test('empty parser 2', () => { const parser = new GitStatusParser(); parser.update(''); - assert.deepEqual(parser.status, []); + assert.deepStrictEqual(parser.status, []); }); test('simple', () => { const parser = new GitStatusParser(); parser.update('?? file.txt\0'); - assert.deepEqual(parser.status, [ + assert.deepStrictEqual(parser.status, [ { path: 'file.txt', rename: undefined, x: '?', y: '?' } ]); }); @@ -34,7 +34,7 @@ suite('git', () => { parser.update('?? file.txt\0'); parser.update('?? file2.txt\0'); parser.update('?? file3.txt\0'); - assert.deepEqual(parser.status, [ + assert.deepStrictEqual(parser.status, [ { path: 'file.txt', rename: undefined, x: '?', y: '?' }, { path: 'file2.txt', rename: undefined, x: '?', y: '?' }, { path: 'file3.txt', rename: undefined, x: '?', y: '?' } @@ -51,7 +51,7 @@ suite('git', () => { parser.update(''); parser.update('?? file3.txt\0'); parser.update(''); - assert.deepEqual(parser.status, [ + assert.deepStrictEqual(parser.status, [ { path: 'file.txt', rename: undefined, x: '?', y: '?' }, { path: 'file2.txt', rename: undefined, x: '?', y: '?' }, { path: 'file3.txt', rename: undefined, x: '?', y: '?' } @@ -61,7 +61,7 @@ suite('git', () => { test('combined', () => { const parser = new GitStatusParser(); parser.update('?? file.txt\0?? file2.txt\0?? file3.txt\0'); - assert.deepEqual(parser.status, [ + assert.deepStrictEqual(parser.status, [ { path: 'file.txt', rename: undefined, x: '?', y: '?' }, { path: 'file2.txt', rename: undefined, x: '?', y: '?' }, { path: 'file3.txt', rename: undefined, x: '?', y: '?' } @@ -72,7 +72,7 @@ suite('git', () => { const parser = new GitStatusParser(); parser.update('?? file.txt\0?? file2'); parser.update('.txt\0?? file3.txt\0'); - assert.deepEqual(parser.status, [ + assert.deepStrictEqual(parser.status, [ { path: 'file.txt', rename: undefined, x: '?', y: '?' }, { path: 'file2.txt', rename: undefined, x: '?', y: '?' }, { path: 'file3.txt', rename: undefined, x: '?', y: '?' } @@ -83,7 +83,7 @@ suite('git', () => { const parser = new GitStatusParser(); parser.update('?? file.txt'); parser.update('\0?? file2.txt\0?? file3.txt\0'); - assert.deepEqual(parser.status, [ + assert.deepStrictEqual(parser.status, [ { path: 'file.txt', rename: undefined, x: '?', y: '?' }, { path: 'file2.txt', rename: undefined, x: '?', y: '?' }, { path: 'file3.txt', rename: undefined, x: '?', y: '?' } @@ -94,7 +94,7 @@ suite('git', () => { const parser = new GitStatusParser(); parser.update('?? file.txt\0?? file2.txt\0?? file3.txt'); parser.update('\0'); - assert.deepEqual(parser.status, [ + assert.deepStrictEqual(parser.status, [ { path: 'file.txt', rename: undefined, x: '?', y: '?' }, { path: 'file2.txt', rename: undefined, x: '?', y: '?' }, { path: 'file3.txt', rename: undefined, x: '?', y: '?' } @@ -104,7 +104,7 @@ suite('git', () => { test('rename', () => { const parser = new GitStatusParser(); parser.update('R newfile.txt\0file.txt\0?? file2.txt\0?? file3.txt\0'); - assert.deepEqual(parser.status, [ + assert.deepStrictEqual(parser.status, [ { path: 'file.txt', rename: 'newfile.txt', x: 'R', y: ' ' }, { path: 'file2.txt', rename: undefined, x: '?', y: '?' }, { path: 'file3.txt', rename: undefined, x: '?', y: '?' } @@ -115,7 +115,7 @@ suite('git', () => { const parser = new GitStatusParser(); parser.update('R newfile.txt\0fil'); parser.update('e.txt\0?? file2.txt\0?? file3.txt\0'); - assert.deepEqual(parser.status, [ + assert.deepStrictEqual(parser.status, [ { path: 'file.txt', rename: 'newfile.txt', x: 'R', y: ' ' }, { path: 'file2.txt', rename: undefined, x: '?', y: '?' }, { path: 'file3.txt', rename: undefined, x: '?', y: '?' } @@ -127,7 +127,7 @@ suite('git', () => { parser.update('?? file2.txt\0R new'); parser.update('file.txt\0fil'); parser.update('e.txt\0?? file3.txt\0'); - assert.deepEqual(parser.status, [ + assert.deepStrictEqual(parser.status, [ { path: 'file2.txt', rename: undefined, x: '?', y: '?' }, { path: 'file.txt', rename: 'newfile.txt', x: 'R', y: ' ' }, { path: 'file3.txt', rename: undefined, x: '?', y: '?' } @@ -137,7 +137,7 @@ suite('git', () => { suite('parseGitmodules', () => { test('empty', () => { - assert.deepEqual(parseGitmodules(''), []); + assert.deepStrictEqual(parseGitmodules(''), []); }); test('sample', () => { @@ -146,7 +146,7 @@ suite('git', () => { url = https://github.com/gabime/spdlog.git `; - assert.deepEqual(parseGitmodules(sample), [ + assert.deepStrictEqual(parseGitmodules(sample), [ { name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' } ]); }); @@ -166,7 +166,7 @@ suite('git', () => { url = https://github.com/gabime/spdlog4.git `; - assert.deepEqual(parseGitmodules(sample), [ + assert.deepStrictEqual(parseGitmodules(sample), [ { name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' }, { name: 'deps/spdlog2', path: 'deps/spdlog2', url: 'https://github.com/gabime/spdlog.git' }, { name: 'deps/spdlog3', path: 'deps/spdlog3', url: 'https://github.com/gabime/spdlog.git' }, @@ -180,7 +180,7 @@ suite('git', () => { url = https://github.com/gabime/spdlog.git `; - assert.deepEqual(parseGitmodules(sample), [ + assert.deepStrictEqual(parseGitmodules(sample), [ { name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' } ]); }); @@ -191,7 +191,7 @@ suite('git', () => { url=https://github.com/gabime/spdlog.git `; - assert.deepEqual(parseGitmodules(sample), [ + assert.deepStrictEqual(parseGitmodules(sample), [ { name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' } ]); }); @@ -207,7 +207,7 @@ john.doe@mail.com 8e5a374372b8393906c7e380dbb09349c5385554 This is a commit message.\x00`; - assert.deepEqual(parseGitCommits(GIT_OUTPUT_SINGLE_PARENT), [{ + assert.deepStrictEqual(parseGitCommits(GIT_OUTPUT_SINGLE_PARENT), [{ hash: '52c293a05038d865604c2284aa8698bd087915a1', message: 'This is a commit message.', parents: ['8e5a374372b8393906c7e380dbb09349c5385554'], @@ -227,7 +227,7 @@ john.doe@mail.com 8e5a374372b8393906c7e380dbb09349c5385554 df27d8c75b129ab9b178b386077da2822101b217 This is a commit message.\x00`; - assert.deepEqual(parseGitCommits(GIT_OUTPUT_MULTIPLE_PARENTS), [{ + assert.deepStrictEqual(parseGitCommits(GIT_OUTPUT_MULTIPLE_PARENTS), [{ hash: '52c293a05038d865604c2284aa8698bd087915a1', message: 'This is a commit message.', parents: ['8e5a374372b8393906c7e380dbb09349c5385554', 'df27d8c75b129ab9b178b386077da2822101b217'], @@ -247,7 +247,7 @@ john.doe@mail.com This is a commit message.\x00`; - assert.deepEqual(parseGitCommits(GIT_OUTPUT_NO_PARENTS), [{ + assert.deepStrictEqual(parseGitCommits(GIT_OUTPUT_NO_PARENTS), [{ hash: '52c293a05038d865604c2284aa8698bd087915a1', message: 'This is a commit message.', parents: [], @@ -275,7 +275,7 @@ This is a commit message.\x00`; const output = parseLsTree(input); - assert.deepEqual(output, [ + assert.deepStrictEqual(output, [ { mode: '040000', type: 'tree', object: '0274a81f8ee9ca3669295dc40f510bd2021d0043', size: '-', file: '.vscode' }, { mode: '100644', type: 'blob', object: '1d487c1817262e4f20efbfa1d04c18f51b0046f6', size: '491570', file: 'Screen Shot 2018-06-01 at 14.48.05.png' }, { mode: '100644', type: 'blob', object: '686c16e4f019b734655a2576ce8b98749a9ffdb9', size: '764420', file: 'Screen Shot 2018-06-07 at 20.04.59.png' }, @@ -307,7 +307,7 @@ This is a commit message.\x00`; const output = parseLsFiles(input); - assert.deepEqual(output, [ + assert.deepStrictEqual(output, [ { mode: '100644', object: '7a73a41bfdf76d6f793007240d80983a52f15f97', stage: '0', file: '.vscode/settings.json' }, { mode: '100644', object: '1d487c1817262e4f20efbfa1d04c18f51b0046f6', stage: '0', file: 'Screen Shot 2018-06-01 at 14.48.05.png' }, { mode: '100644', object: '686c16e4f019b734655a2576ce8b98749a9ffdb9', stage: '0', file: 'Screen Shot 2018-06-07 at 20.04.59.png' }, @@ -325,72 +325,72 @@ This is a commit message.\x00`; suite('splitInChunks', () => { test('unit tests', function () { - assert.deepEqual( + assert.deepStrictEqual( [...splitInChunks(['hello', 'there', 'cool', 'stuff'], 6)], [['hello'], ['there'], ['cool'], ['stuff']] ); - assert.deepEqual( + assert.deepStrictEqual( [...splitInChunks(['hello', 'there', 'cool', 'stuff'], 10)], [['hello', 'there'], ['cool', 'stuff']] ); - assert.deepEqual( + assert.deepStrictEqual( [...splitInChunks(['hello', 'there', 'cool', 'stuff'], 12)], [['hello', 'there'], ['cool', 'stuff']] ); - assert.deepEqual( + assert.deepStrictEqual( [...splitInChunks(['hello', 'there', 'cool', 'stuff'], 14)], [['hello', 'there', 'cool'], ['stuff']] ); - assert.deepEqual( + assert.deepStrictEqual( [...splitInChunks(['hello', 'there', 'cool', 'stuff'], 2000)], [['hello', 'there', 'cool', 'stuff']] ); - assert.deepEqual( + assert.deepStrictEqual( [...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 1)], [['0'], ['01'], ['012'], ['0'], ['01'], ['012'], ['0'], ['01'], ['012']] ); - assert.deepEqual( + assert.deepStrictEqual( [...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 2)], [['0'], ['01'], ['012'], ['0'], ['01'], ['012'], ['0'], ['01'], ['012']] ); - assert.deepEqual( + assert.deepStrictEqual( [...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 3)], [['0', '01'], ['012'], ['0', '01'], ['012'], ['0', '01'], ['012']] ); - assert.deepEqual( + assert.deepStrictEqual( [...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 4)], [['0', '01'], ['012', '0'], ['01'], ['012', '0'], ['01'], ['012']] ); - assert.deepEqual( + assert.deepStrictEqual( [...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 5)], [['0', '01'], ['012', '0'], ['01', '012'], ['0', '01'], ['012']] ); - assert.deepEqual( + assert.deepStrictEqual( [...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 6)], [['0', '01', '012'], ['0', '01', '012'], ['0', '01', '012']] ); - assert.deepEqual( + assert.deepStrictEqual( [...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 7)], [['0', '01', '012', '0'], ['01', '012', '0'], ['01', '012']] ); - assert.deepEqual( + assert.deepStrictEqual( [...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 8)], [['0', '01', '012', '0'], ['01', '012', '0', '01'], ['012']] ); - assert.deepEqual( + assert.deepStrictEqual( [...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 9)], [['0', '01', '012', '0', '01'], ['012', '0', '01', '012']] ); diff --git a/lib/vscode/extensions/git/src/test/index.ts b/extensions/git/src/test/index.ts similarity index 100% rename from lib/vscode/extensions/git/src/test/index.ts rename to extensions/git/src/test/index.ts diff --git a/lib/vscode/extensions/git/src/test/smoke.test.ts b/extensions/git/src/test/smoke.test.ts similarity index 86% rename from lib/vscode/extensions/git/src/test/smoke.test.ts rename to extensions/git/src/test/smoke.test.ts index ed6a5d504a6f..2ba3da99aa67 100644 --- a/lib/vscode/extensions/git/src/test/smoke.test.ts +++ b/extensions/git/src/test/smoke.test.ts @@ -59,8 +59,8 @@ suite('git smoke test', function () { await eventToPromise(git.onDidOpenRepository); } - assert.equal(git.repositories.length, 1); - assert.equal(fs.realpathSync(git.repositories[0].rootUri.fsPath), cwd); + assert.strictEqual(git.repositories.length, 1); + assert.strictEqual(fs.realpathSync(git.repositories[0].rootUri.fsPath), cwd); repository = git.repositories[0]; }); @@ -72,7 +72,7 @@ suite('git smoke test', function () { await type(appjs, ' world'); await appjs.save(); await repository.status(); - assert.equal(repository.state.workingTreeChanges.length, 1); + assert.strictEqual(repository.state.workingTreeChanges.length, 1); repository.state.workingTreeChanges.some(r => r.uri.path === appjs.uri.path && r.status === Status.MODIFIED); fs.writeFileSync(file('newfile.txt'), ''); @@ -80,7 +80,7 @@ suite('git smoke test', function () { await type(newfile, 'hey there'); await newfile.save(); await repository.status(); - assert.equal(repository.state.workingTreeChanges.length, 2); + assert.strictEqual(repository.state.workingTreeChanges.length, 2); repository.state.workingTreeChanges.some(r => r.uri.path === appjs.uri.path && r.status === Status.MODIFIED); repository.state.workingTreeChanges.some(r => r.uri.path === newfile.uri.path && r.status === Status.UNTRACKED); }); @@ -90,7 +90,7 @@ suite('git smoke test', function () { await commands.executeCommand('git.openChange', appjs); assert(window.activeTextEditor); - assert.equal(window.activeTextEditor!.document.uri.path, appjs.path); + assert.strictEqual(window.activeTextEditor!.document.uri.path, appjs.path); // TODO: how do we really know this is a diff editor? }); @@ -100,13 +100,13 @@ suite('git smoke test', function () { const newfile = uri('newfile.txt'); await commands.executeCommand('git.stage', appjs); - assert.equal(repository.state.workingTreeChanges.length, 1); + assert.strictEqual(repository.state.workingTreeChanges.length, 1); repository.state.workingTreeChanges.some(r => r.uri.path === newfile.path && r.status === Status.UNTRACKED); - assert.equal(repository.state.indexChanges.length, 1); + assert.strictEqual(repository.state.indexChanges.length, 1); repository.state.indexChanges.some(r => r.uri.path === appjs.path && r.status === Status.INDEX_MODIFIED); await commands.executeCommand('git.unstage', appjs); - assert.equal(repository.state.workingTreeChanges.length, 2); + assert.strictEqual(repository.state.workingTreeChanges.length, 2); repository.state.workingTreeChanges.some(r => r.uri.path === appjs.path && r.status === Status.MODIFIED); repository.state.workingTreeChanges.some(r => r.uri.path === newfile.path && r.status === Status.UNTRACKED); }); @@ -117,14 +117,14 @@ suite('git smoke test', function () { await commands.executeCommand('git.stage', appjs); await repository.commit('second commit'); - assert.equal(repository.state.workingTreeChanges.length, 1); + assert.strictEqual(repository.state.workingTreeChanges.length, 1); repository.state.workingTreeChanges.some(r => r.uri.path === newfile.path && r.status === Status.UNTRACKED); - assert.equal(repository.state.indexChanges.length, 0); + assert.strictEqual(repository.state.indexChanges.length, 0); await commands.executeCommand('git.stageAll', appjs); await repository.commit('third commit'); - assert.equal(repository.state.workingTreeChanges.length, 0); - assert.equal(repository.state.indexChanges.length, 0); + assert.strictEqual(repository.state.workingTreeChanges.length, 0); + assert.strictEqual(repository.state.indexChanges.length, 0); }); test('rename/delete conflict', async function () { diff --git a/lib/vscode/extensions/git/src/timelineProvider.ts b/extensions/git/src/timelineProvider.ts similarity index 100% rename from lib/vscode/extensions/git/src/timelineProvider.ts rename to extensions/git/src/timelineProvider.ts diff --git a/lib/vscode/extensions/git/src/typings/refs.d.ts b/extensions/git/src/typings/refs.d.ts similarity index 100% rename from lib/vscode/extensions/git/src/typings/refs.d.ts rename to extensions/git/src/typings/refs.d.ts diff --git a/lib/vscode/extensions/git/src/uri.ts b/extensions/git/src/uri.ts similarity index 100% rename from lib/vscode/extensions/git/src/uri.ts rename to extensions/git/src/uri.ts diff --git a/lib/vscode/extensions/git/src/util.ts b/extensions/git/src/util.ts similarity index 100% rename from lib/vscode/extensions/git/src/util.ts rename to extensions/git/src/util.ts diff --git a/lib/vscode/extensions/git/src/watch.ts b/extensions/git/src/watch.ts similarity index 100% rename from lib/vscode/extensions/git/src/watch.ts rename to extensions/git/src/watch.ts diff --git a/lib/vscode/extensions/git/syntaxes/diff.tmLanguage.json b/extensions/git/syntaxes/diff.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/git/syntaxes/diff.tmLanguage.json rename to extensions/git/syntaxes/diff.tmLanguage.json diff --git a/lib/vscode/extensions/git/syntaxes/git-commit.tmLanguage.json b/extensions/git/syntaxes/git-commit.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/git/syntaxes/git-commit.tmLanguage.json rename to extensions/git/syntaxes/git-commit.tmLanguage.json diff --git a/lib/vscode/extensions/git/syntaxes/git-rebase.tmLanguage.json b/extensions/git/syntaxes/git-rebase.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/git/syntaxes/git-rebase.tmLanguage.json rename to extensions/git/syntaxes/git-rebase.tmLanguage.json diff --git a/lib/vscode/extensions/git/syntaxes/ignore.tmLanguage.json b/extensions/git/syntaxes/ignore.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/git/syntaxes/ignore.tmLanguage.json rename to extensions/git/syntaxes/ignore.tmLanguage.json diff --git a/lib/vscode/extensions/git/test/colorize-fixtures/COMMIT_EDITMSG b/extensions/git/test/colorize-fixtures/COMMIT_EDITMSG similarity index 100% rename from lib/vscode/extensions/git/test/colorize-fixtures/COMMIT_EDITMSG rename to extensions/git/test/colorize-fixtures/COMMIT_EDITMSG diff --git a/lib/vscode/extensions/git/test/colorize-fixtures/example.diff b/extensions/git/test/colorize-fixtures/example.diff similarity index 100% rename from lib/vscode/extensions/git/test/colorize-fixtures/example.diff rename to extensions/git/test/colorize-fixtures/example.diff diff --git a/lib/vscode/extensions/git/test/colorize-fixtures/git-rebase-todo b/extensions/git/test/colorize-fixtures/git-rebase-todo similarity index 100% rename from lib/vscode/extensions/git/test/colorize-fixtures/git-rebase-todo rename to extensions/git/test/colorize-fixtures/git-rebase-todo diff --git a/lib/vscode/extensions/git/test/colorize-results/COMMIT_EDITMSG.json b/extensions/git/test/colorize-results/COMMIT_EDITMSG.json similarity index 100% rename from lib/vscode/extensions/git/test/colorize-results/COMMIT_EDITMSG.json rename to extensions/git/test/colorize-results/COMMIT_EDITMSG.json diff --git a/lib/vscode/extensions/git/test/colorize-results/example_diff.json b/extensions/git/test/colorize-results/example_diff.json similarity index 100% rename from lib/vscode/extensions/git/test/colorize-results/example_diff.json rename to extensions/git/test/colorize-results/example_diff.json diff --git a/lib/vscode/extensions/git/test/colorize-results/git-rebase-todo.json b/extensions/git/test/colorize-results/git-rebase-todo.json similarity index 100% rename from lib/vscode/extensions/git/test/colorize-results/git-rebase-todo.json rename to extensions/git/test/colorize-results/git-rebase-todo.json diff --git a/lib/vscode/extensions/git/test/mocha.opts b/extensions/git/test/mocha.opts similarity index 100% rename from lib/vscode/extensions/git/test/mocha.opts rename to extensions/git/test/mocha.opts diff --git a/lib/vscode/extensions/git/tsconfig.json b/extensions/git/tsconfig.json similarity index 100% rename from lib/vscode/extensions/git/tsconfig.json rename to extensions/git/tsconfig.json diff --git a/extensions/git/yarn.lock b/extensions/git/yarn.lock new file mode 100644 index 000000000000..3853a2d2c046 --- /dev/null +++ b/extensions/git/yarn.lock @@ -0,0 +1,167 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/byline@4.2.31": + version "4.2.31" + resolved "https://registry.yarnpkg.com/@types/byline/-/byline-4.2.31.tgz#0e61fcb9c03e047d21c4496554c7116297ab60cd" + integrity sha1-DmH8ucA+BH0hxEllVMcRYperYM0= + dependencies: + "@types/node" "*" + +"@types/file-type@^5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@types/file-type/-/file-type-5.2.1.tgz#e7af49e08187b6b7598509c5e416669d25fa3461" + integrity sha512-Im0cJaIPJbbpuW91OrjXnqWPZCJK/tcFy2cFX+1qjG1gubgVZPPO9OVsTVAjotN4I1E6FAV0eIqt+rR8Y1c3iA== + dependencies: + "@types/node" "*" + +"@types/mocha@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44" + integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ== + +"@types/node@*": + version "8.0.51" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.51.tgz#b31d716fb8d58eeb95c068a039b9b6292817d5fb" + integrity sha512-El3+WJk2D/ppWNd2X05aiP5l2k4EwF7KwheknQZls+I26eSICoWRhRIJ56jGgw2dqNGQ5LtNajmBU2ajS28EvQ== + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +"@types/which@^1.0.28": + version "1.0.28" + resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6" + integrity sha1-AW44dim4gXvtZT/jLqtdESecjfY= + +applicationinsights@1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" + integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== + dependencies: + cls-hooked "^4.2.2" + continuation-local-storage "^3.2.1" + diagnostic-channel "0.2.0" + diagnostic-channel-publishers "^0.3.3" + +async-hook-jl@^1.7.6: + version "1.7.6" + resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" + integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== + dependencies: + stack-chain "^1.3.7" + +async-listener@^0.6.0: + version "0.6.10" + resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" + integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== + dependencies: + semver "^5.3.0" + shimmer "^1.1.0" + +byline@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" + integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= + +cls-hooked@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" + integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== + dependencies: + async-hook-jl "^1.7.6" + emitter-listener "^1.0.1" + semver "^5.4.1" + +continuation-local-storage@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" + integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== + dependencies: + async-listener "^0.6.0" + emitter-listener "^1.1.1" + +diagnostic-channel-publishers@^0.3.3: + version "0.3.5" + resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" + integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== + +diagnostic-channel@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" + integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= + dependencies: + semver "^5.3.0" + +emitter-listener@^1.0.1, emitter-listener@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" + integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== + dependencies: + shimmer "^1.2.0" + +file-type@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-7.2.0.tgz#113cfed52e1d6959ab80248906e2f25a8cdccb74" + integrity sha1-ETz+1S4daVmrgCSJBuLyWozcy3Q= + +iconv-lite-umd@0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/iconv-lite-umd/-/iconv-lite-umd-0.6.8.tgz#5ad310ec126b260621471a2d586f7f37b9958ec0" + integrity sha512-zvXJ5gSwMC9JD3wDzH8CoZGc1pbiJn12Tqjk8BXYCnYz3hYL5GRjHW8LEykjXhV9WgNGI4rgpgHcbIiBfrRq6A== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +jschardet@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-2.3.0.tgz#06e2636e16c8ada36feebbdc08aa34e6a9b3ff75" + integrity sha512-6I6xT7XN/7sBB7q8ObzKbmv5vN+blzLcboDE1BNEsEfmRXJValMxO6OIRT69ylPBRemS3rw6US+CMCar0OBc9g== + +semver@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== + +semver@^5.4.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +shimmer@^1.1.0, shimmer@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + +stack-chain@^1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" + integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= + +vscode-extension-telemetry@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" + integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== + dependencies: + applicationinsights "1.7.4" + +vscode-nls@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" + integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== + +vscode-uri@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.0.0.tgz#2df704222f72b8a71ff266ba0830ed6c51ac1542" + integrity sha512-lWXWofDSYD8r/TIyu64MdwB4FaSirQ608PP/TzUyslyOeHGwQ0eTHUZeJrK1ILOmwUHaJtV693m2JoUYroUDpw== + +which@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + integrity sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg== + dependencies: + isexe "^2.0.0" diff --git a/lib/vscode/extensions/github-authentication/.gitignore b/extensions/github-authentication/.gitignore similarity index 100% rename from lib/vscode/extensions/github-authentication/.gitignore rename to extensions/github-authentication/.gitignore diff --git a/lib/vscode/extensions/github-authentication/.vscodeignore b/extensions/github-authentication/.vscodeignore similarity index 100% rename from lib/vscode/extensions/github-authentication/.vscodeignore rename to extensions/github-authentication/.vscodeignore diff --git a/lib/vscode/extensions/github-authentication/README.md b/extensions/github-authentication/README.md similarity index 100% rename from lib/vscode/extensions/github-authentication/README.md rename to extensions/github-authentication/README.md diff --git a/lib/vscode/extensions/github-authentication/extension-browser.webpack.config.js b/extensions/github-authentication/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/github-authentication/extension-browser.webpack.config.js rename to extensions/github-authentication/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/github-authentication/extension.webpack.config.js b/extensions/github-authentication/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/github-authentication/extension.webpack.config.js rename to extensions/github-authentication/extension.webpack.config.js diff --git a/lib/vscode/extensions/github-authentication/images/icon.png b/extensions/github-authentication/images/icon.png similarity index 100% rename from lib/vscode/extensions/github-authentication/images/icon.png rename to extensions/github-authentication/images/icon.png diff --git a/extensions/github-authentication/package.json b/extensions/github-authentication/package.json new file mode 100644 index 000000000000..2064e28dedc8 --- /dev/null +++ b/extensions/github-authentication/package.json @@ -0,0 +1,103 @@ +{ + "name": "github-authentication", + "displayName": "%displayName%", + "description": "%description%", + "publisher": "vscode", + "license": "MIT", + "version": "0.0.2", + "engines": { + "vscode": "^1.41.0" + }, + "icon": "images/icon.png", + "enableProposedApi": true, + "categories": [ + "Other" + ], + "extensionKind": [ + "ui", + "workspace", + "web" + ], + "activationEvents": [ + "onAuthenticationRequest:github", + "onAuthenticationRequest:github-enterprise" + ], + "capabilities": { + "virtualWorkspaces": true, + "untrustedWorkspaces": { + "supported": true + } + }, + "contributes": { + "commands": [ + { + "command": "github.provide-token", + "title": "Manually Provide Token", + "category": "GitHub" + }, + { + "command": "github-enterprise.provide-token", + "title": "Manually Provide Token", + "category": "GitHub Enterprise" + + } + ], + "menus": { + "commandPalette": [ + { + "command": "github.provide-token", + "when": "false" + }, + { + "command": "github-enterprise.provide-token", + "when": "false" + } + ] + }, + "authentication": [ + { + "label": "GitHub", + "id": "github" + }, + { + "label": "GitHub Enterprise", + "id": "github-enterprise" + } + ], + "configuration": { + "title": "GitHub Enterprise Authentication Provider", + "properties": { + "github-enterprise.uri" : { + "type": "string", + "description": "URI of your GitHub Enterprise Instanace" + } + } + } + }, + "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", + "main": "./out/extension.js", + "browser": "./dist/browser/extension.js", + "scripts": { + "compile": "gulp compile-extension:github-authentication", + "compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none", + "watch": "gulp watch-extension:github-authentication", + "watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose", + "vscode:prepublish": "npm run compile" + }, + "dependencies": { + "node-fetch": "2.6.1", + "uuid": "8.1.0", + "vscode-extension-telemetry": "0.1.7", + "vscode-nls": "^4.1.2", + "vscode-tas-client": "^0.1.22" + }, + "devDependencies": { + "@types/node": "14.x", + "@types/node-fetch": "^2.5.7", + "@types/uuid": "8.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/github-authentication/package.nls.json b/extensions/github-authentication/package.nls.json similarity index 100% rename from lib/vscode/extensions/github-authentication/package.nls.json rename to extensions/github-authentication/package.nls.json diff --git a/lib/vscode/extensions/github-authentication/src/common/keychain.ts b/extensions/github-authentication/src/common/keychain.ts similarity index 89% rename from lib/vscode/extensions/github-authentication/src/common/keychain.ts rename to extensions/github-authentication/src/common/keychain.ts index d1dc0a32a640..04d64682c989 100644 --- a/lib/vscode/extensions/github-authentication/src/common/keychain.ts +++ b/extensions/github-authentication/src/common/keychain.ts @@ -28,13 +28,11 @@ export type Keytar = { deletePassword: typeof keytarType['deletePassword']; }; -const SERVICE_ID = `github.auth`; - export class Keychain { - constructor(private context: vscode.ExtensionContext) { } + constructor(private context: vscode.ExtensionContext, private serviceId: string) { } async setToken(token: string): Promise { try { - return await this.context.secrets.store(SERVICE_ID, token); + return await this.context.secrets.store(this.serviceId, token); } catch (e) { // Ignore Logger.error(`Setting token failed: ${e}`); @@ -48,7 +46,7 @@ export class Keychain { async getToken(): Promise { try { - return await this.context.secrets.get(SERVICE_ID); + return await this.context.secrets.get(this.serviceId); } catch (e) { // Ignore Logger.error(`Getting token failed: ${e}`); @@ -58,7 +56,7 @@ export class Keychain { async deleteToken(): Promise { try { - return await this.context.secrets.delete(SERVICE_ID); + return await this.context.secrets.delete(this.serviceId); } catch (e) { // Ignore Logger.error(`Deleting token failed: ${e}`); diff --git a/lib/vscode/extensions/github-authentication/src/common/logger.ts b/extensions/github-authentication/src/common/logger.ts similarity index 100% rename from lib/vscode/extensions/github-authentication/src/common/logger.ts rename to extensions/github-authentication/src/common/logger.ts diff --git a/lib/vscode/extensions/github-authentication/src/common/utils.ts b/extensions/github-authentication/src/common/utils.ts similarity index 100% rename from lib/vscode/extensions/github-authentication/src/common/utils.ts rename to extensions/github-authentication/src/common/utils.ts diff --git a/lib/vscode/extensions/github-authentication/src/experimentationService.ts b/extensions/github-authentication/src/experimentationService.ts similarity index 100% rename from lib/vscode/extensions/github-authentication/src/experimentationService.ts rename to extensions/github-authentication/src/experimentationService.ts diff --git a/extensions/github-authentication/src/extension.ts b/extensions/github-authentication/src/extension.ts new file mode 100644 index 000000000000..bc7a086f6927 --- /dev/null +++ b/extensions/github-authentication/src/extension.ts @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { GitHubAuthenticationProvider, AuthProviderType } from './github'; +import TelemetryReporter from 'vscode-extension-telemetry'; +import { createExperimentationService, ExperimentationTelemetry } from './experimentationService'; + +export async function activate(context: vscode.ExtensionContext) { + const { name, version, aiKey } = require('../package.json') as { name: string, version: string, aiKey: string }; + const telemetryReporter = new ExperimentationTelemetry(new TelemetryReporter(name, version, aiKey)); + + const experimentationService = await createExperimentationService(context, telemetryReporter); + await experimentationService.initialFetch; + + [ + AuthProviderType.github, + AuthProviderType['github-enterprise'] + ].forEach(async type => { + const loginService = new GitHubAuthenticationProvider(context, type, telemetryReporter); + await loginService.initialize(); + }); +} + +// this method is called when your extension is deactivated +export function deactivate() { } diff --git a/extensions/github-authentication/src/github.ts b/extensions/github-authentication/src/github.ts new file mode 100644 index 000000000000..fa676744079c --- /dev/null +++ b/extensions/github-authentication/src/github.ts @@ -0,0 +1,285 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { v4 as uuid } from 'uuid'; +import { Keychain } from './common/keychain'; +import { GitHubServer, uriHandler, NETWORK_ERROR } from './githubServer'; +import Logger from './common/logger'; +import { arrayEquals } from './common/utils'; +import { ExperimentationTelemetry } from './experimentationService'; + +interface SessionData { + id: string; + account?: { + label?: string; + displayName?: string; + id: string; + } + scopes: string[]; + accessToken: string; +} + +export enum AuthProviderType { + github = 'github', + 'github-enterprise' = 'github-enterprise' +} + + +export class GitHubAuthenticationProvider implements vscode.AuthenticationProvider { + private _sessions: vscode.AuthenticationSession[] = []; + private _sessionChangeEmitter = new vscode.EventEmitter(); + private _githubServer: GitHubServer; + + private _keychain: Keychain; + + constructor(private context: vscode.ExtensionContext, private type: AuthProviderType, private telemetryReporter: ExperimentationTelemetry) { + this._keychain = new Keychain(context, `${type}.auth`); + this._githubServer = new GitHubServer(type, telemetryReporter); + } + + get onDidChangeSessions() { + return this._sessionChangeEmitter.event; + } + + public async initialize(): Promise { + try { + this._sessions = await this.readSessions(); + await this.verifySessions(); + } catch (e) { + // Ignore, network request failed + } + + let friendlyName = 'GitHub'; + if (this.type === AuthProviderType.github) { + this.context.subscriptions.push(vscode.window.registerUriHandler(uriHandler)); + } + if (this.type === AuthProviderType['github-enterprise']) { + friendlyName = 'GitHub Enterprise'; + } + + this.context.subscriptions.push(vscode.commands.registerCommand(`${this.type}.provide-token`, () => this.manuallyProvideToken())); + this.context.subscriptions.push(vscode.authentication.registerAuthenticationProvider(this.type, friendlyName, this, { supportsMultipleAccounts: false })); + this.context.subscriptions.push(this.context.secrets.onDidChange(() => this.checkForUpdates())); + } + + async getSessions(scopes?: string[]): Promise { + return scopes + ? this._sessions.filter(session => arrayEquals(session.scopes, scopes)) + : this._sessions; + } + + private async afterTokenLoad(token: string): Promise { + if (this.type === AuthProviderType.github) { + this._githubServer.checkIsEdu(token); + } + if (this.type === AuthProviderType['github-enterprise']) { + this._githubServer.checkEnterpriseVersion(token); + } + } + + private async verifySessions(): Promise { + const verifiedSessions: vscode.AuthenticationSession[] = []; + const verificationPromises = this._sessions.map(async session => { + try { + await this._githubServer.getUserInfo(session.accessToken); + this.afterTokenLoad(session.accessToken); + verifiedSessions.push(session); + } catch (e) { + // Remove sessions that return unauthorized response + if (e.message !== 'Unauthorized') { + verifiedSessions.push(session); + } + } + }); + + Promise.all(verificationPromises).then(_ => { + if (this._sessions.length !== verifiedSessions.length) { + this._sessions = verifiedSessions; + this.storeSessions(); + } + }); + } + + private async checkForUpdates() { + let storedSessions: vscode.AuthenticationSession[]; + try { + storedSessions = await this.readSessions(); + } catch (e) { + // Ignore, network request failed + return; + } + + const added: vscode.AuthenticationSession[] = []; + const removed: vscode.AuthenticationSession[] = []; + + storedSessions.forEach(session => { + const matchesExisting = this._sessions.some(s => s.id === session.id); + // Another window added a session to the keychain, add it to our state as well + if (!matchesExisting) { + Logger.info('Adding session found in keychain'); + this._sessions.push(session); + added.push(session); + } + }); + + this._sessions.map(session => { + const matchesExisting = storedSessions.some(s => s.id === session.id); + // Another window has logged out, remove from our state + if (!matchesExisting) { + Logger.info('Removing session no longer found in keychain'); + const sessionIndex = this._sessions.findIndex(s => s.id === session.id); + if (sessionIndex > -1) { + this._sessions.splice(sessionIndex, 1); + } + + removed.push(session); + } + }); + + if (added.length || removed.length) { + this._sessionChangeEmitter.fire({ added, removed, changed: [] }); + } + } + + private async readSessions(): Promise { + const storedSessions = await this._keychain.getToken() || await this._keychain.tryMigrate(); + if (storedSessions) { + try { + const sessionData: SessionData[] = JSON.parse(storedSessions); + const sessionPromises = sessionData.map(async (session: SessionData): Promise => { + const needsUserInfo = !session.account; + let userInfo: { id: string, accountName: string }; + if (needsUserInfo) { + userInfo = await this._githubServer.getUserInfo(session.accessToken); + } + + return { + id: session.id, + account: { + label: session.account + ? session.account.label || session.account.displayName! + : userInfo!.accountName, + id: session.account?.id ?? userInfo!.id + }, + scopes: session.scopes, + accessToken: session.accessToken + }; + }); + + return Promise.all(sessionPromises); + } catch (e) { + if (e === NETWORK_ERROR) { + return []; + } + + Logger.error(`Error reading sessions: ${e}`); + await this._keychain.deleteToken(); + } + } + + return []; + } + + private async storeSessions(): Promise { + await this._keychain.setToken(JSON.stringify(this._sessions)); + } + + get sessions(): vscode.AuthenticationSession[] { + return this._sessions; + } + + public async createSession(scopes: string[]): Promise { + try { + /* __GDPR__ + "login" : { } + */ + this.telemetryReporter?.sendTelemetryEvent('login'); + + const token = await this._githubServer.login(scopes.join(' ')); + this.afterTokenLoad(token); + const session = await this.tokenToSession(token, scopes); + await this.setToken(session); + this._sessionChangeEmitter.fire({ added: [session], removed: [], changed: [] }); + + Logger.info('Login success!'); + + return session; + } catch (e) { + // If login was cancelled, do not notify user. + if (e.message === 'Cancelled') { + /* __GDPR__ + "loginCancelled" : { } + */ + this.telemetryReporter?.sendTelemetryEvent('loginCancelled'); + throw e; + } + + /* __GDPR__ + "loginFailed" : { } + */ + this.telemetryReporter?.sendTelemetryEvent('loginFailed'); + + vscode.window.showErrorMessage(`Sign in failed: ${e}`); + Logger.error(e); + throw e; + } + } + + public async manuallyProvideToken(): Promise { + this._githubServer.manuallyProvideToken(); + } + + private async tokenToSession(token: string, scopes: string[]): Promise { + const userInfo = await this._githubServer.getUserInfo(token); + return { + id: uuid(), + accessToken: token, + account: { label: userInfo.accountName, id: userInfo.id }, + scopes + }; + } + + private async setToken(session: vscode.AuthenticationSession): Promise { + const sessionIndex = this._sessions.findIndex(s => s.id === session.id); + if (sessionIndex > -1) { + this._sessions.splice(sessionIndex, 1, session); + } else { + this._sessions.push(session); + } + + await this.storeSessions(); + } + + public async removeSession(id: string) { + try { + /* __GDPR__ + "logout" : { } + */ + this.telemetryReporter?.sendTelemetryEvent('logout'); + + Logger.info(`Logging out of ${id}`); + const sessionIndex = this._sessions.findIndex(session => session.id === id); + if (sessionIndex > -1) { + const session = this._sessions[sessionIndex]; + this._sessions.splice(sessionIndex, 1); + this._sessionChangeEmitter.fire({ added: [], removed: [session], changed: [] }); + } else { + Logger.error('Session not found'); + } + + await this.storeSessions(); + } catch (e) { + /* __GDPR__ + "logoutFailed" : { } + */ + this.telemetryReporter?.sendTelemetryEvent('logoutFailed'); + + vscode.window.showErrorMessage(`Sign out failed: ${e}`); + Logger.error(e); + throw e; + } + } +} diff --git a/extensions/github-authentication/src/githubServer.ts b/extensions/github-authentication/src/githubServer.ts new file mode 100644 index 000000000000..f675507c4dd3 --- /dev/null +++ b/extensions/github-authentication/src/githubServer.ts @@ -0,0 +1,330 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as nls from 'vscode-nls'; +import * as vscode from 'vscode'; +import fetch, { Response } from 'node-fetch'; +import { v4 as uuid } from 'uuid'; +import { PromiseAdapter, promiseFromEvent } from './common/utils'; +import Logger from './common/logger'; +import { ExperimentationTelemetry } from './experimentationService'; +import { AuthProviderType } from './github'; + +const localize = nls.loadMessageBundle(); + +export const NETWORK_ERROR = 'network error'; +const AUTH_RELAY_SERVER = 'vscode-auth.github.com'; +// const AUTH_RELAY_STAGING_SERVER = 'client-auth-staging-14a768b.herokuapp.com'; + +class UriEventHandler extends vscode.EventEmitter implements vscode.UriHandler { + public handleUri(uri: vscode.Uri) { + this.fire(uri); + } +} + +export const uriHandler = new UriEventHandler; + +function parseQuery(uri: vscode.Uri) { + return uri.query.split('&').reduce((prev: any, current) => { + const queryString = current.split('='); + prev[queryString[0]] = queryString[1]; + return prev; + }, {}); +} + +export class GitHubServer { + private _statusBarItem: vscode.StatusBarItem | undefined; + private _onDidManuallyProvideToken = new vscode.EventEmitter(); + + private _pendingStates = new Map(); + private _codeExchangePromises = new Map, cancel: vscode.EventEmitter }>(); + + constructor(private type: AuthProviderType, private readonly telemetryReporter: ExperimentationTelemetry) { } + + private isTestEnvironment(url: vscode.Uri): boolean { + return this.type === AuthProviderType['github-enterprise'] || /\.azurewebsites\.net$/.test(url.authority) || url.authority.startsWith('localhost:'); + } + + // TODO@joaomoreno TODO@RMacfarlane + private async isNoCorsEnvironment(): Promise { + const uri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/dummy`)); + return (uri.scheme === 'https' && /^vscode\./.test(uri.authority)) || (uri.scheme === 'http' && /^localhost/.test(uri.authority)); + } + + public async login(scopes: string): Promise { + Logger.info('Logging in...'); + this.updateStatusBarItem(true); + + const state = uuid(); + + // TODO@joaomoreno TODO@RMacfarlane + const nocors = await this.isNoCorsEnvironment(); + const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate${nocors ? '?nocors=true' : ''}`)); + + if (this.isTestEnvironment(callbackUri)) { + const token = await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true }); + if (!token) { throw new Error('Sign in failed: No token provided'); } + + const tokenScopes = await this.getScopes(token); // Example: ['repo', 'user'] + const scopesList = scopes.split(' '); // Example: 'read:user repo user:email' + if (!scopesList.every(scope => { + const included = tokenScopes.includes(scope); + if (included || !scope.includes(':')) { + return included; + } + + return scope.split(':').some(splitScopes => { + return tokenScopes.includes(splitScopes); + }); + })) { + throw new Error(`The provided token is does not match the requested scopes: ${scopes}`); + } + + this.updateStatusBarItem(false); + return token; + } else { + const existingStates = this._pendingStates.get(scopes) || []; + this._pendingStates.set(scopes, [...existingStates, state]); + + const uri = vscode.Uri.parse(`https://${AUTH_RELAY_SERVER}/authorize/?callbackUri=${encodeURIComponent(callbackUri.toString())}&scope=${scopes}&state=${state}&responseType=code&authServer=https://github.com${nocors ? '&nocors=true' : ''}`); + await vscode.env.openExternal(uri); + } + + // Register a single listener for the URI callback, in case the user starts the login process multiple times + // before completing it. + let codeExchangePromise = this._codeExchangePromises.get(scopes); + if (!codeExchangePromise) { + codeExchangePromise = promiseFromEvent(uriHandler.event, this.exchangeCodeForToken(scopes)); + this._codeExchangePromises.set(scopes, codeExchangePromise); + } + + return Promise.race([ + codeExchangePromise.promise, + promiseFromEvent(this._onDidManuallyProvideToken.event, (token: string | undefined, resolve, reject): void => { + if (!token) { + reject('Cancelled'); + } else { + resolve(token); + } + }).promise + ]).finally(() => { + this._pendingStates.delete(scopes); + codeExchangePromise?.cancel.fire(); + this._codeExchangePromises.delete(scopes); + this.updateStatusBarItem(false); + }); + } + + private exchangeCodeForToken: (scopes: string) => PromiseAdapter = + (scopes) => async (uri, resolve, reject) => { + Logger.info('Exchanging code for token...'); + const query = parseQuery(uri); + const code = query.code; + + const acceptedStates = this._pendingStates.get(scopes) || []; + if (!acceptedStates.includes(query.state)) { + reject('Received mismatched state'); + return; + } + + const url = `https://${AUTH_RELAY_SERVER}/token?code=${code}&state=${query.state}`; + + // TODO@joao: remove + if (query.nocors) { + try { + const json: any = await vscode.commands.executeCommand('_workbench.fetchJSON', url, 'POST'); + Logger.info('Token exchange success!'); + resolve(json.access_token); + } catch (err) { + reject(err); + } + } else { + try { + const result = await fetch(url, { + method: 'POST', + headers: { + Accept: 'application/json' + } + }); + + if (result.ok) { + const json = await result.json(); + Logger.info('Token exchange success!'); + resolve(json.access_token); + } else { + reject(result.statusText); + } + } catch (ex) { + reject(ex); + } + } + }; + + private getServerUri(path?: string) { + const apiUri = this.type === AuthProviderType['github-enterprise'] + ? vscode.Uri.parse(vscode.workspace.getConfiguration('github-enterprise').get('uri') || '', true) + : vscode.Uri.parse('https://api.github.com'); + + if (!path) { + path = ''; + } + if (this.type === AuthProviderType['github-enterprise']) { + path = '/api/v3' + path; + } + + return vscode.Uri.parse(`${apiUri.scheme}://${apiUri.authority}${path}`); + } + + private updateStatusBarItem(isStart?: boolean) { + if (isStart && !this._statusBarItem) { + this._statusBarItem = vscode.window.createStatusBarItem('status.git.signIn', vscode.StatusBarAlignment.Left); + this._statusBarItem.name = localize('status.git.signIn.name', "GitHub Sign-in"); + this._statusBarItem.text = this.type === AuthProviderType.github + ? localize('signingIn', "$(mark-github) Signing in to github.com...") + : localize('signingInEnterprise', "$(mark-github) Signing in to {0}...", this.getServerUri().authority); + this._statusBarItem.command = this.type === AuthProviderType.github + ? 'github.provide-token' + : 'github-enterprise.provide-token'; + this._statusBarItem.show(); + } + + if (!isStart && this._statusBarItem) { + this._statusBarItem.dispose(); + this._statusBarItem = undefined; + } + } + + public async manuallyProvideToken() { + const uriOrToken = await vscode.window.showInputBox({ prompt: 'Token', ignoreFocusOut: true }); + if (!uriOrToken) { + this._onDidManuallyProvideToken.fire(undefined); + return; + } + + try { + const uri = vscode.Uri.parse(uriOrToken.trim()); + if (!uri.scheme || uri.scheme === 'file') { throw new Error; } + uriHandler.handleUri(uri); + } catch (e) { + // If it doesn't look like a URI, treat it as a token. + Logger.info('Treating input as token'); + this._onDidManuallyProvideToken.fire(uriOrToken); + } + } + + private async getScopes(token: string): Promise { + try { + Logger.info('Getting token scopes...'); + const result = await fetch(this.getServerUri('/').toString(), { + headers: { + Authorization: `token ${token}`, + 'User-Agent': 'Visual-Studio-Code' + } + }); + + if (result.ok) { + const scopes = result.headers.get('X-OAuth-Scopes'); + return scopes ? scopes.split(',').map(scope => scope.trim()) : []; + } else { + Logger.error(`Getting scopes failed: ${result.statusText}`); + throw new Error(result.statusText); + } + } catch (ex) { + Logger.error(ex.message); + throw new Error(NETWORK_ERROR); + } + } + + public async getUserInfo(token: string): Promise<{ id: string, accountName: string }> { + let result: Response; + try { + Logger.info('Getting user info...'); + result = await fetch(this.getServerUri('/user').toString(), { + headers: { + Authorization: `token ${token}`, + 'User-Agent': 'Visual-Studio-Code' + } + }); + } catch (ex) { + Logger.error(ex.message); + throw new Error(NETWORK_ERROR); + } + + if (result.ok) { + const json = await result.json(); + Logger.info('Got account info!'); + return { id: json.id, accountName: json.login }; + } else { + Logger.error(`Getting account info failed: ${result.statusText}`); + throw new Error(result.statusText); + } + } + + public async checkIsEdu(token: string): Promise { + const nocors = await this.isNoCorsEnvironment(); + + if (nocors) { + return; + } + + try { + const result = await fetch('https://education.github.com/api/user', { + headers: { + Authorization: `token ${token}`, + 'faculty-check-preview': 'true', + 'User-Agent': 'Visual-Studio-Code' + } + }); + + if (result.ok) { + const json: { student: boolean, faculty: boolean } = await result.json(); + + /* __GDPR__ + "session" : { + "isEdu": { "classification": "NonIdentifiableDemographicInfo", "purpose": "FeatureInsight" } + } + */ + this.telemetryReporter.sendTelemetryEvent('session', { + isEdu: json.student + ? 'student' + : json.faculty + ? 'faculty' + : 'none' + }); + } + } catch (e) { + // No-op + } + } + + public async checkEnterpriseVersion(token: string): Promise { + try { + + const result = await fetch(this.getServerUri('/meta').toString(), { + headers: { + Authorization: `token ${token}`, + 'User-Agent': 'Visual-Studio-Code' + } + }); + + if (!result.ok) { + return; + } + + const json: { verifiable_password_authentication: boolean, installed_version: string } = await result.json(); + + /* __GDPR__ + "ghe-session" : { + "version": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ + this.telemetryReporter.sendTelemetryEvent('ghe-session', { + version: json.installed_version + }); + } catch { + // No-op + } + } +} diff --git a/lib/vscode/extensions/simple-browser/src/typings/ref.d.ts b/extensions/github-authentication/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/simple-browser/src/typings/ref.d.ts rename to extensions/github-authentication/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/github-authentication/tsconfig.json b/extensions/github-authentication/tsconfig.json similarity index 100% rename from lib/vscode/extensions/github-authentication/tsconfig.json rename to extensions/github-authentication/tsconfig.json diff --git a/extensions/github-authentication/yarn.lock b/extensions/github-authentication/yarn.lock new file mode 100644 index 000000000000..090dc94dcb76 --- /dev/null +++ b/extensions/github-authentication/yarn.lock @@ -0,0 +1,188 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node-fetch@^2.5.7": + version "2.5.7" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.7.tgz#20a2afffa882ab04d44ca786449a276f9f6bbf3c" + integrity sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + +"@types/node@*": + version "14.0.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.5.tgz#3d03acd3b3414cf67faf999aed11682ed121f22b" + integrity sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA== + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +"@types/uuid@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.0.0.tgz#165aae4819ad2174a17476dbe66feebd549556c0" + integrity sha512-xSQfNcvOiE5f9dyd4Kzxbof1aTrLobL278pGLKOZI6esGfZ7ts9Ka16CzIN6Y8hFHE1C7jIBZokULhK1bOgjRw== + +applicationinsights@1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" + integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== + dependencies: + cls-hooked "^4.2.2" + continuation-local-storage "^3.2.1" + diagnostic-channel "0.2.0" + diagnostic-channel-publishers "^0.3.3" + +async-hook-jl@^1.7.6: + version "1.7.6" + resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" + integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== + dependencies: + stack-chain "^1.3.7" + +async-listener@^0.6.0: + version "0.6.10" + resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" + integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== + dependencies: + semver "^5.3.0" + shimmer "^1.1.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +axios@^0.21.1: + version "0.21.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" + integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== + dependencies: + follow-redirects "^1.10.0" + +cls-hooked@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" + integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== + dependencies: + async-hook-jl "^1.7.6" + emitter-listener "^1.0.1" + semver "^5.4.1" + +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +continuation-local-storage@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" + integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== + dependencies: + async-listener "^0.6.0" + emitter-listener "^1.1.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +diagnostic-channel-publishers@^0.3.3: + version "0.3.5" + resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" + integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== + +diagnostic-channel@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" + integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= + dependencies: + semver "^5.3.0" + +emitter-listener@^1.0.1, emitter-listener@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" + integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== + dependencies: + shimmer "^1.2.0" + +follow-redirects@^1.10.0: + version "1.13.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.3.tgz#e5598ad50174c1bc4e872301e82ac2cd97f90267" + integrity sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA== + +form-data@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" + integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +mime-db@1.44.0: + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== + +mime-types@^2.1.12: + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + dependencies: + mime-db "1.44.0" + +node-fetch@2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + +semver@^5.3.0, semver@^5.4.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +shimmer@^1.1.0, shimmer@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + +stack-chain@^1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" + integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= + +tas-client@0.1.21: + version "0.1.21" + resolved "https://registry.yarnpkg.com/tas-client/-/tas-client-0.1.21.tgz#62275d5f75266eaae408f7463364748cb92f220d" + integrity sha512-7UuIwOXarCYoCTrQHY5n7M+63XuwMC0sVUdbPQzxqDB9wMjIW0JF39dnp3yoJnxr4jJUVhPtvkkXZbAD0BxCcA== + dependencies: + axios "^0.21.1" + +uuid@8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.1.0.tgz#6f1536eb43249f473abc6bd58ff983da1ca30d8d" + integrity sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg== + +vscode-extension-telemetry@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" + integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== + dependencies: + applicationinsights "1.7.4" + +vscode-nls@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" + integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== + +vscode-tas-client@^0.1.22: + version "0.1.22" + resolved "https://registry.yarnpkg.com/vscode-tas-client/-/vscode-tas-client-0.1.22.tgz#2dd674b21a94ff4e97db2b6545d9efda8b5f07c3" + integrity sha512-1sYH73nhiSRVQgfZkLQNJW7VzhKM9qNbCe8QyXgiKkLhH4GflDXRPAK4yy4P41jUgula+Fc9G7i5imj1dlKfaw== + dependencies: + tas-client "0.1.21" diff --git a/lib/vscode/extensions/github/.vscodeignore b/extensions/github/.vscodeignore similarity index 100% rename from lib/vscode/extensions/github/.vscodeignore rename to extensions/github/.vscodeignore diff --git a/lib/vscode/extensions/github/README.md b/extensions/github/README.md similarity index 100% rename from lib/vscode/extensions/github/README.md rename to extensions/github/README.md diff --git a/lib/vscode/extensions/github/extension.webpack.config.js b/extensions/github/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/github/extension.webpack.config.js rename to extensions/github/extension.webpack.config.js diff --git a/lib/vscode/extensions/github/images/icon.png b/extensions/github/images/icon.png similarity index 100% rename from lib/vscode/extensions/github/images/icon.png rename to extensions/github/images/icon.png diff --git a/extensions/github/package.json b/extensions/github/package.json new file mode 100644 index 000000000000..f21080ab6f17 --- /dev/null +++ b/extensions/github/package.json @@ -0,0 +1,79 @@ +{ + "name": "github", + "displayName": "%displayName%", + "description": "%description%", + "publisher": "vscode", + "license": "MIT", + "version": "0.0.1", + "engines": { + "vscode": "^1.41.0" + }, + "icon": "images/icon.png", + "enableProposedApi": true, + "categories": [ + "Other" + ], + "activationEvents": [ + "*" + ], + "extensionDependencies": [ + "vscode.git" + ], + "main": "./out/extension.js", + "capabilities": { + "virtualWorkspaces": false, + "untrustedWorkspaces": { + "supported": true + } + }, + "contributes": { + "commands": [ + { + "command": "github.publish", + "title": "Publish to GitHub" + } + ], + "configuration": [ + { + "title": "GitHub", + "properties": { + "github.gitAuthentication": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%config.gitAuthentication%" + } + } + } + ], + "viewsWelcome": [ + { + "view": "scm", + "contents": "%welcome.publishFolder%", + "when": "config.git.enabled && git.state == initialized && workbenchState == folder" + }, + { + "view": "scm", + "contents": "%welcome.publishWorkspaceFolder%", + "when": "config.git.enabled && git.state == initialized && workbenchState == workspace && workspaceFolderCount != 0" + } + ] + }, + "scripts": { + "vscode:prepublish": "npm run compile", + "compile": "gulp compile-extension:github", + "watch": "gulp watch-extension:github" + }, + "dependencies": { + "@octokit/rest": "^18.0.1", + "tunnel": "^0.0.6", + "vscode-nls": "^4.1.2" + }, + "devDependencies": { + "@types/node": "14.x" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/github/package.nls.json b/extensions/github/package.nls.json similarity index 100% rename from lib/vscode/extensions/github/package.nls.json rename to extensions/github/package.nls.json diff --git a/lib/vscode/extensions/github/src/auth.ts b/extensions/github/src/auth.ts similarity index 100% rename from lib/vscode/extensions/github/src/auth.ts rename to extensions/github/src/auth.ts diff --git a/lib/vscode/extensions/github/src/commands.ts b/extensions/github/src/commands.ts similarity index 100% rename from lib/vscode/extensions/github/src/commands.ts rename to extensions/github/src/commands.ts diff --git a/lib/vscode/extensions/github/src/credentialProvider.ts b/extensions/github/src/credentialProvider.ts similarity index 100% rename from lib/vscode/extensions/github/src/credentialProvider.ts rename to extensions/github/src/credentialProvider.ts diff --git a/lib/vscode/extensions/github/src/extension.ts b/extensions/github/src/extension.ts similarity index 100% rename from lib/vscode/extensions/github/src/extension.ts rename to extensions/github/src/extension.ts diff --git a/lib/vscode/extensions/github/src/publish.ts b/extensions/github/src/publish.ts similarity index 100% rename from lib/vscode/extensions/github/src/publish.ts rename to extensions/github/src/publish.ts diff --git a/lib/vscode/extensions/github/src/pushErrorHandler.ts b/extensions/github/src/pushErrorHandler.ts similarity index 100% rename from lib/vscode/extensions/github/src/pushErrorHandler.ts rename to extensions/github/src/pushErrorHandler.ts diff --git a/lib/vscode/extensions/github/src/remoteSourceProvider.ts b/extensions/github/src/remoteSourceProvider.ts similarity index 100% rename from lib/vscode/extensions/github/src/remoteSourceProvider.ts rename to extensions/github/src/remoteSourceProvider.ts diff --git a/lib/vscode/extensions/github/src/typings/git.d.ts b/extensions/github/src/typings/git.d.ts similarity index 100% rename from lib/vscode/extensions/github/src/typings/git.d.ts rename to extensions/github/src/typings/git.d.ts diff --git a/lib/vscode/extensions/github/src/typings/ref.d.ts b/extensions/github/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/github/src/typings/ref.d.ts rename to extensions/github/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/github/src/util.ts b/extensions/github/src/util.ts similarity index 100% rename from lib/vscode/extensions/github/src/util.ts rename to extensions/github/src/util.ts diff --git a/lib/vscode/extensions/github/tsconfig.json b/extensions/github/tsconfig.json similarity index 100% rename from lib/vscode/extensions/github/tsconfig.json rename to extensions/github/tsconfig.json diff --git a/extensions/github/yarn.lock b/extensions/github/yarn.lock new file mode 100644 index 000000000000..94f7a26da9d9 --- /dev/null +++ b/extensions/github/yarn.lock @@ -0,0 +1,157 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@octokit/auth-token@^2.4.0": + version "2.4.2" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.2.tgz#10d0ae979b100fa6b72fa0e8e63e27e6d0dbff8a" + integrity sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ== + dependencies: + "@octokit/types" "^5.0.0" + +"@octokit/core@^3.0.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.1.1.tgz#1856745aa8fb154cf1544a2a1b82586c809c5e66" + integrity sha512-cQ2HGrtyNJ1IBxpTP1U5m/FkMAJvgw7d2j1q3c9P0XUuYilEgF6e4naTpsgm4iVcQeOnccZlw7XHRIUBy0ymcg== + dependencies: + "@octokit/auth-token" "^2.4.0" + "@octokit/graphql" "^4.3.1" + "@octokit/request" "^5.4.0" + "@octokit/types" "^5.0.0" + before-after-hook "^2.1.0" + universal-user-agent "^6.0.0" + +"@octokit/endpoint@^6.0.1": + version "6.0.4" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.4.tgz#da3eafdee1fabd6e5b6ca311efcba26f0dd99848" + integrity sha512-ZJHIsvsClEE+6LaZXskDvWIqD3Ao7+2gc66pRG5Ov4MQtMvCU9wGu1TItw9aGNmRuU9x3Fei1yb+uqGaQnm0nw== + dependencies: + "@octokit/types" "^5.0.0" + is-plain-object "^3.0.0" + universal-user-agent "^6.0.0" + +"@octokit/graphql@^4.3.1": + version "4.5.2" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.2.tgz#33021ebf94939cf47562823851ab11fe64392274" + integrity sha512-SpB/JGdB7bxRj8qowwfAXjMpICUYSJqRDj26MKJAryRQBqp/ZzARsaO2LEFWzDaps0FLQoPYVGppS0HQXkBhdg== + dependencies: + "@octokit/request" "^5.3.0" + "@octokit/types" "^5.0.0" + universal-user-agent "^6.0.0" + +"@octokit/plugin-paginate-rest@^2.2.0": + version "2.2.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.2.3.tgz#a6ad4377e7e7832fb4bdd9d421e600cb7640ac27" + integrity sha512-eKTs91wXnJH8Yicwa30jz6DF50kAh7vkcqCQ9D7/tvBAP5KKkg6I2nNof8Mp/65G0Arjsb4QcOJcIEQY+rK1Rg== + dependencies: + "@octokit/types" "^5.0.0" + +"@octokit/plugin-request-log@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" + integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== + +"@octokit/plugin-rest-endpoint-methods@4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.1.0.tgz#338c568177c4d4d753f9525af88b29cd0f091734" + integrity sha512-zbRTjm+xplSNlixotTVMvLJe8aRogUXS+r37wZK5EjLsNYH4j02K5XLMOWyYaSS4AJEZtPmzCcOcui4VzVGq+A== + dependencies: + "@octokit/types" "^5.1.0" + deprecation "^2.3.1" + +"@octokit/request-error@^2.0.0": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.2.tgz#0e76b83f5d8fdda1db99027ea5f617c2e6ba9ed0" + integrity sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw== + dependencies: + "@octokit/types" "^5.0.1" + deprecation "^2.0.0" + once "^1.4.0" + +"@octokit/request@^5.3.0", "@octokit/request@^5.4.0": + version "5.4.6" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.6.tgz#e8cc8d4cfc654d30428ea92aaa62168fd5ead7eb" + integrity sha512-9r8Sn4CvqFI9LDLHl9P17EZHwj3ehwQnTpTE+LEneb0VBBqSiI/VS4rWIBfBhDrDs/aIGEGZRSB0QWAck8u+2g== + dependencies: + "@octokit/endpoint" "^6.0.1" + "@octokit/request-error" "^2.0.0" + "@octokit/types" "^5.0.0" + deprecation "^2.0.0" + is-plain-object "^3.0.0" + node-fetch "^2.3.0" + once "^1.4.0" + universal-user-agent "^6.0.0" + +"@octokit/rest@^18.0.1": + version "18.0.1" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.1.tgz#46ee234770c5ff4c646f7e18708c56b6d7fa3c66" + integrity sha512-KLlJpgsJx88OZ0VLBH3gvUK4sfcXjr/nE0Qzyoe76dNqMzDzkSmmvILF3f2XviGgrzuP6Ie0ay/QX478Vrpn9A== + dependencies: + "@octokit/core" "^3.0.0" + "@octokit/plugin-paginate-rest" "^2.2.0" + "@octokit/plugin-request-log" "^1.0.0" + "@octokit/plugin-rest-endpoint-methods" "4.1.0" + +"@octokit/types@^5.0.0", "@octokit/types@^5.0.1", "@octokit/types@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.1.0.tgz#4377a3f39edad3e60753fb5c3c310756f1ded57f" + integrity sha512-OFxUBgrEllAbdEmWp/wNmKIu5EuumKHG4sgy56vjZ8lXPgMhF05c76hmulfOdFHHYRpPj49ygOZJ8wgVsPecuA== + dependencies: + "@types/node" ">= 8" + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +"@types/node@>= 8": + version "14.0.23" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.23.tgz#676fa0883450ed9da0bb24156213636290892806" + integrity sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw== + +before-after-hook@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" + integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== + +deprecation@^2.0.0, deprecation@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" + integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== + +is-plain-object@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.1.tgz#662d92d24c0aa4302407b0d45d21f2251c85f85b" + integrity sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g== + +node-fetch@^2.3.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + +once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +tunnel@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" + integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== + +universal-user-agent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" + integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== + +vscode-nls@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" + integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= diff --git a/lib/vscode/extensions/go/.vscodeignore b/extensions/go/.vscodeignore similarity index 100% rename from lib/vscode/extensions/go/.vscodeignore rename to extensions/go/.vscodeignore diff --git a/lib/vscode/extensions/go/cgmanifest.json b/extensions/go/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/go/cgmanifest.json rename to extensions/go/cgmanifest.json diff --git a/lib/vscode/extensions/go/language-configuration.json b/extensions/go/language-configuration.json similarity index 100% rename from lib/vscode/extensions/go/language-configuration.json rename to extensions/go/language-configuration.json diff --git a/lib/vscode/extensions/go/package.json b/extensions/go/package.json similarity index 100% rename from lib/vscode/extensions/go/package.json rename to extensions/go/package.json diff --git a/lib/vscode/extensions/go/package.nls.json b/extensions/go/package.nls.json similarity index 100% rename from lib/vscode/extensions/go/package.nls.json rename to extensions/go/package.nls.json diff --git a/lib/vscode/extensions/go/syntaxes/go.tmLanguage.json b/extensions/go/syntaxes/go.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/go/syntaxes/go.tmLanguage.json rename to extensions/go/syntaxes/go.tmLanguage.json diff --git a/lib/vscode/extensions/go/yarn.lock b/extensions/go/yarn.lock similarity index 100% rename from lib/vscode/extensions/go/yarn.lock rename to extensions/go/yarn.lock diff --git a/lib/vscode/extensions/groovy/.vscodeignore b/extensions/groovy/.vscodeignore similarity index 100% rename from lib/vscode/extensions/groovy/.vscodeignore rename to extensions/groovy/.vscodeignore diff --git a/lib/vscode/extensions/groovy/cgmanifest.json b/extensions/groovy/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/groovy/cgmanifest.json rename to extensions/groovy/cgmanifest.json diff --git a/lib/vscode/extensions/groovy/language-configuration.json b/extensions/groovy/language-configuration.json similarity index 100% rename from lib/vscode/extensions/groovy/language-configuration.json rename to extensions/groovy/language-configuration.json diff --git a/lib/vscode/extensions/groovy/package.json b/extensions/groovy/package.json similarity index 100% rename from lib/vscode/extensions/groovy/package.json rename to extensions/groovy/package.json diff --git a/lib/vscode/extensions/groovy/package.nls.json b/extensions/groovy/package.nls.json similarity index 100% rename from lib/vscode/extensions/groovy/package.nls.json rename to extensions/groovy/package.nls.json diff --git a/lib/vscode/extensions/groovy/snippets/groovy.code-snippets b/extensions/groovy/snippets/groovy.code-snippets similarity index 100% rename from lib/vscode/extensions/groovy/snippets/groovy.code-snippets rename to extensions/groovy/snippets/groovy.code-snippets diff --git a/lib/vscode/extensions/groovy/syntaxes/groovy.tmLanguage.json b/extensions/groovy/syntaxes/groovy.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/groovy/syntaxes/groovy.tmLanguage.json rename to extensions/groovy/syntaxes/groovy.tmLanguage.json diff --git a/lib/vscode/extensions/groovy/yarn.lock b/extensions/groovy/yarn.lock similarity index 100% rename from lib/vscode/extensions/groovy/yarn.lock rename to extensions/groovy/yarn.lock diff --git a/lib/vscode/extensions/grunt/.vscodeignore b/extensions/grunt/.vscodeignore similarity index 100% rename from lib/vscode/extensions/grunt/.vscodeignore rename to extensions/grunt/.vscodeignore diff --git a/lib/vscode/extensions/grunt/README.md b/extensions/grunt/README.md similarity index 100% rename from lib/vscode/extensions/grunt/README.md rename to extensions/grunt/README.md diff --git a/lib/vscode/extensions/grunt/extension.webpack.config.js b/extensions/grunt/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/grunt/extension.webpack.config.js rename to extensions/grunt/extension.webpack.config.js diff --git a/lib/vscode/extensions/grunt/images/grunt.png b/extensions/grunt/images/grunt.png similarity index 100% rename from lib/vscode/extensions/grunt/images/grunt.png rename to extensions/grunt/images/grunt.png diff --git a/extensions/grunt/package.json b/extensions/grunt/package.json new file mode 100644 index 000000000000..c784b1ed83a1 --- /dev/null +++ b/extensions/grunt/package.json @@ -0,0 +1,81 @@ +{ + "name": "grunt", + "publisher": "vscode", + "description": "Extension to add Grunt capabilities to VS Code.", + "displayName": "Grunt support for VS Code", + "version": "1.0.0", + "icon": "images/grunt.png", + "license": "MIT", + "engines": { + "vscode": "*" + }, + "categories": [ + "Other" + ], + "scripts": { + "compile": "gulp compile-extension:grunt", + "watch": "gulp watch-extension:grunt" + }, + "dependencies": { + "vscode-nls": "^4.0.0" + }, + "devDependencies": { + "@types/node": "14.x" + }, + "main": "./out/main", + "activationEvents": [ + "onCommand:workbench.action.tasks.runTask" + ], + "capabilities": { + "virtualWorkspaces": false, + "untrustedWorkspaces": { + "supported": true + } + }, + "contributes": { + "configuration": { + "id": "grunt", + "type": "object", + "title": "Grunt", + "properties": { + "grunt.autoDetect": { + "scope": "application", + "type": "string", + "enum": [ + "off", + "on" + ], + "default": "off", + "description": "%config.grunt.autoDetect%" + } + } + }, + "taskDefinitions": [ + { + "type": "grunt", + "required": [ + "task" + ], + "properties": { + "task": { + "type": "string", + "description": "%grunt.taskDefinition.type.description%" + }, + "args": { + "type": "array", + "description": "%grunt.taskDefinition.args.description%" + }, + "file": { + "type": "string", + "description": "%grunt.taskDefinition.file.description%" + } + }, + "when": "shellExecutionSupported" + } + ] + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/extensions/grunt/package.nls.json b/extensions/grunt/package.nls.json new file mode 100644 index 000000000000..789a579cc545 --- /dev/null +++ b/extensions/grunt/package.nls.json @@ -0,0 +1,8 @@ +{ + "description": "Extension to add Grunt capabilities to VS Code.", + "displayName": "Grunt support for VS Code", + "config.grunt.autoDetect": "Controls enablement of Grunt task detection. Grunt task detection can cause files in any open workspace to be executed.", + "grunt.taskDefinition.type.description": "The Grunt task to customize.", + "grunt.taskDefinition.args.description": "Command line arguments to pass to the grunt task", + "grunt.taskDefinition.file.description": "The Grunt file that provides the task. Can be omitted." +} diff --git a/lib/vscode/extensions/grunt/src/main.ts b/extensions/grunt/src/main.ts similarity index 100% rename from lib/vscode/extensions/grunt/src/main.ts rename to extensions/grunt/src/main.ts diff --git a/lib/vscode/extensions/grunt/src/typings/refs.d.ts b/extensions/grunt/src/typings/refs.d.ts similarity index 100% rename from lib/vscode/extensions/grunt/src/typings/refs.d.ts rename to extensions/grunt/src/typings/refs.d.ts diff --git a/lib/vscode/extensions/grunt/tsconfig.json b/extensions/grunt/tsconfig.json similarity index 100% rename from lib/vscode/extensions/grunt/tsconfig.json rename to extensions/grunt/tsconfig.json diff --git a/extensions/grunt/yarn.lock b/extensions/grunt/yarn.lock new file mode 100644 index 000000000000..f7a30098ef45 --- /dev/null +++ b/extensions/grunt/yarn.lock @@ -0,0 +1,13 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +vscode-nls@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" + integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== diff --git a/lib/vscode/extensions/gulp/.vscodeignore b/extensions/gulp/.vscodeignore similarity index 100% rename from lib/vscode/extensions/gulp/.vscodeignore rename to extensions/gulp/.vscodeignore diff --git a/lib/vscode/extensions/gulp/README.md b/extensions/gulp/README.md similarity index 100% rename from lib/vscode/extensions/gulp/README.md rename to extensions/gulp/README.md diff --git a/lib/vscode/extensions/gulp/extension.webpack.config.js b/extensions/gulp/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/gulp/extension.webpack.config.js rename to extensions/gulp/extension.webpack.config.js diff --git a/lib/vscode/extensions/gulp/images/gulp.png b/extensions/gulp/images/gulp.png similarity index 100% rename from lib/vscode/extensions/gulp/images/gulp.png rename to extensions/gulp/images/gulp.png diff --git a/extensions/gulp/package.json b/extensions/gulp/package.json new file mode 100644 index 000000000000..21800e96cfb6 --- /dev/null +++ b/extensions/gulp/package.json @@ -0,0 +1,77 @@ +{ + "name": "gulp", + "publisher": "vscode", + "description": "%description%", + "displayName": "%displayName%", + "version": "1.0.0", + "icon": "images/gulp.png", + "license": "MIT", + "engines": { + "vscode": "*" + }, + "categories": [ + "Other" + ], + "scripts": { + "compile": "gulp compile-extension:gulp", + "watch": "gulp watch-extension:gulp" + }, + "dependencies": { + "vscode-nls": "^4.0.0" + }, + "devDependencies": { + "@types/node": "14.x" + }, + "main": "./out/main", + "activationEvents": [ + "onCommand:workbench.action.tasks.runTask" + ], + "capabilities": { + "virtualWorkspaces": false, + "untrustedWorkspaces": { + "supported": true + } + }, + "contributes": { + "configuration": { + "id": "gulp", + "type": "object", + "title": "Gulp", + "properties": { + "gulp.autoDetect": { + "scope": "application", + "type": "string", + "enum": [ + "off", + "on" + ], + "default": "off", + "description": "%config.gulp.autoDetect%" + } + } + }, + "taskDefinitions": [ + { + "type": "gulp", + "required": [ + "task" + ], + "properties": { + "task": { + "type": "string", + "description": "%gulp.taskDefinition.type.description%" + }, + "file": { + "type": "string", + "description": "%gulp.taskDefinition.file.description%" + } + }, + "when": "shellExecutionSupported" + } + ] + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/extensions/gulp/package.nls.json b/extensions/gulp/package.nls.json new file mode 100644 index 000000000000..222ad3a87ec3 --- /dev/null +++ b/extensions/gulp/package.nls.json @@ -0,0 +1,7 @@ +{ + "description": "Extension to add Gulp capabilities to VSCode.", + "displayName": "Gulp support for VSCode", + "config.gulp.autoDetect": "Controls enablement of Gulp task detection. Gulp task detection can cause files in any open workspace to be executed.", + "gulp.taskDefinition.type.description": "The Gulp task to customize.", + "gulp.taskDefinition.file.description": "The Gulp file that provides the task. Can be omitted." +} diff --git a/lib/vscode/extensions/gulp/src/main.ts b/extensions/gulp/src/main.ts similarity index 100% rename from lib/vscode/extensions/gulp/src/main.ts rename to extensions/gulp/src/main.ts diff --git a/lib/vscode/extensions/gulp/src/typings/refs.d.ts b/extensions/gulp/src/typings/refs.d.ts similarity index 100% rename from lib/vscode/extensions/gulp/src/typings/refs.d.ts rename to extensions/gulp/src/typings/refs.d.ts diff --git a/lib/vscode/extensions/gulp/tsconfig.json b/extensions/gulp/tsconfig.json similarity index 100% rename from lib/vscode/extensions/gulp/tsconfig.json rename to extensions/gulp/tsconfig.json diff --git a/extensions/gulp/yarn.lock b/extensions/gulp/yarn.lock new file mode 100644 index 000000000000..f7a30098ef45 --- /dev/null +++ b/extensions/gulp/yarn.lock @@ -0,0 +1,13 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +vscode-nls@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" + integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== diff --git a/lib/vscode/extensions/handlebars/.vscodeignore b/extensions/handlebars/.vscodeignore similarity index 100% rename from lib/vscode/extensions/handlebars/.vscodeignore rename to extensions/handlebars/.vscodeignore diff --git a/lib/vscode/extensions/handlebars/cgmanifest.json b/extensions/handlebars/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/handlebars/cgmanifest.json rename to extensions/handlebars/cgmanifest.json diff --git a/lib/vscode/extensions/handlebars/language-configuration.json b/extensions/handlebars/language-configuration.json similarity index 100% rename from lib/vscode/extensions/handlebars/language-configuration.json rename to extensions/handlebars/language-configuration.json diff --git a/lib/vscode/extensions/handlebars/package.json b/extensions/handlebars/package.json similarity index 100% rename from lib/vscode/extensions/handlebars/package.json rename to extensions/handlebars/package.json diff --git a/lib/vscode/extensions/handlebars/package.nls.json b/extensions/handlebars/package.nls.json similarity index 100% rename from lib/vscode/extensions/handlebars/package.nls.json rename to extensions/handlebars/package.nls.json diff --git a/lib/vscode/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json b/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json rename to extensions/handlebars/syntaxes/Handlebars.tmLanguage.json diff --git a/lib/vscode/extensions/handlebars/yarn.lock b/extensions/handlebars/yarn.lock similarity index 100% rename from lib/vscode/extensions/handlebars/yarn.lock rename to extensions/handlebars/yarn.lock diff --git a/lib/vscode/extensions/hlsl/.vscodeignore b/extensions/hlsl/.vscodeignore similarity index 100% rename from lib/vscode/extensions/hlsl/.vscodeignore rename to extensions/hlsl/.vscodeignore diff --git a/lib/vscode/extensions/hlsl/cgmanifest.json b/extensions/hlsl/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/hlsl/cgmanifest.json rename to extensions/hlsl/cgmanifest.json diff --git a/lib/vscode/extensions/hlsl/language-configuration.json b/extensions/hlsl/language-configuration.json similarity index 100% rename from lib/vscode/extensions/hlsl/language-configuration.json rename to extensions/hlsl/language-configuration.json diff --git a/lib/vscode/extensions/hlsl/package.json b/extensions/hlsl/package.json similarity index 100% rename from lib/vscode/extensions/hlsl/package.json rename to extensions/hlsl/package.json diff --git a/lib/vscode/extensions/hlsl/package.nls.json b/extensions/hlsl/package.nls.json similarity index 100% rename from lib/vscode/extensions/hlsl/package.nls.json rename to extensions/hlsl/package.nls.json diff --git a/lib/vscode/extensions/hlsl/syntaxes/hlsl.tmLanguage.json b/extensions/hlsl/syntaxes/hlsl.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/hlsl/syntaxes/hlsl.tmLanguage.json rename to extensions/hlsl/syntaxes/hlsl.tmLanguage.json diff --git a/lib/vscode/extensions/hlsl/yarn.lock b/extensions/hlsl/yarn.lock similarity index 100% rename from lib/vscode/extensions/hlsl/yarn.lock rename to extensions/hlsl/yarn.lock diff --git a/lib/vscode/extensions/html-language-features/.vscode/launch.json b/extensions/html-language-features/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/html-language-features/.vscode/launch.json rename to extensions/html-language-features/.vscode/launch.json diff --git a/lib/vscode/extensions/html-language-features/.vscode/settings.json b/extensions/html-language-features/.vscode/settings.json similarity index 100% rename from lib/vscode/extensions/html-language-features/.vscode/settings.json rename to extensions/html-language-features/.vscode/settings.json diff --git a/lib/vscode/extensions/html-language-features/.vscode/tasks.json b/extensions/html-language-features/.vscode/tasks.json similarity index 100% rename from lib/vscode/extensions/html-language-features/.vscode/tasks.json rename to extensions/html-language-features/.vscode/tasks.json diff --git a/lib/vscode/extensions/html-language-features/.vscodeignore b/extensions/html-language-features/.vscodeignore similarity index 100% rename from lib/vscode/extensions/html-language-features/.vscodeignore rename to extensions/html-language-features/.vscodeignore diff --git a/lib/vscode/extensions/html-language-features/CONTRIBUTING.md b/extensions/html-language-features/CONTRIBUTING.md similarity index 100% rename from lib/vscode/extensions/html-language-features/CONTRIBUTING.md rename to extensions/html-language-features/CONTRIBUTING.md diff --git a/lib/vscode/extensions/html-language-features/README.md b/extensions/html-language-features/README.md similarity index 100% rename from lib/vscode/extensions/html-language-features/README.md rename to extensions/html-language-features/README.md diff --git a/lib/vscode/extensions/html-language-features/build/bundleTypeScriptLibraries.js b/extensions/html-language-features/build/bundleTypeScriptLibraries.js similarity index 100% rename from lib/vscode/extensions/html-language-features/build/bundleTypeScriptLibraries.js rename to extensions/html-language-features/build/bundleTypeScriptLibraries.js diff --git a/lib/vscode/extensions/html-language-features/cgmanifest.json b/extensions/html-language-features/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/html-language-features/cgmanifest.json rename to extensions/html-language-features/cgmanifest.json diff --git a/lib/vscode/extensions/html-language-features/client/src/browser/htmlClientMain.ts b/extensions/html-language-features/client/src/browser/htmlClientMain.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/client/src/browser/htmlClientMain.ts rename to extensions/html-language-features/client/src/browser/htmlClientMain.ts diff --git a/lib/vscode/extensions/html-language-features/client/src/customData.ts b/extensions/html-language-features/client/src/customData.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/client/src/customData.ts rename to extensions/html-language-features/client/src/customData.ts diff --git a/lib/vscode/extensions/html-language-features/client/src/htmlClient.ts b/extensions/html-language-features/client/src/htmlClient.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/client/src/htmlClient.ts rename to extensions/html-language-features/client/src/htmlClient.ts diff --git a/lib/vscode/extensions/html-language-features/client/src/htmlEmptyTagsShared.ts b/extensions/html-language-features/client/src/htmlEmptyTagsShared.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/client/src/htmlEmptyTagsShared.ts rename to extensions/html-language-features/client/src/htmlEmptyTagsShared.ts diff --git a/lib/vscode/extensions/html-language-features/client/src/node/htmlClientMain.ts b/extensions/html-language-features/client/src/node/htmlClientMain.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/client/src/node/htmlClientMain.ts rename to extensions/html-language-features/client/src/node/htmlClientMain.ts diff --git a/lib/vscode/extensions/html-language-features/client/src/node/nodeFs.ts b/extensions/html-language-features/client/src/node/nodeFs.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/client/src/node/nodeFs.ts rename to extensions/html-language-features/client/src/node/nodeFs.ts diff --git a/lib/vscode/extensions/html-language-features/client/src/requests.ts b/extensions/html-language-features/client/src/requests.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/client/src/requests.ts rename to extensions/html-language-features/client/src/requests.ts diff --git a/lib/vscode/extensions/html-language-features/client/src/tagClosing.ts b/extensions/html-language-features/client/src/tagClosing.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/client/src/tagClosing.ts rename to extensions/html-language-features/client/src/tagClosing.ts diff --git a/lib/vscode/extensions/html-language-features/client/src/typings/ref.d.ts b/extensions/html-language-features/client/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/client/src/typings/ref.d.ts rename to extensions/html-language-features/client/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/html-language-features/client/tsconfig.json b/extensions/html-language-features/client/tsconfig.json similarity index 100% rename from lib/vscode/extensions/html-language-features/client/tsconfig.json rename to extensions/html-language-features/client/tsconfig.json diff --git a/lib/vscode/extensions/html-language-features/extension-browser.webpack.config.js b/extensions/html-language-features/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/html-language-features/extension-browser.webpack.config.js rename to extensions/html-language-features/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/html-language-features/extension.webpack.config.js b/extensions/html-language-features/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/html-language-features/extension.webpack.config.js rename to extensions/html-language-features/extension.webpack.config.js diff --git a/lib/vscode/extensions/html-language-features/icons/html.png b/extensions/html-language-features/icons/html.png similarity index 100% rename from lib/vscode/extensions/html-language-features/icons/html.png rename to extensions/html-language-features/icons/html.png diff --git a/extensions/html-language-features/package.json b/extensions/html-language-features/package.json new file mode 100644 index 000000000000..3c6a539c0797 --- /dev/null +++ b/extensions/html-language-features/package.json @@ -0,0 +1,254 @@ +{ + "enableProposedApi": true, + "name": "html-language-features", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "publisher": "vscode", + "license": "MIT", + "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", + "engines": { + "vscode": "0.10.x" + }, + "icon": "icons/html.png", + "activationEvents": [ + "onLanguage:html", + "onLanguage:handlebars" + ], + "main": "./client/out/node/htmlClientMain", + "browser": "./client/dist/browser/htmlClientMain", + "capabilities": { + "virtualWorkspaces": true, + "untrustedWorkspaces": { + "supported": true + } + }, + "scripts": { + "compile": "npx gulp compile-extension:html-language-features-client compile-extension:html-language-features-server", + "watch": "npx gulp watch-extension:html-language-features-client watch-extension:html-language-features-server", + "install-client-next": "yarn add vscode-languageclient@next" + }, + "categories": [ + "Programming Languages" + ], + "contributes": { + "configuration": { + "id": "html", + "order": 20, + "type": "object", + "title": "HTML", + "properties": { + "html.customData": { + "type": "array", + "markdownDescription": "%html.customData.desc%", + "default": [], + "items": { + "type": "string" + }, + "scope": "resource" + }, + "html.format.enable": { + "type": "boolean", + "scope": "window", + "default": true, + "description": "%html.format.enable.desc%" + }, + "html.format.wrapLineLength": { + "type": "integer", + "scope": "resource", + "default": 120, + "description": "%html.format.wrapLineLength.desc%" + }, + "html.format.unformatted": { + "type": [ + "string", + "null" + ], + "scope": "resource", + "default": "wbr", + "markdownDescription": "%html.format.unformatted.desc%" + }, + "html.format.contentUnformatted": { + "type": [ + "string", + "null" + ], + "scope": "resource", + "default": "pre,code,textarea", + "markdownDescription": "%html.format.contentUnformatted.desc%" + }, + "html.format.indentInnerHtml": { + "type": "boolean", + "scope": "resource", + "default": false, + "markdownDescription": "%html.format.indentInnerHtml.desc%" + }, + "html.format.preserveNewLines": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%html.format.preserveNewLines.desc%" + }, + "html.format.maxPreserveNewLines": { + "type": [ + "number", + "null" + ], + "scope": "resource", + "default": null, + "markdownDescription": "%html.format.maxPreserveNewLines.desc%" + }, + "html.format.indentHandlebars": { + "type": "boolean", + "scope": "resource", + "default": false, + "markdownDescription": "%html.format.indentHandlebars.desc%" + }, + "html.format.endWithNewline": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%html.format.endWithNewline.desc%" + }, + "html.format.extraLiners": { + "type": [ + "string", + "null" + ], + "scope": "resource", + "default": "head, body, /html", + "markdownDescription": "%html.format.extraLiners.desc%" + }, + "html.format.wrapAttributes": { + "type": "string", + "scope": "resource", + "default": "auto", + "enum": [ + "auto", + "force", + "force-aligned", + "force-expand-multiline", + "aligned-multiple", + "preserve", + "preserve-aligned" + ], + "enumDescriptions": [ + "%html.format.wrapAttributes.auto%", + "%html.format.wrapAttributes.force%", + "%html.format.wrapAttributes.forcealign%", + "%html.format.wrapAttributes.forcemultiline%", + "%html.format.wrapAttributes.alignedmultiple%", + "%html.format.wrapAttributes.preserve%", + "%html.format.wrapAttributes.preservealigned%" + ], + "description": "%html.format.wrapAttributes.desc%" + }, + "html.format.wrapAttributesIndentSize": { + "type": [ + "number", + "null" + ], + "scope": "resource", + "default": null, + "description": "%html.format.wrapAttributesIndentSize.desc%" + }, + "html.format.templating": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%html.format.templating.desc%" + }, + "html.format.unformattedContentDelimiter": { + "type": "string", + "scope": "resource", + "default": "", + "markdownDescription": "%html.format.unformattedContentDelimiter.desc%" + }, + "html.suggest.html5": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%html.suggest.html5.desc%" + }, + "html.validate.scripts": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%html.validate.scripts%" + }, + "html.validate.styles": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%html.validate.styles%" + }, + "html.autoClosingTags": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%html.autoClosingTags%" + }, + "html.hover.documentation": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%html.hover.documentation%" + }, + "html.hover.references": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%html.hover.references%" + }, + "html.mirrorCursorOnMatchingTag": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%html.mirrorCursorOnMatchingTag%", + "deprecationMessage": "%html.mirrorCursorOnMatchingTagDeprecationMessage%" + }, + "html.trace.server": { + "type": "string", + "scope": "window", + "enum": [ + "off", + "messages", + "verbose" + ], + "default": "off", + "description": "%html.trace.server.desc%" + } + } + }, + "configurationDefaults": { + "[html]": { + "editor.suggest.insertMode": "replace" + }, + "[handlebars]": { + "editor.suggest.insertMode": "replace" + } + }, + "jsonValidation": [ + { + "fileMatch": "*.html-data.json", + "url": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/master/docs/customData.schema.json" + }, + { + "fileMatch": "package.json", + "url": "./schemas/package.schema.json" + } + ] + }, + "dependencies": { + "vscode-extension-telemetry": "0.1.7", + "vscode-languageclient": "^7.0.0", + "vscode-nls": "^5.0.0" + }, + "devDependencies": { + "@types/node": "14.x" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/html-language-features/package.nls.json b/extensions/html-language-features/package.nls.json similarity index 100% rename from lib/vscode/extensions/html-language-features/package.nls.json rename to extensions/html-language-features/package.nls.json diff --git a/lib/vscode/extensions/html-language-features/schemas/package.schema.json b/extensions/html-language-features/schemas/package.schema.json similarity index 100% rename from lib/vscode/extensions/html-language-features/schemas/package.schema.json rename to extensions/html-language-features/schemas/package.schema.json diff --git a/lib/vscode/extensions/html-language-features/server/.vscode/launch.json b/extensions/html-language-features/server/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/html-language-features/server/.vscode/launch.json rename to extensions/html-language-features/server/.vscode/launch.json diff --git a/lib/vscode/extensions/html-language-features/server/.vscode/tasks.json b/extensions/html-language-features/server/.vscode/tasks.json similarity index 100% rename from lib/vscode/extensions/html-language-features/server/.vscode/tasks.json rename to extensions/html-language-features/server/.vscode/tasks.json diff --git a/lib/vscode/extensions/html-language-features/server/build/javaScriptLibraryLoader.js b/extensions/html-language-features/server/build/javaScriptLibraryLoader.js similarity index 100% rename from lib/vscode/extensions/html-language-features/server/build/javaScriptLibraryLoader.js rename to extensions/html-language-features/server/build/javaScriptLibraryLoader.js diff --git a/lib/vscode/extensions/html-language-features/server/extension-browser.webpack.config.js b/extensions/html-language-features/server/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/html-language-features/server/extension-browser.webpack.config.js rename to extensions/html-language-features/server/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/html-language-features/server/extension.webpack.config.js b/extensions/html-language-features/server/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/html-language-features/server/extension.webpack.config.js rename to extensions/html-language-features/server/extension.webpack.config.js diff --git a/lib/vscode/extensions/html-language-features/server/lib/cgmanifest.json b/extensions/html-language-features/server/lib/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/html-language-features/server/lib/cgmanifest.json rename to extensions/html-language-features/server/lib/cgmanifest.json diff --git a/lib/vscode/extensions/html-language-features/server/lib/jquery.d.ts b/extensions/html-language-features/server/lib/jquery.d.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/lib/jquery.d.ts rename to extensions/html-language-features/server/lib/jquery.d.ts diff --git a/extensions/html-language-features/server/package.json b/extensions/html-language-features/server/package.json new file mode 100644 index 000000000000..ab5b93df5c76 --- /dev/null +++ b/extensions/html-language-features/server/package.json @@ -0,0 +1,32 @@ +{ + "name": "vscode-html-languageserver", + "description": "HTML language server", + "version": "1.0.0", + "author": "Microsoft Corporation", + "license": "MIT", + "engines": { + "node": "*" + }, + "main": "./out/node/htmlServerMain", + "dependencies": { + "vscode-css-languageservice": "^5.1.3", + "vscode-html-languageservice": "^4.0.4", + "vscode-languageserver": "^7.0.0", + "vscode-languageserver-textdocument": "^1.0.1", + "vscode-nls": "^5.0.0", + "vscode-uri": "^3.0.2" + }, + "devDependencies": { + "@types/mocha": "^8.2.0", + "@types/node": "14.x" + }, + "scripts": { + "compile": "npx gulp compile-extension:html-language-features-server", + "watch": "npx gulp watch-extension:html-language-features-server", + "install-service-next": "yarn add vscode-css-languageservice@next && yarn add vscode-html-languageservice@next", + "install-service-local": "yarn link vscode-css-languageservice && yarn link vscode-html-languageservice", + "install-server-next": "yarn add vscode-languageserver@next", + "install-server-local": "yarn link vscode-languageserver", + "test": "npm run compile && node ./test/index.js" + } +} diff --git a/lib/vscode/extensions/html-language-features/server/src/browser/htmlServerMain.ts b/extensions/html-language-features/server/src/browser/htmlServerMain.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/browser/htmlServerMain.ts rename to extensions/html-language-features/server/src/browser/htmlServerMain.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/customData.ts b/extensions/html-language-features/server/src/customData.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/customData.ts rename to extensions/html-language-features/server/src/customData.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/htmlServer.ts b/extensions/html-language-features/server/src/htmlServer.ts similarity index 90% rename from lib/vscode/extensions/html-language-features/server/src/htmlServer.ts rename to extensions/html-language-features/server/src/htmlServer.ts index 7bc6a444bea7..e153cf7fa91f 100644 --- a/lib/vscode/extensions/html-language-features/server/src/htmlServer.ts +++ b/extensions/html-language-features/server/src/htmlServer.ts @@ -5,9 +5,9 @@ import { Connection, TextDocuments, InitializeParams, InitializeResult, RequestType, - DocumentRangeFormattingRequest, Disposable, DocumentSelector, TextDocumentPositionParams, ServerCapabilities, + DocumentRangeFormattingRequest, Disposable, TextDocumentPositionParams, ServerCapabilities, ConfigurationRequest, ConfigurationParams, DidChangeWorkspaceFoldersNotification, - DocumentColorRequest, ColorPresentationRequest, TextDocumentSyncKind, NotificationType, RequestType0 + DocumentColorRequest, ColorPresentationRequest, TextDocumentSyncKind, NotificationType, RequestType0, DocumentFormattingRequest, FormattingOptions, TextEdit } from 'vscode-languageserver'; import { getLanguageModes, LanguageModes, Settings, TextDocument, Position, Diagnostic, WorkspaceFolder, ColorInformation, @@ -152,7 +152,8 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment) completionProvider: clientSnippetSupport ? { resolveProvider: true, triggerCharacters: ['.', ':', '<', '"', '=', '/'] } : undefined, hoverProvider: true, documentHighlightProvider: true, - documentRangeFormattingProvider: initializationOptions?.provideFormatter === true, + documentRangeFormattingProvider: params.initializationOptions?.provideFormatter === true, + documentFormattingProvider: params.initializationOptions?.provideFormatter === true, documentLinkProvider: { resolveProvider: false }, documentSymbolProvider: true, definitionProvider: true, @@ -188,7 +189,7 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment) } }); - let formatterRegistration: Thenable | null = null; + let formatterRegistrations: Thenable[] | null = null; // The settings have changed. Is send on server activation as well. connection.onDidChangeConfiguration((change) => { @@ -200,13 +201,16 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment) if (dynamicFormatterRegistration) { const enableFormatter = globalSettings && globalSettings.html && globalSettings.html.format && globalSettings.html.format.enable; if (enableFormatter) { - if (!formatterRegistration) { - const documentSelector: DocumentSelector = [{ language: 'html' }, { language: 'handlebars' }]; - formatterRegistration = connection.client.register(DocumentRangeFormattingRequest.type, { documentSelector }); + if (!formatterRegistrations) { + const documentSelector = [{ language: 'html' }, { language: 'handlebars' }]; + formatterRegistrations = [ + connection.client.register(DocumentRangeFormattingRequest.type, { documentSelector }), + connection.client.register(DocumentFormattingRequest.type, { documentSelector }) + ]; } - } else if (formatterRegistration) { - formatterRegistration.then(r => r.dispose()); - formatterRegistration = null; + } else if (formatterRegistrations) { + formatterRegistrations.forEach(p => p.then(r => r.dispose())); + formatterRegistrations = null; } } }); @@ -381,21 +385,27 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment) }, null, `Error while computing signature help for ${signatureHelpParms.textDocument.uri}`, token); }); - connection.onDocumentRangeFormatting(async (formatParams, token) => { - return runSafe(async () => { - const document = documents.get(formatParams.textDocument.uri); - if (document) { - let settings = await getDocumentSettings(document, () => true); - if (!settings) { - settings = globalSettings; - } - const unformattedTags: string = settings && settings.html && settings.html.format && settings.html.format.unformatted || ''; - const enabledModes = { css: !unformattedTags.match(/\bstyle\b/), javascript: !unformattedTags.match(/\bscript\b/) }; - - return format(languageModes, document, formatParams.range, formatParams.options, settings, enabledModes); + async function onFormat(textDocument: TextDocumentIdentifier, range: Range | undefined, options: FormattingOptions): Promise { + const document = documents.get(textDocument.uri); + if (document) { + let settings = await getDocumentSettings(document, () => true); + if (!settings) { + settings = globalSettings; } - return []; - }, [], `Error while formatting range for ${formatParams.textDocument.uri}`, token); + const unformattedTags: string = settings && settings.html && settings.html.format && settings.html.format.unformatted || ''; + const enabledModes = { css: !unformattedTags.match(/\bstyle\b/), javascript: !unformattedTags.match(/\bscript\b/) }; + + return format(languageModes, document, range ?? getFullRange(document), options, settings, enabledModes); + } + return []; + } + + connection.onDocumentRangeFormatting((formatParams, token) => { + return runSafe(() => onFormat(formatParams.textDocument, formatParams.range, formatParams.options), [], `Error while formatting range for ${formatParams.textDocument.uri}`, token); + }); + + connection.onDocumentFormatting((formatParams, token) => { + return runSafe(() => onFormat(formatParams.textDocument, undefined, formatParams.options), [], `Error while formatting ${formatParams.textDocument.uri}`, token); }); connection.onDocumentLinks((documentLinkParam, token) => { @@ -561,3 +571,7 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment) // Listen on the connection connection.listen(); } + +function getFullRange(document: TextDocument): Range { + return Range.create(Position.create(0, 0), document.positionAt(document.getText().length)); +} diff --git a/lib/vscode/extensions/html-language-features/server/src/languageModelCache.ts b/extensions/html-language-features/server/src/languageModelCache.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/languageModelCache.ts rename to extensions/html-language-features/server/src/languageModelCache.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/modes/cssMode.ts b/extensions/html-language-features/server/src/modes/cssMode.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/modes/cssMode.ts rename to extensions/html-language-features/server/src/modes/cssMode.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/modes/embeddedSupport.ts b/extensions/html-language-features/server/src/modes/embeddedSupport.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/modes/embeddedSupport.ts rename to extensions/html-language-features/server/src/modes/embeddedSupport.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/modes/formatting.ts b/extensions/html-language-features/server/src/modes/formatting.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/modes/formatting.ts rename to extensions/html-language-features/server/src/modes/formatting.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/modes/htmlFolding.ts b/extensions/html-language-features/server/src/modes/htmlFolding.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/modes/htmlFolding.ts rename to extensions/html-language-features/server/src/modes/htmlFolding.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/modes/htmlMode.ts b/extensions/html-language-features/server/src/modes/htmlMode.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/modes/htmlMode.ts rename to extensions/html-language-features/server/src/modes/htmlMode.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/modes/javascriptLibs.ts b/extensions/html-language-features/server/src/modes/javascriptLibs.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/modes/javascriptLibs.ts rename to extensions/html-language-features/server/src/modes/javascriptLibs.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/modes/javascriptMode.ts b/extensions/html-language-features/server/src/modes/javascriptMode.ts similarity index 99% rename from lib/vscode/extensions/html-language-features/server/src/modes/javascriptMode.ts rename to extensions/html-language-features/server/src/modes/javascriptMode.ts index 01e0b381d112..e6571c5bac0a 100644 --- a/lib/vscode/extensions/html-language-features/server/src/modes/javascriptMode.ts +++ b/extensions/html-language-features/server/src/modes/javascriptMode.ts @@ -127,7 +127,6 @@ export function getJavaScriptMode(documentRegions: LanguageModelCache { const jsDocument = jsDocuments.get(document); const jsLanguageService = await host.getLanguageService(jsDocument); - // @ts-expect-error until 4.3 protocol update let details = jsLanguageService.getCompletionEntryDetails(jsDocument.uri, item.data.offset, item.label, undefined, undefined, undefined, undefined); if (details) { item.detail = ts.displayPartsToString(details.displayParts); diff --git a/lib/vscode/extensions/html-language-features/server/src/modes/javascriptSemanticTokens.ts b/extensions/html-language-features/server/src/modes/javascriptSemanticTokens.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/modes/javascriptSemanticTokens.ts rename to extensions/html-language-features/server/src/modes/javascriptSemanticTokens.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/modes/languageModes.ts b/extensions/html-language-features/server/src/modes/languageModes.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/modes/languageModes.ts rename to extensions/html-language-features/server/src/modes/languageModes.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/modes/selectionRanges.ts b/extensions/html-language-features/server/src/modes/selectionRanges.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/modes/selectionRanges.ts rename to extensions/html-language-features/server/src/modes/selectionRanges.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/modes/semanticTokens.ts b/extensions/html-language-features/server/src/modes/semanticTokens.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/modes/semanticTokens.ts rename to extensions/html-language-features/server/src/modes/semanticTokens.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/node/htmlServerMain.ts b/extensions/html-language-features/server/src/node/htmlServerMain.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/node/htmlServerMain.ts rename to extensions/html-language-features/server/src/node/htmlServerMain.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/node/nodeFs.ts b/extensions/html-language-features/server/src/node/nodeFs.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/node/nodeFs.ts rename to extensions/html-language-features/server/src/node/nodeFs.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/requests.ts b/extensions/html-language-features/server/src/requests.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/requests.ts rename to extensions/html-language-features/server/src/requests.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/test/completions.test.ts b/extensions/html-language-features/server/src/test/completions.test.ts similarity index 95% rename from lib/vscode/extensions/html-language-features/server/src/test/completions.test.ts rename to extensions/html-language-features/server/src/test/completions.test.ts index 0371a2f74cd0..aaf3cb5ec6b8 100644 --- a/lib/vscode/extensions/html-language-features/server/src/test/completions.test.ts +++ b/extensions/html-language-features/server/src/test/completions.test.ts @@ -23,24 +23,24 @@ export function assertCompletion(completions: CompletionList, expected: ItemDesc return completion.label === expected.label; }); if (expected.notAvailable) { - assert.equal(matches.length, 0, `${expected.label} should not existing is results`); + assert.strictEqual(matches.length, 0, `${expected.label} should not existing is results`); return; } - assert.equal(matches.length, 1, `${expected.label} should only existing once: Actual: ${completions.items.map(c => c.label).join(', ')}`); + assert.strictEqual(matches.length, 1, `${expected.label} should only existing once: Actual: ${completions.items.map(c => c.label).join(', ')}`); let match = matches[0]; if (expected.documentation) { - assert.equal(match.documentation, expected.documentation); + assert.strictEqual(match.documentation, expected.documentation); } if (expected.kind) { - assert.equal(match.kind, expected.kind); + assert.strictEqual(match.kind, expected.kind); } if (expected.resultText && match.textEdit) { const edit = TextEdit.is(match.textEdit) ? match.textEdit : TextEdit.replace(match.textEdit.replace, match.textEdit.newText); - assert.equal(TextDocument.applyEdits(document, [edit]), expected.resultText); + assert.strictEqual(TextDocument.applyEdits(document, [edit]), expected.resultText); } if (expected.command) { - assert.deepEqual(match.command, expected.command); + assert.deepStrictEqual(match.command, expected.command); } } @@ -65,7 +65,7 @@ export async function testCompletionFor(value: string, expected: { count?: numbe let list = await mode.doComplete!(document, position, context); if (expected.count) { - assert.equal(list.items.length, expected.count); + assert.strictEqual(list.items.length, expected.count); } if (expected.items) { for (let item of expected.items) { diff --git a/extensions/html-language-features/server/src/test/documentContext.test.ts b/extensions/html-language-features/server/src/test/documentContext.test.ts new file mode 100644 index 000000000000..29ba68809723 --- /dev/null +++ b/extensions/html-language-features/server/src/test/documentContext.test.ts @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as assert from 'assert'; +import { getDocumentContext } from '../utils/documentContext'; + +suite('HTML Document Context', () => { + + test('Context', function (): any { + const docURI = 'file:///users/test/folder/test.html'; + const rootFolders = [{ name: '', uri: 'file:///users/test/' }]; + + let context = getDocumentContext(docURI, rootFolders); + assert.strictEqual(context.resolveReference('/', docURI), 'file:///users/test/'); + assert.strictEqual(context.resolveReference('/message.html', docURI), 'file:///users/test/message.html'); + assert.strictEqual(context.resolveReference('message.html', docURI), 'file:///users/test/folder/message.html'); + assert.strictEqual(context.resolveReference('message.html', 'file:///users/test/'), 'file:///users/test/message.html'); + }); +}); diff --git a/lib/vscode/extensions/html-language-features/server/src/test/embedded.test.ts b/extensions/html-language-features/server/src/test/embedded.test.ts similarity index 98% rename from lib/vscode/extensions/html-language-features/server/src/test/embedded.test.ts rename to extensions/html-language-features/server/src/test/embedded.test.ts index 525d5a59c112..005ecf0864c3 100644 --- a/lib/vscode/extensions/html-language-features/server/src/test/embedded.test.ts +++ b/extensions/html-language-features/server/src/test/embedded.test.ts @@ -23,7 +23,7 @@ suite('HTML Embedded Support', () => { const docRegions = embeddedSupport.getDocumentRegions(htmlLanguageService, document); const languageId = docRegions.getLanguageAtPosition(position); - assert.equal(languageId, expectedLanguageId); + assert.strictEqual(languageId, expectedLanguageId); } function assertEmbeddedLanguageContent(value: string, languageId: string, expectedContent: string): void { @@ -31,7 +31,7 @@ suite('HTML Embedded Support', () => { const docRegions = embeddedSupport.getDocumentRegions(htmlLanguageService, document); const content = docRegions.getEmbeddedDocument(languageId); - assert.equal(content.getText(), expectedContent); + assert.strictEqual(content.getText(), expectedContent); } test('Styles', function (): any { diff --git a/lib/vscode/extensions/html-language-features/server/src/test/fixtures/expected/19813-4spaces.html b/extensions/html-language-features/server/src/test/fixtures/expected/19813-4spaces.html similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/test/fixtures/expected/19813-4spaces.html rename to extensions/html-language-features/server/src/test/fixtures/expected/19813-4spaces.html diff --git a/lib/vscode/extensions/html-language-features/server/src/test/fixtures/expected/19813-tab.html b/extensions/html-language-features/server/src/test/fixtures/expected/19813-tab.html similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/test/fixtures/expected/19813-tab.html rename to extensions/html-language-features/server/src/test/fixtures/expected/19813-tab.html diff --git a/lib/vscode/extensions/html-language-features/server/src/test/fixtures/expected/19813.html b/extensions/html-language-features/server/src/test/fixtures/expected/19813.html similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/test/fixtures/expected/19813.html rename to extensions/html-language-features/server/src/test/fixtures/expected/19813.html diff --git a/lib/vscode/extensions/html-language-features/server/src/test/fixtures/expected/21634.html b/extensions/html-language-features/server/src/test/fixtures/expected/21634.html similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/test/fixtures/expected/21634.html rename to extensions/html-language-features/server/src/test/fixtures/expected/21634.html diff --git a/lib/vscode/extensions/html-language-features/server/src/test/fixtures/inputs/19813.html b/extensions/html-language-features/server/src/test/fixtures/inputs/19813.html similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/test/fixtures/inputs/19813.html rename to extensions/html-language-features/server/src/test/fixtures/inputs/19813.html diff --git a/lib/vscode/extensions/html-language-features/server/src/test/fixtures/inputs/21634.html b/extensions/html-language-features/server/src/test/fixtures/inputs/21634.html similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/test/fixtures/inputs/21634.html rename to extensions/html-language-features/server/src/test/fixtures/inputs/21634.html diff --git a/lib/vscode/extensions/html-language-features/server/src/test/folding.test.ts b/extensions/html-language-features/server/src/test/folding.test.ts similarity index 99% rename from lib/vscode/extensions/html-language-features/server/src/test/folding.test.ts rename to extensions/html-language-features/server/src/test/folding.test.ts index 693a74420f08..7bf90bb10d54 100644 --- a/lib/vscode/extensions/html-language-features/server/src/test/folding.test.ts +++ b/extensions/html-language-features/server/src/test/folding.test.ts @@ -30,7 +30,7 @@ async function assertRanges(lines: string[], expected: ExpectedIndentRange[], me actualRanges[i] = r(actual[i].startLine, actual[i].endLine, actual[i].kind); } actualRanges = actualRanges.sort((r1, r2) => r1.startLine - r2.startLine); - assert.deepEqual(actualRanges, expected, message); + assert.deepStrictEqual(actualRanges, expected, message); } function r(startLine: number, endLine: number, kind?: string): ExpectedIndentRange { diff --git a/lib/vscode/extensions/html-language-features/server/src/test/formatting.test.ts b/extensions/html-language-features/server/src/test/formatting.test.ts similarity index 99% rename from lib/vscode/extensions/html-language-features/server/src/test/formatting.test.ts rename to extensions/html-language-features/server/src/test/formatting.test.ts index d7c922c736a6..107001c7c007 100644 --- a/lib/vscode/extensions/html-language-features/server/src/test/formatting.test.ts +++ b/extensions/html-language-features/server/src/test/formatting.test.ts @@ -41,7 +41,7 @@ suite('HTML Embedded Formatting', () => { let result = await format(languageModes, document, range, formatOptions, undefined, { css: true, javascript: true }); let actual = TextDocument.applyEdits(document, result); - assert.equal(actual, expected, message); + assert.strictEqual(actual, expected, message); } async function assertFormatWithFixture(fixtureName: string, expectedPath: string, options?: any, formatOptions?: FormattingOptions): Promise { diff --git a/lib/vscode/extensions/html-language-features/server/src/test/pathCompletionFixtures/.foo.js b/extensions/html-language-features/server/src/test/pathCompletionFixtures/.foo.js similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/test/pathCompletionFixtures/.foo.js rename to extensions/html-language-features/server/src/test/pathCompletionFixtures/.foo.js diff --git a/lib/vscode/extensions/html-language-features/server/src/test/pathCompletionFixtures/about/about.css b/extensions/html-language-features/server/src/test/pathCompletionFixtures/about/about.css similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/test/pathCompletionFixtures/about/about.css rename to extensions/html-language-features/server/src/test/pathCompletionFixtures/about/about.css diff --git a/lib/vscode/extensions/html-language-features/server/src/test/pathCompletionFixtures/about/about.html b/extensions/html-language-features/server/src/test/pathCompletionFixtures/about/about.html similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/test/pathCompletionFixtures/about/about.html rename to extensions/html-language-features/server/src/test/pathCompletionFixtures/about/about.html diff --git a/lib/vscode/extensions/html-language-features/server/src/test/pathCompletionFixtures/about/media/icon.pic b/extensions/html-language-features/server/src/test/pathCompletionFixtures/about/media/icon.pic similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/test/pathCompletionFixtures/about/media/icon.pic rename to extensions/html-language-features/server/src/test/pathCompletionFixtures/about/media/icon.pic diff --git a/lib/vscode/extensions/html-language-features/server/src/test/pathCompletionFixtures/index.html b/extensions/html-language-features/server/src/test/pathCompletionFixtures/index.html similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/test/pathCompletionFixtures/index.html rename to extensions/html-language-features/server/src/test/pathCompletionFixtures/index.html diff --git a/lib/vscode/extensions/html-language-features/server/src/test/pathCompletionFixtures/src/feature.js b/extensions/html-language-features/server/src/test/pathCompletionFixtures/src/feature.js similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/test/pathCompletionFixtures/src/feature.js rename to extensions/html-language-features/server/src/test/pathCompletionFixtures/src/feature.js diff --git a/lib/vscode/extensions/html-language-features/server/src/test/pathCompletionFixtures/src/test.js b/extensions/html-language-features/server/src/test/pathCompletionFixtures/src/test.js similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/test/pathCompletionFixtures/src/test.js rename to extensions/html-language-features/server/src/test/pathCompletionFixtures/src/test.js diff --git a/lib/vscode/extensions/html-language-features/server/src/test/rename.test.ts b/extensions/html-language-features/server/src/test/rename.test.ts similarity index 97% rename from lib/vscode/extensions/html-language-features/server/src/test/rename.test.ts rename to extensions/html-language-features/server/src/test/rename.test.ts index 2705b56fdf87..edebe68d7b26 100644 --- a/lib/vscode/extensions/html-language-features/server/src/test/rename.test.ts +++ b/extensions/html-language-features/server/src/test/rename.test.ts @@ -34,7 +34,7 @@ async function testRename(value: string, newName: string, expectedDocContent: st } const newDocContent = TextDocument.applyEdits(document, edits); - assert.equal(newDocContent, expectedDocContent, `Expected: ${expectedDocContent}\nActual: ${newDocContent}`); + assert.strictEqual(newDocContent, expectedDocContent, `Expected: ${expectedDocContent}\nActual: ${newDocContent}`); } else { assert.fail('should have javascriptMode but no') } diff --git a/lib/vscode/extensions/html-language-features/server/src/test/selectionRanges.test.ts b/extensions/html-language-features/server/src/test/selectionRanges.test.ts similarity index 95% rename from lib/vscode/extensions/html-language-features/server/src/test/selectionRanges.test.ts rename to extensions/html-language-features/server/src/test/selectionRanges.test.ts index 9f9937bcaf73..c5166c7bb453 100644 --- a/lib/vscode/extensions/html-language-features/server/src/test/selectionRanges.test.ts +++ b/extensions/html-language-features/server/src/test/selectionRanges.test.ts @@ -5,7 +5,7 @@ import 'mocha'; import * as assert from 'assert'; -import { getLanguageModes, ClientCapabilities, TextDocument, SelectionRange} from '../modes/languageModes'; +import { getLanguageModes, ClientCapabilities, TextDocument, SelectionRange } from '../modes/languageModes'; import { getSelectionRanges } from '../modes/selectionRanges'; import { getNodeFSRequestService } from '../node/nodeFs'; @@ -23,7 +23,7 @@ async function assertRanges(content: string, expected: (number | string)[][]): P const document = TextDocument.create('test://foo.html', 'html', 1, content); const actualRanges = await getSelectionRanges(languageModes, document, [document.positionAt(offset)]); - assert.equal(actualRanges.length, 1); + assert.strictEqual(actualRanges.length, 1); const offsetPairs: [number, string][] = []; let curr: SelectionRange | undefined = actualRanges[0]; while (curr) { @@ -32,7 +32,7 @@ async function assertRanges(content: string, expected: (number | string)[][]): P } message += `${JSON.stringify(offsetPairs)}\n but should give:\n${JSON.stringify(expected)}\n`; - assert.deepEqual(offsetPairs, expected, message); + assert.deepStrictEqual(offsetPairs, expected, message); } suite('HTML SelectionRange', () => { diff --git a/lib/vscode/extensions/html-language-features/server/src/test/semanticTokens.test.ts b/extensions/html-language-features/server/src/test/semanticTokens.test.ts similarity index 99% rename from lib/vscode/extensions/html-language-features/server/src/test/semanticTokens.test.ts rename to extensions/html-language-features/server/src/test/semanticTokens.test.ts index 548ce7d84586..3cf242df18f1 100644 --- a/lib/vscode/extensions/html-language-features/server/src/test/semanticTokens.test.ts +++ b/extensions/html-language-features/server/src/test/semanticTokens.test.ts @@ -40,7 +40,7 @@ async function assertTokens(lines: string[], expected: ExpectedToken[], ranges?: lastLine = line; lastCharacter = character; } - assert.deepEqual(actualRanges, expected, message); + assert.deepStrictEqual(actualRanges, expected, message); } function t(startLine: number, character: number, length: number, tokenClassifiction: string): ExpectedToken { diff --git a/lib/vscode/extensions/html-language-features/server/src/test/words.test.ts b/extensions/html-language-features/server/src/test/words.test.ts similarity index 95% rename from lib/vscode/extensions/html-language-features/server/src/test/words.test.ts rename to extensions/html-language-features/server/src/test/words.test.ts index e094bfb4251b..f86ae969c666 100644 --- a/lib/vscode/extensions/html-language-features/server/src/test/words.test.ts +++ b/extensions/html-language-features/server/src/test/words.test.ts @@ -16,7 +16,7 @@ suite('HTML Words', () => { let actualRange = words.getWordAtText(value, offset, wordRegex); assert(actualRange.start <= offset); assert(actualRange.start + actualRange.length >= offset); - assert.equal(value.substr(actualRange.start, actualRange.length), expected); + assert.strictEqual(value.substr(actualRange.start, actualRange.length), expected); } @@ -41,4 +41,4 @@ suite('HTML Words', () => { assertWord('console.log("hello");\n\r |var x1 = new F(a, b);', 'var'); }); -}); \ No newline at end of file +}); diff --git a/lib/vscode/extensions/html-language-features/server/src/utils/arrays.ts b/extensions/html-language-features/server/src/utils/arrays.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/utils/arrays.ts rename to extensions/html-language-features/server/src/utils/arrays.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/utils/documentContext.ts b/extensions/html-language-features/server/src/utils/documentContext.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/utils/documentContext.ts rename to extensions/html-language-features/server/src/utils/documentContext.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/utils/positions.ts b/extensions/html-language-features/server/src/utils/positions.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/utils/positions.ts rename to extensions/html-language-features/server/src/utils/positions.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/utils/runner.ts b/extensions/html-language-features/server/src/utils/runner.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/utils/runner.ts rename to extensions/html-language-features/server/src/utils/runner.ts diff --git a/lib/vscode/extensions/html-language-features/server/src/utils/strings.ts b/extensions/html-language-features/server/src/utils/strings.ts similarity index 100% rename from lib/vscode/extensions/html-language-features/server/src/utils/strings.ts rename to extensions/html-language-features/server/src/utils/strings.ts diff --git a/lib/vscode/extensions/html-language-features/server/test/index.js b/extensions/html-language-features/server/test/index.js similarity index 100% rename from lib/vscode/extensions/html-language-features/server/test/index.js rename to extensions/html-language-features/server/test/index.js diff --git a/lib/vscode/extensions/html-language-features/server/tsconfig.json b/extensions/html-language-features/server/tsconfig.json similarity index 100% rename from lib/vscode/extensions/html-language-features/server/tsconfig.json rename to extensions/html-language-features/server/tsconfig.json diff --git a/extensions/html-language-features/server/yarn.lock b/extensions/html-language-features/server/yarn.lock new file mode 100644 index 000000000000..5a578b7ea202 --- /dev/null +++ b/extensions/html-language-features/server/yarn.lock @@ -0,0 +1,73 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/mocha@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44" + integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ== + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +vscode-css-languageservice@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-5.1.3.tgz#a7b2f21ed48842af5d9a98223bcae09e33d707d5" + integrity sha512-c8xiUhrDBNG6iS92FEE+K3IWOHAqVvzsqjjLSaXHyF5Qdn/6VhUweGNjtZ2CBSfs+Vkmz7pJzLQ7Io1x5deumA== + dependencies: + vscode-languageserver-textdocument "^1.0.1" + vscode-languageserver-types "^3.16.0" + vscode-nls "^5.0.0" + vscode-uri "^3.0.2" + +vscode-html-languageservice@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-4.0.4.tgz#f171f663e83037c8a5c5f4552a6b4771c1a9f017" + integrity sha512-WHXpLfj5NlCAgppDa6n5gQjW1YTTt72MVs0lkkuGQwTb5Sfdq8UhMjLDT82MuzqwV0QvmSBWlUbreGodzXleLg== + dependencies: + vscode-languageserver-textdocument "^1.0.1" + vscode-languageserver-types "^3.16.0" + vscode-nls "^5.0.0" + vscode-uri "^3.0.2" + +vscode-jsonrpc@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" + integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== + +vscode-languageserver-protocol@3.16.0: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" + integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== + dependencies: + vscode-jsonrpc "6.0.0" + vscode-languageserver-types "3.16.0" + +vscode-languageserver-textdocument@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz#178168e87efad6171b372add1dea34f53e5d330f" + integrity sha512-UIcJDjX7IFkck7cSkNNyzIz5FyvpQfY7sdzVy+wkKN/BLaD4DQ0ppXQrKePomCxTS7RrolK1I0pey0bG9eh8dA== + +vscode-languageserver-types@3.16.0, vscode-languageserver-types@^3.16.0: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" + integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== + +vscode-languageserver@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz#49b068c87cfcca93a356969d20f5d9bdd501c6b0" + integrity sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw== + dependencies: + vscode-languageserver-protocol "3.16.0" + +vscode-nls@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840" + integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA== + +vscode-uri@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.2.tgz#ecfd1d066cb8ef4c3a208decdbab9a8c23d055d0" + integrity sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA== diff --git a/extensions/html-language-features/yarn.lock b/extensions/html-language-features/yarn.lock new file mode 100644 index 000000000000..d14954d241fd --- /dev/null +++ b/extensions/html-language-features/yarn.lock @@ -0,0 +1,172 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +applicationinsights@1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" + integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== + dependencies: + cls-hooked "^4.2.2" + continuation-local-storage "^3.2.1" + diagnostic-channel "0.2.0" + diagnostic-channel-publishers "^0.3.3" + +async-hook-jl@^1.7.6: + version "1.7.6" + resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" + integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== + dependencies: + stack-chain "^1.3.7" + +async-listener@^0.6.0: + version "0.6.10" + resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" + integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== + dependencies: + semver "^5.3.0" + shimmer "^1.1.0" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +cls-hooked@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" + integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== + dependencies: + async-hook-jl "^1.7.6" + emitter-listener "^1.0.1" + semver "^5.4.1" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +continuation-local-storage@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" + integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== + dependencies: + async-listener "^0.6.0" + emitter-listener "^1.1.1" + +diagnostic-channel-publishers@^0.3.3: + version "0.3.5" + resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" + integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== + +diagnostic-channel@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" + integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= + dependencies: + semver "^5.3.0" + +emitter-listener@^1.0.1, emitter-listener@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" + integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== + dependencies: + shimmer "^1.2.0" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +semver@^5.3.0: + version "5.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" + integrity sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw== + +semver@^5.4.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^7.3.4: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + +shimmer@^1.1.0, shimmer@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + +stack-chain@^1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" + integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= + +vscode-extension-telemetry@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" + integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== + dependencies: + applicationinsights "1.7.4" + +vscode-jsonrpc@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" + integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== + +vscode-languageclient@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-7.0.0.tgz#b505c22c21ffcf96e167799757fca07a6bad0fb2" + integrity sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg== + dependencies: + minimatch "^3.0.4" + semver "^7.3.4" + vscode-languageserver-protocol "3.16.0" + +vscode-languageserver-protocol@3.16.0: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" + integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== + dependencies: + vscode-jsonrpc "6.0.0" + vscode-languageserver-types "3.16.0" + +vscode-languageserver-types@3.16.0: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" + integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== + +vscode-nls@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840" + integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== diff --git a/lib/vscode/extensions/html/.vscodeignore b/extensions/html/.vscodeignore similarity index 100% rename from lib/vscode/extensions/html/.vscodeignore rename to extensions/html/.vscodeignore diff --git a/lib/vscode/extensions/html/build/update-grammar.js b/extensions/html/build/update-grammar.js similarity index 100% rename from lib/vscode/extensions/html/build/update-grammar.js rename to extensions/html/build/update-grammar.js diff --git a/lib/vscode/extensions/html/cgmanifest.json b/extensions/html/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/html/cgmanifest.json rename to extensions/html/cgmanifest.json diff --git a/lib/vscode/extensions/html/language-configuration.json b/extensions/html/language-configuration.json similarity index 100% rename from lib/vscode/extensions/html/language-configuration.json rename to extensions/html/language-configuration.json diff --git a/lib/vscode/extensions/html/package.json b/extensions/html/package.json similarity index 100% rename from lib/vscode/extensions/html/package.json rename to extensions/html/package.json diff --git a/lib/vscode/extensions/html/package.nls.json b/extensions/html/package.nls.json similarity index 100% rename from lib/vscode/extensions/html/package.nls.json rename to extensions/html/package.nls.json diff --git a/lib/vscode/extensions/html/syntaxes/html-derivative.tmLanguage.json b/extensions/html/syntaxes/html-derivative.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/html/syntaxes/html-derivative.tmLanguage.json rename to extensions/html/syntaxes/html-derivative.tmLanguage.json diff --git a/lib/vscode/extensions/html/syntaxes/html.tmLanguage.json b/extensions/html/syntaxes/html.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/html/syntaxes/html.tmLanguage.json rename to extensions/html/syntaxes/html.tmLanguage.json diff --git a/lib/vscode/extensions/html/yarn.lock b/extensions/html/yarn.lock similarity index 100% rename from lib/vscode/extensions/html/yarn.lock rename to extensions/html/yarn.lock diff --git a/lib/vscode/extensions/image-preview/.vscodeignore b/extensions/image-preview/.vscodeignore similarity index 100% rename from lib/vscode/extensions/image-preview/.vscodeignore rename to extensions/image-preview/.vscodeignore diff --git a/lib/vscode/extensions/image-preview/README.md b/extensions/image-preview/README.md similarity index 100% rename from lib/vscode/extensions/image-preview/README.md rename to extensions/image-preview/README.md diff --git a/lib/vscode/extensions/image-preview/extension-browser.webpack.config.js b/extensions/image-preview/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/image-preview/extension-browser.webpack.config.js rename to extensions/image-preview/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/image-preview/extension.webpack.config.js b/extensions/image-preview/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/image-preview/extension.webpack.config.js rename to extensions/image-preview/extension.webpack.config.js diff --git a/lib/vscode/extensions/image-preview/icon.png b/extensions/image-preview/icon.png similarity index 100% rename from lib/vscode/extensions/image-preview/icon.png rename to extensions/image-preview/icon.png diff --git a/lib/vscode/extensions/image-preview/icon.svg b/extensions/image-preview/icon.svg similarity index 100% rename from lib/vscode/extensions/image-preview/icon.svg rename to extensions/image-preview/icon.svg diff --git a/lib/vscode/extensions/image-preview/media/loading-dark.svg b/extensions/image-preview/media/loading-dark.svg similarity index 100% rename from lib/vscode/extensions/image-preview/media/loading-dark.svg rename to extensions/image-preview/media/loading-dark.svg diff --git a/lib/vscode/extensions/image-preview/media/loading-hc.svg b/extensions/image-preview/media/loading-hc.svg similarity index 100% rename from lib/vscode/extensions/image-preview/media/loading-hc.svg rename to extensions/image-preview/media/loading-hc.svg diff --git a/lib/vscode/extensions/image-preview/media/loading.svg b/extensions/image-preview/media/loading.svg similarity index 100% rename from lib/vscode/extensions/image-preview/media/loading.svg rename to extensions/image-preview/media/loading.svg diff --git a/lib/vscode/extensions/image-preview/media/main.css b/extensions/image-preview/media/main.css similarity index 100% rename from lib/vscode/extensions/image-preview/media/main.css rename to extensions/image-preview/media/main.css diff --git a/lib/vscode/extensions/image-preview/media/main.js b/extensions/image-preview/media/main.js similarity index 100% rename from lib/vscode/extensions/image-preview/media/main.js rename to extensions/image-preview/media/main.js diff --git a/lib/vscode/extensions/image-preview/package.json b/extensions/image-preview/package.json similarity index 100% rename from lib/vscode/extensions/image-preview/package.json rename to extensions/image-preview/package.json diff --git a/lib/vscode/extensions/image-preview/package.nls.json b/extensions/image-preview/package.nls.json similarity index 100% rename from lib/vscode/extensions/image-preview/package.nls.json rename to extensions/image-preview/package.nls.json diff --git a/lib/vscode/extensions/image-preview/src/binarySizeStatusBarEntry.ts b/extensions/image-preview/src/binarySizeStatusBarEntry.ts similarity index 89% rename from lib/vscode/extensions/image-preview/src/binarySizeStatusBarEntry.ts rename to extensions/image-preview/src/binarySizeStatusBarEntry.ts index 0c983d37cd21..ce375fc19b80 100644 --- a/lib/vscode/extensions/image-preview/src/binarySizeStatusBarEntry.ts +++ b/extensions/image-preview/src/binarySizeStatusBarEntry.ts @@ -39,12 +39,7 @@ class BinarySize { export class BinarySizeStatusBarEntry extends PreviewStatusBarEntry { constructor() { - super({ - id: 'imagePreview.binarySize', - name: localize('sizeStatusBar.name', "Image Binary Size"), - alignment: vscode.StatusBarAlignment.Right, - priority: 100, - }); + super('status.imagePreview.binarySize', localize('sizeStatusBar.name', "Image Binary Size"), vscode.StatusBarAlignment.Right, 100); } public show(owner: string, size: number | undefined) { diff --git a/lib/vscode/extensions/image-preview/src/dispose.ts b/extensions/image-preview/src/dispose.ts similarity index 100% rename from lib/vscode/extensions/image-preview/src/dispose.ts rename to extensions/image-preview/src/dispose.ts diff --git a/lib/vscode/extensions/image-preview/src/extension.ts b/extensions/image-preview/src/extension.ts similarity index 100% rename from lib/vscode/extensions/image-preview/src/extension.ts rename to extensions/image-preview/src/extension.ts diff --git a/lib/vscode/extensions/image-preview/src/ownedStatusBarEntry.ts b/extensions/image-preview/src/ownedStatusBarEntry.ts similarity index 85% rename from lib/vscode/extensions/image-preview/src/ownedStatusBarEntry.ts rename to extensions/image-preview/src/ownedStatusBarEntry.ts index 51c9e25503cf..31165f67d69d 100644 --- a/lib/vscode/extensions/image-preview/src/ownedStatusBarEntry.ts +++ b/extensions/image-preview/src/ownedStatusBarEntry.ts @@ -11,9 +11,10 @@ export abstract class PreviewStatusBarEntry extends Disposable { protected readonly entry: vscode.StatusBarItem; - constructor(options: vscode.StatusBarItemOptions) { + constructor(id: string, name: string, alignment: vscode.StatusBarAlignment, priority: number) { super(); - this.entry = this._register(vscode.window.createStatusBarItem(options)); + this.entry = this._register(vscode.window.createStatusBarItem(id, alignment, priority)); + this.entry.name = name; } protected showItem(owner: string, text: string) { diff --git a/lib/vscode/extensions/image-preview/src/preview.ts b/extensions/image-preview/src/preview.ts similarity index 100% rename from lib/vscode/extensions/image-preview/src/preview.ts rename to extensions/image-preview/src/preview.ts diff --git a/lib/vscode/extensions/image-preview/src/sizeStatusBarEntry.ts b/extensions/image-preview/src/sizeStatusBarEntry.ts similarity index 77% rename from lib/vscode/extensions/image-preview/src/sizeStatusBarEntry.ts rename to extensions/image-preview/src/sizeStatusBarEntry.ts index e74eea0fe603..68e5c34d2325 100644 --- a/lib/vscode/extensions/image-preview/src/sizeStatusBarEntry.ts +++ b/extensions/image-preview/src/sizeStatusBarEntry.ts @@ -12,12 +12,7 @@ const localize = nls.loadMessageBundle(); export class SizeStatusBarEntry extends PreviewStatusBarEntry { constructor() { - super({ - id: 'imagePreview.size', - name: localize('sizeStatusBar.name', "Image Size"), - alignment: vscode.StatusBarAlignment.Right, - priority: 101 /* to the left of editor status (100) */, - }); + super('status.imagePreview.size', localize('sizeStatusBar.name', "Image Size"), vscode.StatusBarAlignment.Right, 101 /* to the left of editor status (100) */); } public show(owner: string, text: string) { diff --git a/lib/vscode/extensions/image-preview/src/typings/ref.d.ts b/extensions/image-preview/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/image-preview/src/typings/ref.d.ts rename to extensions/image-preview/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/image-preview/src/zoomStatusBarEntry.ts b/extensions/image-preview/src/zoomStatusBarEntry.ts similarity index 89% rename from lib/vscode/extensions/image-preview/src/zoomStatusBarEntry.ts rename to extensions/image-preview/src/zoomStatusBarEntry.ts index 18adc19d6d2b..a4fcdc2b604c 100644 --- a/lib/vscode/extensions/image-preview/src/zoomStatusBarEntry.ts +++ b/extensions/image-preview/src/zoomStatusBarEntry.ts @@ -19,12 +19,7 @@ export class ZoomStatusBarEntry extends OwnedStatusBarEntry { public readonly onDidChangeScale = this._onDidChangeScale.event; constructor() { - super({ - id: 'imagePreview.zoom', - name: localize('zoomStatusBar.name', "Image Zoom"), - alignment: vscode.StatusBarAlignment.Right, - priority: 102 /* to the left of editor size entry (101) */, - }); + super('status.imagePreview.zoom', localize('zoomStatusBar.name', "Image Zoom"), vscode.StatusBarAlignment.Right, 102 /* to the left of editor size entry (101) */); this._register(vscode.commands.registerCommand(selectZoomLevelCommandId, async () => { type MyPickItem = vscode.QuickPickItem & { scale: Scale }; diff --git a/lib/vscode/extensions/image-preview/tsconfig.json b/extensions/image-preview/tsconfig.json similarity index 100% rename from lib/vscode/extensions/image-preview/tsconfig.json rename to extensions/image-preview/tsconfig.json diff --git a/lib/vscode/extensions/image-preview/yarn.lock b/extensions/image-preview/yarn.lock similarity index 100% rename from lib/vscode/extensions/image-preview/yarn.lock rename to extensions/image-preview/yarn.lock diff --git a/lib/vscode/extensions/ini/.vscodeignore b/extensions/ini/.vscodeignore similarity index 100% rename from lib/vscode/extensions/ini/.vscodeignore rename to extensions/ini/.vscodeignore diff --git a/lib/vscode/extensions/ini/cgmanifest.json b/extensions/ini/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/ini/cgmanifest.json rename to extensions/ini/cgmanifest.json diff --git a/lib/vscode/extensions/ini/ini.language-configuration.json b/extensions/ini/ini.language-configuration.json similarity index 100% rename from lib/vscode/extensions/ini/ini.language-configuration.json rename to extensions/ini/ini.language-configuration.json diff --git a/lib/vscode/extensions/ini/package.json b/extensions/ini/package.json similarity index 100% rename from lib/vscode/extensions/ini/package.json rename to extensions/ini/package.json diff --git a/lib/vscode/extensions/ini/package.nls.json b/extensions/ini/package.nls.json similarity index 100% rename from lib/vscode/extensions/ini/package.nls.json rename to extensions/ini/package.nls.json diff --git a/lib/vscode/extensions/ini/properties.language-configuration.json b/extensions/ini/properties.language-configuration.json similarity index 100% rename from lib/vscode/extensions/ini/properties.language-configuration.json rename to extensions/ini/properties.language-configuration.json diff --git a/lib/vscode/extensions/ini/syntaxes/ini.tmLanguage.json b/extensions/ini/syntaxes/ini.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/ini/syntaxes/ini.tmLanguage.json rename to extensions/ini/syntaxes/ini.tmLanguage.json diff --git a/lib/vscode/extensions/ini/yarn.lock b/extensions/ini/yarn.lock similarity index 100% rename from lib/vscode/extensions/ini/yarn.lock rename to extensions/ini/yarn.lock diff --git a/lib/vscode/extensions/jake/.vscodeignore b/extensions/jake/.vscodeignore similarity index 100% rename from lib/vscode/extensions/jake/.vscodeignore rename to extensions/jake/.vscodeignore diff --git a/lib/vscode/extensions/jake/README.md b/extensions/jake/README.md similarity index 100% rename from lib/vscode/extensions/jake/README.md rename to extensions/jake/README.md diff --git a/lib/vscode/extensions/jake/extension.webpack.config.js b/extensions/jake/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/jake/extension.webpack.config.js rename to extensions/jake/extension.webpack.config.js diff --git a/lib/vscode/extensions/jake/images/cowboy_hat.png b/extensions/jake/images/cowboy_hat.png similarity index 100% rename from lib/vscode/extensions/jake/images/cowboy_hat.png rename to extensions/jake/images/cowboy_hat.png diff --git a/extensions/jake/package.json b/extensions/jake/package.json new file mode 100644 index 000000000000..244d12d96e56 --- /dev/null +++ b/extensions/jake/package.json @@ -0,0 +1,77 @@ +{ + "name": "jake", + "publisher": "vscode", + "description": "%description%", + "displayName": "%displayName%", + "icon": "images/cowboy_hat.png", + "version": "1.0.0", + "license": "MIT", + "engines": { + "vscode": "*" + }, + "categories": [ + "Other" + ], + "scripts": { + "compile": "gulp compile-extension:jake", + "watch": "gulp watch-extension:jake" + }, + "dependencies": { + "vscode-nls": "^4.0.0" + }, + "devDependencies": { + "@types/node": "14.x" + }, + "main": "./out/main", + "activationEvents": [ + "onCommand:workbench.action.tasks.runTask" + ], + "capabilities": { + "virtualWorkspaces": false, + "untrustedWorkspaces": { + "supported": true + } + }, + "contributes": { + "configuration": { + "id": "jake", + "type": "object", + "title": "Jake", + "properties": { + "jake.autoDetect": { + "scope": "application", + "type": "string", + "enum": [ + "off", + "on" + ], + "default": "off", + "description": "%config.jake.autoDetect%" + } + } + }, + "taskDefinitions": [ + { + "type": "jake", + "required": [ + "task" + ], + "properties": { + "task": { + "type": "string", + "description": "%jake.taskDefinition.type.description%" + }, + "file": { + "type": "string", + "description": "%jake.taskDefinition.file.description%" + } + }, + "when": "shellExecutionSupported" + } + ] + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/extensions/jake/package.nls.json b/extensions/jake/package.nls.json new file mode 100644 index 000000000000..e82030efcb81 --- /dev/null +++ b/extensions/jake/package.nls.json @@ -0,0 +1,7 @@ +{ + "description": "Extension to add Jake capabilities to VS Code.", + "displayName": "Jake support for VS Code", + "jake.taskDefinition.type.description": "The Jake task to customize.", + "jake.taskDefinition.file.description": "The Jake file that provides the task. Can be omitted.", + "config.jake.autoDetect": "Controls enablement of Jake task detection. Jake task detection can cause files in any open workspace to be executed." +} diff --git a/lib/vscode/extensions/jake/src/main.ts b/extensions/jake/src/main.ts similarity index 100% rename from lib/vscode/extensions/jake/src/main.ts rename to extensions/jake/src/main.ts diff --git a/lib/vscode/extensions/jake/src/typings/refs.d.ts b/extensions/jake/src/typings/refs.d.ts similarity index 100% rename from lib/vscode/extensions/jake/src/typings/refs.d.ts rename to extensions/jake/src/typings/refs.d.ts diff --git a/lib/vscode/extensions/jake/tsconfig.json b/extensions/jake/tsconfig.json similarity index 100% rename from lib/vscode/extensions/jake/tsconfig.json rename to extensions/jake/tsconfig.json diff --git a/extensions/jake/yarn.lock b/extensions/jake/yarn.lock new file mode 100644 index 000000000000..f7a30098ef45 --- /dev/null +++ b/extensions/jake/yarn.lock @@ -0,0 +1,13 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +vscode-nls@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" + integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== diff --git a/lib/vscode/extensions/java/.vscodeignore b/extensions/java/.vscodeignore similarity index 100% rename from lib/vscode/extensions/java/.vscodeignore rename to extensions/java/.vscodeignore diff --git a/lib/vscode/extensions/java/cgmanifest.json b/extensions/java/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/java/cgmanifest.json rename to extensions/java/cgmanifest.json diff --git a/lib/vscode/extensions/java/language-configuration.json b/extensions/java/language-configuration.json similarity index 100% rename from lib/vscode/extensions/java/language-configuration.json rename to extensions/java/language-configuration.json diff --git a/lib/vscode/extensions/java/package.json b/extensions/java/package.json similarity index 100% rename from lib/vscode/extensions/java/package.json rename to extensions/java/package.json diff --git a/lib/vscode/extensions/java/package.nls.json b/extensions/java/package.nls.json similarity index 100% rename from lib/vscode/extensions/java/package.nls.json rename to extensions/java/package.nls.json diff --git a/lib/vscode/extensions/java/snippets/java.code-snippets b/extensions/java/snippets/java.code-snippets similarity index 100% rename from lib/vscode/extensions/java/snippets/java.code-snippets rename to extensions/java/snippets/java.code-snippets diff --git a/lib/vscode/extensions/java/syntaxes/java.tmLanguage.json b/extensions/java/syntaxes/java.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/java/syntaxes/java.tmLanguage.json rename to extensions/java/syntaxes/java.tmLanguage.json diff --git a/lib/vscode/extensions/java/yarn.lock b/extensions/java/yarn.lock similarity index 100% rename from lib/vscode/extensions/java/yarn.lock rename to extensions/java/yarn.lock diff --git a/lib/vscode/extensions/javascript/.vscodeignore b/extensions/javascript/.vscodeignore similarity index 100% rename from lib/vscode/extensions/javascript/.vscodeignore rename to extensions/javascript/.vscodeignore diff --git a/lib/vscode/extensions/javascript/cgmanifest.json b/extensions/javascript/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/javascript/cgmanifest.json rename to extensions/javascript/cgmanifest.json diff --git a/lib/vscode/extensions/javascript/javascript-language-configuration.json b/extensions/javascript/javascript-language-configuration.json similarity index 100% rename from lib/vscode/extensions/javascript/javascript-language-configuration.json rename to extensions/javascript/javascript-language-configuration.json diff --git a/lib/vscode/extensions/javascript/package.json b/extensions/javascript/package.json similarity index 100% rename from lib/vscode/extensions/javascript/package.json rename to extensions/javascript/package.json diff --git a/lib/vscode/extensions/javascript/package.nls.json b/extensions/javascript/package.nls.json similarity index 100% rename from lib/vscode/extensions/javascript/package.nls.json rename to extensions/javascript/package.nls.json diff --git a/lib/vscode/extensions/javascript/snippets/javascript.code-snippets b/extensions/javascript/snippets/javascript.code-snippets similarity index 100% rename from lib/vscode/extensions/javascript/snippets/javascript.code-snippets rename to extensions/javascript/snippets/javascript.code-snippets diff --git a/lib/vscode/extensions/javascript/syntaxes/JavaScript.tmLanguage.json b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/javascript/syntaxes/JavaScript.tmLanguage.json rename to extensions/javascript/syntaxes/JavaScript.tmLanguage.json diff --git a/lib/vscode/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json b/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json rename to extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json diff --git a/lib/vscode/extensions/javascript/syntaxes/Readme.md b/extensions/javascript/syntaxes/Readme.md similarity index 100% rename from lib/vscode/extensions/javascript/syntaxes/Readme.md rename to extensions/javascript/syntaxes/Readme.md diff --git a/lib/vscode/extensions/javascript/syntaxes/Regular Expressions (JavaScript).tmLanguage b/extensions/javascript/syntaxes/Regular Expressions (JavaScript).tmLanguage similarity index 100% rename from lib/vscode/extensions/javascript/syntaxes/Regular Expressions (JavaScript).tmLanguage rename to extensions/javascript/syntaxes/Regular Expressions (JavaScript).tmLanguage diff --git a/lib/vscode/extensions/javascript/tags-language-configuration.json b/extensions/javascript/tags-language-configuration.json similarity index 100% rename from lib/vscode/extensions/javascript/tags-language-configuration.json rename to extensions/javascript/tags-language-configuration.json diff --git a/lib/vscode/extensions/javascript/yarn.lock b/extensions/javascript/yarn.lock similarity index 100% rename from lib/vscode/extensions/javascript/yarn.lock rename to extensions/javascript/yarn.lock diff --git a/lib/vscode/extensions/json-language-features/.vscode/launch.json b/extensions/json-language-features/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/json-language-features/.vscode/launch.json rename to extensions/json-language-features/.vscode/launch.json diff --git a/lib/vscode/extensions/json-language-features/.vscode/tasks.json b/extensions/json-language-features/.vscode/tasks.json similarity index 100% rename from lib/vscode/extensions/json-language-features/.vscode/tasks.json rename to extensions/json-language-features/.vscode/tasks.json diff --git a/lib/vscode/extensions/json-language-features/.vscodeignore b/extensions/json-language-features/.vscodeignore similarity index 100% rename from lib/vscode/extensions/json-language-features/.vscodeignore rename to extensions/json-language-features/.vscodeignore diff --git a/lib/vscode/extensions/json-language-features/CONTRIBUTING.md b/extensions/json-language-features/CONTRIBUTING.md similarity index 100% rename from lib/vscode/extensions/json-language-features/CONTRIBUTING.md rename to extensions/json-language-features/CONTRIBUTING.md diff --git a/lib/vscode/extensions/json-language-features/README.md b/extensions/json-language-features/README.md similarity index 100% rename from lib/vscode/extensions/json-language-features/README.md rename to extensions/json-language-features/README.md diff --git a/lib/vscode/extensions/json-language-features/client/src/browser/jsonClientMain.ts b/extensions/json-language-features/client/src/browser/jsonClientMain.ts similarity index 100% rename from lib/vscode/extensions/json-language-features/client/src/browser/jsonClientMain.ts rename to extensions/json-language-features/client/src/browser/jsonClientMain.ts diff --git a/lib/vscode/extensions/json-language-features/client/src/jsonClient.ts b/extensions/json-language-features/client/src/jsonClient.ts similarity index 99% rename from lib/vscode/extensions/json-language-features/client/src/jsonClient.ts rename to extensions/json-language-features/client/src/jsonClient.ts index c925a9181f61..611327188efc 100644 --- a/lib/vscode/extensions/json-language-features/client/src/jsonClient.ts +++ b/extensions/json-language-features/client/src/jsonClient.ts @@ -101,12 +101,8 @@ export function startClient(context: ExtensionContext, newLanguageClient: Langua const documentSelector = ['json', 'jsonc']; - const schemaResolutionErrorStatusBarItem = window.createStatusBarItem({ - id: 'status.json.resolveError', - name: localize('json.resolveError', "JSON: Schema Resolution Error"), - alignment: StatusBarAlignment.Right, - priority: 0, - }); + const schemaResolutionErrorStatusBarItem = window.createStatusBarItem('status.json.resolveError', StatusBarAlignment.Right, 0); + schemaResolutionErrorStatusBarItem.name = localize('json.resolveError', "JSON: Schema Resolution Error"); schemaResolutionErrorStatusBarItem.text = '$(alert)'; toDispose.push(schemaResolutionErrorStatusBarItem); diff --git a/lib/vscode/extensions/json-language-features/client/src/node/jsonClientMain.ts b/extensions/json-language-features/client/src/node/jsonClientMain.ts similarity index 100% rename from lib/vscode/extensions/json-language-features/client/src/node/jsonClientMain.ts rename to extensions/json-language-features/client/src/node/jsonClientMain.ts diff --git a/lib/vscode/extensions/json-language-features/client/src/requests.ts b/extensions/json-language-features/client/src/requests.ts similarity index 100% rename from lib/vscode/extensions/json-language-features/client/src/requests.ts rename to extensions/json-language-features/client/src/requests.ts diff --git a/lib/vscode/extensions/json-language-features/client/src/typings/ref.d.ts b/extensions/json-language-features/client/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/json-language-features/client/src/typings/ref.d.ts rename to extensions/json-language-features/client/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/json-language-features/client/src/utils/hash.ts b/extensions/json-language-features/client/src/utils/hash.ts similarity index 100% rename from lib/vscode/extensions/json-language-features/client/src/utils/hash.ts rename to extensions/json-language-features/client/src/utils/hash.ts diff --git a/lib/vscode/extensions/json-language-features/client/tsconfig.json b/extensions/json-language-features/client/tsconfig.json similarity index 100% rename from lib/vscode/extensions/json-language-features/client/tsconfig.json rename to extensions/json-language-features/client/tsconfig.json diff --git a/lib/vscode/extensions/json-language-features/extension-browser.webpack.config.js b/extensions/json-language-features/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/json-language-features/extension-browser.webpack.config.js rename to extensions/json-language-features/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/json-language-features/extension.webpack.config.js b/extensions/json-language-features/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/json-language-features/extension.webpack.config.js rename to extensions/json-language-features/extension.webpack.config.js diff --git a/lib/vscode/extensions/json-language-features/icons/json.png b/extensions/json-language-features/icons/json.png similarity index 100% rename from lib/vscode/extensions/json-language-features/icons/json.png rename to extensions/json-language-features/icons/json.png diff --git a/extensions/json-language-features/package.json b/extensions/json-language-features/package.json new file mode 100644 index 000000000000..4b832e4ebb6f --- /dev/null +++ b/extensions/json-language-features/package.json @@ -0,0 +1,149 @@ +{ + "name": "json-language-features", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "publisher": "vscode", + "license": "MIT", + "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", + "engines": { + "vscode": "0.10.x" + }, + "icon": "icons/json.png", + "activationEvents": [ + "onLanguage:json", + "onLanguage:jsonc" + ], + "main": "./client/out/node/jsonClientMain", + "browser": "./client/dist/browser/jsonClientMain", + "enableProposedApi": true, + "capabilities": { + "virtualWorkspaces": true, + "untrustedWorkspaces": { + "supported": true + } + }, + "scripts": { + "compile": "gulp compile-extension:json-language-features-client compile-extension:json-language-features-server", + "watch": "gulp watch-extension:json-language-features-client watch-extension:json-language-features-server", + "install-client-next": "yarn add vscode-languageclient@next" + }, + "categories": [ + "Programming Languages" + ], + "contributes": { + "configuration": { + "id": "json", + "order": 20, + "type": "object", + "title": "JSON", + "properties": { + "json.schemas": { + "type": "array", + "scope": "resource", + "description": "%json.schemas.desc%", + "items": { + "type": "object", + "default": { + "fileMatch": [ + "/myfile" + ], + "url": "schemaURL" + }, + "properties": { + "url": { + "type": "string", + "default": "/user.schema.json", + "description": "%json.schemas.url.desc%" + }, + "fileMatch": { + "type": "array", + "items": { + "type": "string", + "default": "MyFile.json", + "description": "%json.schemas.fileMatch.item.desc%" + }, + "minItems": 1, + "description": "%json.schemas.fileMatch.desc%" + }, + "schema": { + "$ref": "http://json-schema.org/draft-07/schema#", + "description": "%json.schemas.schema.desc%" + } + } + } + }, + "json.format.enable": { + "type": "boolean", + "scope": "window", + "default": true, + "description": "%json.format.enable.desc%" + }, + "json.trace.server": { + "type": "string", + "scope": "window", + "enum": [ + "off", + "messages", + "verbose" + ], + "default": "off", + "description": "%json.tracing.desc%" + }, + "json.colorDecorators.enable": { + "type": "boolean", + "scope": "window", + "default": true, + "description": "%json.colorDecorators.enable.desc%", + "deprecationMessage": "%json.colorDecorators.enable.deprecationMessage%" + }, + "json.maxItemsComputed": { + "type": "number", + "default": 5000, + "description": "%json.maxItemsComputed.desc%" + }, + "json.schemaDownload.enable": { + "type": "boolean", + "default": true, + "description": "%json.enableSchemaDownload.desc%", + "tags": [ + "usesOnlineServices" + ] + } + } + }, + "configurationDefaults": { + "[json]": { + "editor.quickSuggestions": { + "strings": true + }, + "editor.suggest.insertMode": "replace" + }, + "[jsonc]": { + "editor.quickSuggestions": { + "strings": true + }, + "editor.suggest.insertMode": "replace" + } + }, + "jsonValidation": [ + { + "fileMatch": "*.schema.json", + "url": "http://json-schema.org/draft-07/schema#" + } + ] + }, + "dependencies": { + "request-light": "^0.4.0", + "vscode-extension-telemetry": "0.1.7", + "vscode-languageclient": "^7.0.0", + "vscode-nls": "^5.0.0" + }, + "devDependencies": { + "@types/node": "14.x" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/json-language-features/package.nls.json b/extensions/json-language-features/package.nls.json similarity index 100% rename from lib/vscode/extensions/json-language-features/package.nls.json rename to extensions/json-language-features/package.nls.json diff --git a/lib/vscode/extensions/json-language-features/server/.npmignore b/extensions/json-language-features/server/.npmignore similarity index 100% rename from lib/vscode/extensions/json-language-features/server/.npmignore rename to extensions/json-language-features/server/.npmignore diff --git a/lib/vscode/extensions/json-language-features/server/.vscode/launch.json b/extensions/json-language-features/server/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/json-language-features/server/.vscode/launch.json rename to extensions/json-language-features/server/.vscode/launch.json diff --git a/lib/vscode/extensions/json-language-features/server/.vscode/tasks.json b/extensions/json-language-features/server/.vscode/tasks.json similarity index 100% rename from lib/vscode/extensions/json-language-features/server/.vscode/tasks.json rename to extensions/json-language-features/server/.vscode/tasks.json diff --git a/lib/vscode/extensions/json-language-features/server/README.md b/extensions/json-language-features/server/README.md similarity index 100% rename from lib/vscode/extensions/json-language-features/server/README.md rename to extensions/json-language-features/server/README.md diff --git a/lib/vscode/extensions/json-language-features/server/bin/vscode-json-languageserver b/extensions/json-language-features/server/bin/vscode-json-languageserver similarity index 100% rename from lib/vscode/extensions/json-language-features/server/bin/vscode-json-languageserver rename to extensions/json-language-features/server/bin/vscode-json-languageserver diff --git a/lib/vscode/extensions/json-language-features/server/extension-browser.webpack.config.js b/extensions/json-language-features/server/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/json-language-features/server/extension-browser.webpack.config.js rename to extensions/json-language-features/server/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/json-language-features/server/extension.webpack.config.js b/extensions/json-language-features/server/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/json-language-features/server/extension.webpack.config.js rename to extensions/json-language-features/server/extension.webpack.config.js diff --git a/extensions/json-language-features/server/package.json b/extensions/json-language-features/server/package.json new file mode 100644 index 000000000000..49926f97faed --- /dev/null +++ b/extensions/json-language-features/server/package.json @@ -0,0 +1,36 @@ +{ + "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": { + "jsonc-parser": "^3.0.0", + "request-light": "^0.4.0", + "vscode-json-languageservice": "^4.1.4", + "vscode-languageserver": "^7.0.0", + "vscode-uri": "^3.0.2" + }, + "devDependencies": { + "@types/mocha": "^8.2.0", + "@types/node": "14.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" + } +} diff --git a/lib/vscode/extensions/json-language-features/server/src/browser/jsonServerMain.ts b/extensions/json-language-features/server/src/browser/jsonServerMain.ts similarity index 100% rename from lib/vscode/extensions/json-language-features/server/src/browser/jsonServerMain.ts rename to extensions/json-language-features/server/src/browser/jsonServerMain.ts diff --git a/lib/vscode/extensions/json-language-features/server/src/jsonServer.ts b/extensions/json-language-features/server/src/jsonServer.ts similarity index 90% rename from lib/vscode/extensions/json-language-features/server/src/jsonServer.ts rename to extensions/json-language-features/server/src/jsonServer.ts index 0266d536c265..bb3538a0c985 100644 --- a/lib/vscode/extensions/json-language-features/server/src/jsonServer.ts +++ b/extensions/json-language-features/server/src/jsonServer.ts @@ -6,7 +6,7 @@ import { Connection, TextDocuments, InitializeParams, InitializeResult, NotificationType, RequestType, - DocumentRangeFormattingRequest, Disposable, ServerCapabilities, TextDocumentSyncKind, TextEdit + DocumentRangeFormattingRequest, Disposable, ServerCapabilities, TextDocumentSyncKind, TextEdit, DocumentFormattingRequest, TextDocumentIdentifier, FormattingOptions } from 'vscode-languageserver'; import { formatError, runSafe, runSafeAsync } from './utils/runner'; @@ -138,6 +138,7 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment) hoverProvider: true, documentSymbolProvider: true, documentRangeFormattingProvider: params.initializationOptions?.provideFormatter === true, + documentFormattingProvider: params.initializationOptions?.provideFormatter === true, colorProvider: {}, foldingRangeProvider: true, selectionRangeProvider: true, @@ -206,7 +207,7 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment) let jsonConfigurationSettings: JSONSchemaSettings[] | undefined = undefined; let schemaAssociations: ISchemaAssociations | SchemaConfiguration[] | undefined = undefined; - let formatterRegistration: Thenable | null = null; + let formatterRegistrations: Thenable[] | null = null; // The settings have changed. Is send on server activation as well. connection.onDidChangeConfiguration((change) => { @@ -224,12 +225,16 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment) if (dynamicFormatterRegistration) { const enableFormatter = settings && settings.json && settings.json.format && settings.json.format.enable; if (enableFormatter) { - if (!formatterRegistration) { - formatterRegistration = connection.client.register(DocumentRangeFormattingRequest.type, { documentSelector: [{ language: 'json' }, { language: 'jsonc' }] }); + if (!formatterRegistrations) { + const documentSelector = [{ language: 'json' }, { language: 'jsonc' }]; + formatterRegistrations = [ + connection.client.register(DocumentRangeFormattingRequest.type, { documentSelector }), + connection.client.register(DocumentFormattingRequest.type, { documentSelector }) + ]; } - } else if (formatterRegistration) { - formatterRegistration.then(r => r.dispose()); - formatterRegistration = null; + } else if (formatterRegistrations) { + formatterRegistrations.forEach(p => p.then(r => r.dispose())); + formatterRegistrations = null; } } }); @@ -420,19 +425,25 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment) }, [], `Error while computing document symbols for ${documentSymbolParams.textDocument.uri}`, token); }); - connection.onDocumentRangeFormatting((formatParams, token) => { - return runSafe(() => { - const document = documents.get(formatParams.textDocument.uri); - if (document) { - const edits = languageService.format(document, formatParams.range, formatParams.options); - if (edits.length > formatterMaxNumberOfEdits) { - const newText = TextDocument.applyEdits(document, edits); - return [TextEdit.replace(Range.create(Position.create(0, 0), document.positionAt(document.getText().length)), newText)]; - } - return edits; + function onFormat(textDocument: TextDocumentIdentifier, range: Range | undefined, options: FormattingOptions): TextEdit[] { + const document = documents.get(textDocument.uri); + if (document) { + const edits = languageService.format(document, range ?? getFullRange(document), options); + if (edits.length > formatterMaxNumberOfEdits) { + const newText = TextDocument.applyEdits(document, edits); + return [TextEdit.replace(getFullRange(document), newText)]; } - return []; - }, [], `Error while formatting range for ${formatParams.textDocument.uri}`, token); + return edits; + } + return []; + } + + connection.onDocumentRangeFormatting((formatParams, token) => { + return runSafe(() => onFormat(formatParams.textDocument, formatParams.range, formatParams.options), [], `Error while formatting range for ${formatParams.textDocument.uri}`, token); + }); + + connection.onDocumentFormatting((formatParams, token) => { + return runSafe(() => onFormat(formatParams.textDocument, undefined, formatParams.options), [], `Error while formatting ${formatParams.textDocument.uri}`, token); }); connection.onDocumentColor((params, token) => { @@ -495,3 +506,7 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment) // Listen on the connection connection.listen(); } + +function getFullRange(document: TextDocument): Range { + return Range.create(Position.create(0, 0), document.positionAt(document.getText().length)); +} diff --git a/lib/vscode/extensions/json-language-features/server/src/languageModelCache.ts b/extensions/json-language-features/server/src/languageModelCache.ts similarity index 100% rename from lib/vscode/extensions/json-language-features/server/src/languageModelCache.ts rename to extensions/json-language-features/server/src/languageModelCache.ts diff --git a/lib/vscode/extensions/json-language-features/server/src/node/jsonServerMain.ts b/extensions/json-language-features/server/src/node/jsonServerMain.ts similarity index 100% rename from lib/vscode/extensions/json-language-features/server/src/node/jsonServerMain.ts rename to extensions/json-language-features/server/src/node/jsonServerMain.ts diff --git a/lib/vscode/extensions/json-language-features/server/src/requests.ts b/extensions/json-language-features/server/src/requests.ts similarity index 100% rename from lib/vscode/extensions/json-language-features/server/src/requests.ts rename to extensions/json-language-features/server/src/requests.ts diff --git a/lib/vscode/extensions/json-language-features/server/src/utils/runner.ts b/extensions/json-language-features/server/src/utils/runner.ts similarity index 100% rename from lib/vscode/extensions/json-language-features/server/src/utils/runner.ts rename to extensions/json-language-features/server/src/utils/runner.ts diff --git a/lib/vscode/extensions/json-language-features/server/src/utils/strings.ts b/extensions/json-language-features/server/src/utils/strings.ts similarity index 100% rename from lib/vscode/extensions/json-language-features/server/src/utils/strings.ts rename to extensions/json-language-features/server/src/utils/strings.ts diff --git a/lib/vscode/extensions/json-language-features/server/test/mocha.opts b/extensions/json-language-features/server/test/mocha.opts similarity index 100% rename from lib/vscode/extensions/json-language-features/server/test/mocha.opts rename to extensions/json-language-features/server/test/mocha.opts diff --git a/lib/vscode/extensions/json-language-features/server/tsconfig.json b/extensions/json-language-features/server/tsconfig.json similarity index 100% rename from lib/vscode/extensions/json-language-features/server/tsconfig.json rename to extensions/json-language-features/server/tsconfig.json diff --git a/extensions/json-language-features/server/yarn.lock b/extensions/json-language-features/server/yarn.lock new file mode 100644 index 000000000000..abe012c86ae8 --- /dev/null +++ b/extensions/json-language-features/server/yarn.lock @@ -0,0 +1,163 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/mocha@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44" + integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ== + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +agent-base@4: + version "4.1.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.1.2.tgz#80fa6cde440f4dcf9af2617cf246099b5d99f0c8" + integrity sha512-VE6QoEdaugY86BohRtfGmTDabxdU5sCKOkbcPA6PXKJsRzEi/7A3RCTxJal1ft/4qSfPht5/iQLhMh/wzSkkNw== + dependencies: + es6-promisify "^5.0.0" + +agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +debug@3.1.0, debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + +es6-promise@^4.0.3: + version "4.1.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a" + integrity sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= + dependencies: + es6-promise "^4.0.3" + +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== + dependencies: + agent-base "4" + debug "3.1.0" + +https-proxy-agent@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + +jsonc-parser@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" + integrity sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA== + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +request-light@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/request-light/-/request-light-0.4.0.tgz#c6b91ef00b18cb0de75d2127e55b3a2c9f7f90f9" + integrity sha512-fimzjIVw506FBZLspTAXHdpvgvQebyjpNyLRd0e6drPPRq7gcrROeGWRyF81wLqFg5ijPgnOQbmfck5wdTqpSA== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + vscode-nls "^4.1.2" + +vscode-json-languageservice@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-4.1.4.tgz#c83d3d812f8f17ab525724c611d8ff5e8834fc84" + integrity sha512-/UqaE58BVFdePM9l971L6xPRLlCLNk01aovf1Pp9hB/8pytmd2s9ZNEnS1JqYyQEJ1k5/fEBsWOdhQlNo4H7VA== + dependencies: + jsonc-parser "^3.0.0" + minimatch "^3.0.4" + vscode-languageserver-textdocument "^1.0.1" + vscode-languageserver-types "^3.16.0" + vscode-nls "^5.0.0" + vscode-uri "^3.0.2" + +vscode-jsonrpc@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" + integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== + +vscode-languageserver-protocol@3.16.0: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" + integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== + dependencies: + vscode-jsonrpc "6.0.0" + vscode-languageserver-types "3.16.0" + +vscode-languageserver-textdocument@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz#178168e87efad6171b372add1dea34f53e5d330f" + integrity sha512-UIcJDjX7IFkck7cSkNNyzIz5FyvpQfY7sdzVy+wkKN/BLaD4DQ0ppXQrKePomCxTS7RrolK1I0pey0bG9eh8dA== + +vscode-languageserver-types@3.16.0, vscode-languageserver-types@^3.16.0: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" + integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== + +vscode-languageserver@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz#49b068c87cfcca93a356969d20f5d9bdd501c6b0" + integrity sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw== + dependencies: + vscode-languageserver-protocol "3.16.0" + +vscode-nls@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" + integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== + +vscode-nls@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840" + integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA== + +vscode-uri@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.2.tgz#ecfd1d066cb8ef4c3a208decdbab9a8c23d055d0" + integrity sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA== diff --git a/extensions/json-language-features/yarn.lock b/extensions/json-language-features/yarn.lock new file mode 100644 index 000000000000..4ba9b7b63016 --- /dev/null +++ b/extensions/json-language-features/yarn.lock @@ -0,0 +1,252 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +agent-base@4: + version "4.2.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" + integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== + dependencies: + es6-promisify "^5.0.0" + +agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + +applicationinsights@1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" + integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== + dependencies: + cls-hooked "^4.2.2" + continuation-local-storage "^3.2.1" + diagnostic-channel "0.2.0" + diagnostic-channel-publishers "^0.3.3" + +async-hook-jl@^1.7.6: + version "1.7.6" + resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" + integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== + dependencies: + stack-chain "^1.3.7" + +async-listener@^0.6.0: + version "0.6.10" + resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" + integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== + dependencies: + semver "^5.3.0" + shimmer "^1.1.0" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +cls-hooked@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" + integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== + dependencies: + async-hook-jl "^1.7.6" + emitter-listener "^1.0.1" + semver "^5.4.1" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +continuation-local-storage@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" + integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== + dependencies: + async-listener "^0.6.0" + emitter-listener "^1.1.1" + +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + +debug@^3.1.0: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +diagnostic-channel-publishers@^0.3.3: + version "0.3.5" + resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" + integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== + +diagnostic-channel@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" + integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= + dependencies: + semver "^5.3.0" + +emitter-listener@^1.0.1, emitter-listener@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" + integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== + dependencies: + shimmer "^1.2.0" + +es6-promise@^4.0.3: + version "4.2.6" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.6.tgz#b685edd8258886365ea62b57d30de28fadcd974f" + integrity sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= + dependencies: + es6-promise "^4.0.3" + +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== + dependencies: + agent-base "4" + debug "3.1.0" + +https-proxy-agent@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +request-light@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/request-light/-/request-light-0.4.0.tgz#c6b91ef00b18cb0de75d2127e55b3a2c9f7f90f9" + integrity sha512-fimzjIVw506FBZLspTAXHdpvgvQebyjpNyLRd0e6drPPRq7gcrROeGWRyF81wLqFg5ijPgnOQbmfck5wdTqpSA== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + vscode-nls "^4.1.2" + +semver@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== + +semver@^5.4.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^7.3.4: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + +shimmer@^1.1.0, shimmer@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + +stack-chain@^1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" + integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= + +vscode-extension-telemetry@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" + integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== + dependencies: + applicationinsights "1.7.4" + +vscode-jsonrpc@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" + integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== + +vscode-languageclient@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-7.0.0.tgz#b505c22c21ffcf96e167799757fca07a6bad0fb2" + integrity sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg== + dependencies: + minimatch "^3.0.4" + semver "^7.3.4" + vscode-languageserver-protocol "3.16.0" + +vscode-languageserver-protocol@3.16.0: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" + integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== + dependencies: + vscode-jsonrpc "6.0.0" + vscode-languageserver-types "3.16.0" + +vscode-languageserver-types@3.16.0: + version "3.16.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" + integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== + +vscode-nls@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" + integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== + +vscode-nls@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840" + integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== diff --git a/lib/vscode/extensions/json/.vscodeignore b/extensions/json/.vscodeignore similarity index 100% rename from lib/vscode/extensions/json/.vscodeignore rename to extensions/json/.vscodeignore diff --git a/lib/vscode/extensions/json/build/update-grammars.js b/extensions/json/build/update-grammars.js similarity index 100% rename from lib/vscode/extensions/json/build/update-grammars.js rename to extensions/json/build/update-grammars.js diff --git a/lib/vscode/extensions/json/cgmanifest.json b/extensions/json/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/json/cgmanifest.json rename to extensions/json/cgmanifest.json diff --git a/lib/vscode/extensions/json/language-configuration.json b/extensions/json/language-configuration.json similarity index 100% rename from lib/vscode/extensions/json/language-configuration.json rename to extensions/json/language-configuration.json diff --git a/extensions/json/package.json b/extensions/json/package.json new file mode 100644 index 000000000000..8f197c31181c --- /dev/null +++ b/extensions/json/package.json @@ -0,0 +1,85 @@ +{ + "name": "json", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "publisher": "vscode", + "license": "MIT", + "engines": { + "vscode": "0.10.x" + }, + "scripts": { + "update-grammar": "node ./build/update-grammars.js" + }, + "contributes": { + "languages": [ + { + "id": "json", + "aliases": [ + "JSON", + "json" + ], + "extensions": [ + ".json", + ".bowerrc", + ".jscsrc", + ".webmanifest", + ".js.map", + ".css.map", + ".ts.map", + ".har", + ".jslintrc", + ".jsonld", + ".ipynb" + ], + "filenames": [ + "composer.lock", + ".watchmanconfig" + ], + "mimetypes": [ + "application/json", + "application/manifest+json" + ], + "configuration": "./language-configuration.json" + }, + { + "id": "jsonc", + "aliases": [ + "JSON with Comments" + ], + "extensions": [ + ".jsonc", + ".eslintrc", + ".eslintrc.json", + ".jsfmtrc", + ".jshintrc", + ".swcrc", + ".hintrc", + ".babelrc" + ], + "filenames": [ + "babel.config.json", + ".babelrc.json", + ".ember-cli" + ], + "configuration": "./language-configuration.json" + } + ], + "grammars": [ + { + "language": "json", + "scopeName": "source.json", + "path": "./syntaxes/JSON.tmLanguage.json" + }, + { + "language": "jsonc", + "scopeName": "source.json.comments", + "path": "./syntaxes/JSONC.tmLanguage.json" + } + ] + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/json/package.nls.json b/extensions/json/package.nls.json similarity index 100% rename from lib/vscode/extensions/json/package.nls.json rename to extensions/json/package.nls.json diff --git a/lib/vscode/extensions/json/syntaxes/JSON.tmLanguage.json b/extensions/json/syntaxes/JSON.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/json/syntaxes/JSON.tmLanguage.json rename to extensions/json/syntaxes/JSON.tmLanguage.json diff --git a/lib/vscode/extensions/json/syntaxes/JSONC.tmLanguage.json b/extensions/json/syntaxes/JSONC.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/json/syntaxes/JSONC.tmLanguage.json rename to extensions/json/syntaxes/JSONC.tmLanguage.json diff --git a/lib/vscode/extensions/json/yarn.lock b/extensions/json/yarn.lock similarity index 100% rename from lib/vscode/extensions/json/yarn.lock rename to extensions/json/yarn.lock diff --git a/extensions/julia/.vscodeignore b/extensions/julia/.vscodeignore new file mode 100644 index 000000000000..d9011becfb64 --- /dev/null +++ b/extensions/julia/.vscodeignore @@ -0,0 +1,2 @@ +build/** +cgmanifest.json diff --git a/extensions/julia/cgmanifest.json b/extensions/julia/cgmanifest.json new file mode 100644 index 000000000000..e2f4268ed2fa --- /dev/null +++ b/extensions/julia/cgmanifest.json @@ -0,0 +1,17 @@ +{ + "registrations": [ + { + "component": { + "type": "git", + "git": { + "name": "JuliaEditorSupport/atom-language-julia", + "repositoryUrl": "https://github.com/JuliaEditorSupport/atom-language-julia", + "commitHash": "008e02c5ec9440fa9f0ea8a891712c7238f24706" + } + }, + "license": "MIT", + "version": "0.21.0" + } + ], + "version": 1 +} diff --git a/lib/vscode/extensions/julia/language-configuration.json b/extensions/julia/language-configuration.json similarity index 100% rename from lib/vscode/extensions/julia/language-configuration.json rename to extensions/julia/language-configuration.json diff --git a/lib/vscode/extensions/julia/package.json b/extensions/julia/package.json similarity index 100% rename from lib/vscode/extensions/julia/package.json rename to extensions/julia/package.json diff --git a/lib/vscode/extensions/julia/package.nls.json b/extensions/julia/package.nls.json similarity index 100% rename from lib/vscode/extensions/julia/package.nls.json rename to extensions/julia/package.nls.json diff --git a/lib/vscode/extensions/julia/syntaxes/julia.tmLanguage.json b/extensions/julia/syntaxes/julia.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/julia/syntaxes/julia.tmLanguage.json rename to extensions/julia/syntaxes/julia.tmLanguage.json diff --git a/lib/vscode/extensions/less/.vscodeignore b/extensions/less/.vscodeignore similarity index 100% rename from lib/vscode/extensions/less/.vscodeignore rename to extensions/less/.vscodeignore diff --git a/lib/vscode/extensions/less/cgmanifest.json b/extensions/less/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/less/cgmanifest.json rename to extensions/less/cgmanifest.json diff --git a/lib/vscode/extensions/less/language-configuration.json b/extensions/less/language-configuration.json similarity index 100% rename from lib/vscode/extensions/less/language-configuration.json rename to extensions/less/language-configuration.json diff --git a/lib/vscode/extensions/less/package.json b/extensions/less/package.json similarity index 100% rename from lib/vscode/extensions/less/package.json rename to extensions/less/package.json diff --git a/lib/vscode/extensions/less/package.nls.json b/extensions/less/package.nls.json similarity index 100% rename from lib/vscode/extensions/less/package.nls.json rename to extensions/less/package.nls.json diff --git a/lib/vscode/extensions/less/syntaxes/less.tmLanguage.json b/extensions/less/syntaxes/less.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/less/syntaxes/less.tmLanguage.json rename to extensions/less/syntaxes/less.tmLanguage.json diff --git a/lib/vscode/extensions/less/yarn.lock b/extensions/less/yarn.lock similarity index 100% rename from lib/vscode/extensions/less/yarn.lock rename to extensions/less/yarn.lock diff --git a/lib/vscode/extensions/log/.vscodeignore b/extensions/log/.vscodeignore similarity index 100% rename from lib/vscode/extensions/log/.vscodeignore rename to extensions/log/.vscodeignore diff --git a/lib/vscode/extensions/log/cgmanifest.json b/extensions/log/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/log/cgmanifest.json rename to extensions/log/cgmanifest.json diff --git a/lib/vscode/extensions/log/package.json b/extensions/log/package.json similarity index 100% rename from lib/vscode/extensions/log/package.json rename to extensions/log/package.json diff --git a/lib/vscode/extensions/log/package.nls.json b/extensions/log/package.nls.json similarity index 100% rename from lib/vscode/extensions/log/package.nls.json rename to extensions/log/package.nls.json diff --git a/lib/vscode/extensions/log/syntaxes/log.tmLanguage.json b/extensions/log/syntaxes/log.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/log/syntaxes/log.tmLanguage.json rename to extensions/log/syntaxes/log.tmLanguage.json diff --git a/lib/vscode/extensions/log/yarn.lock b/extensions/log/yarn.lock similarity index 100% rename from lib/vscode/extensions/log/yarn.lock rename to extensions/log/yarn.lock diff --git a/lib/vscode/extensions/lua/.vscodeignore b/extensions/lua/.vscodeignore similarity index 100% rename from lib/vscode/extensions/lua/.vscodeignore rename to extensions/lua/.vscodeignore diff --git a/lib/vscode/extensions/lua/cgmanifest.json b/extensions/lua/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/lua/cgmanifest.json rename to extensions/lua/cgmanifest.json diff --git a/lib/vscode/extensions/lua/language-configuration.json b/extensions/lua/language-configuration.json similarity index 100% rename from lib/vscode/extensions/lua/language-configuration.json rename to extensions/lua/language-configuration.json diff --git a/lib/vscode/extensions/lua/package.json b/extensions/lua/package.json similarity index 100% rename from lib/vscode/extensions/lua/package.json rename to extensions/lua/package.json diff --git a/lib/vscode/extensions/lua/package.nls.json b/extensions/lua/package.nls.json similarity index 100% rename from lib/vscode/extensions/lua/package.nls.json rename to extensions/lua/package.nls.json diff --git a/lib/vscode/extensions/lua/syntaxes/lua.tmLanguage.json b/extensions/lua/syntaxes/lua.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/lua/syntaxes/lua.tmLanguage.json rename to extensions/lua/syntaxes/lua.tmLanguage.json diff --git a/lib/vscode/extensions/lua/yarn.lock b/extensions/lua/yarn.lock similarity index 100% rename from lib/vscode/extensions/lua/yarn.lock rename to extensions/lua/yarn.lock diff --git a/lib/vscode/extensions/make/.vscodeignore b/extensions/make/.vscodeignore similarity index 100% rename from lib/vscode/extensions/make/.vscodeignore rename to extensions/make/.vscodeignore diff --git a/lib/vscode/extensions/make/cgmanifest.json b/extensions/make/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/make/cgmanifest.json rename to extensions/make/cgmanifest.json diff --git a/lib/vscode/extensions/make/language-configuration.json b/extensions/make/language-configuration.json similarity index 100% rename from lib/vscode/extensions/make/language-configuration.json rename to extensions/make/language-configuration.json diff --git a/extensions/make/package.json b/extensions/make/package.json new file mode 100644 index 000000000000..89a5134c64de --- /dev/null +++ b/extensions/make/package.json @@ -0,0 +1,56 @@ +{ + "name": "make", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "publisher": "vscode", + "license": "MIT", + "engines": { + "vscode": "*" + }, + "scripts": { + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin fadeevab/make.tmbundle Syntaxes/Makefile.plist ./syntaxes/make.tmLanguage.json" + }, + "contributes": { + "languages": [ + { + "id": "makefile", + "aliases": [ + "Makefile", + "makefile" + ], + "extensions": [ + ".mak", + ".mk" + ], + "filenames": [ + "Makefile", + "makefile", + "GNUmakefile", + "OCamlMakefile" + ], + "firstLine": "^#!\\s*/usr/bin/make", + "configuration": "./language-configuration.json" + } + ], + "grammars": [ + { + "language": "makefile", + "scopeName": "source.makefile", + "path": "./syntaxes/make.tmLanguage.json", + "tokenTypes": { + "string.interpolated": "other" + } + } + ], + "configurationDefaults": { + "[makefile]": { + "editor.insertSpaces": false + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/make/package.nls.json b/extensions/make/package.nls.json similarity index 100% rename from lib/vscode/extensions/make/package.nls.json rename to extensions/make/package.nls.json diff --git a/lib/vscode/extensions/make/syntaxes/make.tmLanguage.json b/extensions/make/syntaxes/make.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/make/syntaxes/make.tmLanguage.json rename to extensions/make/syntaxes/make.tmLanguage.json diff --git a/lib/vscode/extensions/make/yarn.lock b/extensions/make/yarn.lock similarity index 100% rename from lib/vscode/extensions/make/yarn.lock rename to extensions/make/yarn.lock diff --git a/lib/vscode/extensions/markdown-basics/.vscodeignore b/extensions/markdown-basics/.vscodeignore similarity index 100% rename from lib/vscode/extensions/markdown-basics/.vscodeignore rename to extensions/markdown-basics/.vscodeignore diff --git a/extensions/markdown-basics/cgmanifest.json b/extensions/markdown-basics/cgmanifest.json new file mode 100644 index 000000000000..f3f0717c5adb --- /dev/null +++ b/extensions/markdown-basics/cgmanifest.json @@ -0,0 +1,44 @@ +{ + "registrations": [ + { + "component": { + "type": "git", + "git": { + "name": "textmate/markdown.tmbundle", + "repositoryUrl": "https://github.com/textmate/markdown.tmbundle", + "commitHash": "11cf764606cb2cde54badb5d0e5a0758a8871c4b" + } + }, + "licenseDetail": [ + "Copyright (c) markdown.tmbundle authors", + "", + "If not otherwise specified (see below), files in this repository fall under the following license:", + "", + "Permission to copy, use, modify, sell and distribute this", + "software is granted. This software is provided \"as is\" without", + "express or implied warranty, and with no claim as to its", + "suitability for any purpose.", + "", + "An exception is made for files in readable text which contain their own license information,", + "or files where an accompanying file exists (in the same directory) with a \"-license\" suffix added", + "to the base-name name of the original file, and an extension of txt, html, or similar. For example", + "\"tidy\" is accompanied by \"tidy-license.txt\"." + ], + "license": "TextMate Bundle License", + "version": "0.0.0" + }, + { + "component": { + "type": "git", + "git": { + "name": "microsoft/vscode-markdown-tm-grammar", + "repositoryUrl": "https://github.com/microsoft/vscode-markdown-tm-grammar", + "commitHash": "a612b96d62aa1ce305c4a55dc9d577316fab39da" + } + }, + "license": "MIT", + "version": "1.0.0" + } + ], + "version": 1 +} \ No newline at end of file diff --git a/lib/vscode/extensions/markdown-basics/language-configuration.json b/extensions/markdown-basics/language-configuration.json similarity index 100% rename from lib/vscode/extensions/markdown-basics/language-configuration.json rename to extensions/markdown-basics/language-configuration.json diff --git a/lib/vscode/extensions/markdown-basics/package.json b/extensions/markdown-basics/package.json similarity index 100% rename from lib/vscode/extensions/markdown-basics/package.json rename to extensions/markdown-basics/package.json diff --git a/lib/vscode/extensions/markdown-basics/package.nls.json b/extensions/markdown-basics/package.nls.json similarity index 100% rename from lib/vscode/extensions/markdown-basics/package.nls.json rename to extensions/markdown-basics/package.nls.json diff --git a/lib/vscode/extensions/markdown-basics/snippets/markdown.code-snippets b/extensions/markdown-basics/snippets/markdown.code-snippets similarity index 100% rename from lib/vscode/extensions/markdown-basics/snippets/markdown.code-snippets rename to extensions/markdown-basics/snippets/markdown.code-snippets diff --git a/lib/vscode/extensions/markdown-basics/syntaxes/markdown.tmLanguage.json b/extensions/markdown-basics/syntaxes/markdown.tmLanguage.json similarity index 95% rename from lib/vscode/extensions/markdown-basics/syntaxes/markdown.tmLanguage.json rename to extensions/markdown-basics/syntaxes/markdown.tmLanguage.json index a61af0d0c060..aaa4c774b407 100644 --- a/lib/vscode/extensions/markdown-basics/syntaxes/markdown.tmLanguage.json +++ b/extensions/markdown-basics/syntaxes/markdown.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/microsoft/vscode-markdown-tm-grammar/commit/7019b191c3ee38b6c345f3a2a843f223eb92ca1e", + "version": "https://github.com/microsoft/vscode-markdown-tm-grammar/commit/a612b96d62aa1ce305c4a55dc9d577316fab39da", "name": "Markdown", "scopeName": "text.html.markdown", "patterns": [ @@ -63,7 +63,7 @@ "while": "(^|\\G)\\s*(>) ?" }, "fenced_code_block_css": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(css|css.erb)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(css|css.erb)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -96,7 +96,7 @@ ] }, "fenced_code_block_basic": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(html|htm|shtml|xhtml|inc|tmpl|tpl)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(html|htm|shtml|xhtml|inc|tmpl|tpl)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -129,7 +129,7 @@ ] }, "fenced_code_block_ini": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ini|conf)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ini|conf)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -162,7 +162,7 @@ ] }, "fenced_code_block_java": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(java|bsh)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(java|bsh)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -195,7 +195,7 @@ ] }, "fenced_code_block_lua": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(lua)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(lua)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -228,7 +228,7 @@ ] }, "fenced_code_block_makefile": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(Makefile|makefile|GNUmakefile|OCamlMakefile)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(Makefile|makefile|GNUmakefile|OCamlMakefile)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -261,7 +261,7 @@ ] }, "fenced_code_block_perl": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl|pl|pm|pod|t|PL|psgi|vcl)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl|pl|pm|pod|t|PL|psgi|vcl)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -294,7 +294,7 @@ ] }, "fenced_code_block_r": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(R|r|s|S|Rprofile|\\{\\.r.+?\\})((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(R|r|s|S|Rprofile|\\{\\.r.+?\\})((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -327,7 +327,7 @@ ] }, "fenced_code_block_ruby": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ruby|rb|rbx|rjs|Rakefile|rake|cgi|fcgi|gemspec|irbrc|Capfile|ru|prawn|Cheffile|Gemfile|Guardfile|Hobofile|Vagrantfile|Appraisals|Rantfile|Berksfile|Berksfile.lock|Thorfile|Puppetfile)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ruby|rb|rbx|rjs|Rakefile|rake|cgi|fcgi|gemspec|irbrc|Capfile|ru|prawn|Cheffile|Gemfile|Guardfile|Hobofile|Vagrantfile|Appraisals|Rantfile|Berksfile|Berksfile.lock|Thorfile|Puppetfile)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -360,7 +360,7 @@ ] }, "fenced_code_block_php": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(php|php3|php4|php5|phpt|phtml|aw|ctp)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(php|php3|php4|php5|phpt|phtml|aw|ctp)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -396,7 +396,7 @@ ] }, "fenced_code_block_sql": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(sql|ddl|dml)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(sql|ddl|dml)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -429,7 +429,7 @@ ] }, "fenced_code_block_vs_net": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(vb)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(vb)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -462,7 +462,7 @@ ] }, "fenced_code_block_xml": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xml|xsd|tld|jsp|pt|cpt|dtml|rss|opml)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xml|xsd|tld|jsp|pt|cpt|dtml|rss|opml)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -495,7 +495,7 @@ ] }, "fenced_code_block_xsl": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xsl|xslt)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xsl|xslt)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -528,7 +528,7 @@ ] }, "fenced_code_block_yaml": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(yaml|yml)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(yaml|yml)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -561,7 +561,7 @@ ] }, "fenced_code_block_dosbatch": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(bat|batch)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(bat|batch)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -594,7 +594,7 @@ ] }, "fenced_code_block_clojure": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(clj|cljs|clojure)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(clj|cljs|clojure)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -627,7 +627,7 @@ ] }, "fenced_code_block_coffee": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(coffee|Cakefile|coffee.erb)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(coffee|Cakefile|coffee.erb)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -660,7 +660,7 @@ ] }, "fenced_code_block_c": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(c|h)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(c|h)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -693,7 +693,7 @@ ] }, "fenced_code_block_cpp": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cpp|c\\+\\+|cxx)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cpp|c\\+\\+|cxx)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -726,7 +726,7 @@ ] }, "fenced_code_block_diff": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(patch|diff|rej)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(patch|diff|rej)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -759,7 +759,7 @@ ] }, "fenced_code_block_dockerfile": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(dockerfile|Dockerfile)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(dockerfile|Dockerfile)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -792,7 +792,7 @@ ] }, "fenced_code_block_git_commit": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(COMMIT_EDITMSG|MERGE_MSG)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(COMMIT_EDITMSG|MERGE_MSG)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -825,7 +825,7 @@ ] }, "fenced_code_block_git_rebase": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(git-rebase-todo)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(git-rebase-todo)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -858,7 +858,7 @@ ] }, "fenced_code_block_go": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(go|golang)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(go|golang)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -891,7 +891,7 @@ ] }, "fenced_code_block_groovy": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(groovy|gvy)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(groovy|gvy)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -924,7 +924,7 @@ ] }, "fenced_code_block_pug": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jade|pug)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jade|pug)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -957,7 +957,7 @@ ] }, "fenced_code_block_js": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(js|jsx|javascript|es6|mjs|cjs|\\{\\.js.+?\\})((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(js|jsx|javascript|es6|mjs|cjs|\\{\\.js.+?\\})((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -990,7 +990,7 @@ ] }, "fenced_code_block_js_regexp": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(regexp)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(regexp)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1023,7 +1023,7 @@ ] }, "fenced_code_block_json": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(json|json5|sublime-settings|sublime-menu|sublime-keymap|sublime-mousemap|sublime-theme|sublime-build|sublime-project|sublime-completions)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(json|json5|sublime-settings|sublime-menu|sublime-keymap|sublime-mousemap|sublime-theme|sublime-build|sublime-project|sublime-completions)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1056,7 +1056,7 @@ ] }, "fenced_code_block_jsonc": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jsonc)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jsonc)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1089,7 +1089,7 @@ ] }, "fenced_code_block_less": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(less)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(less)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1122,7 +1122,7 @@ ] }, "fenced_code_block_objc": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(objectivec|objective-c|mm|objc|obj-c|m|h)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(objectivec|objective-c|mm|objc|obj-c|m|h)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1155,7 +1155,7 @@ ] }, "fenced_code_block_swift": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(swift)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(swift)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1188,7 +1188,7 @@ ] }, "fenced_code_block_scss": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scss)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scss)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1221,7 +1221,7 @@ ] }, "fenced_code_block_perl6": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl6|p6|pl6|pm6|nqp)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl6|p6|pl6|pm6|nqp)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1254,7 +1254,7 @@ ] }, "fenced_code_block_powershell": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(powershell|ps1|psm1|psd1)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(powershell|ps1|psm1|psd1)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1287,7 +1287,7 @@ ] }, "fenced_code_block_python": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(python|py|py3|rpy|pyw|cpy|SConstruct|Sconstruct|sconstruct|SConscript|gyp|gypi|\\{\\.python.+?\\})((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(python|py|py3|rpy|pyw|cpy|SConstruct|Sconstruct|sconstruct|SConscript|gyp|gypi|\\{\\.python.+?\\})((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1320,7 +1320,7 @@ ] }, "fenced_code_block_regexp_python": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(re)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(re)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1353,7 +1353,7 @@ ] }, "fenced_code_block_rust": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(rust|rs|\\{\\.rust.+?\\})((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(rust|rs|\\{\\.rust.+?\\})((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1386,7 +1386,7 @@ ] }, "fenced_code_block_scala": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scala|sbt)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scala|sbt)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1419,7 +1419,7 @@ ] }, "fenced_code_block_shell": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(shell|sh|bash|zsh|bashrc|bash_profile|bash_login|profile|bash_logout|.textmate_init|\\{\\.bash.+?\\})((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(shell|sh|bash|zsh|bashrc|bash_profile|bash_login|profile|bash_logout|.textmate_init|\\{\\.bash.+?\\})((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1452,7 +1452,7 @@ ] }, "fenced_code_block_ts": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(typescript|ts)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(typescript|ts)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1485,7 +1485,7 @@ ] }, "fenced_code_block_tsx": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(tsx)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(tsx)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1518,7 +1518,7 @@ ] }, "fenced_code_block_csharp": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cs|csharp|c#)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cs|csharp|c#)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1551,7 +1551,7 @@ ] }, "fenced_code_block_fsharp": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(fs|fsharp|f#)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(fs|fsharp|f#)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1584,7 +1584,7 @@ ] }, "fenced_code_block_dart": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(dart)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(dart)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1617,7 +1617,7 @@ ] }, "fenced_code_block_handlebars": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(handlebars|hbs)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(handlebars|hbs)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1650,7 +1650,7 @@ ] }, "fenced_code_block_markdown": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(markdown|md)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(markdown|md)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1683,7 +1683,7 @@ ] }, "fenced_code_block_log": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(log)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(log)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1716,7 +1716,7 @@ ] }, "fenced_code_block_erlang": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(erlang)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(erlang)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1749,7 +1749,7 @@ ] }, "fenced_code_block_elixir": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(elixir)((\\s+|:|\\{)[^`~]*)?$)", + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(elixir)((\\s+|:|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { @@ -1975,7 +1975,15 @@ "name": "punctuation.definition.heading.markdown" }, "2": { - "name": "entity.name.section.markdown" + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.derivative" + } + ] }, "3": { "name": "punctuation.definition.heading.markdown" @@ -1990,7 +1998,15 @@ "name": "punctuation.definition.heading.markdown" }, "2": { - "name": "entity.name.section.markdown" + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.derivative" + } + ] }, "3": { "name": "punctuation.definition.heading.markdown" @@ -2005,7 +2021,15 @@ "name": "punctuation.definition.heading.markdown" }, "2": { - "name": "entity.name.section.markdown" + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.derivative" + } + ] }, "3": { "name": "punctuation.definition.heading.markdown" @@ -2020,7 +2044,15 @@ "name": "punctuation.definition.heading.markdown" }, "2": { - "name": "entity.name.section.markdown" + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.derivative" + } + ] }, "3": { "name": "punctuation.definition.heading.markdown" @@ -2035,7 +2067,15 @@ "name": "punctuation.definition.heading.markdown" }, "2": { - "name": "entity.name.section.markdown" + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.derivative" + } + ] }, "3": { "name": "punctuation.definition.heading.markdown" @@ -2050,7 +2090,15 @@ "name": "punctuation.definition.heading.markdown" }, "2": { - "name": "entity.name.section.markdown" + "name": "entity.name.section.markdown", + "patterns": [ + { + "include": "#inline" + }, + { + "include": "text.html.derivative" + } + ] }, "3": { "name": "punctuation.definition.heading.markdown" diff --git a/lib/vscode/extensions/markdown-basics/yarn.lock b/extensions/markdown-basics/yarn.lock similarity index 100% rename from lib/vscode/extensions/markdown-basics/yarn.lock rename to extensions/markdown-basics/yarn.lock diff --git a/lib/vscode/extensions/markdown-language-features/.gitignore b/extensions/markdown-language-features/.gitignore similarity index 100% rename from lib/vscode/extensions/markdown-language-features/.gitignore rename to extensions/markdown-language-features/.gitignore diff --git a/lib/vscode/extensions/markdown-language-features/.vscodeignore b/extensions/markdown-language-features/.vscodeignore similarity index 100% rename from lib/vscode/extensions/markdown-language-features/.vscodeignore rename to extensions/markdown-language-features/.vscodeignore diff --git a/lib/vscode/extensions/markdown-language-features/README.md b/extensions/markdown-language-features/README.md similarity index 100% rename from lib/vscode/extensions/markdown-language-features/README.md rename to extensions/markdown-language-features/README.md diff --git a/lib/vscode/extensions/markdown-language-features/esbuild.js b/extensions/markdown-language-features/esbuild.js similarity index 100% rename from lib/vscode/extensions/markdown-language-features/esbuild.js rename to extensions/markdown-language-features/esbuild.js diff --git a/lib/vscode/extensions/markdown-language-features/extension-browser.webpack.config.js b/extensions/markdown-language-features/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/markdown-language-features/extension-browser.webpack.config.js rename to extensions/markdown-language-features/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/markdown-language-features/extension.webpack.config.js b/extensions/markdown-language-features/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/markdown-language-features/extension.webpack.config.js rename to extensions/markdown-language-features/extension.webpack.config.js diff --git a/lib/vscode/extensions/markdown-language-features/icon.png b/extensions/markdown-language-features/icon.png similarity index 100% rename from lib/vscode/extensions/markdown-language-features/icon.png rename to extensions/markdown-language-features/icon.png diff --git a/lib/vscode/extensions/markdown-language-features/media/highlight.css b/extensions/markdown-language-features/media/highlight.css similarity index 100% rename from lib/vscode/extensions/markdown-language-features/media/highlight.css rename to extensions/markdown-language-features/media/highlight.css diff --git a/lib/vscode/extensions/markdown-language-features/media/markdown.css b/extensions/markdown-language-features/media/markdown.css similarity index 98% rename from lib/vscode/extensions/markdown-language-features/media/markdown.css rename to extensions/markdown-language-features/media/markdown.css index edaa6f925d16..e12805e1de55 100644 --- a/lib/vscode/extensions/markdown-language-features/media/markdown.css +++ b/extensions/markdown-language-features/media/markdown.css @@ -106,6 +106,13 @@ body.showEditorSelection li.code-line:hover:before { border-left: none; } +ul ul, +ul ol, +ol ul, +ol ol { + margin-bottom: 0; +} + img { max-width: 100%; max-height: 100%; @@ -152,6 +159,7 @@ h1 { table { border-collapse: collapse; + margin-bottom: 0.7em; } th { diff --git a/lib/vscode/extensions/markdown-language-features/media/preview-dark.svg b/extensions/markdown-language-features/media/preview-dark.svg similarity index 100% rename from lib/vscode/extensions/markdown-language-features/media/preview-dark.svg rename to extensions/markdown-language-features/media/preview-dark.svg diff --git a/lib/vscode/extensions/markdown-language-features/media/preview-light.svg b/extensions/markdown-language-features/media/preview-light.svg similarity index 100% rename from lib/vscode/extensions/markdown-language-features/media/preview-light.svg rename to extensions/markdown-language-features/media/preview-light.svg diff --git a/extensions/markdown-language-features/notebook/index.ts b/extensions/markdown-language-features/notebook/index.ts new file mode 100644 index 000000000000..371091691b7a --- /dev/null +++ b/extensions/markdown-language-features/notebook/index.ts @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +const MarkdownIt = require('markdown-it'); + +export function activate() { + let markdownIt = new MarkdownIt({ + html: true + }); + + return { + renderOutputItem: (outputInfo: { text(): string }, element: HTMLElement) => { + const rendered = markdownIt.render(outputInfo.text()); + element.innerHTML = rendered; + + // Insert styles into markdown preview shadow dom so that they are applied + for (const markdownStyleNode of document.getElementsByClassName('markdown-style')) { + element.insertAdjacentElement('beforebegin', markdownStyleNode.cloneNode(true) as Element); + } + }, + extendMarkdownIt: (f: (md: typeof markdownIt) => void) => { + f(markdownIt); + } + }; +} diff --git a/lib/vscode/extensions/markdown-language-features/notebook/tsconfig.json b/extensions/markdown-language-features/notebook/tsconfig.json similarity index 100% rename from lib/vscode/extensions/markdown-language-features/notebook/tsconfig.json rename to extensions/markdown-language-features/notebook/tsconfig.json diff --git a/extensions/markdown-language-features/package.json b/extensions/markdown-language-features/package.json new file mode 100644 index 000000000000..ec72a0d53441 --- /dev/null +++ b/extensions/markdown-language-features/package.json @@ -0,0 +1,372 @@ +{ + "name": "markdown-language-features", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "icon": "icon.png", + "publisher": "vscode", + "enableProposedApi": true, + "license": "MIT", + "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", + "engines": { + "vscode": "^1.20.0" + }, + "main": "./out/extension", + "browser": "./dist/browser/extension", + "categories": [ + "Programming Languages" + ], + "activationEvents": [ + "onLanguage:markdown", + "onCommand:markdown.preview.toggleLock", + "onCommand:markdown.preview.refresh", + "onCommand:markdown.showPreview", + "onCommand:markdown.showPreviewToSide", + "onCommand:markdown.showLockedPreviewToSide", + "onCommand:markdown.showSource", + "onCommand:markdown.showPreviewSecuritySelector", + "onCommand:markdown.api.render", + "onWebviewPanel:markdown.preview", + "onCustomEditor:vscode.markdown.preview.editor" + ], + "capabilities": { + "virtualWorkspaces": true, + "untrustedWorkspaces": { + "supported": "limited", + "description": "%workspaceTrust%", + "restrictedConfigurations": [ + "markdown.styles" + ] + } + }, + "contributes": { + "notebookRenderer": [ + { + "id": "markdownItRenderer", + "displayName": "Markdown it renderer", + "entrypoint": "./notebook-out/index.js", + "mimeTypes": [ + "text/markdown" + ] + } + ], + "commands": [ + { + "command": "markdown.showPreview", + "title": "%markdown.preview.title%", + "category": "Markdown", + "icon": { + "light": "./media/preview-light.svg", + "dark": "./media/preview-dark.svg" + } + }, + { + "command": "markdown.showPreviewToSide", + "title": "%markdown.previewSide.title%", + "category": "Markdown", + "icon": "$(open-preview)" + }, + { + "command": "markdown.showLockedPreviewToSide", + "title": "%markdown.showLockedPreviewToSide.title%", + "category": "Markdown", + "icon": "$(open-preview)" + }, + { + "command": "markdown.showSource", + "title": "%markdown.showSource.title%", + "category": "Markdown", + "icon": "$(go-to-file)" + }, + { + "command": "markdown.showPreviewSecuritySelector", + "title": "%markdown.showPreviewSecuritySelector.title%", + "category": "Markdown" + }, + { + "command": "markdown.preview.refresh", + "title": "%markdown.preview.refresh.title%", + "category": "Markdown" + }, + { + "command": "markdown.preview.toggleLock", + "title": "%markdown.preview.toggleLock.title%", + "category": "Markdown" + } + ], + "menus": { + "editor/title": [ + { + "command": "markdown.showPreviewToSide", + "when": "editorLangId == markdown && !notebookEditorFocused", + "alt": "markdown.showPreview", + "group": "navigation" + }, + { + "command": "markdown.showSource", + "when": "markdownPreviewFocus", + "group": "navigation" + }, + { + "command": "markdown.preview.refresh", + "when": "markdownPreviewFocus", + "group": "1_markdown" + }, + { + "command": "markdown.preview.toggleLock", + "when": "markdownPreviewFocus", + "group": "1_markdown" + }, + { + "command": "markdown.showPreviewSecuritySelector", + "when": "markdownPreviewFocus", + "group": "1_markdown" + } + ], + "explorer/context": [ + { + "command": "markdown.showPreview", + "when": "resourceLangId == markdown", + "group": "navigation" + } + ], + "editor/title/context": [ + { + "command": "markdown.showPreview", + "when": "resourceLangId == markdown", + "group": "1_open" + } + ], + "commandPalette": [ + { + "command": "markdown.showPreview", + "when": "editorLangId == markdown && !notebookEditorFocused", + "group": "navigation" + }, + { + "command": "markdown.showPreviewToSide", + "when": "editorLangId == markdown && !notebookEditorFocused", + "group": "navigation" + }, + { + "command": "markdown.showLockedPreviewToSide", + "when": "editorLangId == markdown && !notebookEditorFocused", + "group": "navigation" + }, + { + "command": "markdown.showSource", + "when": "markdownPreviewFocus", + "group": "navigation" + }, + { + "command": "markdown.showPreviewSecuritySelector", + "when": "editorLangId == markdown && !notebookEditorFocused" + }, + { + "command": "markdown.showPreviewSecuritySelector", + "when": "markdownPreviewFocus" + }, + { + "command": "markdown.preview.toggleLock", + "when": "markdownPreviewFocus" + }, + { + "command": "markdown.preview.refresh", + "when": "editorLangId == markdown && !notebookEditorFocused" + }, + { + "command": "markdown.preview.refresh", + "when": "markdownPreviewFocus" + } + ] + }, + "keybindings": [ + { + "command": "markdown.showPreview", + "key": "shift+ctrl+v", + "mac": "shift+cmd+v", + "when": "editorLangId == markdown && !notebookEditorFocused" + }, + { + "command": "markdown.showPreviewToSide", + "key": "ctrl+k v", + "mac": "cmd+k v", + "when": "editorLangId == markdown && !notebookEditorFocused" + } + ], + "configuration": { + "type": "object", + "title": "Markdown", + "order": 20, + "properties": { + "markdown.styles": { + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "description": "%markdown.styles.dec%", + "scope": "resource" + }, + "markdown.preview.breaks": { + "type": "boolean", + "default": false, + "description": "%markdown.preview.breaks.desc%", + "scope": "resource" + }, + "markdown.preview.linkify": { + "type": "boolean", + "default": true, + "description": "%markdown.preview.linkify%", + "scope": "resource" + }, + "markdown.preview.typographer": { + "type": "boolean", + "default": false, + "description": "%markdown.preview.typographer%", + "scope": "resource" + }, + "markdown.preview.fontFamily": { + "type": "string", + "default": "-apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif", + "description": "%markdown.preview.fontFamily.desc%", + "scope": "resource" + }, + "markdown.preview.fontSize": { + "type": "number", + "default": 14, + "description": "%markdown.preview.fontSize.desc%", + "scope": "resource" + }, + "markdown.preview.lineHeight": { + "type": "number", + "default": 1.6, + "description": "%markdown.preview.lineHeight.desc%", + "scope": "resource" + }, + "markdown.preview.scrollPreviewWithEditor": { + "type": "boolean", + "default": true, + "description": "%markdown.preview.scrollPreviewWithEditor.desc%", + "scope": "resource" + }, + "markdown.preview.markEditorSelection": { + "type": "boolean", + "default": true, + "description": "%markdown.preview.markEditorSelection.desc%", + "scope": "resource" + }, + "markdown.preview.scrollEditorWithPreview": { + "type": "boolean", + "default": true, + "description": "%markdown.preview.scrollEditorWithPreview.desc%", + "scope": "resource" + }, + "markdown.preview.doubleClickToSwitchToEditor": { + "type": "boolean", + "default": true, + "description": "%markdown.preview.doubleClickToSwitchToEditor.desc%", + "scope": "resource" + }, + "markdown.preview.openMarkdownLinks": { + "type": "string", + "default": "inPreview", + "description": "%configuration.markdown.preview.openMarkdownLinks.description%", + "scope": "resource", + "enum": [ + "inPreview", + "inEditor" + ], + "enumDescriptions": [ + "%configuration.markdown.preview.openMarkdownLinks.inPreview%", + "%configuration.markdown.preview.openMarkdownLinks.inEditor%" + ] + }, + "markdown.links.openLocation": { + "type": "string", + "default": "currentGroup", + "description": "%configuration.markdown.links.openLocation.description%", + "scope": "resource", + "enum": [ + "currentGroup", + "beside" + ], + "enumDescriptions": [ + "%configuration.markdown.links.openLocation.currentGroup%", + "%configuration.markdown.links.openLocation.beside%" + ] + }, + "markdown.trace": { + "type": "string", + "enum": [ + "off", + "verbose" + ], + "default": "off", + "description": "%markdown.trace.desc%", + "scope": "window" + } + } + }, + "configurationDefaults": { + "[markdown]": { + "editor.wordWrap": "on", + "editor.quickSuggestions": false + } + }, + "jsonValidation": [ + { + "fileMatch": "package.json", + "url": "./schemas/package.schema.json" + } + ], + "markdown.previewStyles": [ + "./media/markdown.css", + "./media/highlight.css" + ], + "markdown.previewScripts": [ + "./media/index.js" + ], + "customEditors": [ + { + "viewType": "vscode.markdown.preview.editor", + "displayName": "Markdown Preview (Experimental)", + "priority": "option", + "selector": [ + { + "filenamePattern": "*.md" + } + ] + } + ] + }, + "scripts": { + "compile": "gulp compile-extension:markdown-language-features && npm run build-preview && npm run build-notebook", + "watch": "npm run build-preview && gulp watch-extension:markdown-language-features", + "vscode:prepublish": "npm run build-ext && npm run build-preview", + "build-ext": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:markdown-language-features ./tsconfig.json", + "build-preview": "npx webpack-cli --mode production", + "build-notebook": "node ./esbuild", + "compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none", + "watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose" + }, + "dependencies": { + "highlight.js": "^10.4.1", + "markdown-it": "^12.0.3", + "markdown-it-front-matter": "^0.2.1", + "vscode-extension-telemetry": "0.1.7", + "vscode-nls": "^4.0.0" + }, + "devDependencies": { + "@types/highlight.js": "10.1.0", + "@types/lodash.throttle": "^4.1.3", + "@types/markdown-it": "0.0.2", + "@types/node": "14.x", + "@types/vscode-webview": "^1.57.0", + "lodash.throttle": "^4.1.1" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/markdown-language-features/package.nls.json b/extensions/markdown-language-features/package.nls.json similarity index 100% rename from lib/vscode/extensions/markdown-language-features/package.nls.json rename to extensions/markdown-language-features/package.nls.json diff --git a/lib/vscode/extensions/markdown-language-features/preview-src/activeLineMarker.ts b/extensions/markdown-language-features/preview-src/activeLineMarker.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/preview-src/activeLineMarker.ts rename to extensions/markdown-language-features/preview-src/activeLineMarker.ts diff --git a/lib/vscode/extensions/markdown-language-features/preview-src/csp.ts b/extensions/markdown-language-features/preview-src/csp.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/preview-src/csp.ts rename to extensions/markdown-language-features/preview-src/csp.ts diff --git a/lib/vscode/extensions/markdown-language-features/preview-src/events.ts b/extensions/markdown-language-features/preview-src/events.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/preview-src/events.ts rename to extensions/markdown-language-features/preview-src/events.ts diff --git a/extensions/markdown-language-features/preview-src/index.ts b/extensions/markdown-language-features/preview-src/index.ts new file mode 100644 index 000000000000..13f4f1f7770e --- /dev/null +++ b/extensions/markdown-language-features/preview-src/index.ts @@ -0,0 +1,224 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { ActiveLineMarker } from './activeLineMarker'; +import { onceDocumentLoaded } from './events'; +import { createPosterForVsCode } from './messaging'; +import { getEditorLineNumberForPageOffset, scrollToRevealSourceLine, getLineElementForFragment } from './scroll-sync'; +import { getSettings, getData } from './settings'; +import throttle = require('lodash.throttle'); + +let scrollDisabledCount = 0; +const marker = new ActiveLineMarker(); +const settings = getSettings(); + +const vscode = acquireVsCodeApi(); + +const originalState = vscode.getState(); + +const state = { + ...(typeof originalState === 'object' ? originalState : {}), + ...getData('data-state') +}; + +// Make sure to sync VS Code state here +vscode.setState(state); + +const messaging = createPosterForVsCode(vscode); + +window.cspAlerter.setPoster(messaging); +window.styleLoadingMonitor.setPoster(messaging); + +window.onload = () => { + updateImageSizes(); +}; + + +function doAfterImagesLoaded(cb: () => void) { + const imgElements = document.getElementsByTagName('img'); + if (imgElements.length > 0) { + const ps = Array.from(imgElements, e => { + if (e.complete) { + return Promise.resolve(); + } else { + return new Promise((resolve) => { + e.addEventListener('load', () => resolve()); + e.addEventListener('error', () => resolve()); + }); + } + }); + Promise.all(ps).then(() => setImmediate(cb)); + } else { + setImmediate(cb); + } +} + +onceDocumentLoaded(() => { + const scrollProgress = state.scrollProgress; + + if (typeof scrollProgress === 'number' && !settings.fragment) { + doAfterImagesLoaded(() => { + scrollDisabledCount += 1; + window.scrollTo(0, scrollProgress * document.body.clientHeight); + }); + return; + } + + if (settings.scrollPreviewWithEditor) { + doAfterImagesLoaded(() => { + // Try to scroll to fragment if available + if (settings.fragment) { + state.fragment = undefined; + vscode.setState(state); + + const element = getLineElementForFragment(settings.fragment); + if (element) { + scrollDisabledCount += 1; + scrollToRevealSourceLine(element.line); + } + } else { + if (!isNaN(settings.line!)) { + scrollDisabledCount += 1; + scrollToRevealSourceLine(settings.line!); + } + } + }); + } +}); + +const onUpdateView = (() => { + const doScroll = throttle((line: number) => { + scrollDisabledCount += 1; + doAfterImagesLoaded(() => scrollToRevealSourceLine(line)); + }, 50); + + return (line: number) => { + if (!isNaN(line)) { + state.line = line; + + doScroll(line); + } + }; +})(); + +let updateImageSizes = throttle(() => { + const imageInfo: { id: string, height: number, width: number; }[] = []; + let images = document.getElementsByTagName('img'); + if (images) { + let i; + for (i = 0; i < images.length; i++) { + const img = images[i]; + + if (img.classList.contains('loading')) { + img.classList.remove('loading'); + } + + imageInfo.push({ + id: img.id, + height: img.height, + width: img.width + }); + } + + messaging.postMessage('cacheImageSizes', imageInfo); + } +}, 50); + +window.addEventListener('resize', () => { + scrollDisabledCount += 1; + updateScrollProgress(); + updateImageSizes(); +}, true); + +window.addEventListener('message', event => { + if (event.data.source !== settings.source) { + return; + } + + switch (event.data.type) { + case 'onDidChangeTextEditorSelection': + marker.onDidChangeTextEditorSelection(event.data.line); + break; + + case 'updateView': + onUpdateView(event.data.line); + break; + } +}, false); + +document.addEventListener('dblclick', event => { + if (!settings.doubleClickToSwitchToEditor) { + return; + } + + // Ignore clicks on links + for (let node = event.target as HTMLElement; node; node = node.parentNode as HTMLElement) { + if (node.tagName === 'A') { + return; + } + } + + const offset = event.pageY; + const line = getEditorLineNumberForPageOffset(offset); + if (typeof line === 'number' && !isNaN(line)) { + messaging.postMessage('didClick', { line: Math.floor(line) }); + } +}); + +const passThroughLinkSchemes = ['http:', 'https:', 'mailto:', 'vscode:', 'vscode-insiders:']; + +document.addEventListener('click', event => { + if (!event) { + return; + } + + let node: any = event.target; + while (node) { + if (node.tagName && node.tagName === 'A' && node.href) { + if (node.getAttribute('href').startsWith('#')) { + return; + } + + let hrefText = node.getAttribute('data-href'); + if (!hrefText) { + // Pass through known schemes + if (passThroughLinkSchemes.some(scheme => node.href.startsWith(scheme))) { + return; + } + hrefText = node.getAttribute('href'); + } + + // If original link doesn't look like a url, delegate back to VS Code to resolve + if (!/^[a-z\-]+:/i.test(hrefText)) { + messaging.postMessage('openLink', { href: hrefText }); + event.preventDefault(); + event.stopPropagation(); + return; + } + + return; + } + node = node.parentNode; + } +}, true); + +window.addEventListener('scroll', throttle(() => { + updateScrollProgress(); + + if (scrollDisabledCount > 0) { + scrollDisabledCount -= 1; + } else { + const line = getEditorLineNumberForPageOffset(window.scrollY); + if (typeof line === 'number' && !isNaN(line)) { + messaging.postMessage('revealLine', { line }); + } + } +}, 50)); + +function updateScrollProgress() { + state.scrollProgress = window.scrollY / document.body.clientHeight; + vscode.setState(state); +} + diff --git a/lib/vscode/extensions/markdown-language-features/preview-src/loading.ts b/extensions/markdown-language-features/preview-src/loading.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/preview-src/loading.ts rename to extensions/markdown-language-features/preview-src/loading.ts diff --git a/lib/vscode/extensions/markdown-language-features/preview-src/messaging.ts b/extensions/markdown-language-features/preview-src/messaging.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/preview-src/messaging.ts rename to extensions/markdown-language-features/preview-src/messaging.ts diff --git a/lib/vscode/extensions/markdown-language-features/preview-src/pre.ts b/extensions/markdown-language-features/preview-src/pre.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/preview-src/pre.ts rename to extensions/markdown-language-features/preview-src/pre.ts diff --git a/lib/vscode/extensions/markdown-language-features/preview-src/scroll-sync.ts b/extensions/markdown-language-features/preview-src/scroll-sync.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/preview-src/scroll-sync.ts rename to extensions/markdown-language-features/preview-src/scroll-sync.ts diff --git a/lib/vscode/extensions/markdown-language-features/preview-src/settings.ts b/extensions/markdown-language-features/preview-src/settings.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/preview-src/settings.ts rename to extensions/markdown-language-features/preview-src/settings.ts diff --git a/lib/vscode/extensions/markdown-language-features/preview-src/strings.ts b/extensions/markdown-language-features/preview-src/strings.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/preview-src/strings.ts rename to extensions/markdown-language-features/preview-src/strings.ts diff --git a/extensions/markdown-language-features/preview-src/tsconfig.json b/extensions/markdown-language-features/preview-src/tsconfig.json new file mode 100644 index 000000000000..62af34c62f84 --- /dev/null +++ b/extensions/markdown-language-features/preview-src/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./dist/", + "jsx": "react", + "lib": [ + "es2018", + "DOM", + "DOM.Iterable" + ] + }, + "typeAcquisition": { + "include": [ + "@types/vscode-webview" + ] + } +} diff --git a/lib/vscode/extensions/markdown-language-features/schemas/package.schema.json b/extensions/markdown-language-features/schemas/package.schema.json similarity index 100% rename from lib/vscode/extensions/markdown-language-features/schemas/package.schema.json rename to extensions/markdown-language-features/schemas/package.schema.json diff --git a/lib/vscode/extensions/markdown-language-features/src/commandManager.ts b/extensions/markdown-language-features/src/commandManager.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/commandManager.ts rename to extensions/markdown-language-features/src/commandManager.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/commands/index.ts b/extensions/markdown-language-features/src/commands/index.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/commands/index.ts rename to extensions/markdown-language-features/src/commands/index.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/commands/moveCursorToPosition.ts b/extensions/markdown-language-features/src/commands/moveCursorToPosition.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/commands/moveCursorToPosition.ts rename to extensions/markdown-language-features/src/commands/moveCursorToPosition.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/commands/openDocumentLink.ts b/extensions/markdown-language-features/src/commands/openDocumentLink.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/commands/openDocumentLink.ts rename to extensions/markdown-language-features/src/commands/openDocumentLink.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/commands/refreshPreview.ts b/extensions/markdown-language-features/src/commands/refreshPreview.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/commands/refreshPreview.ts rename to extensions/markdown-language-features/src/commands/refreshPreview.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/commands/renderDocument.ts b/extensions/markdown-language-features/src/commands/renderDocument.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/commands/renderDocument.ts rename to extensions/markdown-language-features/src/commands/renderDocument.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/commands/showPreview.ts b/extensions/markdown-language-features/src/commands/showPreview.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/commands/showPreview.ts rename to extensions/markdown-language-features/src/commands/showPreview.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/commands/showPreviewSecuritySelector.ts b/extensions/markdown-language-features/src/commands/showPreviewSecuritySelector.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/commands/showPreviewSecuritySelector.ts rename to extensions/markdown-language-features/src/commands/showPreviewSecuritySelector.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/commands/showSource.ts b/extensions/markdown-language-features/src/commands/showSource.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/commands/showSource.ts rename to extensions/markdown-language-features/src/commands/showSource.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/commands/toggleLock.ts b/extensions/markdown-language-features/src/commands/toggleLock.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/commands/toggleLock.ts rename to extensions/markdown-language-features/src/commands/toggleLock.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/extension.ts b/extensions/markdown-language-features/src/extension.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/extension.ts rename to extensions/markdown-language-features/src/extension.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/features/documentLinkProvider.ts b/extensions/markdown-language-features/src/features/documentLinkProvider.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/features/documentLinkProvider.ts rename to extensions/markdown-language-features/src/features/documentLinkProvider.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/features/documentSymbolProvider.ts b/extensions/markdown-language-features/src/features/documentSymbolProvider.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/features/documentSymbolProvider.ts rename to extensions/markdown-language-features/src/features/documentSymbolProvider.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/features/foldingProvider.ts b/extensions/markdown-language-features/src/features/foldingProvider.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/features/foldingProvider.ts rename to extensions/markdown-language-features/src/features/foldingProvider.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/features/preview.ts b/extensions/markdown-language-features/src/features/preview.ts similarity index 93% rename from lib/vscode/extensions/markdown-language-features/src/features/preview.ts rename to extensions/markdown-language-features/src/features/preview.ts index 42d6f08fc072..fb3fbeca1832 100644 --- a/lib/vscode/extensions/markdown-language-features/src/features/preview.ts +++ b/extensions/markdown-language-features/src/features/preview.ts @@ -11,8 +11,8 @@ import { Logger } from '../logger'; import { MarkdownContributionProvider } from '../markdownExtensions'; import { Disposable } from '../util/dispose'; import { isMarkdownFile } from '../util/file'; -import { normalizeResource, WebviewResourceProvider } from '../util/resources'; -import { getVisibleLine, TopmostLineMonitor } from '../util/topmostLineMonitor'; +import { WebviewResourceProvider } from '../util/resources'; +import { getVisibleLine, LastScrollLocation, TopmostLineMonitor } from '../util/topmostLineMonitor'; import { MarkdownPreviewConfigurationManager } from './previewConfig'; import { MarkdownContentProvider, MarkdownContentProviderOutput } from './previewContentProvider'; import { MarkdownEngine } from '../markdownEngine'; @@ -120,6 +120,8 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider { private imageInfo: { readonly id: string, readonly width: number, readonly height: number; }[] = []; private readonly _fileWatchersBySrc = new Map(); + private readonly _onScrollEmitter = this._register(new vscode.EventEmitter()); + public readonly onScroll = this._onScrollEmitter.event; constructor( webview: vscode.WebviewPanel, @@ -324,7 +326,7 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider { private onDidScrollPreview(line: number) { this.line = line; - + this._onScrollEmitter.fire({ line: this.line, uri: this._resource }); const config = this._previewConfigurations.loadAndCacheConfiguration(this._resource); if (!config.scrollEditorWithPreview) { return; @@ -336,13 +338,7 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider { } this.isScrolling = true; - const sourceLine = Math.floor(line); - const fraction = line - sourceLine; - const text = editor.document.lineAt(sourceLine).text; - const start = Math.floor(fraction * text.length); - editor.revealRange( - new vscode.Range(sourceLine, start, sourceLine + 1, 0), - vscode.TextEditorRevealType.AtTop); + scrollEditorToLine(line, editor); } } @@ -427,12 +423,12 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider { baseRoots.push(vscode.Uri.file(path.dirname(this._resource.fsPath))); } - return baseRoots.map(root => normalizeResource(this._resource, root)); + return baseRoots; } private async onDidClickPreviewLink(href: string) { - let [hrefPath, fragment] = decodeURIComponent(href).split('#'); + let [hrefPath, fragment] = href.split('#').map(c => decodeURIComponent(c)); if (hrefPath[0] !== '/') { // We perviously already resolve absolute paths. @@ -460,7 +456,7 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider { //#region WebviewResourceProvider asWebviewUri(resource: vscode.Uri) { - return this._webviewPanel.webview.asWebviewUri(normalizeResource(this._resource, resource)); + return this._webviewPanel.webview.asWebviewUri(resource); } get cspSource() { @@ -497,11 +493,13 @@ export class StaticMarkdownPreview extends Disposable implements ManagedMarkdown webview: vscode.WebviewPanel, contentProvider: MarkdownContentProvider, previewConfigurations: MarkdownPreviewConfigurationManager, + topmostLineMonitor: TopmostLineMonitor, logger: Logger, contributionProvider: MarkdownContributionProvider, engine: MarkdownEngine, + scrollLine?: number, ): StaticMarkdownPreview { - return new StaticMarkdownPreview(webview, resource, contentProvider, previewConfigurations, logger, contributionProvider, engine); + return new StaticMarkdownPreview(webview, resource, contentProvider, previewConfigurations, topmostLineMonitor, logger, contributionProvider, engine, scrollLine); } private readonly preview: MarkdownPreview; @@ -511,13 +509,15 @@ export class StaticMarkdownPreview extends Disposable implements ManagedMarkdown resource: vscode.Uri, contentProvider: MarkdownContentProvider, private readonly _previewConfigurations: MarkdownPreviewConfigurationManager, + topmostLineMonitor: TopmostLineMonitor, logger: Logger, contributionProvider: MarkdownContributionProvider, engine: MarkdownEngine, + scrollLine?: number, ) { super(); - - this.preview = this._register(new MarkdownPreview(this._webviewPanel, resource, undefined, { + const topScrollLocation = scrollLine ? new StartingScrollLine(scrollLine) : undefined; + this.preview = this._register(new MarkdownPreview(this._webviewPanel, resource, topScrollLocation, { getAdditionalState: () => { return {}; }, openPreviewLinkToMarkdownFile: () => { /* todo */ } }, engine, contentProvider, _previewConfigurations, logger, contributionProvider)); @@ -529,6 +529,16 @@ export class StaticMarkdownPreview extends Disposable implements ManagedMarkdown this._register(this._webviewPanel.onDidChangeViewState(e => { this._onDidChangeViewState.fire(e); })); + + this._register(this.preview.onScroll((scrollInfo) => { + topmostLineMonitor.setPreviousEditorLine(scrollInfo); + })); + + this._register(topmostLineMonitor.onDidChanged(event => { + if (this.preview.isPreviewOf(event.resource)) { + this.preview.scrollTo(event.line); + } + })); } private readonly _onDispose = this._register(new vscode.EventEmitter()); @@ -789,3 +799,18 @@ export class DynamicMarkdownPreview extends Disposable implements ManagedMarkdow } } +/** + * Change the top-most visible line of `editor` to be at `line` + */ +export function scrollEditorToLine( + line: number, + editor: vscode.TextEditor +) { + const sourceLine = Math.floor(line); + const fraction = line - sourceLine; + const text = editor.document.lineAt(sourceLine).text; + const start = Math.floor(fraction * text.length); + editor.revealRange( + new vscode.Range(sourceLine, start, sourceLine + 1, 0), + vscode.TextEditorRevealType.AtTop); +} diff --git a/lib/vscode/extensions/markdown-language-features/src/features/previewConfig.ts b/extensions/markdown-language-features/src/features/previewConfig.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/features/previewConfig.ts rename to extensions/markdown-language-features/src/features/previewConfig.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/features/previewContentProvider.ts b/extensions/markdown-language-features/src/features/previewContentProvider.ts similarity index 99% rename from lib/vscode/extensions/markdown-language-features/src/features/previewContentProvider.ts rename to extensions/markdown-language-features/src/features/previewContentProvider.ts index 474b1864ed7d..e2b28c092cbc 100644 --- a/lib/vscode/extensions/markdown-language-features/src/features/previewContentProvider.ts +++ b/extensions/markdown-language-features/src/features/previewContentProvider.ts @@ -81,7 +81,7 @@ export class MarkdownContentProvider { const nonce = new Date().getTime() + '' + new Date().getMilliseconds(); const csp = this.getCsp(resourceProvider, sourceUri, nonce); - const body = await this.engine.render(markdownDocument); + const body = await this.engine.render(markdownDocument, resourceProvider); const html = ` diff --git a/lib/vscode/extensions/markdown-language-features/src/features/previewManager.ts b/extensions/markdown-language-features/src/features/previewManager.ts similarity index 88% rename from lib/vscode/extensions/markdown-language-features/src/features/previewManager.ts rename to extensions/markdown-language-features/src/features/previewManager.ts index 05729e0873a7..7f30abb1c84d 100644 --- a/lib/vscode/extensions/markdown-language-features/src/features/previewManager.ts +++ b/extensions/markdown-language-features/src/features/previewManager.ts @@ -9,9 +9,10 @@ import { MarkdownEngine } from '../markdownEngine'; import { MarkdownContributionProvider } from '../markdownExtensions'; import { Disposable, disposeAll } from '../util/dispose'; import { TopmostLineMonitor } from '../util/topmostLineMonitor'; -import { DynamicMarkdownPreview, ManagedMarkdownPreview, StartingScrollFragment, StaticMarkdownPreview } from './preview'; +import { DynamicMarkdownPreview, ManagedMarkdownPreview, StartingScrollFragment, StaticMarkdownPreview, scrollEditorToLine } from './preview'; import { MarkdownPreviewConfigurationManager } from './previewConfig'; import { MarkdownContentProvider } from './previewContentProvider'; +import { isMarkdownFile } from '../util/file'; export interface DynamicPreviewSettings { readonly resourceColumn: vscode.ViewColumn; @@ -75,6 +76,17 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview super(); this._register(vscode.window.registerWebviewPanelSerializer(DynamicMarkdownPreview.viewType, this)); this._register(vscode.window.registerCustomEditorProvider(this.customEditorViewType, this)); + + this._register(vscode.window.onDidChangeActiveTextEditor(textEditor => { + + // When at a markdown file, apply existing scroll settings + if (textEditor && textEditor.document && isMarkdownFile(textEditor.document)) { + const line = this._topmostLineMonitor.getPreviousEditorLineByUri(textEditor.document.uri); + if (line) { + scrollEditorToLine(line, textEditor); + } + } + })); } public refresh() { @@ -160,14 +172,18 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview document: vscode.TextDocument, webview: vscode.WebviewPanel ): Promise { + const lineNumber = this._topmostLineMonitor.getPreviousEditorLineByUri(document.uri); const preview = StaticMarkdownPreview.revive( document.uri, webview, this._contentProvider, this._previewConfigurations, + this._topmostLineMonitor, this._logger, this._contributions, - this._engine); + this._engine, + lineNumber + ); this.registerStaticPreview(preview); } @@ -175,11 +191,14 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview resource: vscode.Uri, previewSettings: DynamicPreviewSettings ): DynamicMarkdownPreview { + const activeTextEditorURI = vscode.window.activeTextEditor?.document.uri; + const scrollLine = (activeTextEditorURI?.toString() === resource.toString()) ? vscode.window.activeTextEditor?.visibleRanges[0].start.line : undefined; const preview = DynamicMarkdownPreview.create( { resource, resourceColumn: previewSettings.resourceColumn, locked: previewSettings.locked, + line: scrollLine, }, previewSettings.previewColumn, this._contentProvider, diff --git a/lib/vscode/extensions/markdown-language-features/src/features/smartSelect.ts b/extensions/markdown-language-features/src/features/smartSelect.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/features/smartSelect.ts rename to extensions/markdown-language-features/src/features/smartSelect.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/features/workspaceSymbolProvider.ts b/extensions/markdown-language-features/src/features/workspaceSymbolProvider.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/features/workspaceSymbolProvider.ts rename to extensions/markdown-language-features/src/features/workspaceSymbolProvider.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/logger.ts b/extensions/markdown-language-features/src/logger.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/logger.ts rename to extensions/markdown-language-features/src/logger.ts diff --git a/extensions/markdown-language-features/src/markdownEngine.ts b/extensions/markdown-language-features/src/markdownEngine.ts new file mode 100644 index 000000000000..346547f3da9f --- /dev/null +++ b/extensions/markdown-language-features/src/markdownEngine.ts @@ -0,0 +1,399 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { MarkdownIt, Token } from 'markdown-it'; +import * as vscode from 'vscode'; +import { MarkdownContributionProvider as MarkdownContributionProvider } from './markdownExtensions'; +import { Slugifier } from './slugify'; +import { SkinnyTextDocument } from './tableOfContentsProvider'; +import { hash } from './util/hash'; +import { isOfScheme, Schemes } from './util/links'; +import { WebviewResourceProvider } from './util/resources'; + +const UNICODE_NEWLINE_REGEX = /\u2028|\u2029/g; + +interface MarkdownItConfig { + readonly breaks: boolean; + readonly linkify: boolean; + readonly typographer: boolean; +} + +class TokenCache { + private cachedDocument?: { + readonly uri: vscode.Uri; + readonly version: number; + readonly config: MarkdownItConfig; + }; + private tokens?: Token[]; + + public tryGetCached(document: SkinnyTextDocument, config: MarkdownItConfig): Token[] | undefined { + if (this.cachedDocument + && this.cachedDocument.uri.toString() === document.uri.toString() + && this.cachedDocument.version === document.version + && this.cachedDocument.config.breaks === config.breaks + && this.cachedDocument.config.linkify === config.linkify + ) { + return this.tokens; + } + return undefined; + } + + public update(document: SkinnyTextDocument, config: MarkdownItConfig, tokens: Token[]) { + this.cachedDocument = { + uri: document.uri, + version: document.version, + config, + }; + this.tokens = tokens; + } + + public clean(): void { + this.cachedDocument = undefined; + this.tokens = undefined; + } +} + +export interface RenderOutput { + html: string; + containingImages: { src: string }[]; +} + +interface RenderEnv { + containingImages: { src: string }[]; + currentDocument: vscode.Uri | undefined; + resourceProvider: WebviewResourceProvider | undefined; +} + +export class MarkdownEngine { + private md?: Promise; + + private _slugCount = new Map(); + private _tokenCache = new TokenCache(); + + public constructor( + private readonly contributionProvider: MarkdownContributionProvider, + private readonly slugifier: Slugifier, + ) { + contributionProvider.onContributionsChanged(() => { + // Markdown plugin contributions may have changed + this.md = undefined; + }); + } + + private async getEngine(config: MarkdownItConfig): Promise { + if (!this.md) { + this.md = import('markdown-it').then(async markdownIt => { + let md: MarkdownIt = markdownIt(await getMarkdownOptions(() => md)); + + for (const plugin of this.contributionProvider.contributions.markdownItPlugins.values()) { + try { + md = (await plugin)(md); + } catch { + // noop + } + } + + const frontMatterPlugin = require('markdown-it-front-matter'); + // Extract rules from front matter plugin and apply at a lower precedence + let fontMatterRule: any; + frontMatterPlugin({ + block: { + ruler: { + before: (_id: any, _id2: any, rule: any) => { fontMatterRule = rule; } + } + } + }, () => { /* noop */ }); + + md.block.ruler.before('fence', 'front_matter', fontMatterRule, { + alt: ['paragraph', 'reference', 'blockquote', 'list'] + }); + + for (const renderName of ['paragraph_open', 'heading_open', 'image', 'code_block', 'fence', 'blockquote_open', 'list_item_open']) { + this.addLineNumberRenderer(md, renderName); + } + + this.addImageRenderer(md); + this.addFencedRenderer(md); + this.addLinkNormalizer(md); + this.addLinkValidator(md); + this.addNamedHeaders(md); + this.addLinkRenderer(md); + return md; + }); + } + + const md = await this.md!; + md.set(config); + return md; + } + + private tokenizeDocument( + document: SkinnyTextDocument, + config: MarkdownItConfig, + engine: MarkdownIt + ): Token[] { + const cached = this._tokenCache.tryGetCached(document, config); + if (cached) { + return cached; + } + + const tokens = this.tokenizeString(document.getText(), engine); + this._tokenCache.update(document, config, tokens); + return tokens; + } + + private tokenizeString(text: string, engine: MarkdownIt) { + this._slugCount = new Map(); + + return engine.parse(text.replace(UNICODE_NEWLINE_REGEX, ''), {}); + } + + public async render(input: SkinnyTextDocument | string, resourceProvider?: WebviewResourceProvider): Promise { + const config = this.getConfig(typeof input === 'string' ? undefined : input.uri); + const engine = await this.getEngine(config); + + const tokens = typeof input === 'string' + ? this.tokenizeString(input, engine) + : this.tokenizeDocument(input, config, engine); + + const env: RenderEnv = { + containingImages: [], + currentDocument: typeof input === 'string' ? undefined : input.uri, + resourceProvider, + }; + + const html = engine.renderer.render(tokens, { + ...(engine as any).options, + ...config + }, env); + + return { + html, + containingImages: env.containingImages + }; + } + + public async parse(document: SkinnyTextDocument): Promise { + const config = this.getConfig(document.uri); + const engine = await this.getEngine(config); + return this.tokenizeDocument(document, config, engine); + } + + public cleanCache(): void { + this._tokenCache.clean(); + } + + private getConfig(resource?: vscode.Uri): MarkdownItConfig { + const config = vscode.workspace.getConfiguration('markdown', resource); + return { + breaks: config.get('preview.breaks', false), + linkify: config.get('preview.linkify', true), + typographer: config.get('preview.typographer', false) + }; + } + + private addLineNumberRenderer(md: MarkdownIt, ruleName: string): void { + const original = md.renderer.rules[ruleName]; + md.renderer.rules[ruleName] = (tokens: Token[], idx: number, options: any, env: any, self: any) => { + const token = tokens[idx]; + if (token.map && token.map.length) { + token.attrSet('data-line', token.map[0] + ''); + token.attrJoin('class', 'code-line'); + } + + if (original) { + return original(tokens, idx, options, env, self); + } else { + return self.renderToken(tokens, idx, options, env, self); + } + }; + } + + private addImageRenderer(md: MarkdownIt): void { + const original = md.renderer.rules.image; + md.renderer.rules.image = (tokens: Token[], idx: number, options: any, env: RenderEnv, self: any) => { + const token = tokens[idx]; + token.attrJoin('class', 'loading'); + + const src = token.attrGet('src'); + if (src) { + env.containingImages?.push({ src }); + const imgHash = hash(src); + token.attrSet('id', `image-hash-${imgHash}`); + + if (!token.attrGet('data-src')) { + token.attrSet('src', this.toResourceUri(src, env.currentDocument, env.resourceProvider)); + token.attrSet('data-src', src); + } + } + + if (original) { + return original(tokens, idx, options, env, self); + } else { + return self.renderToken(tokens, idx, options, env, self); + } + }; + } + + private addFencedRenderer(md: MarkdownIt): void { + const original = md.renderer.rules['fenced']; + md.renderer.rules['fenced'] = (tokens: Token[], idx: number, options: any, env: any, self: any) => { + const token = tokens[idx]; + if (token.map && token.map.length) { + token.attrJoin('class', 'hljs'); + } + + return original(tokens, idx, options, env, self); + }; + } + + private addLinkNormalizer(md: MarkdownIt): void { + const normalizeLink = md.normalizeLink; + md.normalizeLink = (link: string) => { + try { + // Normalize VS Code schemes to target the current version + if (isOfScheme(Schemes.vscode, link) || isOfScheme(Schemes['vscode-insiders'], link)) { + return normalizeLink(vscode.Uri.parse(link).with({ scheme: vscode.env.uriScheme }).toString()); + } + + } catch (e) { + // noop + } + return normalizeLink(link); + }; + } + + private addLinkValidator(md: MarkdownIt): void { + const validateLink = md.validateLink; + md.validateLink = (link: string) => { + return validateLink(link) + || isOfScheme(Schemes.vscode, link) + || isOfScheme(Schemes['vscode-insiders'], link) + || /^data:image\/.*?;/.test(link); + }; + } + + private addNamedHeaders(md: MarkdownIt): void { + const original = md.renderer.rules.heading_open; + md.renderer.rules.heading_open = (tokens: Token[], idx: number, options: any, env: any, self: any) => { + const title = tokens[idx + 1].children.reduce((acc: string, t: any) => acc + t.content, ''); + let slug = this.slugifier.fromHeading(title); + + if (this._slugCount.has(slug.value)) { + const count = this._slugCount.get(slug.value)!; + this._slugCount.set(slug.value, count + 1); + slug = this.slugifier.fromHeading(slug.value + '-' + (count + 1)); + } else { + this._slugCount.set(slug.value, 0); + } + + tokens[idx].attrs = tokens[idx].attrs || []; + tokens[idx].attrs.push(['id', slug.value]); + + if (original) { + return original(tokens, idx, options, env, self); + } else { + return self.renderToken(tokens, idx, options, env, self); + } + }; + } + + private addLinkRenderer(md: MarkdownIt): void { + const old_render = md.renderer.rules.link_open || ((tokens: Token[], idx: number, options: any, _env: any, self: any) => { + return self.renderToken(tokens, idx, options); + }); + + md.renderer.rules.link_open = (tokens: Token[], idx: number, options: any, env: any, self: any) => { + const token = tokens[idx]; + const hrefIndex = token.attrIndex('href'); + if (hrefIndex >= 0) { + const href = token.attrs[hrefIndex][1]; + token.attrPush(['data-href', href]); + } + return old_render(tokens, idx, options, env, self); + }; + } + + private toResourceUri(href: string, currentDocument: vscode.Uri | undefined, resourceProvider: WebviewResourceProvider | undefined): string { + try { + // Support file:// links + if (isOfScheme(Schemes.file, href)) { + const uri = vscode.Uri.parse(href); + if (resourceProvider) { + return resourceProvider.asWebviewUri(uri).toString(true); + } + // Not sure how to resolve this + return href; + } + + // If original link doesn't look like a url with a scheme, assume it must be a link to a file in workspace + if (!/^[a-z\-]+:/i.test(href)) { + // Use a fake scheme for parsing + let uri = vscode.Uri.parse('markdown-link:' + href); + + // Relative paths should be resolved correctly inside the preview but we need to + // handle absolute paths specially to resolve them relative to the workspace root + if (uri.path[0] === '/' && currentDocument) { + const root = vscode.workspace.getWorkspaceFolder(currentDocument); + if (root) { + uri = vscode.Uri.joinPath(root.uri, uri.fsPath).with({ + fragment: uri.fragment, + query: uri.query, + }); + + if (resourceProvider) { + return resourceProvider.asWebviewUri(uri).toString(true); + } else { + uri = uri.with({ scheme: 'markdown-link' }); + } + } + } + + return uri.toString(true).replace(/^markdown-link:/, ''); + } + + return href; + } catch { + return href; + } + } +} + +async function getMarkdownOptions(md: () => MarkdownIt) { + const hljs = await import('highlight.js'); + return { + html: true, + highlight: (str: string, lang?: string) => { + lang = normalizeHighlightLang(lang); + if (lang && hljs.getLanguage(lang)) { + try { + return `
    ${hljs.highlight(lang, str, true).value}
    `; + } + catch (error) { } + } + return `
    ${md().utils.escapeHtml(str)}
    `; + } + }; +} + +function normalizeHighlightLang(lang: string | undefined) { + switch (lang && lang.toLowerCase()) { + case 'tsx': + case 'typescriptreact': + // Workaround for highlight not supporting tsx: https://github.com/isagalaev/highlight.js/issues/1155 + return 'jsx'; + + case 'json5': + case 'jsonc': + return 'json'; + + case 'c#': + case 'csharp': + return 'cs'; + + default: + return lang; + } +} diff --git a/lib/vscode/extensions/markdown-language-features/src/markdownExtensions.ts b/extensions/markdown-language-features/src/markdownExtensions.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/markdownExtensions.ts rename to extensions/markdown-language-features/src/markdownExtensions.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/security.ts b/extensions/markdown-language-features/src/security.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/security.ts rename to extensions/markdown-language-features/src/security.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/slugify.ts b/extensions/markdown-language-features/src/slugify.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/slugify.ts rename to extensions/markdown-language-features/src/slugify.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/tableOfContentsProvider.ts b/extensions/markdown-language-features/src/tableOfContentsProvider.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/tableOfContentsProvider.ts rename to extensions/markdown-language-features/src/tableOfContentsProvider.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/telemetryReporter.ts b/extensions/markdown-language-features/src/telemetryReporter.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/telemetryReporter.ts rename to extensions/markdown-language-features/src/telemetryReporter.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/test/documentLink.test.ts b/extensions/markdown-language-features/src/test/documentLink.test.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/test/documentLink.test.ts rename to extensions/markdown-language-features/src/test/documentLink.test.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/test/documentLinkProvider.test.ts b/extensions/markdown-language-features/src/test/documentLinkProvider.test.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/test/documentLinkProvider.test.ts rename to extensions/markdown-language-features/src/test/documentLinkProvider.test.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/test/documentSymbolProvider.test.ts b/extensions/markdown-language-features/src/test/documentSymbolProvider.test.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/test/documentSymbolProvider.test.ts rename to extensions/markdown-language-features/src/test/documentSymbolProvider.test.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/test/engine.test.ts b/extensions/markdown-language-features/src/test/engine.test.ts similarity index 91% rename from lib/vscode/extensions/markdown-language-features/src/test/engine.test.ts rename to extensions/markdown-language-features/src/test/engine.test.ts index c3eb7c850566..e398ed088ce9 100644 --- a/lib/vscode/extensions/markdown-language-features/src/test/engine.test.ts +++ b/extensions/markdown-language-features/src/test/engine.test.ts @@ -37,11 +37,11 @@ suite('markdown.engine', () => { const engine = createNewMarkdownEngine(); assert.deepStrictEqual((await engine.render(input)), { html: '

    ' - + ' ' + + ' ' + ' ' - + ' ' - + ' ' - + '' + + ' ' + + ' ' + + '' + '

    \n' , containingImages: [{ src: 'img.png' }, { src: 'http://example.org/img.png' }, { src: 'img.png' }, { src: './img2.png' }], diff --git a/lib/vscode/extensions/markdown-language-features/src/test/engine.ts b/extensions/markdown-language-features/src/test/engine.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/test/engine.ts rename to extensions/markdown-language-features/src/test/engine.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/test/foldingProvider.test.ts b/extensions/markdown-language-features/src/test/foldingProvider.test.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/test/foldingProvider.test.ts rename to extensions/markdown-language-features/src/test/foldingProvider.test.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/test/inMemoryDocument.ts b/extensions/markdown-language-features/src/test/inMemoryDocument.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/test/inMemoryDocument.ts rename to extensions/markdown-language-features/src/test/inMemoryDocument.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/test/index.ts b/extensions/markdown-language-features/src/test/index.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/test/index.ts rename to extensions/markdown-language-features/src/test/index.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/test/smartSelect.test.ts b/extensions/markdown-language-features/src/test/smartSelect.test.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/test/smartSelect.test.ts rename to extensions/markdown-language-features/src/test/smartSelect.test.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/test/tableOfContentsProvider.test.ts b/extensions/markdown-language-features/src/test/tableOfContentsProvider.test.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/test/tableOfContentsProvider.test.ts rename to extensions/markdown-language-features/src/test/tableOfContentsProvider.test.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/test/urlToUri.test.ts b/extensions/markdown-language-features/src/test/urlToUri.test.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/test/urlToUri.test.ts rename to extensions/markdown-language-features/src/test/urlToUri.test.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/test/util.ts b/extensions/markdown-language-features/src/test/util.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/test/util.ts rename to extensions/markdown-language-features/src/test/util.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/test/workspaceSymbolProvider.test.ts b/extensions/markdown-language-features/src/test/workspaceSymbolProvider.test.ts similarity index 98% rename from lib/vscode/extensions/markdown-language-features/src/test/workspaceSymbolProvider.test.ts rename to extensions/markdown-language-features/src/test/workspaceSymbolProvider.test.ts index e74d3b592bcb..d66cbf198b2b 100644 --- a/lib/vscode/extensions/markdown-language-features/src/test/workspaceSymbolProvider.test.ts +++ b/extensions/markdown-language-features/src/test/workspaceSymbolProvider.test.ts @@ -18,7 +18,7 @@ suite('markdown.WorkspaceSymbolProvider', () => { test('Should not return anything for empty workspace', async () => { const provider = new MarkdownWorkspaceSymbolProvider(symbolProvider, new InMemoryWorkspaceMarkdownDocumentProvider([])); - assert.deepEqual(await provider.provideWorkspaceSymbols(''), []); + assert.deepStrictEqual(await provider.provideWorkspaceSymbols(''), []); }); test('Should return symbols from workspace with one markdown file', async () => { diff --git a/lib/vscode/extensions/markdown-language-features/src/typings/ref.d.ts b/extensions/markdown-language-features/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/typings/ref.d.ts rename to extensions/markdown-language-features/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/util/arrays.ts b/extensions/markdown-language-features/src/util/arrays.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/util/arrays.ts rename to extensions/markdown-language-features/src/util/arrays.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/util/dispose.ts b/extensions/markdown-language-features/src/util/dispose.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/util/dispose.ts rename to extensions/markdown-language-features/src/util/dispose.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/util/file.ts b/extensions/markdown-language-features/src/util/file.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/util/file.ts rename to extensions/markdown-language-features/src/util/file.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/util/hash.ts b/extensions/markdown-language-features/src/util/hash.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/util/hash.ts rename to extensions/markdown-language-features/src/util/hash.ts diff --git a/lib/vscode/extensions/markdown-language-features/src/util/lazy.ts b/extensions/markdown-language-features/src/util/lazy.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/util/lazy.ts rename to extensions/markdown-language-features/src/util/lazy.ts diff --git a/extensions/markdown-language-features/src/util/links.ts b/extensions/markdown-language-features/src/util/links.ts new file mode 100644 index 000000000000..02e5aba6590b --- /dev/null +++ b/extensions/markdown-language-features/src/util/links.ts @@ -0,0 +1,46 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; + +export const Schemes = { + http: 'http:', + https: 'https:', + file: 'file:', + untitled: 'untitled', + mailto: 'mailto:', + data: 'data:', + vscode: 'vscode:', + 'vscode-insiders': 'vscode-insiders:', +}; + +const knownSchemes = [ + ...Object.values(Schemes), + `${vscode.env.uriScheme}:` +]; + +export function getUriForLinkWithKnownExternalScheme(link: string): vscode.Uri | undefined { + if (knownSchemes.some(knownScheme => isOfScheme(knownScheme, link))) { + return vscode.Uri.parse(link); + } + + return undefined; +} + +export function isOfScheme(scheme: string, link: string): boolean { + return link.toLowerCase().startsWith(scheme); +} + +export const MarkdownFileExtensions: readonly string[] = [ + '.md', + '.mkd', + '.mdwn', + '.mdown', + '.markdown', + '.markdn', + '.mdtxt', + '.mdtext', + '.workbook', +]; diff --git a/extensions/markdown-language-features/src/util/resources.ts b/extensions/markdown-language-features/src/util/resources.ts new file mode 100644 index 000000000000..f1f2d0886ab2 --- /dev/null +++ b/extensions/markdown-language-features/src/util/resources.ts @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; + +export interface WebviewResourceProvider { + asWebviewUri(resource: vscode.Uri): vscode.Uri; + + readonly cspSource: string; +} + diff --git a/extensions/markdown-language-features/src/util/topmostLineMonitor.ts b/extensions/markdown-language-features/src/util/topmostLineMonitor.ts new file mode 100644 index 000000000000..62f5b5c194b1 --- /dev/null +++ b/extensions/markdown-language-features/src/util/topmostLineMonitor.ts @@ -0,0 +1,93 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { Disposable } from '../util/dispose'; +import { isMarkdownFile } from './file'; + +export interface LastScrollLocation { + readonly line: number; + readonly uri: vscode.Uri; +} + +export class TopmostLineMonitor extends Disposable { + + private readonly pendingUpdates = new Map(); + private readonly throttle = 50; + private previousEditorInfo = new Map(); + public isPrevEditorCustom = false; + + constructor() { + super(); + + if (vscode.window.activeTextEditor) { + const line = getVisibleLine(vscode.window.activeTextEditor); + this.setPreviousEditorLine({ uri: vscode.window.activeTextEditor.document.uri, line: line ?? 0 }); + } + + this._register(vscode.window.onDidChangeTextEditorVisibleRanges(event => { + if (isMarkdownFile(event.textEditor.document)) { + const line = getVisibleLine(event.textEditor); + if (typeof line === 'number') { + this.updateLine(event.textEditor.document.uri, line); + this.setPreviousEditorLine({ uri: event.textEditor.document.uri, line: line }); + } + } + })); + } + + private readonly _onChanged = this._register(new vscode.EventEmitter<{ readonly resource: vscode.Uri, readonly line: number }>()); + public readonly onDidChanged = this._onChanged.event; + + public setPreviousEditorLine(scrollLocation: LastScrollLocation): void { + this.previousEditorInfo.set(scrollLocation.uri.toString(), scrollLocation); + } + + public getPreviousEditorLineByUri(resource: vscode.Uri): number | undefined { + const scrollLoc = this.previousEditorInfo.get(resource.toString()); + return scrollLoc?.line; + } + + public updateLine( + resource: vscode.Uri, + line: number + ) { + const key = resource.toString(); + if (!this.pendingUpdates.has(key)) { + // schedule update + setTimeout(() => { + if (this.pendingUpdates.has(key)) { + this._onChanged.fire({ + resource, + line: this.pendingUpdates.get(key) as number + }); + this.pendingUpdates.delete(key); + } + }, this.throttle); + } + + this.pendingUpdates.set(key, line); + } +} + +/** + * Get the top-most visible range of `editor`. + * + * Returns a fractional line number based the visible character within the line. + * Floor to get real line number + */ +export function getVisibleLine( + editor: vscode.TextEditor +): number | undefined { + if (!editor.visibleRanges.length) { + return undefined; + } + + const firstVisiblePosition = editor.visibleRanges[0].start; + const lineNumber = firstVisiblePosition.line; + const line = editor.document.lineAt(lineNumber); + const progress = firstVisiblePosition.character / (line.text.length + 2); + return lineNumber + progress; +} diff --git a/lib/vscode/extensions/markdown-language-features/src/util/url.ts b/extensions/markdown-language-features/src/util/url.ts similarity index 100% rename from lib/vscode/extensions/markdown-language-features/src/util/url.ts rename to extensions/markdown-language-features/src/util/url.ts diff --git a/lib/vscode/extensions/markdown-language-features/test-workspace/a.md b/extensions/markdown-language-features/test-workspace/a.md similarity index 100% rename from lib/vscode/extensions/markdown-language-features/test-workspace/a.md rename to extensions/markdown-language-features/test-workspace/a.md diff --git a/lib/vscode/extensions/markdown-language-features/test-workspace/b.md b/extensions/markdown-language-features/test-workspace/b.md similarity index 100% rename from lib/vscode/extensions/markdown-language-features/test-workspace/b.md rename to extensions/markdown-language-features/test-workspace/b.md diff --git a/lib/vscode/extensions/markdown-language-features/test-workspace/sub/c.md b/extensions/markdown-language-features/test-workspace/sub/c.md similarity index 100% rename from lib/vscode/extensions/markdown-language-features/test-workspace/sub/c.md rename to extensions/markdown-language-features/test-workspace/sub/c.md diff --git a/lib/vscode/extensions/markdown-language-features/test-workspace/sub/d.md b/extensions/markdown-language-features/test-workspace/sub/d.md similarity index 100% rename from lib/vscode/extensions/markdown-language-features/test-workspace/sub/d.md rename to extensions/markdown-language-features/test-workspace/sub/d.md diff --git a/lib/vscode/extensions/markdown-language-features/tsconfig.json b/extensions/markdown-language-features/tsconfig.json similarity index 100% rename from lib/vscode/extensions/markdown-language-features/tsconfig.json rename to extensions/markdown-language-features/tsconfig.json diff --git a/lib/vscode/extensions/markdown-language-features/webpack.config.js b/extensions/markdown-language-features/webpack.config.js similarity index 100% rename from lib/vscode/extensions/markdown-language-features/webpack.config.js rename to extensions/markdown-language-features/webpack.config.js diff --git a/extensions/markdown-language-features/yarn.lock b/extensions/markdown-language-features/yarn.lock new file mode 100644 index 000000000000..3f1174c3684f --- /dev/null +++ b/extensions/markdown-language-features/yarn.lock @@ -0,0 +1,188 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/highlight.js@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-10.1.0.tgz#89bb0c202997d7a90a07bd2ec1f7d00c56bb90b4" + integrity sha512-77hF2dGBsOgnvZll1vymYiNUtqJ8cJfXPD6GG/2M0aLRc29PkvB7Au6sIDjIEFcSICBhCh2+Pyq6WSRS7LUm6A== + dependencies: + highlight.js "*" + +"@types/lodash.throttle@^4.1.3": + version "4.1.3" + resolved "https://registry.yarnpkg.com/@types/lodash.throttle/-/lodash.throttle-4.1.3.tgz#8bfa4fec519d09ebce56c815bcbff3e55c604db9" + integrity sha512-FUm7uMuYRX7dzqmgX02bxdBwC75owUxGA4dDKtFePDLJ6N1ofXxkRX3NhJV8wOrNs/wCjaY6sDVJrD1lbyERoQ== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*": + version "4.14.104" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" + integrity sha512-ufQcVg4daO8xQ5kopxRHanqFdL4AI7ondQkV+2f+7mz3gvp0LkBx2zBRC6hfs3T87mzQFmf5Fck7Fi145Ul6NQ== + +"@types/markdown-it@0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.2.tgz#5d9ad19e6e6508cdd2f2596df86fd0aade598660" + integrity sha1-XZrRnm5lCM3S8llt+G/Qqt5ZhmA= + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +"@types/vscode-webview@^1.57.0": + version "1.57.0" + resolved "https://registry.yarnpkg.com/@types/vscode-webview/-/vscode-webview-1.57.0.tgz#bad5194d45ae8d03afc1c0f67f71ff5e7a243bbf" + integrity sha512-x3Cb/SMa1IwRHfSvKaZDZOTh4cNoG505c3NjTqGlMC082m++x/ETUmtYniDsw6SSmYzZXO8KBNhYxR0+VqymqA== + +applicationinsights@1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" + integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== + dependencies: + cls-hooked "^4.2.2" + continuation-local-storage "^3.2.1" + diagnostic-channel "0.2.0" + diagnostic-channel-publishers "^0.3.3" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +async-hook-jl@^1.7.6: + version "1.7.6" + resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" + integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== + dependencies: + stack-chain "^1.3.7" + +async-listener@^0.6.0: + version "0.6.10" + resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" + integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== + dependencies: + semver "^5.3.0" + shimmer "^1.1.0" + +cls-hooked@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" + integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== + dependencies: + async-hook-jl "^1.7.6" + emitter-listener "^1.0.1" + semver "^5.4.1" + +continuation-local-storage@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" + integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== + dependencies: + async-listener "^0.6.0" + emitter-listener "^1.1.1" + +diagnostic-channel-publishers@^0.3.3: + version "0.3.5" + resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" + integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== + +diagnostic-channel@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" + integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= + dependencies: + semver "^5.3.0" + +emitter-listener@^1.0.1, emitter-listener@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" + integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== + dependencies: + shimmer "^1.2.0" + +entities@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" + integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== + +highlight.js@*, highlight.js@^10.4.1: + version "10.4.1" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.4.1.tgz#d48fbcf4a9971c4361b3f95f302747afe19dbad0" + integrity sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg== + +linkify-it@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.2.tgz#f55eeb8bc1d3ae754049e124ab3bb56d97797fb8" + integrity sha512-gDBO4aHNZS6coiZCKVhSNh43F9ioIL4JwRjLZPkoLIY4yZFwg264Y5lu2x6rb1Js42Gh6Yqm2f6L2AJcnkzinQ== + dependencies: + uc.micro "^1.0.1" + +lodash.throttle@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" + integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ= + +markdown-it-front-matter@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/markdown-it-front-matter/-/markdown-it-front-matter-0.2.1.tgz#dca49a827bb3cebb0528452c1d87dff276eb28dc" + integrity sha512-ydUIqlKfDscRpRUTRcA3maeeUKn3Cl5EaKZSA+I/f0KOGCBurW7e+bbz59sxqkC3FA9Q2S2+t4mpkH9T0BCM6A== + +markdown-it@^12.0.3: + version "12.0.3" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.3.tgz#8d1e47daf1d716d63610495eb93f6665573e4abe" + integrity sha512-M57RsMv+QQmJHz1yCu0gTJRMx/LlxRPtrrw+2kb/CpDVK/graCmWO0qfNnz/SE1FCNdyq3pkMMZ+itTnyT/YGA== + dependencies: + argparse "^2.0.1" + entities "~2.1.0" + linkify-it "^3.0.1" + mdurl "^1.0.1" + uc.micro "^1.0.5" + +mdurl@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" + integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= + +semver@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== + +semver@^5.4.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +shimmer@^1.1.0, shimmer@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + +stack-chain@^1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" + integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= + +uc.micro@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192" + integrity sha1-ftUNXg+an7ClczeSWfKndFjVAZI= + +uc.micro@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376" + integrity sha512-JoLI4g5zv5qNyT09f4YAvEZIIV1oOjqnewYg5D38dkQljIzpPT296dbIGvKro3digYI1bkb7W6EP1y4uDlmzLg== + +vscode-extension-telemetry@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" + integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== + dependencies: + applicationinsights "1.7.4" + +vscode-nls@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" + integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== diff --git a/lib/vscode/extensions/merge-conflict/.vscodeignore b/extensions/merge-conflict/.vscodeignore similarity index 100% rename from lib/vscode/extensions/merge-conflict/.vscodeignore rename to extensions/merge-conflict/.vscodeignore diff --git a/lib/vscode/extensions/merge-conflict/README.md b/extensions/merge-conflict/README.md similarity index 100% rename from lib/vscode/extensions/merge-conflict/README.md rename to extensions/merge-conflict/README.md diff --git a/lib/vscode/extensions/merge-conflict/extension-browser.webpack.config.js b/extensions/merge-conflict/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/merge-conflict/extension-browser.webpack.config.js rename to extensions/merge-conflict/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/merge-conflict/extension.webpack.config.js b/extensions/merge-conflict/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/merge-conflict/extension.webpack.config.js rename to extensions/merge-conflict/extension.webpack.config.js diff --git a/lib/vscode/extensions/merge-conflict/media/icon.png b/extensions/merge-conflict/media/icon.png similarity index 100% rename from lib/vscode/extensions/merge-conflict/media/icon.png rename to extensions/merge-conflict/media/icon.png diff --git a/extensions/merge-conflict/package.json b/extensions/merge-conflict/package.json new file mode 100644 index 000000000000..2c4719f4b71a --- /dev/null +++ b/extensions/merge-conflict/package.json @@ -0,0 +1,168 @@ +{ + "name": "merge-conflict", + "publisher": "vscode", + "displayName": "%displayName%", + "description": "%description%", + "icon": "media/icon.png", + "version": "1.0.0", + "license": "MIT", + "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", + "engines": { + "vscode": "^1.5.0" + }, + "categories": [ + "Other" + ], + "capabilities": { + "virtualWorkspaces": false, + "untrustedWorkspaces": { + "supported": true + } + }, + "activationEvents": [ + "onStartupFinished" + ], + "main": "./out/mergeConflictMain", + "browser": "./dist/browser/mergeConflictMain", + "scripts": { + "compile": "gulp compile-extension:merge-conflict", + "watch": "gulp watch-extension:merge-conflict" + }, + "contributes": { + "commands": [ + { + "category": "%command.category%", + "title": "%command.accept.all-current%", + "original": "Accept All Current", + "command": "merge-conflict.accept.all-current" + }, + { + "category": "%command.category%", + "title": "%command.accept.all-incoming%", + "original": "Accept All Incoming", + "command": "merge-conflict.accept.all-incoming" + }, + { + "category": "%command.category%", + "title": "%command.accept.all-both%", + "original": "Accept All Both", + "command": "merge-conflict.accept.all-both" + }, + { + "category": "%command.category%", + "title": "%command.accept.current%", + "original": "Accept Current", + "command": "merge-conflict.accept.current" + }, + { + "category": "%command.category%", + "title": "%command.accept.incoming%", + "original": "Accept Incoming", + "command": "merge-conflict.accept.incoming" + }, + { + "category": "%command.category%", + "title": "%command.accept.selection%", + "original": "Accept Selection", + "command": "merge-conflict.accept.selection" + }, + { + "category": "%command.category%", + "title": "%command.accept.both%", + "original": "Accept Both", + "command": "merge-conflict.accept.both" + }, + { + "category": "%command.category%", + "title": "%command.next%", + "original": "Next Conflict", + "command": "merge-conflict.next", + "icon": "$(arrow-down)" + }, + { + "category": "%command.category%", + "title": "%command.previous%", + "original": "Previous Conflict", + "command": "merge-conflict.previous", + "icon": "$(arrow-up)" + }, + { + "category": "%command.category%", + "title": "%command.compare%", + "original": "Compare Current Conflict", + "command": "merge-conflict.compare" + } + ], + "menus": { + "scm/resourceState/context": [ + { + "command": "merge-conflict.accept.all-current", + "when": "scmProvider == git && scmResourceGroup == merge", + "group": "1_modification" + }, + { + "command": "merge-conflict.accept.all-incoming", + "when": "scmProvider == git && scmResourceGroup == merge", + "group": "1_modification" + } + ], + "editor/title": [ + { + "command": "merge-conflict.previous", + "group": "navigation@1", + "when": "mergeConflictsCount && mergeConflictsCount != 0" + }, + { + "command": "merge-conflict.next", + "group": "navigation@2", + "when": "mergeConflictsCount && mergeConflictsCount != 0" + } + ] + }, + "configuration": { + "title": "%config.title%", + "properties": { + "merge-conflict.codeLens.enabled": { + "type": "boolean", + "description": "%config.codeLensEnabled%", + "default": true + }, + "merge-conflict.decorators.enabled": { + "type": "boolean", + "description": "%config.decoratorsEnabled%", + "default": true + }, + "merge-conflict.autoNavigateNextConflict.enabled": { + "type": "boolean", + "description": "%config.autoNavigateNextConflictEnabled%", + "default": false + }, + "merge-conflict.diffViewPosition": { + "type": "string", + "enum": [ + "Current", + "Beside", + "Below" + ], + "description": "%config.diffViewPosition%", + "enumDescriptions": [ + "%config.diffViewPosition.current%", + "%config.diffViewPosition.beside%", + "%config.diffViewPosition.below%" + ], + "default": "Current" + } + } + } + }, + "dependencies": { + "vscode-nls": "^4.0.0" + }, + "devDependencies": { + "@types/node": "14.x" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/merge-conflict/package.nls.json b/extensions/merge-conflict/package.nls.json similarity index 100% rename from lib/vscode/extensions/merge-conflict/package.nls.json rename to extensions/merge-conflict/package.nls.json diff --git a/lib/vscode/extensions/merge-conflict/src/codelensProvider.ts b/extensions/merge-conflict/src/codelensProvider.ts similarity index 100% rename from lib/vscode/extensions/merge-conflict/src/codelensProvider.ts rename to extensions/merge-conflict/src/codelensProvider.ts diff --git a/lib/vscode/extensions/merge-conflict/src/commandHandler.ts b/extensions/merge-conflict/src/commandHandler.ts similarity index 100% rename from lib/vscode/extensions/merge-conflict/src/commandHandler.ts rename to extensions/merge-conflict/src/commandHandler.ts diff --git a/lib/vscode/extensions/merge-conflict/src/contentProvider.ts b/extensions/merge-conflict/src/contentProvider.ts similarity index 100% rename from lib/vscode/extensions/merge-conflict/src/contentProvider.ts rename to extensions/merge-conflict/src/contentProvider.ts diff --git a/lib/vscode/extensions/merge-conflict/src/delayer.ts b/extensions/merge-conflict/src/delayer.ts similarity index 100% rename from lib/vscode/extensions/merge-conflict/src/delayer.ts rename to extensions/merge-conflict/src/delayer.ts diff --git a/lib/vscode/extensions/merge-conflict/src/documentMergeConflict.ts b/extensions/merge-conflict/src/documentMergeConflict.ts similarity index 100% rename from lib/vscode/extensions/merge-conflict/src/documentMergeConflict.ts rename to extensions/merge-conflict/src/documentMergeConflict.ts diff --git a/lib/vscode/extensions/merge-conflict/src/documentTracker.ts b/extensions/merge-conflict/src/documentTracker.ts similarity index 100% rename from lib/vscode/extensions/merge-conflict/src/documentTracker.ts rename to extensions/merge-conflict/src/documentTracker.ts diff --git a/lib/vscode/extensions/merge-conflict/src/interfaces.ts b/extensions/merge-conflict/src/interfaces.ts similarity index 100% rename from lib/vscode/extensions/merge-conflict/src/interfaces.ts rename to extensions/merge-conflict/src/interfaces.ts diff --git a/lib/vscode/extensions/merge-conflict/src/mergeConflictMain.ts b/extensions/merge-conflict/src/mergeConflictMain.ts similarity index 100% rename from lib/vscode/extensions/merge-conflict/src/mergeConflictMain.ts rename to extensions/merge-conflict/src/mergeConflictMain.ts diff --git a/lib/vscode/extensions/merge-conflict/src/mergeConflictParser.ts b/extensions/merge-conflict/src/mergeConflictParser.ts similarity index 100% rename from lib/vscode/extensions/merge-conflict/src/mergeConflictParser.ts rename to extensions/merge-conflict/src/mergeConflictParser.ts diff --git a/lib/vscode/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts similarity index 100% rename from lib/vscode/extensions/merge-conflict/src/mergeDecorator.ts rename to extensions/merge-conflict/src/mergeDecorator.ts diff --git a/lib/vscode/extensions/merge-conflict/src/services.ts b/extensions/merge-conflict/src/services.ts similarity index 100% rename from lib/vscode/extensions/merge-conflict/src/services.ts rename to extensions/merge-conflict/src/services.ts diff --git a/lib/vscode/extensions/merge-conflict/src/typings/refs.d.ts b/extensions/merge-conflict/src/typings/refs.d.ts similarity index 100% rename from lib/vscode/extensions/merge-conflict/src/typings/refs.d.ts rename to extensions/merge-conflict/src/typings/refs.d.ts diff --git a/lib/vscode/extensions/merge-conflict/tsconfig.json b/extensions/merge-conflict/tsconfig.json similarity index 100% rename from lib/vscode/extensions/merge-conflict/tsconfig.json rename to extensions/merge-conflict/tsconfig.json diff --git a/extensions/merge-conflict/yarn.lock b/extensions/merge-conflict/yarn.lock new file mode 100644 index 000000000000..f7a30098ef45 --- /dev/null +++ b/extensions/merge-conflict/yarn.lock @@ -0,0 +1,13 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +vscode-nls@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" + integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== diff --git a/lib/vscode/extensions/microsoft-authentication/.vscodeignore b/extensions/microsoft-authentication/.vscodeignore similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/.vscodeignore rename to extensions/microsoft-authentication/.vscodeignore diff --git a/lib/vscode/extensions/microsoft-authentication/extension-browser.webpack.config.js b/extensions/microsoft-authentication/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/extension-browser.webpack.config.js rename to extensions/microsoft-authentication/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/microsoft-authentication/extension.webpack.config.js b/extensions/microsoft-authentication/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/extension.webpack.config.js rename to extensions/microsoft-authentication/extension.webpack.config.js diff --git a/lib/vscode/extensions/microsoft-authentication/media/auth.css b/extensions/microsoft-authentication/media/auth.css similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/media/auth.css rename to extensions/microsoft-authentication/media/auth.css diff --git a/lib/vscode/extensions/microsoft-authentication/media/auth.html b/extensions/microsoft-authentication/media/auth.html similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/media/auth.html rename to extensions/microsoft-authentication/media/auth.html diff --git a/lib/vscode/extensions/microsoft-authentication/media/icon.png b/extensions/microsoft-authentication/media/icon.png similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/media/icon.png rename to extensions/microsoft-authentication/media/icon.png diff --git a/extensions/microsoft-authentication/package.json b/extensions/microsoft-authentication/package.json new file mode 100644 index 000000000000..148b5c3625c0 --- /dev/null +++ b/extensions/microsoft-authentication/package.json @@ -0,0 +1,69 @@ +{ + "name": "microsoft-authentication", + "publisher": "vscode", + "license": "MIT", + "displayName": "%displayName%", + "description": "%description%", + "version": "0.0.1", + "engines": { + "vscode": "^1.42.0" + }, + "icon": "media/icon.png", + "categories": [ + "Other" + ], + "enableProposedApi": true, + "activationEvents": [ + "onAuthenticationRequest:microsoft" + ], + "capabilities": { + "virtualWorkspaces": true, + "untrustedWorkspaces": { + "supported": true + } + }, + "extensionKind": [ + "ui", + "workspace", + "web" + ], + "contributes": { + "authentication": [ + { + "label": "Microsoft", + "id": "microsoft" + } + ] + }, + "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", + "main": "./out/extension.js", + "browser": "./dist/browser/extension.js", + "scripts": { + "vscode:prepublish": "npm run compile", + "compile": "gulp compile-extension:microsoft-authentication", + "compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none", + "watch": "gulp watch-extension:microsoft-authentication", + "watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose" + }, + "devDependencies": { + "@types/node": "14.x", + "@types/node-fetch": "^2.5.7", + "@types/randombytes": "^2.0.0", + "@types/sha.js": "^2.4.0", + "@types/uuid": "8.0.0" + }, + "dependencies": { + "buffer": "^5.6.0", + "node-fetch": "2.6.1", + "randombytes": "github:rmacfarlane/randombytes#b28d4ecee46262801ea09f15fa1f1513a05c5971", + "sha.js": "2.4.11", + "stream": "0.0.2", + "uuid": "^8.2.0", + "vscode-extension-telemetry": "0.1.7", + "vscode-nls": "^4.1.1" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/microsoft-authentication/package.nls.json b/extensions/microsoft-authentication/package.nls.json similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/package.nls.json rename to extensions/microsoft-authentication/package.nls.json diff --git a/lib/vscode/extensions/microsoft-authentication/src/AADHelper.ts b/extensions/microsoft-authentication/src/AADHelper.ts similarity index 96% rename from lib/vscode/extensions/microsoft-authentication/src/AADHelper.ts rename to extensions/microsoft-authentication/src/AADHelper.ts index 2414055c282c..77618032c12c 100644 --- a/lib/vscode/extensions/microsoft-authentication/src/AADHelper.ts +++ b/extensions/microsoft-authentication/src/AADHelper.ts @@ -396,19 +396,19 @@ export class AzureActiveDirectoryService { } private getCallbackEnvironment(callbackUri: vscode.Uri): string { - if (callbackUri.authority.endsWith('.workspaces.github.com') || callbackUri.authority.endsWith('.github.dev')) { - return `${callbackUri.authority},`; + if (callbackUri.scheme !== 'https' && callbackUri.scheme !== 'http') { + return callbackUri.scheme; } switch (callbackUri.authority) { case 'online.visualstudio.com': - return 'vso,'; + return 'vso'; case 'online-ppe.core.vsengsaas.visualstudio.com': - return 'vsoppe,'; + return 'vsoppe'; case 'online.dev.core.vsengsaas.visualstudio.com': - return 'vsodev,'; + return 'vsodev'; default: - return `${callbackUri.scheme},`; + return callbackUri.authority; } } @@ -417,7 +417,7 @@ export class AzureActiveDirectoryService { const nonce = randomBytes(16).toString('base64'); const port = (callbackUri.authority.match(/:([0-9]*)$/) || [])[1] || (callbackUri.scheme === 'https' ? 443 : 80); const callbackEnvironment = this.getCallbackEnvironment(callbackUri); - const state = `${callbackEnvironment}${port},${encodeURIComponent(nonce)},${encodeURIComponent(callbackUri.query)}`; + const state = `${callbackEnvironment},${port},${encodeURIComponent(nonce)},${encodeURIComponent(callbackUri.query)}`; const signInUrl = `${loginEndpointUrl}${tenant}/oauth2/v2.0/authorize`; let uri = vscode.Uri.parse(signInUrl); const codeVerifier = toBase64UrlEncoding(randomBytes(32).toString('base64')); @@ -566,7 +566,8 @@ export class AzureActiveDirectoryService { }); const proxyEndpoints: { [providerId: string]: string } | undefined = await vscode.commands.executeCommand('workbench.getCodeExchangeProxyEndpoints'); - const endpoint = proxyEndpoints && proxyEndpoints['microsoft'] || `${loginEndpointUrl}${tenant}/oauth2/v2.0/token`; + const endpointUrl = proxyEndpoints?.microsoft || loginEndpointUrl; + const endpoint = `${endpointUrl}${tenant}/oauth2/v2.0/token`; const result = await fetch(endpoint, { method: 'POST', @@ -602,7 +603,10 @@ export class AzureActiveDirectoryService { let result: Response; try { - result = await fetch(`https://login.microsoftonline.com/${tenant}/oauth2/v2.0/token`, { + const proxyEndpoints: { [providerId: string]: string } | undefined = await vscode.commands.executeCommand('workbench.getCodeExchangeProxyEndpoints'); + const endpointUrl = proxyEndpoints?.microsoft || loginEndpointUrl; + const endpoint = `${endpointUrl}${tenant}/oauth2/v2.0/token`; + result = await fetch(endpoint, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', diff --git a/lib/vscode/extensions/microsoft-authentication/src/authServer.ts b/extensions/microsoft-authentication/src/authServer.ts similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/src/authServer.ts rename to extensions/microsoft-authentication/src/authServer.ts diff --git a/lib/vscode/extensions/microsoft-authentication/src/env/browser/authServer.ts b/extensions/microsoft-authentication/src/env/browser/authServer.ts similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/src/env/browser/authServer.ts rename to extensions/microsoft-authentication/src/env/browser/authServer.ts diff --git a/lib/vscode/extensions/microsoft-authentication/src/env/browser/sha256.ts b/extensions/microsoft-authentication/src/env/browser/sha256.ts similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/src/env/browser/sha256.ts rename to extensions/microsoft-authentication/src/env/browser/sha256.ts diff --git a/lib/vscode/extensions/microsoft-authentication/src/env/node/sha256.ts b/extensions/microsoft-authentication/src/env/node/sha256.ts similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/src/env/node/sha256.ts rename to extensions/microsoft-authentication/src/env/node/sha256.ts diff --git a/lib/vscode/extensions/microsoft-authentication/src/extension.ts b/extensions/microsoft-authentication/src/extension.ts similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/src/extension.ts rename to extensions/microsoft-authentication/src/extension.ts diff --git a/lib/vscode/extensions/microsoft-authentication/src/keychain.ts b/extensions/microsoft-authentication/src/keychain.ts similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/src/keychain.ts rename to extensions/microsoft-authentication/src/keychain.ts diff --git a/lib/vscode/extensions/microsoft-authentication/src/logger.ts b/extensions/microsoft-authentication/src/logger.ts similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/src/logger.ts rename to extensions/microsoft-authentication/src/logger.ts diff --git a/lib/vscode/extensions/microsoft-authentication/src/microsoft-authentication.d.ts b/extensions/microsoft-authentication/src/microsoft-authentication.d.ts similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/src/microsoft-authentication.d.ts rename to extensions/microsoft-authentication/src/microsoft-authentication.d.ts diff --git a/lib/vscode/extensions/search-result/src/typings/refs.d.ts b/extensions/microsoft-authentication/src/typings/refs.d.ts similarity index 100% rename from lib/vscode/extensions/search-result/src/typings/refs.d.ts rename to extensions/microsoft-authentication/src/typings/refs.d.ts diff --git a/lib/vscode/extensions/microsoft-authentication/src/utils.ts b/extensions/microsoft-authentication/src/utils.ts similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/src/utils.ts rename to extensions/microsoft-authentication/src/utils.ts diff --git a/lib/vscode/extensions/microsoft-authentication/tsconfig.json b/extensions/microsoft-authentication/tsconfig.json similarity index 100% rename from lib/vscode/extensions/microsoft-authentication/tsconfig.json rename to extensions/microsoft-authentication/tsconfig.json diff --git a/extensions/microsoft-authentication/yarn.lock b/extensions/microsoft-authentication/yarn.lock new file mode 100644 index 000000000000..54025e55a213 --- /dev/null +++ b/extensions/microsoft-authentication/yarn.lock @@ -0,0 +1,235 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node-fetch@^2.5.7": + version "2.5.7" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.7.tgz#20a2afffa882ab04d44ca786449a276f9f6bbf3c" + integrity sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + +"@types/node@*": + version "14.0.23" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.23.tgz#676fa0883450ed9da0bb24156213636290892806" + integrity sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw== + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +"@types/randombytes@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/randombytes/-/randombytes-2.0.0.tgz#0087ff5e60ae68023b9bc4398b406fea7ad18304" + integrity sha512-bz8PhAVlwN72vqefzxa14DKNT8jK/mV66CSjwdVQM/k3Th3EPKfUtdMniwZgMedQTFuywAsfjnZsg+pEnltaMA== + dependencies: + "@types/node" "*" + +"@types/sha.js@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@types/sha.js/-/sha.js-2.4.0.tgz#bce682ef860b40f419d024fa08600c3b8d24bb01" + integrity sha512-amxKgPy6WJTKuw8mpUwjX2BSxuBtBmZfRwIUDIuPJKNwGN8CWDli8JTg5ONTWOtcTkHIstvT7oAhhYXqEjStHQ== + dependencies: + "@types/node" "*" + +"@types/uuid@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.0.0.tgz#165aae4819ad2174a17476dbe66feebd549556c0" + integrity sha512-xSQfNcvOiE5f9dyd4Kzxbof1aTrLobL278pGLKOZI6esGfZ7ts9Ka16CzIN6Y8hFHE1C7jIBZokULhK1bOgjRw== + +applicationinsights@1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" + integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== + dependencies: + cls-hooked "^4.2.2" + continuation-local-storage "^3.2.1" + diagnostic-channel "0.2.0" + diagnostic-channel-publishers "^0.3.3" + +async-hook-jl@^1.7.6: + version "1.7.6" + resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" + integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== + dependencies: + stack-chain "^1.3.7" + +async-listener@^0.6.0: + version "0.6.10" + resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" + integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== + dependencies: + semver "^5.3.0" + shimmer "^1.1.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +base64-js@^1.0.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== + +buffer@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" + integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + +cls-hooked@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" + integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== + dependencies: + async-hook-jl "^1.7.6" + emitter-listener "^1.0.1" + semver "^5.4.1" + +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +continuation-local-storage@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" + integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== + dependencies: + async-listener "^0.6.0" + emitter-listener "^1.1.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +diagnostic-channel-publishers@^0.3.3: + version "0.3.5" + resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" + integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== + +diagnostic-channel@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" + integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= + dependencies: + semver "^5.3.0" + +emitter-component@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/emitter-component/-/emitter-component-1.1.1.tgz#065e2dbed6959bf470679edabeaf7981d1003ab6" + integrity sha1-Bl4tvtaVm/RwZ57avq95gdEAOrY= + +emitter-listener@^1.0.1, emitter-listener@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" + integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== + dependencies: + shimmer "^1.2.0" + +form-data@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" + integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +ieee754@^1.1.4: + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== + +inherits@^2.0.1: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +mime-db@1.44.0: + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== + +mime-types@^2.1.12: + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + dependencies: + mime-db "1.44.0" + +node-fetch@2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + +"randombytes@github:rmacfarlane/randombytes#b28d4ecee46262801ea09f15fa1f1513a05c5971": + version "2.1.0" + resolved "https://codeload.github.com/rmacfarlane/randombytes/tar.gz/b28d4ecee46262801ea09f15fa1f1513a05c5971" + dependencies: + safe-buffer "^5.1.0" + +safe-buffer@^5.0.1: + version "5.2.0" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" + integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +semver@^5.3.0, semver@^5.4.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +sha.js@2.4.11: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shimmer@^1.1.0, shimmer@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + +stack-chain@^1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" + integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= + +stream@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/stream/-/stream-0.0.2.tgz#7f5363f057f6592c5595f00bc80a27f5cec1f0ef" + integrity sha1-f1Nj8Ff2WSxVlfALyAon9c7B8O8= + dependencies: + emitter-component "^1.1.1" + +uuid@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.2.0.tgz#cb10dd6b118e2dada7d0cd9730ba7417c93d920e" + integrity sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q== + +vscode-extension-telemetry@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" + integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== + dependencies: + applicationinsights "1.7.4" + +vscode-nls@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.1.tgz#f9916b64e4947b20322defb1e676a495861f133c" + integrity sha512-4R+2UoUUU/LdnMnFjePxfLqNhBS8lrAFyX7pjb2ud/lqDkrUavFUTcG7wR0HBZFakae0Q6KLBFjMS6W93F403A== diff --git a/lib/vscode/extensions/notebook-markdown-extensions/.gitignore b/extensions/notebook-markdown-extensions/.gitignore similarity index 100% rename from lib/vscode/extensions/notebook-markdown-extensions/.gitignore rename to extensions/notebook-markdown-extensions/.gitignore diff --git a/lib/vscode/extensions/notebook-markdown-extensions/.vscodeignore b/extensions/notebook-markdown-extensions/.vscodeignore similarity index 100% rename from lib/vscode/extensions/notebook-markdown-extensions/.vscodeignore rename to extensions/notebook-markdown-extensions/.vscodeignore diff --git a/lib/vscode/extensions/notebook-markdown-extensions/README.md b/extensions/notebook-markdown-extensions/README.md similarity index 100% rename from lib/vscode/extensions/notebook-markdown-extensions/README.md rename to extensions/notebook-markdown-extensions/README.md diff --git a/lib/vscode/extensions/notebook-markdown-extensions/esbuild.js b/extensions/notebook-markdown-extensions/esbuild.js similarity index 100% rename from lib/vscode/extensions/notebook-markdown-extensions/esbuild.js rename to extensions/notebook-markdown-extensions/esbuild.js diff --git a/lib/vscode/extensions/notebook-markdown-extensions/icon.png b/extensions/notebook-markdown-extensions/icon.png similarity index 100% rename from lib/vscode/extensions/notebook-markdown-extensions/icon.png rename to extensions/notebook-markdown-extensions/icon.png diff --git a/extensions/notebook-markdown-extensions/notebook/emoji.ts b/extensions/notebook-markdown-extensions/notebook/emoji.ts new file mode 100644 index 000000000000..28557b47047f --- /dev/null +++ b/extensions/notebook-markdown-extensions/notebook/emoji.ts @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import type * as markdownIt from 'markdown-it'; + +const emoji = require('markdown-it-emoji'); + +export async function activate(ctx: { + getRenderer: (id: string) => any +}) { + const markdownItRenderer = await ctx.getRenderer('markdownItRenderer'); + if (!markdownItRenderer) { + throw new Error('Could not load markdownItRenderer'); + } + + markdownItRenderer.extendMarkdownIt((md: markdownIt.MarkdownIt) => { + return md.use(emoji); + }); +} diff --git a/extensions/notebook-markdown-extensions/notebook/katex.ts b/extensions/notebook-markdown-extensions/notebook/katex.ts new file mode 100644 index 000000000000..27d7be58be73 --- /dev/null +++ b/extensions/notebook-markdown-extensions/notebook/katex.ts @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import type * as markdownIt from 'markdown-it'; + +const styleHref = import.meta.url.replace(/katex.js$/, 'katex.min.css'); + +export async function activate(ctx: { + getRenderer: (id: string) => Promise +}) { + const markdownItRenderer = await ctx.getRenderer('markdownItRenderer'); + if (!markdownItRenderer) { + throw new Error('Could not load markdownItRenderer'); + } + + const link = document.createElement('link'); + link.rel = 'stylesheet'; + link.classList.add('markdown-style'); + link.href = styleHref; + document.head.append(link); + + const style = document.createElement('style'); + style.classList.add('markdown-style'); + style.textContent = ` + .katex-error { + color: var(--vscode-editorError-foreground); + } + `; + document.head.append(style); + + const katex = require('@iktakahiro/markdown-it-katex'); + markdownItRenderer.extendMarkdownIt((md: markdownIt.MarkdownIt) => { + return md.use(katex); + }); +} diff --git a/lib/vscode/extensions/notebook-markdown-extensions/notebook/tsconfig.json b/extensions/notebook-markdown-extensions/notebook/tsconfig.json similarity index 100% rename from lib/vscode/extensions/notebook-markdown-extensions/notebook/tsconfig.json rename to extensions/notebook-markdown-extensions/notebook/tsconfig.json diff --git a/extensions/notebook-markdown-extensions/package.json b/extensions/notebook-markdown-extensions/package.json new file mode 100644 index 000000000000..981566798f6f --- /dev/null +++ b/extensions/notebook-markdown-extensions/package.json @@ -0,0 +1,58 @@ +{ + "name": "notebook-markdown-extensions", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "icon": "icon.png", + "publisher": "vscode", + "enableProposedApi": true, + "license": "MIT", + "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", + "engines": { + "vscode": "^1.54.0" + }, + "categories": [ + "Other" + ], + "capabilities": { + "virtualWorkspaces": true, + "untrustedWorkspaces": { + "supported": true + } + }, + "contributes": { + "notebookRenderer": [ + { + "id": "markdownItRenderer-katex", + "displayName": "Markdown it katex renderer", + "entrypoint": { + "extends": "markdownItRenderer", + "path": "./notebook-out/katex.js" + } + }, + { + "id": "markdownItRenderer-emoji", + "displayName": "Markdown it emoji renderer", + "entrypoint": { + "extends": "markdownItRenderer", + "path": "./notebook-out/emoji.js" + } + } + ] + }, + "scripts": { + "compile": "npm run build-notebook", + "watch": "npm run build-notebook", + "build-notebook": "node ./esbuild" + }, + "devDependencies": { + "@iktakahiro/markdown-it-katex": "https://github.com/mjbvz/markdown-it-katex.git", + "@types/markdown-it": "^0.0.0", + "markdown-it": "^12.0.4", + "markdown-it-emoji": "^2.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/notebook-markdown-extensions/package.nls.json b/extensions/notebook-markdown-extensions/package.nls.json similarity index 100% rename from lib/vscode/extensions/notebook-markdown-extensions/package.nls.json rename to extensions/notebook-markdown-extensions/package.nls.json diff --git a/extensions/notebook-markdown-extensions/yarn.lock b/extensions/notebook-markdown-extensions/yarn.lock new file mode 100644 index 000000000000..1ae78c16ae80 --- /dev/null +++ b/extensions/notebook-markdown-extensions/yarn.lock @@ -0,0 +1,69 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@iktakahiro/markdown-it-katex@https://github.com/mjbvz/markdown-it-katex.git": + version "4.0.1" + resolved "https://github.com/mjbvz/markdown-it-katex.git#2bf0b89c6c22ef0b585f55ccab66d1f7c5356bea" + dependencies: + katex "^0.13.0" + +"@types/markdown-it@^0.0.0": + version "0.0.0" + resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.0.tgz#8f6acaa5e3245e275f684e95deb3e518d1c6ab16" + integrity sha1-j2rKpeMkXidfaE6V3rPlGNHGqxY= + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +commander@^6.0.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" + integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== + +entities@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" + integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== + +katex@^0.13.0: + version "0.13.0" + resolved "https://registry.yarnpkg.com/katex/-/katex-0.13.0.tgz#62900e56c1ad8fdf7da23399e50d7a7b690b39ab" + integrity sha512-6cHbzbegYgS9vvVGuH8UA+o97X+ZshtboSqJJCdq7trBYzuD75JNwr7Ef606xkUjecPPhFnyB+afx1dVafielg== + dependencies: + commander "^6.0.0" + +linkify-it@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.2.tgz#f55eeb8bc1d3ae754049e124ab3bb56d97797fb8" + integrity sha512-gDBO4aHNZS6coiZCKVhSNh43F9ioIL4JwRjLZPkoLIY4yZFwg264Y5lu2x6rb1Js42Gh6Yqm2f6L2AJcnkzinQ== + dependencies: + uc.micro "^1.0.1" + +markdown-it-emoji@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/markdown-it-emoji/-/markdown-it-emoji-2.0.0.tgz#3164ad4c009efd946e98274f7562ad611089a231" + integrity sha512-39j7/9vP/CPCKbEI44oV8yoPJTpvfeReTn/COgRhSpNrjWF3PfP/JUxxB0hxV6ynOY8KH8Y8aX9NMDdo6z+6YQ== + +markdown-it@^12.0.4: + version "12.0.4" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.4.tgz#eec8247d296327eac3ba9746bdeec9cfcc751e33" + integrity sha512-34RwOXZT8kyuOJy25oJNJoulO8L0bTHYWXcdZBYZqFnjIy3NgjeoM3FmPXIOFQ26/lSHYMr8oc62B6adxXcb3Q== + dependencies: + argparse "^2.0.1" + entities "~2.1.0" + linkify-it "^3.0.1" + mdurl "^1.0.1" + uc.micro "^1.0.5" + +mdurl@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" + integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= + +uc.micro@^1.0.1, uc.micro@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" + integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== diff --git a/lib/vscode/extensions/npm/.vscode/launch.json b/extensions/npm/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/npm/.vscode/launch.json rename to extensions/npm/.vscode/launch.json diff --git a/lib/vscode/extensions/npm/.vscode/tasks.json b/extensions/npm/.vscode/tasks.json similarity index 100% rename from lib/vscode/extensions/npm/.vscode/tasks.json rename to extensions/npm/.vscode/tasks.json diff --git a/lib/vscode/extensions/npm/.vscodeignore b/extensions/npm/.vscodeignore similarity index 100% rename from lib/vscode/extensions/npm/.vscodeignore rename to extensions/npm/.vscodeignore diff --git a/lib/vscode/extensions/npm/README.md b/extensions/npm/README.md similarity index 100% rename from lib/vscode/extensions/npm/README.md rename to extensions/npm/README.md diff --git a/lib/vscode/extensions/npm/extension-browser.webpack.config.js b/extensions/npm/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/npm/extension-browser.webpack.config.js rename to extensions/npm/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/npm/extension.webpack.config.js b/extensions/npm/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/npm/extension.webpack.config.js rename to extensions/npm/extension.webpack.config.js diff --git a/lib/vscode/extensions/npm/images/code.svg b/extensions/npm/images/code.svg similarity index 100% rename from lib/vscode/extensions/npm/images/code.svg rename to extensions/npm/images/code.svg diff --git a/lib/vscode/extensions/npm/images/npm_icon.png b/extensions/npm/images/npm_icon.png similarity index 100% rename from lib/vscode/extensions/npm/images/npm_icon.png rename to extensions/npm/images/npm_icon.png diff --git a/extensions/npm/package.json b/extensions/npm/package.json new file mode 100644 index 000000000000..038f091b78e8 --- /dev/null +++ b/extensions/npm/package.json @@ -0,0 +1,329 @@ +{ + "name": "npm", + "publisher": "vscode", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.1", + "license": "MIT", + "engines": { + "vscode": "0.10.x" + }, + "enableProposedApi": true, + "icon": "images/npm_icon.png", + "categories": [ + "Other" + ], + "scripts": { + "compile": "gulp compile-extension:npm", + "watch": "gulp watch-extension:npm" + }, + "dependencies": { + "find-up": "^4.1.0", + "find-yarn-workspace-root": "^2.0.0", + "jsonc-parser": "^2.2.1", + "minimatch": "^3.0.4", + "request-light": "^0.4.0", + "vscode-nls": "^4.1.1", + "which": "^2.0.2", + "which-pm": "^2.0.0" + }, + "devDependencies": { + "@types/minimatch": "^3.0.3", + "@types/node": "14.x", + "@types/which": "^2.0.0" + }, + "resolutions": { + "which-pm/load-yaml-file/**/argparse": "1.0.9" + }, + "main": "./out/npmMain", + "browser": "./dist/browser/npmBrowserMain", + "activationEvents": [ + "onCommand:workbench.action.tasks.runTask", + "onCommand:npm.runScriptFromFolder", + "onLanguage:json", + "workspaceContains:package.json", + "onView:npm" + ], + "capabilities": { + "virtualWorkspaces": false, + "untrustedWorkspaces": { + "supported": "limited", + "description": "%workspaceTrust%" + } + }, + "contributes": { + "languages": [ + { + "id": "ignore", + "extensions": [ + ".npmignore" + ] + }, + { + "id": "properties", + "extensions": [ + ".npmrc" + ] + } + ], + "views": { + "explorer": [ + { + "id": "npm", + "name": "%view.name%", + "when": "npm:showScriptExplorer", + "icon": "$(json)", + "visibility": "hidden" + } + ] + }, + "commands": [ + { + "command": "npm.runScript", + "title": "%command.run%", + "icon": "$(run)" + }, + { + "command": "npm.debugScript", + "title": "%command.debug%", + "icon": "$(debug)" + }, + { + "command": "npm.openScript", + "title": "%command.openScript%" + }, + { + "command": "npm.runInstall", + "title": "%command.runInstall%" + }, + { + "command": "npm.refresh", + "title": "%command.refresh%", + "icon": "$(refresh)" + }, + { + "command": "npm.runSelectedScript", + "title": "%command.runSelectedScript%" + }, + { + "command": "npm.runScriptFromFolder", + "title": "%command.runScriptFromFolder%" + }, + { + "command": "npm.packageManager", + "title": "%command.packageManager" + } + ], + "menus": { + "commandPalette": [ + { + "command": "npm.refresh", + "when": "false" + }, + { + "command": "npm.runScript", + "when": "false" + }, + { + "command": "npm.debugScript", + "when": "false" + }, + { + "command": "npm.openScript", + "when": "false" + }, + { + "command": "npm.runInstall", + "when": "false" + }, + { + "command": "npm.runSelectedScript", + "when": "false" + }, + { + "command": "npm.runScriptFromFolder", + "when": "false" + }, + { + "command": "npm.packageManager", + "when": "false" + } + ], + "editor/context": [ + { + "command": "npm.runSelectedScript", + "when": "resourceFilename == 'package.json' && resourceScheme == file", + "group": "navigation@+1" + } + ], + "view/title": [ + { + "command": "npm.refresh", + "when": "view == npm", + "group": "navigation" + } + ], + "view/item/context": [ + { + "command": "npm.openScript", + "when": "view == npm && viewItem == packageJSON", + "group": "navigation@1" + }, + { + "command": "npm.runInstall", + "when": "view == npm && viewItem == packageJSON", + "group": "navigation@2" + }, + { + "command": "npm.openScript", + "when": "view == npm && viewItem == script", + "group": "navigation@1" + }, + { + "command": "npm.runScript", + "when": "view == npm && viewItem == script", + "group": "navigation@2" + }, + { + "command": "npm.runScript", + "when": "view == npm && viewItem == script", + "group": "inline" + }, + { + "command": "npm.debugScript", + "when": "view == npm && viewItem == script", + "group": "inline" + }, + { + "command": "npm.debugScript", + "when": "view == npm && viewItem == script", + "group": "navigation@3" + } + ], + "explorer/context": [ + { + "when": "config.npm.enableRunFromFolder && explorerViewletVisible && explorerResourceIsFolder && resourceScheme == file", + "command": "npm.runScriptFromFolder", + "group": "2_workspace" + } + ] + }, + "configuration": { + "id": "npm", + "type": "object", + "title": "Npm", + "properties": { + "npm.autoDetect": { + "type": "string", + "enum": [ + "off", + "on" + ], + "default": "on", + "scope": "resource", + "description": "%config.npm.autoDetect%" + }, + "npm.runSilent": { + "type": "boolean", + "default": false, + "scope": "resource", + "markdownDescription": "%config.npm.runSilent%" + }, + "npm.packageManager": { + "scope": "resource", + "type": "string", + "enum": [ + "auto", + "npm", + "yarn", + "pnpm" + ], + "enumDescriptions": [ + "%config.npm.packageManager.auto%", + "%config.npm.packageManager.npm%", + "%config.npm.packageManager.yarn%", + "%config.npm.packageManager.pnpm%" + ], + "default": "auto", + "description": "%config.npm.packageManager%" + }, + "npm.exclude": { + "type": [ + "string", + "array" + ], + "items": { + "type": "string" + }, + "description": "%config.npm.exclude%", + "scope": "resource" + }, + "npm.enableScriptExplorer": { + "type": "boolean", + "default": false, + "scope": "resource", + "deprecationMessage": "The NPM Script Explorer is now available in 'Views' menu in the Explorer in all folders.", + "description": "%config.npm.enableScriptExplorer%" + }, + "npm.enableRunFromFolder": { + "type": "boolean", + "default": false, + "scope": "resource", + "description": "%config.npm.enableRunFromFolder%" + }, + "npm.scriptExplorerAction": { + "type": "string", + "enum": [ + "open", + "run" + ], + "markdownDescription": "%config.npm.scriptExplorerAction%", + "scope": "window", + "default": "open" + }, + "npm.fetchOnlinePackageInfo": { + "type": "boolean", + "description": "%config.npm.fetchOnlinePackageInfo%", + "default": true, + "scope": "window", + "tags": [ + "usesOnlineServices" + ] + } + } + }, + "jsonValidation": [ + { + "fileMatch": "package.json", + "url": "https://json.schemastore.org/package" + }, + { + "fileMatch": "bower.json", + "url": "https://json.schemastore.org/bower" + } + ], + "taskDefinitions": [ + { + "type": "npm", + "required": [ + "script" + ], + "properties": { + "script": { + "type": "string", + "description": "%taskdef.script%" + }, + "path": { + "type": "string", + "description": "%taskdef.path%" + } + }, + "when": "shellExecutionSupported" + } + ] + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/extensions/npm/package.nls.json b/extensions/npm/package.nls.json new file mode 100644 index 000000000000..b3ff9a4d2292 --- /dev/null +++ b/extensions/npm/package.nls.json @@ -0,0 +1,29 @@ +{ + "description": "Extension to add task support for npm scripts.", + "displayName": "NPM support for VS Code", + "workspaceTrust": "This extension executes tasks, which require trust to run.", + "config.npm.autoDetect": "Controls whether npm scripts should be automatically detected.", + "config.npm.runSilent": "Run npm commands with the `--silent` option.", + "config.npm.packageManager": "The package manager used to run scripts.", + "config.npm.packageManager.npm": "Use npm as the package manager for running scripts.", + "config.npm.packageManager.yarn": "Use yarn as the package manager for running scripts.", + "config.npm.packageManager.pnpm": "Use pnpm as the package manager for running scripts.", + "config.npm.packageManager.auto": "Auto-detect which package manager to use for running scripts based on lock files and installed package managers.", + "config.npm.exclude": "Configure glob patterns for folders that should be excluded from automatic script detection.", + "config.npm.enableScriptExplorer": "Enable an explorer view for npm scripts when there is no top-level 'package.json' file.", + "config.npm.scriptExplorerAction": "The default click action used in the npm scripts explorer: `open` or `run`, the default is `open`.", + "config.npm.enableRunFromFolder": "Enable running npm scripts contained in a folder from the Explorer context menu.", + "config.npm.fetchOnlinePackageInfo": "Fetch data from https://registry.npmjs.org and https://registry.bower.io to provide auto-completion and information on hover features on npm dependencies.", + "npm.parseError": "Npm task detection: failed to parse the file {0}", + "taskdef.script": "The npm script to customize.", + "taskdef.path": "The path to the folder of the package.json file that provides the script. Can be omitted.", + "view.name": "NPM Scripts", + "command.refresh": "Refresh", + "command.run": "Run", + "command.debug": "Debug", + "command.openScript": "Open", + "command.runInstall": "Run Install", + "command.runSelectedScript": "Run Script", + "command.runScriptFromFolder": "Run NPM Script in Folder...", + "command.packageManager": "Get Configured Package Manager" +} diff --git a/lib/vscode/extensions/npm/src/commands.ts b/extensions/npm/src/commands.ts similarity index 100% rename from lib/vscode/extensions/npm/src/commands.ts rename to extensions/npm/src/commands.ts diff --git a/lib/vscode/extensions/npm/src/features/bowerJSONContribution.ts b/extensions/npm/src/features/bowerJSONContribution.ts similarity index 100% rename from lib/vscode/extensions/npm/src/features/bowerJSONContribution.ts rename to extensions/npm/src/features/bowerJSONContribution.ts diff --git a/lib/vscode/extensions/npm/src/features/jsonContributions.ts b/extensions/npm/src/features/jsonContributions.ts similarity index 100% rename from lib/vscode/extensions/npm/src/features/jsonContributions.ts rename to extensions/npm/src/features/jsonContributions.ts diff --git a/lib/vscode/extensions/npm/src/features/packageJSONContribution.ts b/extensions/npm/src/features/packageJSONContribution.ts similarity index 100% rename from lib/vscode/extensions/npm/src/features/packageJSONContribution.ts rename to extensions/npm/src/features/packageJSONContribution.ts diff --git a/lib/vscode/extensions/npm/src/npmBrowserMain.ts b/extensions/npm/src/npmBrowserMain.ts similarity index 100% rename from lib/vscode/extensions/npm/src/npmBrowserMain.ts rename to extensions/npm/src/npmBrowserMain.ts diff --git a/lib/vscode/extensions/npm/src/npmMain.ts b/extensions/npm/src/npmMain.ts similarity index 100% rename from lib/vscode/extensions/npm/src/npmMain.ts rename to extensions/npm/src/npmMain.ts diff --git a/lib/vscode/extensions/npm/src/npmScriptLens.ts b/extensions/npm/src/npmScriptLens.ts similarity index 100% rename from lib/vscode/extensions/npm/src/npmScriptLens.ts rename to extensions/npm/src/npmScriptLens.ts diff --git a/lib/vscode/extensions/npm/src/npmView.ts b/extensions/npm/src/npmView.ts similarity index 100% rename from lib/vscode/extensions/npm/src/npmView.ts rename to extensions/npm/src/npmView.ts diff --git a/lib/vscode/extensions/npm/src/preferred-pm.ts b/extensions/npm/src/preferred-pm.ts similarity index 100% rename from lib/vscode/extensions/npm/src/preferred-pm.ts rename to extensions/npm/src/preferred-pm.ts diff --git a/lib/vscode/extensions/npm/src/readScripts.ts b/extensions/npm/src/readScripts.ts similarity index 100% rename from lib/vscode/extensions/npm/src/readScripts.ts rename to extensions/npm/src/readScripts.ts diff --git a/lib/vscode/extensions/npm/src/scriptHover.ts b/extensions/npm/src/scriptHover.ts similarity index 100% rename from lib/vscode/extensions/npm/src/scriptHover.ts rename to extensions/npm/src/scriptHover.ts diff --git a/lib/vscode/extensions/npm/src/tasks.ts b/extensions/npm/src/tasks.ts similarity index 100% rename from lib/vscode/extensions/npm/src/tasks.ts rename to extensions/npm/src/tasks.ts diff --git a/lib/vscode/extensions/npm/src/typings/refs.d.ts b/extensions/npm/src/typings/refs.d.ts similarity index 100% rename from lib/vscode/extensions/npm/src/typings/refs.d.ts rename to extensions/npm/src/typings/refs.d.ts diff --git a/lib/vscode/extensions/npm/tsconfig.json b/extensions/npm/tsconfig.json similarity index 100% rename from lib/vscode/extensions/npm/tsconfig.json rename to extensions/npm/tsconfig.json diff --git a/extensions/npm/yarn.lock b/extensions/npm/yarn.lock new file mode 100644 index 000000000000..29712f0dcc0c --- /dev/null +++ b/extensions/npm/yarn.lock @@ -0,0 +1,276 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/minimatch@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +"@types/which@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/which/-/which-2.0.0.tgz#446d35586611dee657120de8e0457382a658fc25" + integrity sha512-JHTNOEpZnACQdsTojWggn+SQ8IucfqEhtz7g8Z0G67WdSj4x3F0X5I2c/CVcl8z/QukGrIHeQ/N49v1au74XFQ== + +agent-base@4: + version "4.2.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.0.tgz#9838b5c3392b962bad031e6a4c5e1024abec45ce" + integrity sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg== + dependencies: + es6-promisify "^5.0.0" + +agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + +argparse@1.0.9, argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + integrity sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY= + dependencies: + sprintf-js "~1.0.2" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +debug@3.1.0, debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + +es6-promise@^4.0.3: + version "4.2.4" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" + integrity sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= + dependencies: + es6-promise "^4.0.3" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-yarn-workspace-root@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" + integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== + dependencies: + micromatch "^4.0.2" + +graceful-fs@^4.1.5: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== + dependencies: + agent-base "4" + debug "3.1.0" + +https-proxy-agent@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +js-yaml@^3.13.0: + version "3.14.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" + integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsonc-parser@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc" + integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w== + +load-yaml-file@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/load-yaml-file/-/load-yaml-file-0.2.0.tgz#af854edaf2bea89346c07549122753c07372f64d" + integrity sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw== + dependencies: + graceful-fs "^4.1.5" + js-yaml "^3.13.0" + pify "^4.0.1" + strip-bom "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +picomatch@^2.0.5: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +request-light@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/request-light/-/request-light-0.4.0.tgz#c6b91ef00b18cb0de75d2127e55b3a2c9f7f90f9" + integrity sha512-fimzjIVw506FBZLspTAXHdpvgvQebyjpNyLRd0e6drPPRq7gcrROeGWRyF81wLqFg5ijPgnOQbmfck5wdTqpSA== + dependencies: + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.4" + vscode-nls "^4.1.2" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +vscode-nls@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.1.tgz#f9916b64e4947b20322defb1e676a495861f133c" + integrity sha512-4R+2UoUUU/LdnMnFjePxfLqNhBS8lrAFyX7pjb2ud/lqDkrUavFUTcG7wR0HBZFakae0Q6KLBFjMS6W93F403A== + +vscode-nls@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" + integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== + +which-pm@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-pm/-/which-pm-2.0.0.tgz#8245609ecfe64bf751d0eef2f376d83bf1ddb7ae" + integrity sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w== + dependencies: + load-yaml-file "^0.2.0" + path-exists "^4.0.0" + +which@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" diff --git a/lib/vscode/extensions/objective-c/.vscodeignore b/extensions/objective-c/.vscodeignore similarity index 100% rename from lib/vscode/extensions/objective-c/.vscodeignore rename to extensions/objective-c/.vscodeignore diff --git a/lib/vscode/extensions/objective-c/build/update-grammars.js b/extensions/objective-c/build/update-grammars.js similarity index 100% rename from lib/vscode/extensions/objective-c/build/update-grammars.js rename to extensions/objective-c/build/update-grammars.js diff --git a/lib/vscode/extensions/objective-c/cgmanifest.json b/extensions/objective-c/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/objective-c/cgmanifest.json rename to extensions/objective-c/cgmanifest.json diff --git a/lib/vscode/extensions/objective-c/language-configuration.json b/extensions/objective-c/language-configuration.json similarity index 100% rename from lib/vscode/extensions/objective-c/language-configuration.json rename to extensions/objective-c/language-configuration.json diff --git a/lib/vscode/extensions/objective-c/package.json b/extensions/objective-c/package.json similarity index 100% rename from lib/vscode/extensions/objective-c/package.json rename to extensions/objective-c/package.json diff --git a/lib/vscode/extensions/objective-c/package.nls.json b/extensions/objective-c/package.nls.json similarity index 100% rename from lib/vscode/extensions/objective-c/package.nls.json rename to extensions/objective-c/package.nls.json diff --git a/lib/vscode/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json b/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json rename to extensions/objective-c/syntaxes/objective-c++.tmLanguage.json diff --git a/lib/vscode/extensions/objective-c/syntaxes/objective-c.tmLanguage.json b/extensions/objective-c/syntaxes/objective-c.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/objective-c/syntaxes/objective-c.tmLanguage.json rename to extensions/objective-c/syntaxes/objective-c.tmLanguage.json diff --git a/lib/vscode/extensions/objective-c/yarn.lock b/extensions/objective-c/yarn.lock similarity index 100% rename from lib/vscode/extensions/objective-c/yarn.lock rename to extensions/objective-c/yarn.lock diff --git a/extensions/package.json b/extensions/package.json new file mode 100644 index 000000000000..06af3843aea1 --- /dev/null +++ b/extensions/package.json @@ -0,0 +1,16 @@ +{ + "name": "vscode-extensions", + "version": "0.0.1", + "license": "MIT", + "description": "Dependencies shared by all extensions", + "dependencies": { + "typescript": "4.3.2" + }, + "scripts": { + "postinstall": "node ./postinstall" + }, + "devDependencies": { + "esbuild": "^0.11.12", + "vscode-grammar-updater": "^1.0.3" + } +} diff --git a/lib/vscode/extensions/perl/.vscodeignore b/extensions/perl/.vscodeignore similarity index 100% rename from lib/vscode/extensions/perl/.vscodeignore rename to extensions/perl/.vscodeignore diff --git a/lib/vscode/extensions/perl/cgmanifest.json b/extensions/perl/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/perl/cgmanifest.json rename to extensions/perl/cgmanifest.json diff --git a/lib/vscode/extensions/perl/package.json b/extensions/perl/package.json similarity index 100% rename from lib/vscode/extensions/perl/package.json rename to extensions/perl/package.json diff --git a/lib/vscode/extensions/perl/package.nls.json b/extensions/perl/package.nls.json similarity index 100% rename from lib/vscode/extensions/perl/package.nls.json rename to extensions/perl/package.nls.json diff --git a/lib/vscode/extensions/perl/perl.language-configuration.json b/extensions/perl/perl.language-configuration.json similarity index 100% rename from lib/vscode/extensions/perl/perl.language-configuration.json rename to extensions/perl/perl.language-configuration.json diff --git a/lib/vscode/extensions/perl/perl6.language-configuration.json b/extensions/perl/perl6.language-configuration.json similarity index 100% rename from lib/vscode/extensions/perl/perl6.language-configuration.json rename to extensions/perl/perl6.language-configuration.json diff --git a/lib/vscode/extensions/perl/syntaxes/perl.tmLanguage.json b/extensions/perl/syntaxes/perl.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/perl/syntaxes/perl.tmLanguage.json rename to extensions/perl/syntaxes/perl.tmLanguage.json diff --git a/lib/vscode/extensions/perl/syntaxes/perl6.tmLanguage.json b/extensions/perl/syntaxes/perl6.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/perl/syntaxes/perl6.tmLanguage.json rename to extensions/perl/syntaxes/perl6.tmLanguage.json diff --git a/lib/vscode/extensions/perl/yarn.lock b/extensions/perl/yarn.lock similarity index 100% rename from lib/vscode/extensions/perl/yarn.lock rename to extensions/perl/yarn.lock diff --git a/lib/vscode/extensions/php-language-features/.vscodeignore b/extensions/php-language-features/.vscodeignore similarity index 100% rename from lib/vscode/extensions/php-language-features/.vscodeignore rename to extensions/php-language-features/.vscodeignore diff --git a/lib/vscode/extensions/php-language-features/README.md b/extensions/php-language-features/README.md similarity index 100% rename from lib/vscode/extensions/php-language-features/README.md rename to extensions/php-language-features/README.md diff --git a/lib/vscode/extensions/php-language-features/extension.webpack.config.js b/extensions/php-language-features/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/php-language-features/extension.webpack.config.js rename to extensions/php-language-features/extension.webpack.config.js diff --git a/lib/vscode/extensions/php-language-features/icons/logo.png b/extensions/php-language-features/icons/logo.png similarity index 100% rename from lib/vscode/extensions/php-language-features/icons/logo.png rename to extensions/php-language-features/icons/logo.png diff --git a/extensions/php-language-features/package.json b/extensions/php-language-features/package.json new file mode 100644 index 000000000000..79ae40954769 --- /dev/null +++ b/extensions/php-language-features/package.json @@ -0,0 +1,104 @@ +{ + "name": "php-language-features", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "publisher": "vscode", + "license": "MIT", + "icon": "icons/logo.png", + "engines": { + "vscode": "0.10.x" + }, + "enableProposedApi": true, + "activationEvents": [ + "onLanguage:php" + ], + "main": "./out/phpMain", + "categories": [ + "Programming Languages" + ], + "capabilities": { + "virtualWorkspaces": false, + "untrustedWorkspaces": { + "supported": "limited", + "description": "%workspaceTrust%", + "restrictedConfigurations": [ + "php.validate.executablePath" + ] + } + }, + "contributes": { + "configuration": { + "title": "%configuration.title%", + "type": "object", + "order": 20, + "properties": { + "php.suggest.basic": { + "type": "boolean", + "default": true, + "description": "%configuration.suggest.basic%" + }, + "php.validate.enable": { + "type": "boolean", + "default": true, + "description": "%configuration.validate.enable%" + }, + "php.validate.executablePath": { + "type": [ + "string", + "null" + ], + "default": null, + "description": "%configuration.validate.executablePath%", + "scope": "machine-overridable" + }, + "php.validate.run": { + "type": "string", + "enum": [ + "onSave", + "onType" + ], + "default": "onSave", + "description": "%configuration.validate.run%" + } + } + }, + "jsonValidation": [ + { + "fileMatch": "composer.json", + "url": "https://getcomposer.org/schema.json" + } + ], + "commands": [ + { + "title": "%command.untrustValidationExecutable%", + "category": "%commands.categroy.php%", + "command": "php.untrustValidationExecutable" + } + ], + "menus": { + "commandPalette": [ + { + "command": "php.untrustValidationExecutable", + "when": "php.untrustValidationExecutableContext" + } + ] + } + }, + "scripts": { + "compile": "npx gulp compile-extension:php-language-features", + "watch": "npx gulp watch-extension:php-language-features" + }, + "dependencies": { + "vscode-nls": "^4.0.0", + "which": "^2.0.2" + }, + "devDependencies": { + "@types/node": "14.x", + "@types/which": "^2.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/php-language-features/package.nls.json b/extensions/php-language-features/package.nls.json similarity index 100% rename from lib/vscode/extensions/php-language-features/package.nls.json rename to extensions/php-language-features/package.nls.json diff --git a/lib/vscode/extensions/php-language-features/src/features/completionItemProvider.ts b/extensions/php-language-features/src/features/completionItemProvider.ts similarity index 100% rename from lib/vscode/extensions/php-language-features/src/features/completionItemProvider.ts rename to extensions/php-language-features/src/features/completionItemProvider.ts diff --git a/lib/vscode/extensions/php-language-features/src/features/hoverProvider.ts b/extensions/php-language-features/src/features/hoverProvider.ts similarity index 100% rename from lib/vscode/extensions/php-language-features/src/features/hoverProvider.ts rename to extensions/php-language-features/src/features/hoverProvider.ts diff --git a/lib/vscode/extensions/php-language-features/src/features/phpGlobalFunctions.ts b/extensions/php-language-features/src/features/phpGlobalFunctions.ts similarity index 100% rename from lib/vscode/extensions/php-language-features/src/features/phpGlobalFunctions.ts rename to extensions/php-language-features/src/features/phpGlobalFunctions.ts diff --git a/lib/vscode/extensions/php-language-features/src/features/phpGlobals.ts b/extensions/php-language-features/src/features/phpGlobals.ts similarity index 100% rename from lib/vscode/extensions/php-language-features/src/features/phpGlobals.ts rename to extensions/php-language-features/src/features/phpGlobals.ts diff --git a/lib/vscode/extensions/php-language-features/src/features/signatureHelpProvider.ts b/extensions/php-language-features/src/features/signatureHelpProvider.ts similarity index 100% rename from lib/vscode/extensions/php-language-features/src/features/signatureHelpProvider.ts rename to extensions/php-language-features/src/features/signatureHelpProvider.ts diff --git a/lib/vscode/extensions/php-language-features/src/features/utils/async.ts b/extensions/php-language-features/src/features/utils/async.ts similarity index 100% rename from lib/vscode/extensions/php-language-features/src/features/utils/async.ts rename to extensions/php-language-features/src/features/utils/async.ts diff --git a/lib/vscode/extensions/php-language-features/src/features/utils/markedTextUtil.ts b/extensions/php-language-features/src/features/utils/markedTextUtil.ts similarity index 100% rename from lib/vscode/extensions/php-language-features/src/features/utils/markedTextUtil.ts rename to extensions/php-language-features/src/features/utils/markedTextUtil.ts diff --git a/lib/vscode/extensions/php-language-features/src/features/validationProvider.ts b/extensions/php-language-features/src/features/validationProvider.ts similarity index 94% rename from lib/vscode/extensions/php-language-features/src/features/validationProvider.ts rename to extensions/php-language-features/src/features/validationProvider.ts index acc6beaf2b57..fb4111c874b8 100644 --- a/lib/vscode/extensions/php-language-features/src/features/validationProvider.ts +++ b/extensions/php-language-features/src/features/validationProvider.ts @@ -23,7 +23,7 @@ export class LineDecoder { private stringDecoder: StringDecoder; private remaining: string | null; - constructor(encoding: string = 'utf8') { + constructor(encoding: BufferEncoding = 'utf8') { this.stringDecoder = new StringDecoder(encoding); this.remaining = null; } @@ -194,15 +194,17 @@ export default class PHPValidationProvider { if (vscode.workspace.isTrusted) { trigger(); } - } else if (this.config!.executableIsUserDefined !== undefined && !this.config!.executableIsUserDefined) { - const checkedExecutablePath = this.workspaceStore.get(Setting.CheckedExecutablePath, undefined); - if (!checkedExecutablePath || checkedExecutablePath !== this.config!.executable) { - if (await this.showCustomTrustDialog()) { - this.workspaceStore.update(Setting.CheckedExecutablePath, this.config!.executable); - vscode.commands.executeCommand('setContext', 'php.untrustValidationExecutableContext', true); - } else { - this.pauseValidation = true; - return; + } else { + if (this.config!.executableIsUserDefined !== undefined && !this.config!.executableIsUserDefined) { + const checkedExecutablePath = this.workspaceStore.get(Setting.CheckedExecutablePath, undefined); + if (!checkedExecutablePath || checkedExecutablePath !== this.config!.executable) { + if (await this.showCustomTrustDialog()) { + this.workspaceStore.update(Setting.CheckedExecutablePath, this.config!.executable); + vscode.commands.executeCommand('setContext', 'php.untrustValidationExecutableContext', true); + } else { + this.pauseValidation = true; + return; + } } } diff --git a/lib/vscode/extensions/php-language-features/src/phpMain.ts b/extensions/php-language-features/src/phpMain.ts similarity index 100% rename from lib/vscode/extensions/php-language-features/src/phpMain.ts rename to extensions/php-language-features/src/phpMain.ts diff --git a/lib/vscode/extensions/php-language-features/src/typings/node.additions.d.ts b/extensions/php-language-features/src/typings/node.additions.d.ts similarity index 100% rename from lib/vscode/extensions/php-language-features/src/typings/node.additions.d.ts rename to extensions/php-language-features/src/typings/node.additions.d.ts diff --git a/lib/vscode/extensions/php-language-features/src/typings/refs.d.ts b/extensions/php-language-features/src/typings/refs.d.ts similarity index 100% rename from lib/vscode/extensions/php-language-features/src/typings/refs.d.ts rename to extensions/php-language-features/src/typings/refs.d.ts diff --git a/lib/vscode/extensions/php-language-features/tsconfig.json b/extensions/php-language-features/tsconfig.json similarity index 100% rename from lib/vscode/extensions/php-language-features/tsconfig.json rename to extensions/php-language-features/tsconfig.json diff --git a/extensions/php-language-features/yarn.lock b/extensions/php-language-features/yarn.lock new file mode 100644 index 000000000000..09b31c801237 --- /dev/null +++ b/extensions/php-language-features/yarn.lock @@ -0,0 +1,30 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +"@types/which@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/which/-/which-2.0.0.tgz#446d35586611dee657120de8e0457382a658fc25" + integrity sha512-JHTNOEpZnACQdsTojWggn+SQ8IucfqEhtz7g8Z0G67WdSj4x3F0X5I2c/CVcl8z/QukGrIHeQ/N49v1au74XFQ== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +vscode-nls@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" + integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== + +which@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" diff --git a/lib/vscode/extensions/php/.vscode/launch.json b/extensions/php/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/php/.vscode/launch.json rename to extensions/php/.vscode/launch.json diff --git a/lib/vscode/extensions/php/.vscode/tasks.json b/extensions/php/.vscode/tasks.json similarity index 100% rename from lib/vscode/extensions/php/.vscode/tasks.json rename to extensions/php/.vscode/tasks.json diff --git a/lib/vscode/extensions/php/.vscodeignore b/extensions/php/.vscodeignore similarity index 100% rename from lib/vscode/extensions/php/.vscodeignore rename to extensions/php/.vscodeignore diff --git a/lib/vscode/extensions/php/build/update-grammar.js b/extensions/php/build/update-grammar.js similarity index 100% rename from lib/vscode/extensions/php/build/update-grammar.js rename to extensions/php/build/update-grammar.js diff --git a/extensions/php/cgmanifest.json b/extensions/php/cgmanifest.json new file mode 100644 index 000000000000..e9abbe63e635 --- /dev/null +++ b/extensions/php/cgmanifest.json @@ -0,0 +1,17 @@ +{ + "registrations": [ + { + "component": { + "type": "git", + "git": { + "name": "language-php", + "repositoryUrl": "https://github.com/atom/language-php", + "commitHash": "2bf736a814e1a58aa63470c1a29590bd02e924e7" + } + }, + "license": "MIT", + "version": "0.46.2" + } + ], + "version": 1 +} \ No newline at end of file diff --git a/extensions/php/language-configuration.json b/extensions/php/language-configuration.json new file mode 100644 index 000000000000..b785c0092ab4 --- /dev/null +++ b/extensions/php/language-configuration.json @@ -0,0 +1,37 @@ +{ + "comments": { + "lineComment": "//", // "#" + "blockComment": [ "/*", "*/" ] + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + { "open": "{", "close": "}", "notIn": ["string"] }, + { "open": "[", "close": "]", "notIn": ["string"] }, + { "open": "(", "close": ")", "notIn": ["string"] }, + { "open": "'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "\"", "close": "\"", "notIn": ["string", "comment"] }, + { "open": "/**", "close": " */", "notIn": ["string"] } + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["'", "'"], + ["\"", "\""], + ["`", "`"] + ], + "indentationRules": { + "increaseIndentPattern": "({(?!.*}).*|\\(|\\[|((else(\\s)?)?if|else|for(each)?|while|switch|case).*:)\\s*((/[/*].*|)?$|\\?>)", + "decreaseIndentPattern": "^(.*\\*\\/)?\\s*((\\})|(\\)+[;,])|(\\]\\)*[;,])|\\b(else:)|\\b((end(if|for(each)?|while|switch));))" + }, + "folding": { + "markers": { + "start": "^\\s*(#|\/\/)region\\b", + "end": "^\\s*(#|\/\/)endregion\\b" + } + } +} diff --git a/lib/vscode/extensions/php/package.json b/extensions/php/package.json similarity index 100% rename from lib/vscode/extensions/php/package.json rename to extensions/php/package.json diff --git a/lib/vscode/extensions/php/package.nls.json b/extensions/php/package.nls.json similarity index 100% rename from lib/vscode/extensions/php/package.nls.json rename to extensions/php/package.nls.json diff --git a/lib/vscode/extensions/php/snippets/php.code-snippets b/extensions/php/snippets/php.code-snippets similarity index 100% rename from lib/vscode/extensions/php/snippets/php.code-snippets rename to extensions/php/snippets/php.code-snippets diff --git a/extensions/php/syntaxes/html.tmLanguage.json b/extensions/php/syntaxes/html.tmLanguage.json new file mode 100644 index 000000000000..a8dff09d0a02 --- /dev/null +++ b/extensions/php/syntaxes/html.tmLanguage.json @@ -0,0 +1,88 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-php/blob/master/grammars/html.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/atom/language-php/commit/2bf736a814e1a58aa63470c1a29590bd02e924e7", + "name": "PHP", + "scopeName": "text.html.php", + "injections": { + "text.html.php - (meta.embedded | meta.tag), L:((text.html.php meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.css - (meta.embedded.block.php | meta.embedded.line.php))": { + "patterns": [ + { + "include": "#php-tag" + } + ] + } + }, + "patterns": [ + { + "begin": "\\A#!", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.php" + } + }, + "end": "$", + "name": "comment.line.shebang.php" + }, + { + "include": "text.html.derivative" + } + ], + "repository": { + "php-tag": { + "patterns": [ + { + "begin": "<\\?(?i:php|=)?(?![^?]*\\?>)", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + } + }, + "end": "(\\?)>", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "source.php" + } + }, + "name": "meta.embedded.block.php", + "contentName": "source.php", + "patterns": [ + { + "include": "source.php" + } + ] + }, + { + "begin": "<\\?(?i:php|=)?", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + } + }, + "end": "(\\?)>", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "source.php" + } + }, + "name": "meta.embedded.line.php", + "contentName": "source.php", + "patterns": [ + { + "include": "source.php" + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/lib/vscode/extensions/php/syntaxes/php.tmLanguage.json b/extensions/php/syntaxes/php.tmLanguage.json similarity index 98% rename from lib/vscode/extensions/php/syntaxes/php.tmLanguage.json rename to extensions/php/syntaxes/php.tmLanguage.json index 0dcfc8295c99..d8d7e067384a 100644 --- a/lib/vscode/extensions/php/syntaxes/php.tmLanguage.json +++ b/extensions/php/syntaxes/php.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/atom/language-php/commit/5fae657cf989701e9594912772daff33249839b3", + "version": "https://github.com/atom/language-php/commit/2bf736a814e1a58aa63470c1a29590bd02e924e7", "scopeName": "source.php", "patterns": [ { @@ -2824,6 +2824,59 @@ }, "name": "string.quoted.double.sql.php", "patterns": [ + { + "match": "(#)(\\\\\"|[^\"])*(?=\"|$)", + "name": "comment.line.number-sign.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } + }, + { + "match": "(--)(\\\\\"|[^\"])*(?=\"|$)", + "name": "comment.line.double-dash.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } + }, + { + "match": "\\\\[\\\\\"`']", + "name": "constant.character.escape.php" + }, + { + "match": "'(?=((\\\\')|[^'\"])*(\"|$))", + "name": "string.quoted.single.unclosed.sql" + }, + { + "match": "`(?=((\\\\`)|[^`\"])*(\"|$))", + "name": "string.quoted.other.backtick.unclosed.sql" + }, + { + "begin": "'", + "end": "'", + "name": "string.quoted.single.sql", + "patterns": [ + { + "include": "#interpolation_double_quoted" + } + ] + }, + { + "begin": "`", + "end": "`", + "name": "string.quoted.other.backtick.sql", + "patterns": [ + { + "include": "#interpolation_double_quoted" + } + ] + }, + { + "include": "#interpolation_double_quoted" + }, { "include": "source.sql" } @@ -2845,6 +2898,36 @@ }, "name": "string.quoted.single.sql.php", "patterns": [ + { + "match": "(#)(\\\\'|[^'])*(?='|$)", + "name": "comment.line.number-sign.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } + }, + { + "match": "(--)(\\\\'|[^'])*(?='|$)", + "name": "comment.line.double-dash.sql", + "captures": { + "1": { + "name": "punctuation.definition.comment.sql" + } + } + }, + { + "match": "\\\\[\\\\'`\"]", + "name": "constant.character.escape.php" + }, + { + "match": "`(?=((\\\\`)|[^`'])*('|$))", + "name": "string.quoted.other.backtick.unclosed.sql" + }, + { + "match": "\"(?=((\\\\\")|[^\"'])*('|$))", + "name": "string.quoted.double.unclosed.sql" + }, { "include": "source.sql" } @@ -3685,4 +3768,4 @@ "name": "keyword.operator.null-coalescing.php" } } -} +} \ No newline at end of file diff --git a/lib/vscode/extensions/php/yarn.lock b/extensions/php/yarn.lock similarity index 100% rename from lib/vscode/extensions/php/yarn.lock rename to extensions/php/yarn.lock diff --git a/lib/vscode/extensions/postinstall.js b/extensions/postinstall.js similarity index 91% rename from lib/vscode/extensions/postinstall.js rename to extensions/postinstall.js index 50f3e1144f80..da4fa3e9d044 100644 --- a/lib/vscode/extensions/postinstall.js +++ b/extensions/postinstall.js @@ -24,9 +24,6 @@ function processRoot() { rimraf.sync(filePath); } } - - // Delete .bin so it doesn't contain broken symlinks that trip up nfpm. - rimraf.sync(path.join(__dirname, 'node_modules', '.bin')); } function processLib() { diff --git a/lib/vscode/extensions/powershell/.vscodeignore b/extensions/powershell/.vscodeignore similarity index 100% rename from lib/vscode/extensions/powershell/.vscodeignore rename to extensions/powershell/.vscodeignore diff --git a/lib/vscode/extensions/powershell/cgmanifest.json b/extensions/powershell/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/powershell/cgmanifest.json rename to extensions/powershell/cgmanifest.json diff --git a/lib/vscode/extensions/powershell/language-configuration.json b/extensions/powershell/language-configuration.json similarity index 100% rename from lib/vscode/extensions/powershell/language-configuration.json rename to extensions/powershell/language-configuration.json diff --git a/lib/vscode/extensions/powershell/package.json b/extensions/powershell/package.json similarity index 100% rename from lib/vscode/extensions/powershell/package.json rename to extensions/powershell/package.json diff --git a/lib/vscode/extensions/powershell/package.nls.json b/extensions/powershell/package.nls.json similarity index 100% rename from lib/vscode/extensions/powershell/package.nls.json rename to extensions/powershell/package.nls.json diff --git a/lib/vscode/extensions/powershell/snippets/powershell.code-snippets b/extensions/powershell/snippets/powershell.code-snippets similarity index 100% rename from lib/vscode/extensions/powershell/snippets/powershell.code-snippets rename to extensions/powershell/snippets/powershell.code-snippets diff --git a/lib/vscode/extensions/powershell/syntaxes/powershell.tmLanguage.json b/extensions/powershell/syntaxes/powershell.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/powershell/syntaxes/powershell.tmLanguage.json rename to extensions/powershell/syntaxes/powershell.tmLanguage.json diff --git a/lib/vscode/extensions/powershell/yarn.lock b/extensions/powershell/yarn.lock similarity index 100% rename from lib/vscode/extensions/powershell/yarn.lock rename to extensions/powershell/yarn.lock diff --git a/lib/vscode/extensions/pug/.vscodeignore b/extensions/pug/.vscodeignore similarity index 100% rename from lib/vscode/extensions/pug/.vscodeignore rename to extensions/pug/.vscodeignore diff --git a/lib/vscode/extensions/pug/cgmanifest.json b/extensions/pug/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/pug/cgmanifest.json rename to extensions/pug/cgmanifest.json diff --git a/lib/vscode/extensions/pug/language-configuration.json b/extensions/pug/language-configuration.json similarity index 100% rename from lib/vscode/extensions/pug/language-configuration.json rename to extensions/pug/language-configuration.json diff --git a/lib/vscode/extensions/pug/package.json b/extensions/pug/package.json similarity index 100% rename from lib/vscode/extensions/pug/package.json rename to extensions/pug/package.json diff --git a/lib/vscode/extensions/pug/package.nls.json b/extensions/pug/package.nls.json similarity index 100% rename from lib/vscode/extensions/pug/package.nls.json rename to extensions/pug/package.nls.json diff --git a/lib/vscode/extensions/pug/syntaxes/pug.tmLanguage.json b/extensions/pug/syntaxes/pug.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/pug/syntaxes/pug.tmLanguage.json rename to extensions/pug/syntaxes/pug.tmLanguage.json diff --git a/lib/vscode/extensions/pug/yarn.lock b/extensions/pug/yarn.lock similarity index 100% rename from lib/vscode/extensions/pug/yarn.lock rename to extensions/pug/yarn.lock diff --git a/lib/vscode/extensions/python/.vscode/launch.json b/extensions/python/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/python/.vscode/launch.json rename to extensions/python/.vscode/launch.json diff --git a/lib/vscode/extensions/python/.vscode/tasks.json b/extensions/python/.vscode/tasks.json similarity index 100% rename from lib/vscode/extensions/python/.vscode/tasks.json rename to extensions/python/.vscode/tasks.json diff --git a/lib/vscode/extensions/python/.vscodeignore b/extensions/python/.vscodeignore similarity index 100% rename from lib/vscode/extensions/python/.vscodeignore rename to extensions/python/.vscodeignore diff --git a/lib/vscode/extensions/python/cgmanifest.json b/extensions/python/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/python/cgmanifest.json rename to extensions/python/cgmanifest.json diff --git a/lib/vscode/extensions/python/language-configuration.json b/extensions/python/language-configuration.json similarity index 100% rename from lib/vscode/extensions/python/language-configuration.json rename to extensions/python/language-configuration.json diff --git a/lib/vscode/extensions/python/package.json b/extensions/python/package.json similarity index 100% rename from lib/vscode/extensions/python/package.json rename to extensions/python/package.json diff --git a/lib/vscode/extensions/python/package.nls.json b/extensions/python/package.nls.json similarity index 100% rename from lib/vscode/extensions/python/package.nls.json rename to extensions/python/package.nls.json diff --git a/lib/vscode/extensions/python/syntaxes/MagicPython.tmLanguage.json b/extensions/python/syntaxes/MagicPython.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/python/syntaxes/MagicPython.tmLanguage.json rename to extensions/python/syntaxes/MagicPython.tmLanguage.json diff --git a/lib/vscode/extensions/python/syntaxes/MagicRegExp.tmLanguage.json b/extensions/python/syntaxes/MagicRegExp.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/python/syntaxes/MagicRegExp.tmLanguage.json rename to extensions/python/syntaxes/MagicRegExp.tmLanguage.json diff --git a/lib/vscode/extensions/python/test/colorize-fixtures/test-freeze-56377.py b/extensions/python/test/colorize-fixtures/test-freeze-56377.py similarity index 100% rename from lib/vscode/extensions/python/test/colorize-fixtures/test-freeze-56377.py rename to extensions/python/test/colorize-fixtures/test-freeze-56377.py diff --git a/lib/vscode/extensions/python/test/colorize-fixtures/test.py b/extensions/python/test/colorize-fixtures/test.py similarity index 100% rename from lib/vscode/extensions/python/test/colorize-fixtures/test.py rename to extensions/python/test/colorize-fixtures/test.py diff --git a/lib/vscode/extensions/python/test/colorize-results/test-freeze-56377_py.json b/extensions/python/test/colorize-results/test-freeze-56377_py.json similarity index 100% rename from lib/vscode/extensions/python/test/colorize-results/test-freeze-56377_py.json rename to extensions/python/test/colorize-results/test-freeze-56377_py.json diff --git a/lib/vscode/extensions/python/test/colorize-results/test_py.json b/extensions/python/test/colorize-results/test_py.json similarity index 100% rename from lib/vscode/extensions/python/test/colorize-results/test_py.json rename to extensions/python/test/colorize-results/test_py.json diff --git a/lib/vscode/extensions/python/yarn.lock b/extensions/python/yarn.lock similarity index 100% rename from lib/vscode/extensions/python/yarn.lock rename to extensions/python/yarn.lock diff --git a/lib/vscode/extensions/r/.vscodeignore b/extensions/r/.vscodeignore similarity index 100% rename from lib/vscode/extensions/r/.vscodeignore rename to extensions/r/.vscodeignore diff --git a/lib/vscode/extensions/r/cgmanifest.json b/extensions/r/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/r/cgmanifest.json rename to extensions/r/cgmanifest.json diff --git a/lib/vscode/extensions/r/language-configuration.json b/extensions/r/language-configuration.json similarity index 100% rename from lib/vscode/extensions/r/language-configuration.json rename to extensions/r/language-configuration.json diff --git a/lib/vscode/extensions/r/package.json b/extensions/r/package.json similarity index 100% rename from lib/vscode/extensions/r/package.json rename to extensions/r/package.json diff --git a/lib/vscode/extensions/r/package.nls.json b/extensions/r/package.nls.json similarity index 100% rename from lib/vscode/extensions/r/package.nls.json rename to extensions/r/package.nls.json diff --git a/lib/vscode/extensions/r/syntaxes/r.tmLanguage.json b/extensions/r/syntaxes/r.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/r/syntaxes/r.tmLanguage.json rename to extensions/r/syntaxes/r.tmLanguage.json diff --git a/lib/vscode/extensions/r/yarn.lock b/extensions/r/yarn.lock similarity index 100% rename from lib/vscode/extensions/r/yarn.lock rename to extensions/r/yarn.lock diff --git a/lib/vscode/extensions/razor/.vscodeignore b/extensions/razor/.vscodeignore similarity index 100% rename from lib/vscode/extensions/razor/.vscodeignore rename to extensions/razor/.vscodeignore diff --git a/lib/vscode/extensions/razor/cgmanifest.json b/extensions/razor/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/razor/cgmanifest.json rename to extensions/razor/cgmanifest.json diff --git a/lib/vscode/extensions/razor/language-configuration.json b/extensions/razor/language-configuration.json similarity index 100% rename from lib/vscode/extensions/razor/language-configuration.json rename to extensions/razor/language-configuration.json diff --git a/lib/vscode/extensions/razor/package.json b/extensions/razor/package.json similarity index 100% rename from lib/vscode/extensions/razor/package.json rename to extensions/razor/package.json diff --git a/lib/vscode/extensions/razor/package.nls.json b/extensions/razor/package.nls.json similarity index 100% rename from lib/vscode/extensions/razor/package.nls.json rename to extensions/razor/package.nls.json diff --git a/lib/vscode/extensions/razor/syntaxes/cshtml.tmLanguage.json b/extensions/razor/syntaxes/cshtml.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/razor/syntaxes/cshtml.tmLanguage.json rename to extensions/razor/syntaxes/cshtml.tmLanguage.json diff --git a/lib/vscode/extensions/razor/yarn.lock b/extensions/razor/yarn.lock similarity index 100% rename from lib/vscode/extensions/razor/yarn.lock rename to extensions/razor/yarn.lock diff --git a/lib/vscode/extensions/ruby/.vscodeignore b/extensions/ruby/.vscodeignore similarity index 100% rename from lib/vscode/extensions/ruby/.vscodeignore rename to extensions/ruby/.vscodeignore diff --git a/lib/vscode/extensions/ruby/cgmanifest.json b/extensions/ruby/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/ruby/cgmanifest.json rename to extensions/ruby/cgmanifest.json diff --git a/extensions/ruby/language-configuration.json b/extensions/ruby/language-configuration.json new file mode 100644 index 000000000000..a86f592e3bdb --- /dev/null +++ b/extensions/ruby/language-configuration.json @@ -0,0 +1,31 @@ +{ + "comments": { + "lineComment": "#", + "blockComment": [ "=begin", "=end" ] + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + { "open": "\"", "close": "\"", "notIn": ["string"] }, + { "open": "'", "close": "'", "notIn": ["string"] }, + { "open": "`", "close": "`", "notIn": ["string"] } + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"], + ["`", "`"] + ], + "indentationRules": { + "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|in|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|(\"|'|\/).*\\4)*(#.*)?$", + "decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when|in)\\b)" + } +} diff --git a/lib/vscode/extensions/ruby/package.json b/extensions/ruby/package.json similarity index 100% rename from lib/vscode/extensions/ruby/package.json rename to extensions/ruby/package.json diff --git a/lib/vscode/extensions/ruby/package.nls.json b/extensions/ruby/package.nls.json similarity index 100% rename from lib/vscode/extensions/ruby/package.nls.json rename to extensions/ruby/package.nls.json diff --git a/lib/vscode/extensions/ruby/syntaxes/ruby.tmLanguage.json b/extensions/ruby/syntaxes/ruby.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/ruby/syntaxes/ruby.tmLanguage.json rename to extensions/ruby/syntaxes/ruby.tmLanguage.json diff --git a/lib/vscode/extensions/ruby/yarn.lock b/extensions/ruby/yarn.lock similarity index 100% rename from lib/vscode/extensions/ruby/yarn.lock rename to extensions/ruby/yarn.lock diff --git a/lib/vscode/extensions/rust/.vscodeignore b/extensions/rust/.vscodeignore similarity index 100% rename from lib/vscode/extensions/rust/.vscodeignore rename to extensions/rust/.vscodeignore diff --git a/lib/vscode/extensions/rust/cgmanifest.json b/extensions/rust/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/rust/cgmanifest.json rename to extensions/rust/cgmanifest.json diff --git a/lib/vscode/extensions/rust/language-configuration.json b/extensions/rust/language-configuration.json similarity index 100% rename from lib/vscode/extensions/rust/language-configuration.json rename to extensions/rust/language-configuration.json diff --git a/lib/vscode/extensions/rust/package.json b/extensions/rust/package.json similarity index 100% rename from lib/vscode/extensions/rust/package.json rename to extensions/rust/package.json diff --git a/lib/vscode/extensions/rust/package.nls.json b/extensions/rust/package.nls.json similarity index 100% rename from lib/vscode/extensions/rust/package.nls.json rename to extensions/rust/package.nls.json diff --git a/lib/vscode/extensions/rust/syntaxes/rust.tmLanguage.json b/extensions/rust/syntaxes/rust.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/rust/syntaxes/rust.tmLanguage.json rename to extensions/rust/syntaxes/rust.tmLanguage.json diff --git a/lib/vscode/extensions/rust/yarn.lock b/extensions/rust/yarn.lock similarity index 100% rename from lib/vscode/extensions/rust/yarn.lock rename to extensions/rust/yarn.lock diff --git a/lib/vscode/extensions/scss/.vscodeignore b/extensions/scss/.vscodeignore similarity index 100% rename from lib/vscode/extensions/scss/.vscodeignore rename to extensions/scss/.vscodeignore diff --git a/extensions/scss/cgmanifest.json b/extensions/scss/cgmanifest.json new file mode 100644 index 000000000000..12247769ce22 --- /dev/null +++ b/extensions/scss/cgmanifest.json @@ -0,0 +1,18 @@ +{ + "registrations": [ + { + "component": { + "type": "git", + "git": { + "name": "atom/language-sass", + "repositoryUrl": "https://github.com/atom/language-sass", + "commitHash": "f52ab12f7f9346cc2568129d8c4419bd3d506b47" + } + }, + "license": "MIT", + "description": "The file syntaxes/scss.json was derived from the Atom package https://github.com/atom/language-sass which was originally converted from the TextMate bundle https://github.com/alexsancho/SASS.tmbundle.", + "version": "0.62.1" + } + ], + "version": 1 +} \ No newline at end of file diff --git a/lib/vscode/extensions/scss/language-configuration.json b/extensions/scss/language-configuration.json similarity index 100% rename from lib/vscode/extensions/scss/language-configuration.json rename to extensions/scss/language-configuration.json diff --git a/lib/vscode/extensions/scss/package.json b/extensions/scss/package.json similarity index 100% rename from lib/vscode/extensions/scss/package.json rename to extensions/scss/package.json diff --git a/lib/vscode/extensions/scss/package.nls.json b/extensions/scss/package.nls.json similarity index 100% rename from lib/vscode/extensions/scss/package.nls.json rename to extensions/scss/package.nls.json diff --git a/lib/vscode/extensions/scss/syntaxes/sassdoc.tmLanguage.json b/extensions/scss/syntaxes/sassdoc.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/scss/syntaxes/sassdoc.tmLanguage.json rename to extensions/scss/syntaxes/sassdoc.tmLanguage.json diff --git a/lib/vscode/extensions/scss/syntaxes/scss.tmLanguage.json b/extensions/scss/syntaxes/scss.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/scss/syntaxes/scss.tmLanguage.json rename to extensions/scss/syntaxes/scss.tmLanguage.json diff --git a/lib/vscode/extensions/scss/yarn.lock b/extensions/scss/yarn.lock similarity index 100% rename from lib/vscode/extensions/scss/yarn.lock rename to extensions/scss/yarn.lock diff --git a/lib/vscode/extensions/search-result/.vscodeignore b/extensions/search-result/.vscodeignore similarity index 100% rename from lib/vscode/extensions/search-result/.vscodeignore rename to extensions/search-result/.vscodeignore diff --git a/lib/vscode/extensions/search-result/README.md b/extensions/search-result/README.md similarity index 100% rename from lib/vscode/extensions/search-result/README.md rename to extensions/search-result/README.md diff --git a/lib/vscode/extensions/search-result/extension-browser.webpack.config.js b/extensions/search-result/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/search-result/extension-browser.webpack.config.js rename to extensions/search-result/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/search-result/extension.webpack.config.js b/extensions/search-result/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/search-result/extension.webpack.config.js rename to extensions/search-result/extension.webpack.config.js diff --git a/lib/vscode/extensions/search-result/package.json b/extensions/search-result/package.json similarity index 100% rename from lib/vscode/extensions/search-result/package.json rename to extensions/search-result/package.json diff --git a/lib/vscode/extensions/search-result/package.nls.json b/extensions/search-result/package.nls.json similarity index 100% rename from lib/vscode/extensions/search-result/package.nls.json rename to extensions/search-result/package.nls.json diff --git a/lib/vscode/extensions/search-result/src/extension.ts b/extensions/search-result/src/extension.ts similarity index 100% rename from lib/vscode/extensions/search-result/src/extension.ts rename to extensions/search-result/src/extension.ts diff --git a/lib/vscode/extensions/search-result/src/media/refresh-dark.svg b/extensions/search-result/src/media/refresh-dark.svg similarity index 100% rename from lib/vscode/extensions/search-result/src/media/refresh-dark.svg rename to extensions/search-result/src/media/refresh-dark.svg diff --git a/lib/vscode/extensions/search-result/src/media/refresh-light.svg b/extensions/search-result/src/media/refresh-light.svg similarity index 100% rename from lib/vscode/extensions/search-result/src/media/refresh-light.svg rename to extensions/search-result/src/media/refresh-light.svg diff --git a/lib/vscode/extensions/testing-editor-contributions/src/typings/refs.d.ts b/extensions/search-result/src/typings/refs.d.ts similarity index 100% rename from lib/vscode/extensions/testing-editor-contributions/src/typings/refs.d.ts rename to extensions/search-result/src/typings/refs.d.ts diff --git a/lib/vscode/extensions/search-result/syntaxes/generateTMLanguage.js b/extensions/search-result/syntaxes/generateTMLanguage.js similarity index 100% rename from lib/vscode/extensions/search-result/syntaxes/generateTMLanguage.js rename to extensions/search-result/syntaxes/generateTMLanguage.js diff --git a/lib/vscode/extensions/search-result/syntaxes/searchResult.tmLanguage.json b/extensions/search-result/syntaxes/searchResult.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/search-result/syntaxes/searchResult.tmLanguage.json rename to extensions/search-result/syntaxes/searchResult.tmLanguage.json diff --git a/lib/vscode/extensions/search-result/tsconfig.json b/extensions/search-result/tsconfig.json similarity index 100% rename from lib/vscode/extensions/search-result/tsconfig.json rename to extensions/search-result/tsconfig.json diff --git a/lib/vscode/extensions/search-result/yarn.lock b/extensions/search-result/yarn.lock similarity index 100% rename from lib/vscode/extensions/search-result/yarn.lock rename to extensions/search-result/yarn.lock diff --git a/lib/vscode/extensions/shaderlab/.vscodeignore b/extensions/shaderlab/.vscodeignore similarity index 100% rename from lib/vscode/extensions/shaderlab/.vscodeignore rename to extensions/shaderlab/.vscodeignore diff --git a/lib/vscode/extensions/shaderlab/cgmanifest.json b/extensions/shaderlab/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/shaderlab/cgmanifest.json rename to extensions/shaderlab/cgmanifest.json diff --git a/lib/vscode/extensions/shaderlab/language-configuration.json b/extensions/shaderlab/language-configuration.json similarity index 100% rename from lib/vscode/extensions/shaderlab/language-configuration.json rename to extensions/shaderlab/language-configuration.json diff --git a/lib/vscode/extensions/shaderlab/package.json b/extensions/shaderlab/package.json similarity index 100% rename from lib/vscode/extensions/shaderlab/package.json rename to extensions/shaderlab/package.json diff --git a/lib/vscode/extensions/shaderlab/package.nls.json b/extensions/shaderlab/package.nls.json similarity index 100% rename from lib/vscode/extensions/shaderlab/package.nls.json rename to extensions/shaderlab/package.nls.json diff --git a/lib/vscode/extensions/shaderlab/syntaxes/shaderlab.tmLanguage.json b/extensions/shaderlab/syntaxes/shaderlab.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/shaderlab/syntaxes/shaderlab.tmLanguage.json rename to extensions/shaderlab/syntaxes/shaderlab.tmLanguage.json diff --git a/lib/vscode/extensions/shaderlab/yarn.lock b/extensions/shaderlab/yarn.lock similarity index 100% rename from lib/vscode/extensions/shaderlab/yarn.lock rename to extensions/shaderlab/yarn.lock diff --git a/lib/vscode/extensions/shared.webpack.config.js b/extensions/shared.webpack.config.js similarity index 100% rename from lib/vscode/extensions/shared.webpack.config.js rename to extensions/shared.webpack.config.js diff --git a/lib/vscode/extensions/shellscript/.vscodeignore b/extensions/shellscript/.vscodeignore similarity index 100% rename from lib/vscode/extensions/shellscript/.vscodeignore rename to extensions/shellscript/.vscodeignore diff --git a/lib/vscode/extensions/shellscript/cgmanifest.json b/extensions/shellscript/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/shellscript/cgmanifest.json rename to extensions/shellscript/cgmanifest.json diff --git a/lib/vscode/extensions/shellscript/language-configuration.json b/extensions/shellscript/language-configuration.json similarity index 100% rename from lib/vscode/extensions/shellscript/language-configuration.json rename to extensions/shellscript/language-configuration.json diff --git a/extensions/shellscript/package.json b/extensions/shellscript/package.json new file mode 100644 index 000000000000..3e1e3f3e9c8d --- /dev/null +++ b/extensions/shellscript/package.json @@ -0,0 +1,92 @@ +{ + "name": "shellscript", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "publisher": "vscode", + "license": "MIT", + "engines": { + "vscode": "*" + }, + "scripts": { + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-shellscript grammars/shell-unix-bash.cson ./syntaxes/shell-unix-bash.tmLanguage.json" + }, + "contributes": { + "languages": [ + { + "id": "shellscript", + "aliases": [ + "Shell Script", + "shellscript", + "bash", + "sh", + "zsh", + "ksh", + "csh" + ], + "extensions": [ + ".sh", + ".bash", + ".bashrc", + ".bash_aliases", + ".bash_profile", + ".bash_login", + ".ebuild", + ".profile", + ".bash_logout", + ".xprofile", + ".xsession", + ".xsessionrc", + ".Xsession", + ".zsh", + ".zshrc", + ".zprofile", + ".zlogin", + ".zlogout", + ".zshenv", + ".zsh-theme", + ".ksh", + ".csh", + ".cshrc", + ".tcshrc", + ".yashrc", + ".yash_profile" + ], + "filenames": [ + "APKBUILD", + "PKGBUILD", + ".envrc", + ".hushlogin", + "zshrc", + "zshenv", + "zlogin", + "zprofile", + "zlogout", + "bashrc_Apple_Terminal", + "zshrc_Apple_Terminal" + ], + "firstLine": "^#!.*\\b(bash|zsh|sh|ksh|dtksh|pdksh|mksh|ash|dash|yash|sh|csh|jcsh|tcsh|itcsh).*|^#\\s*-\\*-[^*]*mode:\\s*shell-script[^*]*-\\*-", + "configuration": "./language-configuration.json", + "mimetypes": [ + "text/x-shellscript" + ] + } + ], + "grammars": [ + { + "language": "shellscript", + "scopeName": "source.shell", + "path": "./syntaxes/shell-unix-bash.tmLanguage.json" + } + ], + "configurationDefaults": { + "[shellscript]": { + "files.eol": "\n" + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/shellscript/package.nls.json b/extensions/shellscript/package.nls.json similarity index 100% rename from lib/vscode/extensions/shellscript/package.nls.json rename to extensions/shellscript/package.nls.json diff --git a/lib/vscode/extensions/shellscript/syntaxes/shell-unix-bash.tmLanguage.json b/extensions/shellscript/syntaxes/shell-unix-bash.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/shellscript/syntaxes/shell-unix-bash.tmLanguage.json rename to extensions/shellscript/syntaxes/shell-unix-bash.tmLanguage.json diff --git a/lib/vscode/extensions/shellscript/yarn.lock b/extensions/shellscript/yarn.lock similarity index 100% rename from lib/vscode/extensions/shellscript/yarn.lock rename to extensions/shellscript/yarn.lock diff --git a/lib/vscode/extensions/simple-browser/.gitignore b/extensions/simple-browser/.gitignore similarity index 100% rename from lib/vscode/extensions/simple-browser/.gitignore rename to extensions/simple-browser/.gitignore diff --git a/lib/vscode/extensions/simple-browser/.vscodeignore b/extensions/simple-browser/.vscodeignore similarity index 100% rename from lib/vscode/extensions/simple-browser/.vscodeignore rename to extensions/simple-browser/.vscodeignore diff --git a/lib/vscode/extensions/simple-browser/README.md b/extensions/simple-browser/README.md similarity index 100% rename from lib/vscode/extensions/simple-browser/README.md rename to extensions/simple-browser/README.md diff --git a/lib/vscode/extensions/simple-browser/extension-browser.webpack.config.js b/extensions/simple-browser/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/simple-browser/extension-browser.webpack.config.js rename to extensions/simple-browser/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/simple-browser/extension.webpack.config.js b/extensions/simple-browser/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/simple-browser/extension.webpack.config.js rename to extensions/simple-browser/extension.webpack.config.js diff --git a/lib/vscode/extensions/simple-browser/media/icon.png b/extensions/simple-browser/media/icon.png similarity index 100% rename from lib/vscode/extensions/simple-browser/media/icon.png rename to extensions/simple-browser/media/icon.png diff --git a/lib/vscode/extensions/simple-browser/media/main.css b/extensions/simple-browser/media/main.css similarity index 100% rename from lib/vscode/extensions/simple-browser/media/main.css rename to extensions/simple-browser/media/main.css diff --git a/lib/vscode/extensions/simple-browser/media/preview-dark.svg b/extensions/simple-browser/media/preview-dark.svg similarity index 100% rename from lib/vscode/extensions/simple-browser/media/preview-dark.svg rename to extensions/simple-browser/media/preview-dark.svg diff --git a/lib/vscode/extensions/simple-browser/media/preview-light.svg b/extensions/simple-browser/media/preview-light.svg similarity index 100% rename from lib/vscode/extensions/simple-browser/media/preview-light.svg rename to extensions/simple-browser/media/preview-light.svg diff --git a/extensions/simple-browser/package.json b/extensions/simple-browser/package.json new file mode 100644 index 000000000000..f2af986a046c --- /dev/null +++ b/extensions/simple-browser/package.json @@ -0,0 +1,81 @@ +{ + "name": "simple-browser", + "displayName": "%displayName%", + "description": "%description%", + "enableProposedApi": true, + "version": "1.0.0", + "icon": "media/icon.png", + "publisher": "vscode", + "license": "MIT", + "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", + "engines": { + "vscode": "^1.53.0" + }, + "main": "./out/extension", + "browser": "./dist/browser/extension", + "categories": [ + "Other" + ], + "extensionKind": [ + "ui", + "workspace", + "web" + ], + "activationEvents": [ + "onCommand:simpleBrowser.show", + "onCommand:simpleBrowser.api.open", + "onOpenExternalUri:http", + "onOpenExternalUri:https" + ], + "capabilities": { + "virtualWorkspaces": true, + "untrustedWorkspaces": { + "supported": true + } + }, + "contributes": { + "commands": [ + { + "command": "simpleBrowser.show", + "title": "Show", + "category": "Simple Browser" + } + ], + "configuration": [ + { + "title": "Simple Browser", + "properties": { + "simpleBrowser.focusLockIndicator.enabled": { + "type": "boolean", + "default": true, + "title": "Focus Lock Indicator Enabled", + "description": "%configuration.focusLockIndicator.enabled.description%" + } + } + } + ] + }, + "scripts": { + "compile": "gulp compile-extension:markdown-language-features && npm run build-preview", + "watch": "npm run build-preview && gulp watch-extension:markdown-language-features", + "vscode:prepublish": "npm run build-ext && npm run build-preview", + "build-ext": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:markdown-language-features ./tsconfig.json", + "build-preview": "npx webpack-cli --mode development", + "build-preview-production": "npx webpack-cli --mode production", + "compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none", + "watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose" + }, + "dependencies": { + "vscode-extension-telemetry": "0.1.7", + "vscode-nls": "^4.0.0" + }, + "devDependencies": { + "@types/node": "14.x", + "@types/vscode-webview": "^1.57.0", + "vscode-codicons": "^0.0.14" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/simple-browser/package.nls.json b/extensions/simple-browser/package.nls.json similarity index 100% rename from lib/vscode/extensions/simple-browser/package.nls.json rename to extensions/simple-browser/package.nls.json diff --git a/lib/vscode/extensions/simple-browser/preview-src/events.ts b/extensions/simple-browser/preview-src/events.ts similarity index 100% rename from lib/vscode/extensions/simple-browser/preview-src/events.ts rename to extensions/simple-browser/preview-src/events.ts diff --git a/extensions/simple-browser/preview-src/index.ts b/extensions/simple-browser/preview-src/index.ts new file mode 100644 index 000000000000..0b8f9f93531d --- /dev/null +++ b/extensions/simple-browser/preview-src/index.ts @@ -0,0 +1,110 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { onceDocumentLoaded } from './events'; + +const vscode = acquireVsCodeApi(); + +function getSettings() { + const element = document.getElementById('simple-browser-settings'); + if (element) { + const data = element.getAttribute('data-settings'); + if (data) { + return JSON.parse(data); + } + } + + throw new Error(`Could not load settings`); +} + +const settings = getSettings(); + +const iframe = document.querySelector('iframe')!; +const header = document.querySelector('.header')!; +const input = header.querySelector('.url-input')!; +const forwardButton = header.querySelector('.forward-button')!; +const backButton = header.querySelector('.back-button')!; +const reloadButton = header.querySelector('.reload-button')!; +const openExternalButton = header.querySelector('.open-external-button')!; + +window.addEventListener('message', e => { + switch (e.data.type) { + case 'focus': + { + iframe.focus(); + break; + } + case 'didChangeFocusLockIndicatorEnabled': + { + toggleFocusLockIndicatorEnabled(e.data.enabled); + break; + } + } +}); + +onceDocumentLoaded(() => { + setInterval(() => { + const iframeFocused = document.activeElement?.tagName === 'IFRAME'; + document.body.classList.toggle('iframe-focused', iframeFocused); + }, 50); + + iframe.addEventListener('load', () => { + // Noop + }); + + input.addEventListener('change', e => { + const url = (e.target as HTMLInputElement).value; + navigateTo(url); + }); + + forwardButton.addEventListener('click', () => { + history.forward(); + }); + + backButton.addEventListener('click', () => { + history.back(); + }); + + openExternalButton.addEventListener('click', () => { + vscode.postMessage({ + type: 'openExternal', + url: input.value + }); + }); + + reloadButton.addEventListener('click', () => { + // This does not seem to trigger what we want + // history.go(0); + + // This incorrectly adds entries to the history but does reload + // It also always incorrectly always loads the value in the input bar, + // which may not match the current page if the user has navigated + navigateTo(input.value); + }); + + navigateTo(settings.url); + input.value = settings.url; + + toggleFocusLockIndicatorEnabled(settings.focusLockIndicatorEnabled); + + function navigateTo(rawUrl: string): void { + try { + const url = new URL(rawUrl); + + // Try to bust the cache for the iframe + // There does not appear to be any way to reliably do this except modifying the url + url.searchParams.append('vscodeBrowserReqId', Date.now().toString()); + + iframe.src = url.toString(); + } catch { + iframe.src = rawUrl; + } + } +}); + +function toggleFocusLockIndicatorEnabled(enabled: boolean) { + document.body.classList.toggle('enable-focus-lock-indicator', enabled); +} + diff --git a/lib/vscode/extensions/markdown-language-features/preview-src/tsconfig.json b/extensions/simple-browser/preview-src/tsconfig.json similarity index 100% rename from lib/vscode/extensions/markdown-language-features/preview-src/tsconfig.json rename to extensions/simple-browser/preview-src/tsconfig.json diff --git a/lib/vscode/extensions/simple-browser/src/dispose.ts b/extensions/simple-browser/src/dispose.ts similarity index 100% rename from lib/vscode/extensions/simple-browser/src/dispose.ts rename to extensions/simple-browser/src/dispose.ts diff --git a/lib/vscode/extensions/simple-browser/src/extension.ts b/extensions/simple-browser/src/extension.ts similarity index 100% rename from lib/vscode/extensions/simple-browser/src/extension.ts rename to extensions/simple-browser/src/extension.ts diff --git a/lib/vscode/extensions/simple-browser/src/simpleBrowserManager.ts b/extensions/simple-browser/src/simpleBrowserManager.ts similarity index 100% rename from lib/vscode/extensions/simple-browser/src/simpleBrowserManager.ts rename to extensions/simple-browser/src/simpleBrowserManager.ts diff --git a/lib/vscode/extensions/simple-browser/src/simpleBrowserView.ts b/extensions/simple-browser/src/simpleBrowserView.ts similarity index 100% rename from lib/vscode/extensions/simple-browser/src/simpleBrowserView.ts rename to extensions/simple-browser/src/simpleBrowserView.ts diff --git a/lib/vscode/extensions/github-authentication/src/typings/ref.d.ts b/extensions/simple-browser/src/typings/ref.d.ts similarity index 83% rename from lib/vscode/extensions/github-authentication/src/typings/ref.d.ts rename to extensions/simple-browser/src/typings/ref.d.ts index dfd710c06cf3..c9849d48e083 100644 --- a/lib/vscode/extensions/github-authentication/src/typings/ref.d.ts +++ b/extensions/simple-browser/src/typings/ref.d.ts @@ -5,6 +5,3 @@ /// /// -/// - -// NOTE@coder: add keytar typeref diff --git a/lib/vscode/extensions/simple-browser/tsconfig.json b/extensions/simple-browser/tsconfig.json similarity index 100% rename from lib/vscode/extensions/simple-browser/tsconfig.json rename to extensions/simple-browser/tsconfig.json diff --git a/lib/vscode/extensions/simple-browser/webpack.config.js b/extensions/simple-browser/webpack.config.js similarity index 100% rename from lib/vscode/extensions/simple-browser/webpack.config.js rename to extensions/simple-browser/webpack.config.js diff --git a/extensions/simple-browser/yarn.lock b/extensions/simple-browser/yarn.lock new file mode 100644 index 000000000000..eb52a2a4a63f --- /dev/null +++ b/extensions/simple-browser/yarn.lock @@ -0,0 +1,106 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +"@types/vscode-webview@^1.57.0": + version "1.57.0" + resolved "https://registry.yarnpkg.com/@types/vscode-webview/-/vscode-webview-1.57.0.tgz#bad5194d45ae8d03afc1c0f67f71ff5e7a243bbf" + integrity sha512-x3Cb/SMa1IwRHfSvKaZDZOTh4cNoG505c3NjTqGlMC082m++x/ETUmtYniDsw6SSmYzZXO8KBNhYxR0+VqymqA== + +applicationinsights@1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" + integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== + dependencies: + cls-hooked "^4.2.2" + continuation-local-storage "^3.2.1" + diagnostic-channel "0.2.0" + diagnostic-channel-publishers "^0.3.3" + +async-hook-jl@^1.7.6: + version "1.7.6" + resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" + integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== + dependencies: + stack-chain "^1.3.7" + +async-listener@^0.6.0: + version "0.6.10" + resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" + integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== + dependencies: + semver "^5.3.0" + shimmer "^1.1.0" + +cls-hooked@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" + integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== + dependencies: + async-hook-jl "^1.7.6" + emitter-listener "^1.0.1" + semver "^5.4.1" + +continuation-local-storage@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" + integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== + dependencies: + async-listener "^0.6.0" + emitter-listener "^1.1.1" + +diagnostic-channel-publishers@^0.3.3: + version "0.3.5" + resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" + integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== + +diagnostic-channel@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" + integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= + dependencies: + semver "^5.3.0" + +emitter-listener@^1.0.1, emitter-listener@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" + integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== + dependencies: + shimmer "^1.2.0" + +semver@^5.3.0, semver@^5.4.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +shimmer@^1.1.0, shimmer@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + +stack-chain@^1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" + integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= + +vscode-codicons@^0.0.14: + version "0.0.14" + resolved "https://registry.yarnpkg.com/vscode-codicons/-/vscode-codicons-0.0.14.tgz#e0d05418e2e195564ff6f6a2199d70415911c18f" + integrity sha512-6CEH5KT9ct5WMw7n5dlX7rB8ya4CUI2FSq1Wk36XaW+c5RglFtAanUV0T+gvZVVFhl/WxfjTvFHq06Hz9c1SLA== + +vscode-extension-telemetry@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" + integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== + dependencies: + applicationinsights "1.7.4" + +vscode-nls@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" + integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== diff --git a/lib/vscode/extensions/sql/.vscodeignore b/extensions/sql/.vscodeignore similarity index 100% rename from lib/vscode/extensions/sql/.vscodeignore rename to extensions/sql/.vscodeignore diff --git a/lib/vscode/extensions/sql/build/update-grammar.js b/extensions/sql/build/update-grammar.js similarity index 100% rename from lib/vscode/extensions/sql/build/update-grammar.js rename to extensions/sql/build/update-grammar.js diff --git a/lib/vscode/extensions/sql/cgmanifest.json b/extensions/sql/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/sql/cgmanifest.json rename to extensions/sql/cgmanifest.json diff --git a/lib/vscode/extensions/sql/language-configuration.json b/extensions/sql/language-configuration.json similarity index 100% rename from lib/vscode/extensions/sql/language-configuration.json rename to extensions/sql/language-configuration.json diff --git a/lib/vscode/extensions/sql/package.json b/extensions/sql/package.json similarity index 100% rename from lib/vscode/extensions/sql/package.json rename to extensions/sql/package.json diff --git a/lib/vscode/extensions/sql/package.nls.json b/extensions/sql/package.nls.json similarity index 100% rename from lib/vscode/extensions/sql/package.nls.json rename to extensions/sql/package.nls.json diff --git a/lib/vscode/extensions/sql/syntaxes/sql.tmLanguage.json b/extensions/sql/syntaxes/sql.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/sql/syntaxes/sql.tmLanguage.json rename to extensions/sql/syntaxes/sql.tmLanguage.json diff --git a/lib/vscode/extensions/sql/yarn.lock b/extensions/sql/yarn.lock similarity index 100% rename from lib/vscode/extensions/sql/yarn.lock rename to extensions/sql/yarn.lock diff --git a/lib/vscode/extensions/swift/.vscodeignore b/extensions/swift/.vscodeignore similarity index 100% rename from lib/vscode/extensions/swift/.vscodeignore rename to extensions/swift/.vscodeignore diff --git a/lib/vscode/extensions/swift/LICENSE.md b/extensions/swift/LICENSE.md similarity index 100% rename from lib/vscode/extensions/swift/LICENSE.md rename to extensions/swift/LICENSE.md diff --git a/lib/vscode/extensions/swift/cgmanifest.json b/extensions/swift/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/swift/cgmanifest.json rename to extensions/swift/cgmanifest.json diff --git a/lib/vscode/extensions/swift/language-configuration.json b/extensions/swift/language-configuration.json similarity index 100% rename from lib/vscode/extensions/swift/language-configuration.json rename to extensions/swift/language-configuration.json diff --git a/lib/vscode/extensions/swift/package.json b/extensions/swift/package.json similarity index 100% rename from lib/vscode/extensions/swift/package.json rename to extensions/swift/package.json diff --git a/lib/vscode/extensions/swift/package.nls.json b/extensions/swift/package.nls.json similarity index 100% rename from lib/vscode/extensions/swift/package.nls.json rename to extensions/swift/package.nls.json diff --git a/lib/vscode/extensions/swift/snippets/swift.code-snippets b/extensions/swift/snippets/swift.code-snippets similarity index 100% rename from lib/vscode/extensions/swift/snippets/swift.code-snippets rename to extensions/swift/snippets/swift.code-snippets diff --git a/lib/vscode/extensions/swift/syntaxes/swift.tmLanguage.json b/extensions/swift/syntaxes/swift.tmLanguage.json similarity index 99% rename from lib/vscode/extensions/swift/syntaxes/swift.tmLanguage.json rename to extensions/swift/syntaxes/swift.tmLanguage.json index 3396ff07de9e..be1b132172e1 100644 --- a/lib/vscode/extensions/swift/syntaxes/swift.tmLanguage.json +++ b/extensions/swift/syntaxes/swift.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/textmate/swift.tmbundle/commit/2ee3d7c63f7dd2c769167278b48e3716d1b60b26", + "version": "https://github.com/textmate/swift.tmbundle/commit/8c7672d74c1baa4e6944a05ac6c57a623532f18b", "name": "Swift", "scopeName": "source.swift", "comment": "See swift.tmbundle/grammar-test.swift for test cases.", @@ -1280,7 +1280,7 @@ "name": "meta.import.swift", "patterns": [ { - "begin": "\\G(?!;|$|//|/\\*)(?:(typealias|struct|class|enum|protocol|var|func)\\s+)?", + "begin": "\\G(?!;|$|//|/\\*)(?:(typealias|struct|class|actor|enum|protocol|var|func)\\s+)?", "beginCaptures": { "1": { "name": "storage.modifier.swift" @@ -1908,7 +1908,7 @@ "type": { "patterns": [ { - "begin": "\\b(class(?!\\s+(?:func|var|let)\\b)|struct)\\s+((?`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k))", + "begin": "\\b(class(?!\\s+(?:func|var|let)\\b)|struct|actor)\\s+((?`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k))", "beginCaptures": { "1": { "name": "storage.type.$1.swift" @@ -2337,7 +2337,7 @@ ], "repository": { "availability-condition": { - "begin": "\\B(#available)(\\()", + "begin": "\\B(#(?:un)?available)(\\()", "beginCaptures": { "1": { "name": "support.function.availability-condition.swift" @@ -2645,7 +2645,7 @@ "name": "keyword.other.declaration-specifier.swift" }, { - "match": "(? /// -/// - -// NOTE@coder: add keytar typeref diff --git a/lib/vscode/extensions/testing-editor-contributions/tsconfig.json b/extensions/testing-editor-contributions/tsconfig.json similarity index 100% rename from lib/vscode/extensions/testing-editor-contributions/tsconfig.json rename to extensions/testing-editor-contributions/tsconfig.json diff --git a/lib/vscode/extensions/testing-editor-contributions/yarn.lock b/extensions/testing-editor-contributions/yarn.lock similarity index 100% rename from lib/vscode/extensions/testing-editor-contributions/yarn.lock rename to extensions/testing-editor-contributions/yarn.lock diff --git a/lib/vscode/extensions/theme-abyss/.vscodeignore b/extensions/theme-abyss/.vscodeignore similarity index 100% rename from lib/vscode/extensions/theme-abyss/.vscodeignore rename to extensions/theme-abyss/.vscodeignore diff --git a/lib/vscode/extensions/theme-abyss/cgmanifest.json b/extensions/theme-abyss/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/theme-abyss/cgmanifest.json rename to extensions/theme-abyss/cgmanifest.json diff --git a/lib/vscode/extensions/theme-abyss/package.json b/extensions/theme-abyss/package.json similarity index 100% rename from lib/vscode/extensions/theme-abyss/package.json rename to extensions/theme-abyss/package.json diff --git a/lib/vscode/extensions/theme-abyss/package.nls.json b/extensions/theme-abyss/package.nls.json similarity index 100% rename from lib/vscode/extensions/theme-abyss/package.nls.json rename to extensions/theme-abyss/package.nls.json diff --git a/lib/vscode/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json similarity index 100% rename from lib/vscode/extensions/theme-abyss/themes/abyss-color-theme.json rename to extensions/theme-abyss/themes/abyss-color-theme.json diff --git a/lib/vscode/extensions/theme-abyss/yarn.lock b/extensions/theme-abyss/yarn.lock similarity index 100% rename from lib/vscode/extensions/theme-abyss/yarn.lock rename to extensions/theme-abyss/yarn.lock diff --git a/lib/vscode/extensions/theme-defaults/fileicons/images/document-dark.svg b/extensions/theme-defaults/fileicons/images/document-dark.svg similarity index 100% rename from lib/vscode/extensions/theme-defaults/fileicons/images/document-dark.svg rename to extensions/theme-defaults/fileicons/images/document-dark.svg diff --git a/lib/vscode/extensions/theme-defaults/fileicons/images/document-light.svg b/extensions/theme-defaults/fileicons/images/document-light.svg similarity index 100% rename from lib/vscode/extensions/theme-defaults/fileicons/images/document-light.svg rename to extensions/theme-defaults/fileicons/images/document-light.svg diff --git a/lib/vscode/extensions/theme-defaults/fileicons/images/folder-dark.svg b/extensions/theme-defaults/fileicons/images/folder-dark.svg similarity index 100% rename from lib/vscode/extensions/theme-defaults/fileicons/images/folder-dark.svg rename to extensions/theme-defaults/fileicons/images/folder-dark.svg diff --git a/lib/vscode/extensions/theme-defaults/fileicons/images/folder-light.svg b/extensions/theme-defaults/fileicons/images/folder-light.svg similarity index 100% rename from lib/vscode/extensions/theme-defaults/fileicons/images/folder-light.svg rename to extensions/theme-defaults/fileicons/images/folder-light.svg diff --git a/lib/vscode/extensions/theme-defaults/fileicons/images/folder-open-dark.svg b/extensions/theme-defaults/fileicons/images/folder-open-dark.svg similarity index 100% rename from lib/vscode/extensions/theme-defaults/fileicons/images/folder-open-dark.svg rename to extensions/theme-defaults/fileicons/images/folder-open-dark.svg diff --git a/lib/vscode/extensions/theme-defaults/fileicons/images/folder-open-light.svg b/extensions/theme-defaults/fileicons/images/folder-open-light.svg similarity index 100% rename from lib/vscode/extensions/theme-defaults/fileicons/images/folder-open-light.svg rename to extensions/theme-defaults/fileicons/images/folder-open-light.svg diff --git a/lib/vscode/extensions/theme-defaults/fileicons/images/root-folder-dark.svg b/extensions/theme-defaults/fileicons/images/root-folder-dark.svg similarity index 100% rename from lib/vscode/extensions/theme-defaults/fileicons/images/root-folder-dark.svg rename to extensions/theme-defaults/fileicons/images/root-folder-dark.svg diff --git a/lib/vscode/extensions/theme-defaults/fileicons/images/root-folder-light.svg b/extensions/theme-defaults/fileicons/images/root-folder-light.svg similarity index 100% rename from lib/vscode/extensions/theme-defaults/fileicons/images/root-folder-light.svg rename to extensions/theme-defaults/fileicons/images/root-folder-light.svg diff --git a/lib/vscode/extensions/theme-defaults/fileicons/images/root-folder-open-dark.svg b/extensions/theme-defaults/fileicons/images/root-folder-open-dark.svg similarity index 100% rename from lib/vscode/extensions/theme-defaults/fileicons/images/root-folder-open-dark.svg rename to extensions/theme-defaults/fileicons/images/root-folder-open-dark.svg diff --git a/lib/vscode/extensions/theme-defaults/fileicons/images/root-folder-open-light.svg b/extensions/theme-defaults/fileicons/images/root-folder-open-light.svg similarity index 100% rename from lib/vscode/extensions/theme-defaults/fileicons/images/root-folder-open-light.svg rename to extensions/theme-defaults/fileicons/images/root-folder-open-light.svg diff --git a/lib/vscode/extensions/theme-defaults/fileicons/vs_minimal-icon-theme.json b/extensions/theme-defaults/fileicons/vs_minimal-icon-theme.json similarity index 100% rename from lib/vscode/extensions/theme-defaults/fileicons/vs_minimal-icon-theme.json rename to extensions/theme-defaults/fileicons/vs_minimal-icon-theme.json diff --git a/lib/vscode/extensions/theme-defaults/package.json b/extensions/theme-defaults/package.json similarity index 100% rename from lib/vscode/extensions/theme-defaults/package.json rename to extensions/theme-defaults/package.json diff --git a/lib/vscode/extensions/theme-defaults/package.nls.json b/extensions/theme-defaults/package.nls.json similarity index 100% rename from lib/vscode/extensions/theme-defaults/package.nls.json rename to extensions/theme-defaults/package.nls.json diff --git a/lib/vscode/extensions/theme-defaults/themes/dark_plus.json b/extensions/theme-defaults/themes/dark_plus.json similarity index 100% rename from lib/vscode/extensions/theme-defaults/themes/dark_plus.json rename to extensions/theme-defaults/themes/dark_plus.json diff --git a/lib/vscode/extensions/theme-defaults/themes/dark_vs.json b/extensions/theme-defaults/themes/dark_vs.json similarity index 100% rename from lib/vscode/extensions/theme-defaults/themes/dark_vs.json rename to extensions/theme-defaults/themes/dark_vs.json diff --git a/lib/vscode/extensions/theme-defaults/themes/hc_black.json b/extensions/theme-defaults/themes/hc_black.json similarity index 98% rename from lib/vscode/extensions/theme-defaults/themes/hc_black.json rename to extensions/theme-defaults/themes/hc_black.json index ef3ca5591d88..7faf68ddab71 100644 --- a/lib/vscode/extensions/theme-defaults/themes/hc_black.json +++ b/extensions/theme-defaults/themes/hc_black.json @@ -10,7 +10,8 @@ "selection.background": "#008000", "editor.selectionBackground": "#FFFFFF", "statusBarItem.remoteBackground": "#00000000", - "ports.iconRunningProcessForeground": "#FFFFFF" + "ports.iconRunningProcessForeground": "#FFFFFF", + "editorWhitespace.foreground": "#7c7c7c" }, "tokenColors": [ { diff --git a/lib/vscode/extensions/theme-defaults/themes/light_plus.json b/extensions/theme-defaults/themes/light_plus.json similarity index 100% rename from lib/vscode/extensions/theme-defaults/themes/light_plus.json rename to extensions/theme-defaults/themes/light_plus.json diff --git a/lib/vscode/extensions/theme-defaults/themes/light_vs.json b/extensions/theme-defaults/themes/light_vs.json similarity index 98% rename from lib/vscode/extensions/theme-defaults/themes/light_vs.json rename to extensions/theme-defaults/themes/light_vs.json index f48e636a18a8..b58b9f883219 100644 --- a/lib/vscode/extensions/theme-defaults/themes/light_vs.json +++ b/extensions/theme-defaults/themes/light_vs.json @@ -24,7 +24,8 @@ "tab.lastPinnedBorder": "#61616130", "notebook.cellBorderColor": "#E8E8E8", "notebook.selectedCellBackground": "#c8ddf150", - "statusBarItem.errorBackground": "#c72e0f" + "statusBarItem.errorBackground": "#c72e0f", + "list.focusHighlightForeground": "#9DDDFF" }, "tokenColors": [ { diff --git a/lib/vscode/extensions/theme-defaults/yarn.lock b/extensions/theme-defaults/yarn.lock similarity index 100% rename from lib/vscode/extensions/theme-defaults/yarn.lock rename to extensions/theme-defaults/yarn.lock diff --git a/lib/vscode/extensions/theme-kimbie-dark/.vscodeignore b/extensions/theme-kimbie-dark/.vscodeignore similarity index 100% rename from lib/vscode/extensions/theme-kimbie-dark/.vscodeignore rename to extensions/theme-kimbie-dark/.vscodeignore diff --git a/lib/vscode/extensions/theme-kimbie-dark/cgmanifest.json b/extensions/theme-kimbie-dark/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/theme-kimbie-dark/cgmanifest.json rename to extensions/theme-kimbie-dark/cgmanifest.json diff --git a/lib/vscode/extensions/theme-kimbie-dark/package.json b/extensions/theme-kimbie-dark/package.json similarity index 100% rename from lib/vscode/extensions/theme-kimbie-dark/package.json rename to extensions/theme-kimbie-dark/package.json diff --git a/lib/vscode/extensions/theme-kimbie-dark/package.nls.json b/extensions/theme-kimbie-dark/package.nls.json similarity index 100% rename from lib/vscode/extensions/theme-kimbie-dark/package.nls.json rename to extensions/theme-kimbie-dark/package.nls.json diff --git a/lib/vscode/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json similarity index 100% rename from lib/vscode/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json rename to extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json diff --git a/lib/vscode/extensions/theme-kimbie-dark/yarn.lock b/extensions/theme-kimbie-dark/yarn.lock similarity index 100% rename from lib/vscode/extensions/theme-kimbie-dark/yarn.lock rename to extensions/theme-kimbie-dark/yarn.lock diff --git a/lib/vscode/extensions/theme-monokai-dimmed/.vscodeignore b/extensions/theme-monokai-dimmed/.vscodeignore similarity index 100% rename from lib/vscode/extensions/theme-monokai-dimmed/.vscodeignore rename to extensions/theme-monokai-dimmed/.vscodeignore diff --git a/lib/vscode/extensions/theme-monokai-dimmed/cgmanifest.json b/extensions/theme-monokai-dimmed/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/theme-monokai-dimmed/cgmanifest.json rename to extensions/theme-monokai-dimmed/cgmanifest.json diff --git a/lib/vscode/extensions/theme-monokai-dimmed/package.json b/extensions/theme-monokai-dimmed/package.json similarity index 100% rename from lib/vscode/extensions/theme-monokai-dimmed/package.json rename to extensions/theme-monokai-dimmed/package.json diff --git a/lib/vscode/extensions/theme-monokai-dimmed/package.nls.json b/extensions/theme-monokai-dimmed/package.nls.json similarity index 100% rename from lib/vscode/extensions/theme-monokai-dimmed/package.nls.json rename to extensions/theme-monokai-dimmed/package.nls.json diff --git a/lib/vscode/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json similarity index 100% rename from lib/vscode/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json rename to extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json diff --git a/lib/vscode/extensions/theme-monokai-dimmed/yarn.lock b/extensions/theme-monokai-dimmed/yarn.lock similarity index 100% rename from lib/vscode/extensions/theme-monokai-dimmed/yarn.lock rename to extensions/theme-monokai-dimmed/yarn.lock diff --git a/lib/vscode/extensions/theme-monokai/.vscodeignore b/extensions/theme-monokai/.vscodeignore similarity index 100% rename from lib/vscode/extensions/theme-monokai/.vscodeignore rename to extensions/theme-monokai/.vscodeignore diff --git a/lib/vscode/extensions/theme-monokai/cgmanifest.json b/extensions/theme-monokai/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/theme-monokai/cgmanifest.json rename to extensions/theme-monokai/cgmanifest.json diff --git a/lib/vscode/extensions/theme-monokai/package.json b/extensions/theme-monokai/package.json similarity index 100% rename from lib/vscode/extensions/theme-monokai/package.json rename to extensions/theme-monokai/package.json diff --git a/lib/vscode/extensions/theme-monokai/package.nls.json b/extensions/theme-monokai/package.nls.json similarity index 100% rename from lib/vscode/extensions/theme-monokai/package.nls.json rename to extensions/theme-monokai/package.nls.json diff --git a/lib/vscode/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json similarity index 99% rename from lib/vscode/extensions/theme-monokai/themes/monokai-color-theme.json rename to extensions/theme-monokai/themes/monokai-color-theme.json index d96060d9710b..2b9b207a5a79 100644 --- a/lib/vscode/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -18,7 +18,7 @@ "button.background": "#75715E", "editor.background": "#272822", "editor.foreground": "#f8f8f2", - "selection.background": "#ccccc7", + "selection.background": "#878b9180", "editor.selectionHighlightBackground": "#575b6180", "editor.selectionBackground": "#878b9180", "minimap.selectionHighlight": "#878b9180", diff --git a/lib/vscode/extensions/theme-monokai/yarn.lock b/extensions/theme-monokai/yarn.lock similarity index 100% rename from lib/vscode/extensions/theme-monokai/yarn.lock rename to extensions/theme-monokai/yarn.lock diff --git a/lib/vscode/extensions/theme-quietlight/.vscodeignore b/extensions/theme-quietlight/.vscodeignore similarity index 100% rename from lib/vscode/extensions/theme-quietlight/.vscodeignore rename to extensions/theme-quietlight/.vscodeignore diff --git a/lib/vscode/extensions/theme-quietlight/cgmanifest.json b/extensions/theme-quietlight/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/theme-quietlight/cgmanifest.json rename to extensions/theme-quietlight/cgmanifest.json diff --git a/lib/vscode/extensions/theme-quietlight/package.json b/extensions/theme-quietlight/package.json similarity index 100% rename from lib/vscode/extensions/theme-quietlight/package.json rename to extensions/theme-quietlight/package.json diff --git a/lib/vscode/extensions/theme-quietlight/package.nls.json b/extensions/theme-quietlight/package.nls.json similarity index 100% rename from lib/vscode/extensions/theme-quietlight/package.nls.json rename to extensions/theme-quietlight/package.nls.json diff --git a/lib/vscode/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json similarity index 100% rename from lib/vscode/extensions/theme-quietlight/themes/quietlight-color-theme.json rename to extensions/theme-quietlight/themes/quietlight-color-theme.json diff --git a/lib/vscode/extensions/theme-quietlight/yarn.lock b/extensions/theme-quietlight/yarn.lock similarity index 100% rename from lib/vscode/extensions/theme-quietlight/yarn.lock rename to extensions/theme-quietlight/yarn.lock diff --git a/lib/vscode/extensions/theme-red/.vscodeignore b/extensions/theme-red/.vscodeignore similarity index 100% rename from lib/vscode/extensions/theme-red/.vscodeignore rename to extensions/theme-red/.vscodeignore diff --git a/lib/vscode/extensions/theme-red/cgmanifest.json b/extensions/theme-red/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/theme-red/cgmanifest.json rename to extensions/theme-red/cgmanifest.json diff --git a/lib/vscode/extensions/theme-red/package.json b/extensions/theme-red/package.json similarity index 100% rename from lib/vscode/extensions/theme-red/package.json rename to extensions/theme-red/package.json diff --git a/lib/vscode/extensions/theme-red/package.nls.json b/extensions/theme-red/package.nls.json similarity index 100% rename from lib/vscode/extensions/theme-red/package.nls.json rename to extensions/theme-red/package.nls.json diff --git a/lib/vscode/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json similarity index 100% rename from lib/vscode/extensions/theme-red/themes/Red-color-theme.json rename to extensions/theme-red/themes/Red-color-theme.json diff --git a/lib/vscode/extensions/theme-red/yarn.lock b/extensions/theme-red/yarn.lock similarity index 100% rename from lib/vscode/extensions/theme-red/yarn.lock rename to extensions/theme-red/yarn.lock diff --git a/lib/vscode/extensions/theme-seti/.vscodeignore b/extensions/theme-seti/.vscodeignore similarity index 100% rename from lib/vscode/extensions/theme-seti/.vscodeignore rename to extensions/theme-seti/.vscodeignore diff --git a/extensions/theme-seti/CONTRIBUTING.md b/extensions/theme-seti/CONTRIBUTING.md new file mode 100644 index 000000000000..548a437615fb --- /dev/null +++ b/extensions/theme-seti/CONTRIBUTING.md @@ -0,0 +1,33 @@ +# theme-seti + +This is an icon theme that uses the icons from [`seti-ui`](https://github.com/jesseweed/seti-ui). + +## Previewing icons + +There is a [`./icons/preview.html`](./icons/preview.html) file that can be opened to see all of the icons included in the theme. +To view this, it needs to be hosted by a web server. The easiest way is to open the file with the `Open with Live Server` command from the [Live Server extension](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer). + + +## Updating icons + +- Make a PR against https://github.com/jesseweed/seti-ui` with your icon changes. +- Once accepted there, ping us or make a PR yourself that updates the theme and font here + +To adopt the latest changes from https://github.com/jesseweed/seti-ui: + +- have the main branches of `https://github.com/jesseweed/seti-ui` and `https://github.com/microsoft/vscode` cloned in the same parent folder +- in the `seti-ui` folder, run `npm install` and `npm run prepublishOnly`. This will generate updated icons and fonts. +- in the `vscode/extensions/theme-seti` folder run `npm run update`. This will launch the [icon theme update script](build/update-icon-theme.js) that updates the theme as well as the font based on content in `seti-ui`. +- to test the icon theme, look at the icon preview as described above. +- when done, create a PR with the changes in https://github.com/microsoft/vscode. +Add a screenshot of the preview page to accompany it. + + +### Languages not shipped with `vscode` + +Languages that are not shipped with `vscode` must be added to the `nonBuiltInLanguages` object inside of `update-icon-theme.js`. + +These should match [the file mapping in `seti-ui`](https://github.com/jesseweed/seti-ui/blob/master/styles/components/icons/mapping.less). + +Please try and keep this list in alphabetical order! Thank you. + diff --git a/lib/vscode/extensions/theme-seti/README.md b/extensions/theme-seti/README.md similarity index 100% rename from lib/vscode/extensions/theme-seti/README.md rename to extensions/theme-seti/README.md diff --git a/lib/vscode/extensions/theme-seti/ThirdPartyNotices.txt b/extensions/theme-seti/ThirdPartyNotices.txt similarity index 100% rename from lib/vscode/extensions/theme-seti/ThirdPartyNotices.txt rename to extensions/theme-seti/ThirdPartyNotices.txt diff --git a/lib/vscode/extensions/theme-seti/build/update-icon-theme.js b/extensions/theme-seti/build/update-icon-theme.js similarity index 100% rename from lib/vscode/extensions/theme-seti/build/update-icon-theme.js rename to extensions/theme-seti/build/update-icon-theme.js diff --git a/extensions/theme-seti/cgmanifest.json b/extensions/theme-seti/cgmanifest.json new file mode 100644 index 000000000000..1dd5ab5bc3ef --- /dev/null +++ b/extensions/theme-seti/cgmanifest.json @@ -0,0 +1,16 @@ +{ + "registrations": [ + { + "component": { + "type": "git", + "git": { + "name": "seti-ui", + "repositoryUrl": "https://github.com/jesseweed/seti-ui", + "commitHash": "2b078f89a535a9f6dda47817bac01f02a4350078" + } + }, + "version": "0.1.0" + } + ], + "version": 1 +} \ No newline at end of file diff --git a/lib/vscode/extensions/theme-seti/icons/preview.html b/extensions/theme-seti/icons/preview.html similarity index 100% rename from lib/vscode/extensions/theme-seti/icons/preview.html rename to extensions/theme-seti/icons/preview.html diff --git a/lib/vscode/extensions/theme-seti/icons/seti-circular-128x128.png b/extensions/theme-seti/icons/seti-circular-128x128.png similarity index 100% rename from lib/vscode/extensions/theme-seti/icons/seti-circular-128x128.png rename to extensions/theme-seti/icons/seti-circular-128x128.png diff --git a/extensions/theme-seti/icons/seti.woff b/extensions/theme-seti/icons/seti.woff new file mode 100644 index 000000000000..a3793630a711 Binary files /dev/null and b/extensions/theme-seti/icons/seti.woff differ diff --git a/lib/vscode/extensions/theme-seti/icons/vs-seti-icon-theme.json b/extensions/theme-seti/icons/vs-seti-icon-theme.json similarity index 97% rename from lib/vscode/extensions/theme-seti/icons/vs-seti-icon-theme.json rename to extensions/theme-seti/icons/vs-seti-icon-theme.json index cc52aa7362bb..3421bb87d5c9 100644 --- a/lib/vscode/extensions/theme-seti/icons/vs-seti-icon-theme.json +++ b/extensions/theme-seti/icons/vs-seti-icon-theme.json @@ -1094,391 +1094,399 @@ "fontCharacter": "\\E077", "fontColor": "#cbcb41" }, - "_python_light": { + "_purescript_light": { + "fontCharacter": "\\E078", + "fontColor": "#bfc2c1" + }, + "_purescript": { "fontCharacter": "\\E078", + "fontColor": "#d4d7d6" + }, + "_python_light": { + "fontCharacter": "\\E079", "fontColor": "#498ba7" }, "_python": { - "fontCharacter": "\\E078", + "fontCharacter": "\\E079", "fontColor": "#519aba" }, "_react_light": { - "fontCharacter": "\\E07A", + "fontCharacter": "\\E07B", "fontColor": "#498ba7" }, "_react": { - "fontCharacter": "\\E07A", + "fontCharacter": "\\E07B", "fontColor": "#519aba" }, "_react_1_light": { - "fontCharacter": "\\E07A", + "fontCharacter": "\\E07B", "fontColor": "#cc6d2e" }, "_react_1": { - "fontCharacter": "\\E07A", + "fontCharacter": "\\E07B", "fontColor": "#e37933" }, "_react_2_light": { - "fontCharacter": "\\E07A", + "fontCharacter": "\\E07B", "fontColor": "#b7b73b" }, "_react_2": { - "fontCharacter": "\\E07A", + "fontCharacter": "\\E07B", "fontColor": "#cbcb41" }, "_reasonml_light": { - "fontCharacter": "\\E07B", + "fontCharacter": "\\E07C", "fontColor": "#b8383d" }, "_reasonml": { - "fontCharacter": "\\E07B", + "fontCharacter": "\\E07C", "fontColor": "#cc3e44" }, "_rollup_light": { - "fontCharacter": "\\E07C", + "fontCharacter": "\\E07D", "fontColor": "#b8383d" }, "_rollup": { - "fontCharacter": "\\E07C", + "fontCharacter": "\\E07D", "fontColor": "#cc3e44" }, "_ruby_light": { - "fontCharacter": "\\E07D", + "fontCharacter": "\\E07E", "fontColor": "#b8383d" }, "_ruby": { - "fontCharacter": "\\E07D", + "fontCharacter": "\\E07E", "fontColor": "#cc3e44" }, "_rust_light": { - "fontCharacter": "\\E07E", + "fontCharacter": "\\E07F", "fontColor": "#627379" }, "_rust": { - "fontCharacter": "\\E07E", + "fontCharacter": "\\E07F", "fontColor": "#6d8086" }, "_salesforce_light": { - "fontCharacter": "\\E07F", + "fontCharacter": "\\E080", "fontColor": "#498ba7" }, "_salesforce": { - "fontCharacter": "\\E07F", + "fontCharacter": "\\E080", "fontColor": "#519aba" }, "_sass_light": { - "fontCharacter": "\\E080", + "fontCharacter": "\\E081", "fontColor": "#dd4b78" }, "_sass": { - "fontCharacter": "\\E080", + "fontCharacter": "\\E081", "fontColor": "#f55385" }, "_sbt_light": { - "fontCharacter": "\\E081", + "fontCharacter": "\\E082", "fontColor": "#498ba7" }, "_sbt": { - "fontCharacter": "\\E081", + "fontCharacter": "\\E082", "fontColor": "#519aba" }, "_scala_light": { - "fontCharacter": "\\E082", + "fontCharacter": "\\E083", "fontColor": "#b8383d" }, "_scala": { - "fontCharacter": "\\E082", + "fontCharacter": "\\E083", "fontColor": "#cc3e44" }, "_shell_light": { - "fontCharacter": "\\E085", + "fontCharacter": "\\E086", "fontColor": "#455155" }, "_shell": { - "fontCharacter": "\\E085", + "fontCharacter": "\\E086", "fontColor": "#4d5a5e" }, "_slim_light": { - "fontCharacter": "\\E086", + "fontCharacter": "\\E087", "fontColor": "#cc6d2e" }, "_slim": { - "fontCharacter": "\\E086", + "fontCharacter": "\\E087", "fontColor": "#e37933" }, "_smarty_light": { - "fontCharacter": "\\E087", + "fontCharacter": "\\E088", "fontColor": "#b7b73b" }, "_smarty": { - "fontCharacter": "\\E087", + "fontCharacter": "\\E088", "fontColor": "#cbcb41" }, "_spring_light": { - "fontCharacter": "\\E088", + "fontCharacter": "\\E089", "fontColor": "#7fae42" }, "_spring": { - "fontCharacter": "\\E088", + "fontCharacter": "\\E089", "fontColor": "#8dc149" }, "_stylelint_light": { - "fontCharacter": "\\E089", + "fontCharacter": "\\E08A", "fontColor": "#bfc2c1" }, "_stylelint": { - "fontCharacter": "\\E089", + "fontCharacter": "\\E08A", "fontColor": "#d4d7d6" }, "_stylelint_1_light": { - "fontCharacter": "\\E089", + "fontCharacter": "\\E08A", "fontColor": "#455155" }, "_stylelint_1": { - "fontCharacter": "\\E089", + "fontCharacter": "\\E08A", "fontColor": "#4d5a5e" }, "_stylus_light": { - "fontCharacter": "\\E08A", + "fontCharacter": "\\E08B", "fontColor": "#7fae42" }, "_stylus": { - "fontCharacter": "\\E08A", + "fontCharacter": "\\E08B", "fontColor": "#8dc149" }, "_sublime_light": { - "fontCharacter": "\\E08B", + "fontCharacter": "\\E08C", "fontColor": "#cc6d2e" }, "_sublime": { - "fontCharacter": "\\E08B", + "fontCharacter": "\\E08C", "fontColor": "#e37933" }, "_svelte_light": { - "fontCharacter": "\\E08C", + "fontCharacter": "\\E08D", "fontColor": "#b8383d" }, "_svelte": { - "fontCharacter": "\\E08C", + "fontCharacter": "\\E08D", "fontColor": "#cc3e44" }, "_svg_light": { - "fontCharacter": "\\E08D", + "fontCharacter": "\\E08E", "fontColor": "#9068b0" }, "_svg": { - "fontCharacter": "\\E08D", + "fontCharacter": "\\E08E", "fontColor": "#a074c4" }, "_svg_1_light": { - "fontCharacter": "\\E08D", + "fontCharacter": "\\E08E", "fontColor": "#498ba7" }, "_svg_1": { - "fontCharacter": "\\E08D", + "fontCharacter": "\\E08E", "fontColor": "#519aba" }, "_swift_light": { - "fontCharacter": "\\E08E", + "fontCharacter": "\\E08F", "fontColor": "#cc6d2e" }, "_swift": { - "fontCharacter": "\\E08E", + "fontCharacter": "\\E08F", "fontColor": "#e37933" }, "_terraform_light": { - "fontCharacter": "\\E08F", + "fontCharacter": "\\E090", "fontColor": "#9068b0" }, "_terraform": { - "fontCharacter": "\\E08F", + "fontCharacter": "\\E090", "fontColor": "#a074c4" }, "_tex_light": { - "fontCharacter": "\\E090", + "fontCharacter": "\\E091", "fontColor": "#498ba7" }, "_tex": { - "fontCharacter": "\\E090", + "fontCharacter": "\\E091", "fontColor": "#519aba" }, "_tex_1_light": { - "fontCharacter": "\\E090", + "fontCharacter": "\\E091", "fontColor": "#b7b73b" }, "_tex_1": { - "fontCharacter": "\\E090", + "fontCharacter": "\\E091", "fontColor": "#cbcb41" }, "_tex_2_light": { - "fontCharacter": "\\E090", + "fontCharacter": "\\E091", "fontColor": "#cc6d2e" }, "_tex_2": { - "fontCharacter": "\\E090", + "fontCharacter": "\\E091", "fontColor": "#e37933" }, "_tex_3_light": { - "fontCharacter": "\\E090", + "fontCharacter": "\\E091", "fontColor": "#bfc2c1" }, "_tex_3": { - "fontCharacter": "\\E090", + "fontCharacter": "\\E091", "fontColor": "#d4d7d6" }, "_todo": { - "fontCharacter": "\\E092" + "fontCharacter": "\\E093" }, "_tsconfig_light": { - "fontCharacter": "\\E093", + "fontCharacter": "\\E094", "fontColor": "#498ba7" }, "_tsconfig": { - "fontCharacter": "\\E093", + "fontCharacter": "\\E094", "fontColor": "#519aba" }, "_twig_light": { - "fontCharacter": "\\E094", + "fontCharacter": "\\E095", "fontColor": "#7fae42" }, "_twig": { - "fontCharacter": "\\E094", + "fontCharacter": "\\E095", "fontColor": "#8dc149" }, "_typescript_light": { - "fontCharacter": "\\E095", + "fontCharacter": "\\E096", "fontColor": "#498ba7" }, "_typescript": { - "fontCharacter": "\\E095", + "fontCharacter": "\\E096", "fontColor": "#519aba" }, "_typescript_1_light": { - "fontCharacter": "\\E095", + "fontCharacter": "\\E096", "fontColor": "#b7b73b" }, "_typescript_1": { - "fontCharacter": "\\E095", + "fontCharacter": "\\E096", "fontColor": "#cbcb41" }, "_vala_light": { - "fontCharacter": "\\E096", + "fontCharacter": "\\E097", "fontColor": "#627379" }, "_vala": { - "fontCharacter": "\\E096", + "fontCharacter": "\\E097", "fontColor": "#6d8086" }, "_video_light": { - "fontCharacter": "\\E097", + "fontCharacter": "\\E098", "fontColor": "#dd4b78" }, "_video": { - "fontCharacter": "\\E097", + "fontCharacter": "\\E098", "fontColor": "#f55385" }, "_vue_light": { - "fontCharacter": "\\E098", + "fontCharacter": "\\E099", "fontColor": "#7fae42" }, "_vue": { - "fontCharacter": "\\E098", + "fontCharacter": "\\E099", "fontColor": "#8dc149" }, "_wasm_light": { - "fontCharacter": "\\E099", + "fontCharacter": "\\E09A", "fontColor": "#9068b0" }, "_wasm": { - "fontCharacter": "\\E099", + "fontCharacter": "\\E09A", "fontColor": "#a074c4" }, "_wat_light": { - "fontCharacter": "\\E09A", + "fontCharacter": "\\E09B", "fontColor": "#9068b0" }, "_wat": { - "fontCharacter": "\\E09A", + "fontCharacter": "\\E09B", "fontColor": "#a074c4" }, "_webpack_light": { - "fontCharacter": "\\E09B", + "fontCharacter": "\\E09C", "fontColor": "#498ba7" }, "_webpack": { - "fontCharacter": "\\E09B", + "fontCharacter": "\\E09C", "fontColor": "#519aba" }, "_wgt_light": { - "fontCharacter": "\\E09C", + "fontCharacter": "\\E09D", "fontColor": "#498ba7" }, "_wgt": { - "fontCharacter": "\\E09C", + "fontCharacter": "\\E09D", "fontColor": "#519aba" }, "_windows_light": { - "fontCharacter": "\\E09D", + "fontCharacter": "\\E09E", "fontColor": "#498ba7" }, "_windows": { - "fontCharacter": "\\E09D", + "fontCharacter": "\\E09E", "fontColor": "#519aba" }, "_word_light": { - "fontCharacter": "\\E09E", + "fontCharacter": "\\E09F", "fontColor": "#498ba7" }, "_word": { - "fontCharacter": "\\E09E", + "fontCharacter": "\\E09F", "fontColor": "#519aba" }, "_xls_light": { - "fontCharacter": "\\E09F", + "fontCharacter": "\\E0A0", "fontColor": "#7fae42" }, "_xls": { - "fontCharacter": "\\E09F", + "fontCharacter": "\\E0A0", "fontColor": "#8dc149" }, "_xml_light": { - "fontCharacter": "\\E0A0", + "fontCharacter": "\\E0A1", "fontColor": "#cc6d2e" }, "_xml": { - "fontCharacter": "\\E0A0", + "fontCharacter": "\\E0A1", "fontColor": "#e37933" }, "_yarn_light": { - "fontCharacter": "\\E0A1", + "fontCharacter": "\\E0A2", "fontColor": "#498ba7" }, "_yarn": { - "fontCharacter": "\\E0A1", + "fontCharacter": "\\E0A2", "fontColor": "#519aba" }, "_yml_light": { - "fontCharacter": "\\E0A2", + "fontCharacter": "\\E0A3", "fontColor": "#9068b0" }, "_yml": { - "fontCharacter": "\\E0A2", + "fontCharacter": "\\E0A3", "fontColor": "#a074c4" }, "_zip_light": { - "fontCharacter": "\\E0A3", + "fontCharacter": "\\E0A4", "fontColor": "#b8383d" }, "_zip": { - "fontCharacter": "\\E0A3", + "fontCharacter": "\\E0A4", "fontColor": "#cc3e44" }, "_zip_1_light": { - "fontCharacter": "\\E0A3", + "fontCharacter": "\\E0A4", "fontColor": "#627379" }, "_zip_1": { - "fontCharacter": "\\E0A3", + "fontCharacter": "\\E0A4", "fontColor": "#6d8086" } }, @@ -1596,6 +1604,7 @@ "prisma": "_prisma", "pp": "_puppet", "epp": "_puppet", + "purs": "_purescript", "spec.jsx": "_react_1", "test.jsx": "_react_1", "cjsx": "_react", @@ -1752,6 +1761,8 @@ "webpack.prod.js": "_webpack", "license": "_license", "licence": "_license", + "license.md": "_license", + "licence.md": "_license", "copying": "_license", "compiling": "_license_1", "contributing": "_license_2", @@ -1949,6 +1960,7 @@ "prisma": "_prisma_light", "pp": "_puppet_light", "epp": "_puppet_light", + "purs": "_purescript_light", "spec.jsx": "_react_1_light", "test.jsx": "_react_1_light", "cjsx": "_react_light", @@ -2176,6 +2188,8 @@ "webpack.prod.js": "_webpack_light", "license": "_license_light", "licence": "_license_light", + "license.md": "_license_light", + "licence.md": "_license_light", "copying": "_license_light", "compiling": "_license_1_light", "contributing": "_license_2_light", @@ -2186,5 +2200,5 @@ "npm-debug.log": "_npm_ignored_light" } }, - "version": "https://github.com/jesseweed/seti-ui/commit/894c49fa9f5ce43dd4f012173a7bb107346e524e" + "version": "https://github.com/jesseweed/seti-ui/commit/2b078f89a535a9f6dda47817bac01f02a4350078" } \ No newline at end of file diff --git a/lib/vscode/extensions/theme-seti/package.json b/extensions/theme-seti/package.json similarity index 100% rename from lib/vscode/extensions/theme-seti/package.json rename to extensions/theme-seti/package.json diff --git a/lib/vscode/extensions/theme-seti/package.nls.json b/extensions/theme-seti/package.nls.json similarity index 100% rename from lib/vscode/extensions/theme-seti/package.nls.json rename to extensions/theme-seti/package.nls.json diff --git a/lib/vscode/extensions/theme-seti/yarn.lock b/extensions/theme-seti/yarn.lock similarity index 100% rename from lib/vscode/extensions/theme-seti/yarn.lock rename to extensions/theme-seti/yarn.lock diff --git a/lib/vscode/extensions/theme-solarized-dark/.vscodeignore b/extensions/theme-solarized-dark/.vscodeignore similarity index 100% rename from lib/vscode/extensions/theme-solarized-dark/.vscodeignore rename to extensions/theme-solarized-dark/.vscodeignore diff --git a/lib/vscode/extensions/theme-solarized-dark/cgmanifest.json b/extensions/theme-solarized-dark/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/theme-solarized-dark/cgmanifest.json rename to extensions/theme-solarized-dark/cgmanifest.json diff --git a/lib/vscode/extensions/theme-solarized-dark/package.json b/extensions/theme-solarized-dark/package.json similarity index 100% rename from lib/vscode/extensions/theme-solarized-dark/package.json rename to extensions/theme-solarized-dark/package.json diff --git a/lib/vscode/extensions/theme-solarized-dark/package.nls.json b/extensions/theme-solarized-dark/package.nls.json similarity index 100% rename from lib/vscode/extensions/theme-solarized-dark/package.nls.json rename to extensions/theme-solarized-dark/package.nls.json diff --git a/lib/vscode/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json similarity index 100% rename from lib/vscode/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json rename to extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json diff --git a/lib/vscode/extensions/theme-solarized-dark/yarn.lock b/extensions/theme-solarized-dark/yarn.lock similarity index 100% rename from lib/vscode/extensions/theme-solarized-dark/yarn.lock rename to extensions/theme-solarized-dark/yarn.lock diff --git a/lib/vscode/extensions/theme-solarized-light/.vscodeignore b/extensions/theme-solarized-light/.vscodeignore similarity index 100% rename from lib/vscode/extensions/theme-solarized-light/.vscodeignore rename to extensions/theme-solarized-light/.vscodeignore diff --git a/lib/vscode/extensions/theme-solarized-light/cgmanifest.json b/extensions/theme-solarized-light/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/theme-solarized-light/cgmanifest.json rename to extensions/theme-solarized-light/cgmanifest.json diff --git a/lib/vscode/extensions/theme-solarized-light/package.json b/extensions/theme-solarized-light/package.json similarity index 100% rename from lib/vscode/extensions/theme-solarized-light/package.json rename to extensions/theme-solarized-light/package.json diff --git a/lib/vscode/extensions/theme-solarized-light/package.nls.json b/extensions/theme-solarized-light/package.nls.json similarity index 100% rename from lib/vscode/extensions/theme-solarized-light/package.nls.json rename to extensions/theme-solarized-light/package.nls.json diff --git a/lib/vscode/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json similarity index 98% rename from lib/vscode/extensions/theme-solarized-light/themes/solarized-light-color-theme.json rename to extensions/theme-solarized-light/themes/solarized-light-color-theme.json index 0c0ae03597d2..dfa65c9411a5 100644 --- a/lib/vscode/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -7,7 +7,10 @@ } }, { - "scope": ["meta.embedded", "source.groovy.embedded"], + "scope": [ + "meta.embedded", + "source.groovy.embedded" + ], "settings": { "foreground": "#657B83" } @@ -315,15 +318,12 @@ } ], "colors": { - // Base // "foreground": "", "focusBorder": "#D3AF86", // "contrastActiveBorder": "", // "contrastBorder": "", - // "widget.shadow": "", - "input.background": "#DDD6C1", // "input.border": "", "input.foreground": "#586E75", @@ -335,31 +335,24 @@ // "inputValidation.warningBorder": "", // "inputValidation.errorBackground": "", // "inputValidation.errorBorder": "", - "badge.background": "#B58900AA", "progressBar.background": "#B58900", - "dropdown.background": "#EEE8D5", // "dropdown.foreground": "", "dropdown.border": "#D3AF86", - "button.background": "#AC9D57", // "button.foreground": "", - - "selection.background": "#CCC4B0", - + "selection.background": "#878b9180", "list.activeSelectionBackground": "#DFCA88", "list.activeSelectionForeground": "#6C6C6C", "quickInputList.focusBackground": "#DFCA8866", "list.hoverBackground": "#DFCA8844", "list.inactiveSelectionBackground": "#D1CBB8", "list.highlightForeground": "#B58900", - // "scrollbar.shadow": "", // "scrollbarSlider.activeBackground": "", // "scrollbarSlider.background": "", // "scrollbarSlider.hoverBackground": "", - // Editor "editor.background": "#FDF6E3", // "editor.foreground": "#6688cc", @@ -389,14 +382,12 @@ // "editor.selectionHighlightBackground": "", // "editor.wordHighlightBackground": "", // "editor.wordHighlightStrongBackground": "", - // Editor: Suggest Widget // "editorSuggestWidget.background": "", // "editorSuggestWidget.border": "", // "editorSuggestWidget.foreground": "", // "editorSuggestWidget.highlightForeground": "", // "editorSuggestWidget.selectedBackground": "", - // Editor: Peek View "peekViewResult.background": "#EEE8D5", // "peekViewResult.lineForeground": "", @@ -410,25 +401,21 @@ // "peekViewResult.matchHighlightBackground": "", // "peekViewTitleLabel.foreground": "", // "peekViewTitleDescription.foreground": "", - // Editor: Diff // "diffEditor.insertedTextBackground": "", // "diffEditor.insertedTextBorder": "", // "diffEditor.removedTextBackground": "", // "diffEditor.removedTextBorder": "", - // Workbench: Title "titleBar.activeBackground": "#EEE8D5", // "titleBar.activeForeground": "", // "titleBar.inactiveBackground": "", // "titleBar.inactiveForeground": "", - // Workbench: Editors // "editorGroupHeader.noTabsBackground": "", "editorGroup.border": "#DDD6C1", "editorGroup.dropBackground": "#DDD6C1AA", "editorGroupHeader.tabsBackground": "#D9D2C2", - // Workbench: Tabs "tab.border": "#DDD6C1", "tab.activeBackground": "#FDF6E3", @@ -439,25 +426,21 @@ // "tab.activeForeground": "", // "tab.inactiveForeground": "", "tab.lastPinnedBorder": "#FDF6E3", - // Workbench: Activity Bar "activityBar.background": "#DDD6C1", "activityBar.foreground": "#584c27", "activityBarBadge.background": "#B58900", // "activityBarBadge.foreground": "", - // Workbench: Panel // "panel.background": "", "panel.border": "#DDD6C1", // "panelTitle.activeBorder": "", // "panelTitle.activeForeground": "", // "panelTitle.inactiveForeground": "", - // Workbench: Side Bar "sideBar.background": "#EEE8D5", "sideBarTitle.foreground": "#586E75", // "sideBarSectionHeader.background": "", - // Workbench: Status Bar "statusBar.foreground": "#586E75", "statusBar.background": "#EEE8D5", @@ -470,20 +453,16 @@ "statusBarItem.prominentHoverBackground": "#DDD6C199", // "statusBarItem.activeBackground": "", // "statusBarItem.hoverBackground": "", - // Workbench: Debug "debugToolBar.background": "#DDD6C1", "debugExceptionWidget.background": "#DDD6C1", "debugExceptionWidget.border": "#AB395B", - // Workbench: Quick Open "pickerGroup.border": "#2AA19899", "pickerGroup.foreground": "#2AA19899", - // Extensions "extensionButton.prominentBackground": "#b58900", "extensionButton.prominentHoverBackground": "#584c27aa", - // Workbench: Terminal // Colors sourced from the official palette http://ethanschoonover.com/solarized "terminal.ansiBlack": "#073642", @@ -502,7 +481,6 @@ "terminal.ansiBrightMagenta": "#6c71c4", "terminal.ansiBrightCyan": "#93a1a1", "terminal.ansiBrightWhite": "#eee8d5", - // Interactive Playground "walkThrough.embeddedEditorBackground": "#00000014" }, diff --git a/lib/vscode/extensions/theme-solarized-light/yarn.lock b/extensions/theme-solarized-light/yarn.lock similarity index 100% rename from lib/vscode/extensions/theme-solarized-light/yarn.lock rename to extensions/theme-solarized-light/yarn.lock diff --git a/lib/vscode/extensions/theme-tomorrow-night-blue/.vscodeignore b/extensions/theme-tomorrow-night-blue/.vscodeignore similarity index 100% rename from lib/vscode/extensions/theme-tomorrow-night-blue/.vscodeignore rename to extensions/theme-tomorrow-night-blue/.vscodeignore diff --git a/lib/vscode/extensions/theme-tomorrow-night-blue/cgmanifest.json b/extensions/theme-tomorrow-night-blue/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/theme-tomorrow-night-blue/cgmanifest.json rename to extensions/theme-tomorrow-night-blue/cgmanifest.json diff --git a/lib/vscode/extensions/theme-tomorrow-night-blue/package.json b/extensions/theme-tomorrow-night-blue/package.json similarity index 100% rename from lib/vscode/extensions/theme-tomorrow-night-blue/package.json rename to extensions/theme-tomorrow-night-blue/package.json diff --git a/lib/vscode/extensions/theme-tomorrow-night-blue/package.nls.json b/extensions/theme-tomorrow-night-blue/package.nls.json similarity index 100% rename from lib/vscode/extensions/theme-tomorrow-night-blue/package.nls.json rename to extensions/theme-tomorrow-night-blue/package.nls.json diff --git a/lib/vscode/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json similarity index 100% rename from lib/vscode/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json rename to extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json diff --git a/lib/vscode/extensions/theme-tomorrow-night-blue/yarn.lock b/extensions/theme-tomorrow-night-blue/yarn.lock similarity index 100% rename from lib/vscode/extensions/theme-tomorrow-night-blue/yarn.lock rename to extensions/theme-tomorrow-night-blue/yarn.lock diff --git a/lib/vscode/extensions/tsconfig.base.json b/extensions/tsconfig.base.json similarity index 100% rename from lib/vscode/extensions/tsconfig.base.json rename to extensions/tsconfig.base.json diff --git a/lib/vscode/extensions/types/lib.textEncoder.d.ts b/extensions/types/lib.textEncoder.d.ts similarity index 100% rename from lib/vscode/extensions/types/lib.textEncoder.d.ts rename to extensions/types/lib.textEncoder.d.ts diff --git a/lib/vscode/extensions/types/lib.url.d.ts b/extensions/types/lib.url.d.ts similarity index 100% rename from lib/vscode/extensions/types/lib.url.d.ts rename to extensions/types/lib.url.d.ts diff --git a/lib/vscode/extensions/typescript-basics/.vscodeignore b/extensions/typescript-basics/.vscodeignore similarity index 100% rename from lib/vscode/extensions/typescript-basics/.vscodeignore rename to extensions/typescript-basics/.vscodeignore diff --git a/lib/vscode/extensions/typescript-basics/build/update-grammars.js b/extensions/typescript-basics/build/update-grammars.js similarity index 100% rename from lib/vscode/extensions/typescript-basics/build/update-grammars.js rename to extensions/typescript-basics/build/update-grammars.js diff --git a/lib/vscode/extensions/typescript-basics/cgmanifest.json b/extensions/typescript-basics/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/typescript-basics/cgmanifest.json rename to extensions/typescript-basics/cgmanifest.json diff --git a/lib/vscode/extensions/typescript-basics/language-configuration.json b/extensions/typescript-basics/language-configuration.json similarity index 100% rename from lib/vscode/extensions/typescript-basics/language-configuration.json rename to extensions/typescript-basics/language-configuration.json diff --git a/lib/vscode/extensions/typescript-basics/package.json b/extensions/typescript-basics/package.json similarity index 100% rename from lib/vscode/extensions/typescript-basics/package.json rename to extensions/typescript-basics/package.json diff --git a/lib/vscode/extensions/typescript-basics/package.nls.json b/extensions/typescript-basics/package.nls.json similarity index 100% rename from lib/vscode/extensions/typescript-basics/package.nls.json rename to extensions/typescript-basics/package.nls.json diff --git a/lib/vscode/extensions/typescript-basics/snippets/typescript.code-snippets b/extensions/typescript-basics/snippets/typescript.code-snippets similarity index 100% rename from lib/vscode/extensions/typescript-basics/snippets/typescript.code-snippets rename to extensions/typescript-basics/snippets/typescript.code-snippets diff --git a/lib/vscode/extensions/typescript-basics/syntaxes/Readme.md b/extensions/typescript-basics/syntaxes/Readme.md similarity index 100% rename from lib/vscode/extensions/typescript-basics/syntaxes/Readme.md rename to extensions/typescript-basics/syntaxes/Readme.md diff --git a/lib/vscode/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json b/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json rename to extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json diff --git a/lib/vscode/extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json b/extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json rename to extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json diff --git a/lib/vscode/extensions/typescript-basics/syntaxes/jsdoc.js.injection.tmLanguage.json b/extensions/typescript-basics/syntaxes/jsdoc.js.injection.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/typescript-basics/syntaxes/jsdoc.js.injection.tmLanguage.json rename to extensions/typescript-basics/syntaxes/jsdoc.js.injection.tmLanguage.json diff --git a/lib/vscode/extensions/typescript-basics/syntaxes/jsdoc.ts.injection.tmLanguage.json b/extensions/typescript-basics/syntaxes/jsdoc.ts.injection.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/typescript-basics/syntaxes/jsdoc.ts.injection.tmLanguage.json rename to extensions/typescript-basics/syntaxes/jsdoc.ts.injection.tmLanguage.json diff --git a/lib/vscode/extensions/typescript-basics/yarn.lock b/extensions/typescript-basics/yarn.lock similarity index 100% rename from lib/vscode/extensions/typescript-basics/yarn.lock rename to extensions/typescript-basics/yarn.lock diff --git a/lib/vscode/extensions/typescript-language-features/.eslintrc.json b/extensions/typescript-language-features/.eslintrc.json similarity index 100% rename from lib/vscode/extensions/typescript-language-features/.eslintrc.json rename to extensions/typescript-language-features/.eslintrc.json diff --git a/lib/vscode/extensions/typescript-language-features/.vscodeignore b/extensions/typescript-language-features/.vscodeignore similarity index 100% rename from lib/vscode/extensions/typescript-language-features/.vscodeignore rename to extensions/typescript-language-features/.vscodeignore diff --git a/lib/vscode/extensions/typescript-language-features/README.md b/extensions/typescript-language-features/README.md similarity index 100% rename from lib/vscode/extensions/typescript-language-features/README.md rename to extensions/typescript-language-features/README.md diff --git a/lib/vscode/extensions/typescript-language-features/cgmanifest.json b/extensions/typescript-language-features/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/typescript-language-features/cgmanifest.json rename to extensions/typescript-language-features/cgmanifest.json diff --git a/lib/vscode/extensions/typescript-language-features/extension-browser.webpack.config.js b/extensions/typescript-language-features/extension-browser.webpack.config.js similarity index 100% rename from lib/vscode/extensions/typescript-language-features/extension-browser.webpack.config.js rename to extensions/typescript-language-features/extension-browser.webpack.config.js diff --git a/lib/vscode/extensions/typescript-language-features/extension.webpack.config.js b/extensions/typescript-language-features/extension.webpack.config.js similarity index 100% rename from lib/vscode/extensions/typescript-language-features/extension.webpack.config.js rename to extensions/typescript-language-features/extension.webpack.config.js diff --git a/lib/vscode/extensions/typescript-language-features/language-configuration.json b/extensions/typescript-language-features/language-configuration.json similarity index 100% rename from lib/vscode/extensions/typescript-language-features/language-configuration.json rename to extensions/typescript-language-features/language-configuration.json diff --git a/lib/vscode/extensions/typescript-language-features/media/icon.png b/extensions/typescript-language-features/media/icon.png similarity index 100% rename from lib/vscode/extensions/typescript-language-features/media/icon.png rename to extensions/typescript-language-features/media/icon.png diff --git a/extensions/typescript-language-features/package.json b/extensions/typescript-language-features/package.json new file mode 100644 index 000000000000..e9c7c598a8e1 --- /dev/null +++ b/extensions/typescript-language-features/package.json @@ -0,0 +1,1244 @@ +{ + "name": "typescript-language-features", + "description": "%description%", + "displayName": "%displayName%", + "version": "1.0.0", + "author": "vscode", + "publisher": "vscode", + "license": "MIT", + "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", + "enableProposedApi": true, + "capabilities": { + "virtualWorkspaces": { + "supported": "limited", + "description": "%virtualWorkspaces%" + }, + "untrustedWorkspaces": { + "supported": "limited", + "description": "%workspaceTrust%", + "restrictedConfigurations": [ + "typescript.tsdk", + "typescript.tsserver.pluginPaths", + "typescript.npm" + ] + } + }, + "engines": { + "vscode": "^1.30.0" + }, + "icon": "media/icon.png", + "categories": [ + "Programming Languages" + ], + "dependencies": { + "jsonc-parser": "^2.2.1", + "semver": "5.5.1", + "typescript-vscode-sh-plugin": "^0.7.3", + "vscode-extension-telemetry": "0.1.7", + "vscode-nls": "^4.1.1" + }, + "devDependencies": { + "@types/node": "14.x", + "@types/semver": "^5.5.0" + }, + "scripts": { + "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:typescript-language-features", + "compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none", + "watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose" + }, + "activationEvents": [ + "onLanguage:javascript", + "onLanguage:javascriptreact", + "onLanguage:typescript", + "onLanguage:typescriptreact", + "onLanguage:jsx-tags", + "onCommand:typescript.reloadProjects", + "onCommand:javascript.reloadProjects", + "onCommand:typescript.selectTypeScriptVersion", + "onCommand:javascript.goToProjectConfig", + "onCommand:typescript.goToProjectConfig", + "onCommand:typescript.openTsServerLog", + "onCommand:workbench.action.tasks.runTask", + "onCommand:_typescript.configurePlugin", + "onCommand:_typescript.learnMoreAboutRefactorings", + "onCommand:typescript.fileReferences", + "onLanguage:jsonc" + ], + "main": "./out/extension", + "browser": "./dist/browser/extension", + "contributes": { + "jsonValidation": [ + { + "fileMatch": "package.json", + "url": "./schemas/package.schema.json" + }, + { + "fileMatch": "tsconfig.json", + "url": "https://json.schemastore.org/tsconfig" + }, + { + "fileMatch": "tsconfig.json", + "url": "./schemas/tsconfig.schema.json" + }, + { + "fileMatch": "tsconfig.*.json", + "url": "https://json.schemastore.org/tsconfig" + }, + { + "fileMatch": "tsconfig-*.json", + "url": "./schemas/tsconfig.schema.json" + }, + { + "fileMatch": "tsconfig-*.json", + "url": "https://json.schemastore.org/tsconfig" + }, + { + "fileMatch": "tsconfig.*.json", + "url": "./schemas/tsconfig.schema.json" + }, + { + "fileMatch": "typings.json", + "url": "https://json.schemastore.org/typings" + }, + { + "fileMatch": ".bowerrc", + "url": "https://json.schemastore.org/bowerrc" + }, + { + "fileMatch": ".babelrc", + "url": "https://json.schemastore.org/babelrc" + }, + { + "fileMatch": ".babelrc.json", + "url": "https://json.schemastore.org/babelrc" + }, + { + "fileMatch": "babel.config.json", + "url": "https://json.schemastore.org/babelrc" + }, + { + "fileMatch": "jsconfig.json", + "url": "https://json.schemastore.org/jsconfig" + }, + { + "fileMatch": "jsconfig.json", + "url": "./schemas/jsconfig.schema.json" + }, + { + "fileMatch": "jsconfig.*.json", + "url": "https://json.schemastore.org/jsconfig" + }, + { + "fileMatch": "jsconfig.*.json", + "url": "./schemas/jsconfig.schema.json" + } + ], + "configuration": { + "type": "object", + "title": "%configuration.typescript%", + "order": 20, + "properties": { + "typescript.tsdk": { + "type": [ + "string", + "null" + ], + "default": null, + "markdownDescription": "%typescript.tsdk.desc%", + "scope": "window" + }, + "typescript.disableAutomaticTypeAcquisition": { + "type": "boolean", + "default": false, + "markdownDescription": "%typescript.disableAutomaticTypeAcquisition%", + "scope": "window", + "tags": [ + "usesOnlineServices" + ] + }, + "typescript.enablePromptUseWorkspaceTsdk": { + "type": "boolean", + "default": false, + "description": "%typescript.enablePromptUseWorkspaceTsdk%", + "scope": "window" + }, + "typescript.npm": { + "type": [ + "string", + "null" + ], + "default": null, + "markdownDescription": "%typescript.npm%", + "scope": "machine" + }, + "typescript.check.npmIsInstalled": { + "type": "boolean", + "default": true, + "markdownDescription": "%typescript.check.npmIsInstalled%", + "scope": "window" + }, + "javascript.referencesCodeLens.enabled": { + "type": "boolean", + "default": false, + "description": "%javascript.referencesCodeLens.enabled%", + "scope": "window" + }, + "javascript.referencesCodeLens.showOnAllFunctions": { + "type": "boolean", + "default": false, + "description": "%javascript.referencesCodeLens.showOnAllFunctions%", + "scope": "window" + }, + "typescript.referencesCodeLens.enabled": { + "type": "boolean", + "default": false, + "description": "%typescript.referencesCodeLens.enabled%", + "scope": "window" + }, + "typescript.referencesCodeLens.showOnAllFunctions": { + "type": "boolean", + "default": false, + "description": "%typescript.referencesCodeLens.showOnAllFunctions%", + "scope": "window" + }, + "typescript.implementationsCodeLens.enabled": { + "type": "boolean", + "default": false, + "description": "%typescript.implementationsCodeLens.enabled%", + "scope": "window" + }, + "typescript.tsserver.enableTracing": { + "type": "boolean", + "default": false, + "description": "%typescript.tsserver.enableTracing%", + "scope": "window" + }, + "typescript.tsserver.log": { + "type": "string", + "enum": [ + "off", + "terse", + "normal", + "verbose" + ], + "default": "off", + "description": "%typescript.tsserver.log%", + "scope": "window" + }, + "typescript.tsserver.pluginPaths": { + "type": "array", + "items": { + "type": "string", + "description": "%typescript.tsserver.pluginPaths.item%" + }, + "default": [], + "description": "%typescript.tsserver.pluginPaths%", + "scope": "machine" + }, + "typescript.tsserver.trace": { + "type": "string", + "enum": [ + "off", + "messages", + "verbose" + ], + "default": "off", + "description": "%typescript.tsserver.trace%", + "scope": "window" + }, + "javascript.suggest.completeFunctionCalls": { + "type": "boolean", + "default": false, + "description": "%configuration.suggest.completeFunctionCalls%", + "scope": "resource" + }, + "typescript.suggest.completeFunctionCalls": { + "type": "boolean", + "default": false, + "description": "%configuration.suggest.completeFunctionCalls%", + "scope": "resource" + }, + "javascript.suggest.includeAutomaticOptionalChainCompletions": { + "type": "boolean", + "default": true, + "description": "%configuration.suggest.includeAutomaticOptionalChainCompletions%", + "scope": "resource" + }, + "typescript.suggest.includeAutomaticOptionalChainCompletions": { + "type": "boolean", + "default": true, + "description": "%configuration.suggest.includeAutomaticOptionalChainCompletions%", + "scope": "resource" + }, + "javascript.suggest.includeCompletionsForImportStatements": { + "type": "boolean", + "default": true, + "description": "%configuration.suggest.includeCompletionsForImportStatements%", + "scope": "resource" + }, + "typescript.suggest.includeCompletionsForImportStatements": { + "type": "boolean", + "default": true, + "description": "%configuration.suggest.includeCompletionsForImportStatements%", + "scope": "resource" + }, + "typescript.suggest.includeCompletionsWithSnippetText": { + "type": "boolean", + "default": true, + "description": "%configuration.suggest.includeCompletionsWithSnippetText%", + "scope": "resource" + }, + "typescript.reportStyleChecksAsWarnings": { + "type": "boolean", + "default": true, + "description": "%typescript.reportStyleChecksAsWarnings%", + "scope": "window" + }, + "typescript.validate.enable": { + "type": "boolean", + "default": true, + "description": "%typescript.validate.enable%", + "scope": "window" + }, + "typescript.format.enable": { + "type": "boolean", + "default": true, + "description": "%typescript.format.enable%", + "scope": "window" + }, + "typescript.format.insertSpaceAfterCommaDelimiter": { + "type": "boolean", + "default": true, + "description": "%format.insertSpaceAfterCommaDelimiter%", + "scope": "resource" + }, + "typescript.format.insertSpaceAfterConstructor": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterConstructor%", + "scope": "resource" + }, + "typescript.format.insertSpaceAfterSemicolonInForStatements": { + "type": "boolean", + "default": true, + "description": "%format.insertSpaceAfterSemicolonInForStatements%", + "scope": "resource" + }, + "typescript.format.insertSpaceBeforeAndAfterBinaryOperators": { + "type": "boolean", + "default": true, + "description": "%format.insertSpaceBeforeAndAfterBinaryOperators%", + "scope": "resource" + }, + "typescript.format.insertSpaceAfterKeywordsInControlFlowStatements": { + "type": "boolean", + "default": true, + "description": "%format.insertSpaceAfterKeywordsInControlFlowStatements%", + "scope": "resource" + }, + "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": { + "type": "boolean", + "default": true, + "description": "%format.insertSpaceAfterFunctionKeywordForAnonymousFunctions%", + "scope": "resource" + }, + "typescript.format.insertSpaceBeforeFunctionParenthesis": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceBeforeFunctionParenthesis%", + "scope": "resource" + }, + "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis%", + "scope": "resource" + }, + "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets%", + "scope": "resource" + }, + "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": { + "type": "boolean", + "default": true, + "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces%", + "scope": "resource" + }, + "typescript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": { + "type": "boolean", + "default": true, + "description": "%format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces%", + "scope": "resource" + }, + "typescript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces%", + "scope": "resource" + }, + "typescript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces%", + "scope": "resource" + }, + "typescript.format.insertSpaceAfterTypeAssertion": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterTypeAssertion%", + "scope": "resource" + }, + "typescript.format.placeOpenBraceOnNewLineForFunctions": { + "type": "boolean", + "default": false, + "description": "%format.placeOpenBraceOnNewLineForFunctions%", + "scope": "resource" + }, + "typescript.format.placeOpenBraceOnNewLineForControlBlocks": { + "type": "boolean", + "default": false, + "description": "%format.placeOpenBraceOnNewLineForControlBlocks%", + "scope": "resource" + }, + "typescript.format.semicolons": { + "type": "string", + "default": "ignore", + "description": "%format.semicolons%", + "scope": "resource", + "enum": [ + "ignore", + "insert", + "remove" + ], + "enumDescriptions": [ + "%format.semicolons.ignore%", + "%format.semicolons.insert%", + "%format.semicolons.remove%" + ] + }, + "javascript.validate.enable": { + "type": "boolean", + "default": true, + "description": "%javascript.validate.enable%", + "scope": "window" + }, + "javascript.format.enable": { + "type": "boolean", + "default": true, + "description": "%javascript.format.enable%", + "scope": "window" + }, + "javascript.format.insertSpaceAfterCommaDelimiter": { + "type": "boolean", + "default": true, + "description": "%format.insertSpaceAfterCommaDelimiter%", + "scope": "resource" + }, + "javascript.format.insertSpaceAfterConstructor": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterConstructor%", + "scope": "resource" + }, + "javascript.format.insertSpaceAfterSemicolonInForStatements": { + "type": "boolean", + "default": true, + "description": "%format.insertSpaceAfterSemicolonInForStatements%", + "scope": "resource" + }, + "javascript.format.insertSpaceBeforeAndAfterBinaryOperators": { + "type": "boolean", + "default": true, + "description": "%format.insertSpaceBeforeAndAfterBinaryOperators%", + "scope": "resource" + }, + "javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": { + "type": "boolean", + "default": true, + "description": "%format.insertSpaceAfterKeywordsInControlFlowStatements%", + "scope": "resource" + }, + "javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": { + "type": "boolean", + "default": true, + "description": "%format.insertSpaceAfterFunctionKeywordForAnonymousFunctions%", + "scope": "resource" + }, + "javascript.format.insertSpaceBeforeFunctionParenthesis": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceBeforeFunctionParenthesis%", + "scope": "resource" + }, + "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis%", + "scope": "resource" + }, + "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets%", + "scope": "resource" + }, + "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": { + "type": "boolean", + "default": true, + "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces%", + "scope": "resource" + }, + "javascript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": { + "type": "boolean", + "default": true, + "description": "%format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces%", + "scope": "resource" + }, + "javascript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces%", + "scope": "resource" + }, + "javascript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces%", + "scope": "resource" + }, + "javascript.format.placeOpenBraceOnNewLineForFunctions": { + "type": "boolean", + "default": false, + "description": "%format.placeOpenBraceOnNewLineForFunctions%", + "scope": "resource" + }, + "javascript.format.placeOpenBraceOnNewLineForControlBlocks": { + "type": "boolean", + "default": false, + "description": "%format.placeOpenBraceOnNewLineForControlBlocks%", + "scope": "resource" + }, + "javascript.format.semicolons": { + "type": "string", + "default": "ignore", + "description": "%format.semicolons%", + "scope": "resource", + "enum": [ + "ignore", + "insert", + "remove" + ], + "enumDescriptions": [ + "%format.semicolons.ignore%", + "%format.semicolons.insert%", + "%format.semicolons.remove%" + ] + }, + "javascript.implicitProjectConfig.checkJs": { + "type": "boolean", + "default": false, + "markdownDescription": "%configuration.implicitProjectConfig.checkJs%", + "markdownDeprecationMessage": "%configuration.javascript.checkJs.checkJs.deprecation%", + "scope": "window" + }, + "js/ts.implicitProjectConfig.checkJs": { + "type": "boolean", + "default": false, + "markdownDescription": "%configuration.implicitProjectConfig.checkJs%", + "scope": "window" + }, + "javascript.implicitProjectConfig.experimentalDecorators": { + "type": "boolean", + "default": false, + "markdownDescription": "%configuration.implicitProjectConfig.experimentalDecorators%", + "markdownDeprecationMessage": "%configuration.javascript.checkJs.experimentalDecorators.deprecation%", + "scope": "window" + }, + "js/ts.implicitProjectConfig.experimentalDecorators": { + "type": "boolean", + "default": false, + "markdownDescription": "%configuration.implicitProjectConfig.experimentalDecorators%", + "scope": "window" + }, + "js/ts.implicitProjectConfig.strictNullChecks": { + "type": "boolean", + "default": false, + "markdownDescription": "%configuration.implicitProjectConfig.strictNullChecks%", + "scope": "window" + }, + "js/ts.implicitProjectConfig.strictFunctionTypes": { + "type": "boolean", + "default": true, + "markdownDescription": "%configuration.implicitProjectConfig.strictFunctionTypes%", + "scope": "window" + }, + "javascript.suggest.names": { + "type": "boolean", + "default": true, + "markdownDescription": "%configuration.suggest.names%", + "scope": "resource" + }, + "typescript.tsc.autoDetect": { + "type": "string", + "default": "on", + "enum": [ + "on", + "off", + "build", + "watch" + ], + "markdownEnumDescriptions": [ + "%typescript.tsc.autoDetect.on%", + "%typescript.tsc.autoDetect.off%", + "%typescript.tsc.autoDetect.build%", + "%typescript.tsc.autoDetect.watch%" + ], + "description": "%typescript.tsc.autoDetect%", + "scope": "window" + }, + "javascript.suggest.paths": { + "type": "boolean", + "default": true, + "description": "%configuration.suggest.paths%", + "scope": "resource" + }, + "typescript.suggest.paths": { + "type": "boolean", + "default": true, + "description": "%configuration.suggest.paths%", + "scope": "resource" + }, + "javascript.suggest.autoImports": { + "type": "boolean", + "default": true, + "description": "%configuration.suggest.autoImports%", + "scope": "resource" + }, + "typescript.suggest.autoImports": { + "type": "boolean", + "default": true, + "description": "%configuration.suggest.autoImports%", + "scope": "resource" + }, + "javascript.suggest.completeJSDocs": { + "type": "boolean", + "default": true, + "description": "%configuration.suggest.completeJSDocs%", + "scope": "resource" + }, + "typescript.suggest.completeJSDocs": { + "type": "boolean", + "default": true, + "description": "%configuration.suggest.completeJSDocs%", + "scope": "resource" + }, + "javascript.suggest.jsdoc.generateReturns": { + "type": "boolean", + "default": true, + "markdownDescription": "%configuration.suggest.jsdoc.generateReturns%", + "scope": "resource" + }, + "typescript.suggest.jsdoc.generateReturns": { + "type": "boolean", + "default": true, + "markdownDescription": "%configuration.suggest.jsdoc.generateReturns%", + "scope": "resource" + }, + "typescript.locale": { + "type": [ + "string", + "null" + ], + "enum": [ + "de", + "es", + "en", + "fr", + "it", + "ja", + "ko", + "ru", + "zh-CN", + "zh-TW", + null + ], + "default": null, + "markdownDescription": "%typescript.locale%", + "scope": "window" + }, + "javascript.suggestionActions.enabled": { + "type": "boolean", + "default": true, + "description": "%javascript.suggestionActions.enabled%", + "scope": "resource" + }, + "typescript.suggestionActions.enabled": { + "type": "boolean", + "default": true, + "description": "%typescript.suggestionActions.enabled%", + "scope": "resource" + }, + "javascript.preferences.quoteStyle": { + "type": "string", + "enum": [ + "auto", + "single", + "double" + ], + "default": "auto", + "markdownDescription": "%typescript.preferences.quoteStyle%", + "scope": "resource" + }, + "typescript.preferences.quoteStyle": { + "type": "string", + "enum": [ + "auto", + "single", + "double" + ], + "default": "auto", + "markdownDescription": "%typescript.preferences.quoteStyle%", + "scope": "resource" + }, + "javascript.preferences.importModuleSpecifier": { + "type": "string", + "enum": [ + "shortest", + "relative", + "non-relative", + "project-relative" + ], + "markdownEnumDescriptions": [ + "%typescript.preferences.importModuleSpecifier.shortest%", + "%typescript.preferences.importModuleSpecifier.relative%", + "%typescript.preferences.importModuleSpecifier.nonRelative%", + "%typescript.preferences.importModuleSpecifier.projectRelative%" + ], + "default": "shortest", + "description": "%typescript.preferences.importModuleSpecifier%", + "scope": "resource" + }, + "typescript.preferences.importModuleSpecifier": { + "type": "string", + "enum": [ + "shortest", + "relative", + "non-relative", + "project-relative" + ], + "markdownEnumDescriptions": [ + "%typescript.preferences.importModuleSpecifier.shortest%", + "%typescript.preferences.importModuleSpecifier.relative%", + "%typescript.preferences.importModuleSpecifier.nonRelative%", + "%typescript.preferences.importModuleSpecifier.projectRelative%" + ], + "default": "shortest", + "description": "%typescript.preferences.importModuleSpecifier%", + "scope": "resource" + }, + "javascript.preferences.importModuleSpecifierEnding": { + "type": "string", + "enum": [ + "auto", + "minimal", + "index", + "js" + ], + "markdownEnumDescriptions": [ + "%typescript.preferences.importModuleSpecifierEnding.auto%", + "%typescript.preferences.importModuleSpecifierEnding.minimal%", + "%typescript.preferences.importModuleSpecifierEnding.index%", + "%typescript.preferences.importModuleSpecifierEnding.js%" + ], + "default": "auto", + "description": "%typescript.preferences.importModuleSpecifierEnding%", + "scope": "resource" + }, + "typescript.preferences.importModuleSpecifierEnding": { + "type": "string", + "enum": [ + "auto", + "minimal", + "index", + "js" + ], + "markdownEnumDescriptions": [ + "%typescript.preferences.importModuleSpecifierEnding.auto%", + "%typescript.preferences.importModuleSpecifierEnding.minimal%", + "%typescript.preferences.importModuleSpecifierEnding.index%", + "%typescript.preferences.importModuleSpecifierEnding.js%" + ], + "default": "auto", + "description": "%typescript.preferences.importModuleSpecifierEnding%", + "scope": "resource" + }, + "typescript.preferences.includePackageJsonAutoImports": { + "type": "string", + "enum": [ + "auto", + "on", + "off" + ], + "enumDescriptions": [ + "%typescript.preferences.includePackageJsonAutoImports.auto%", + "%typescript.preferences.includePackageJsonAutoImports.on%", + "%typescript.preferences.includePackageJsonAutoImports.off%" + ], + "default": "auto", + "markdownDescription": "%typescript.preferences.includePackageJsonAutoImports%", + "scope": "window" + }, + "javascript.preferences.renameShorthandProperties": { + "type": "boolean", + "default": true, + "description": "%typescript.preferences.useAliasesForRenames%", + "deprecationMessage": "%typescript.preferences.renameShorthandProperties.deprecationMessage%", + "scope": "resource" + }, + "typescript.preferences.renameShorthandProperties": { + "type": "boolean", + "default": true, + "description": "%typescript.preferences.useAliasesForRenames%", + "deprecationMessage": "%typescript.preferences.renameShorthandProperties.deprecationMessage%", + "scope": "resource" + }, + "javascript.preferences.useAliasesForRenames": { + "type": "boolean", + "default": true, + "description": "%typescript.preferences.useAliasesForRenames%", + "scope": "resource" + }, + "typescript.preferences.useAliasesForRenames": { + "type": "boolean", + "default": true, + "description": "%typescript.preferences.useAliasesForRenames%", + "scope": "resource" + }, + "typescript.updateImportsOnFileMove.enabled": { + "type": "string", + "enum": [ + "prompt", + "always", + "never" + ], + "markdownEnumDescriptions": [ + "%typescript.updateImportsOnFileMove.enabled.prompt%", + "%typescript.updateImportsOnFileMove.enabled.always%", + "%typescript.updateImportsOnFileMove.enabled.never%" + ], + "default": "prompt", + "description": "%typescript.updateImportsOnFileMove.enabled%", + "scope": "resource" + }, + "javascript.updateImportsOnFileMove.enabled": { + "type": "string", + "enum": [ + "prompt", + "always", + "never" + ], + "markdownEnumDescriptions": [ + "%typescript.updateImportsOnFileMove.enabled.prompt%", + "%typescript.updateImportsOnFileMove.enabled.always%", + "%typescript.updateImportsOnFileMove.enabled.never%" + ], + "default": "prompt", + "description": "%typescript.updateImportsOnFileMove.enabled%", + "scope": "resource" + }, + "typescript.autoClosingTags": { + "type": "boolean", + "default": true, + "description": "%typescript.autoClosingTags%" + }, + "javascript.autoClosingTags": { + "type": "boolean", + "default": true, + "description": "%typescript.autoClosingTags%" + }, + "javascript.suggest.enabled": { + "type": "boolean", + "default": true, + "description": "%typescript.suggest.enabled%", + "scope": "resource" + }, + "typescript.suggest.enabled": { + "type": "boolean", + "default": true, + "description": "%typescript.suggest.enabled%", + "scope": "resource" + }, + "typescript.surveys.enabled": { + "type": "boolean", + "default": true, + "description": "%configuration.surveys.enabled%", + "scope": "window" + }, + "typescript.tsserver.useSeparateSyntaxServer": { + "type": "boolean", + "default": true, + "description": "%configuration.tsserver.useSeparateSyntaxServer%", + "scope": "window" + }, + "typescript.tsserver.maxTsServerMemory": { + "type": "number", + "default": 3072, + "description": "%configuration.tsserver.maxTsServerMemory%", + "scope": "window" + }, + "typescript.tsserver.experimental.enableProjectDiagnostics": { + "type": "boolean", + "default": false, + "description": "%configuration.tsserver.experimental.enableProjectDiagnostics%", + "scope": "window" + }, + "typescript.tsserver.watchOptions": { + "type": "object", + "description": "%configuration.tsserver.watchOptions%", + "scope": "window", + "properties": { + "watchFile": { + "type": "string", + "description": "%configuration.tsserver.watchOptions.watchFile%", + "enum": [ + "fixedChunkSizePolling", + "fixedPollingInterval", + "priorityPollingInterval", + "dynamicPriorityPolling", + "useFsEvents", + "useFsEventsOnParentDirectory" + ], + "enumDescriptions": [ + "%configuration.tsserver.watchOptions.watchFile.fixedChunkSizePolling%", + "%configuration.tsserver.watchOptions.watchFile.fixedPollingInterval%", + "%configuration.tsserver.watchOptions.watchFile.priorityPollingInterval%", + "%configuration.tsserver.watchOptions.watchFile.dynamicPriorityPolling%", + "%configuration.tsserver.watchOptions.watchFile.useFsEvents%", + "%configuration.tsserver.watchOptions.watchFile.useFsEventsOnParentDirectory%" + ], + "default": "useFsEvents" + }, + "watchDirectory": { + "type": "string", + "description": "%configuration.tsserver.watchOptions.watchDirectory%", + "enum": [ + "fixedChunkSizePolling", + "fixedPollingInterval", + "dynamicPriorityPolling", + "useFsEvents" + ], + "enumDescriptions": [ + "%configuration.tsserver.watchOptions.watchDirectory.fixedChunkSizePolling%", + "%configuration.tsserver.watchOptions.watchDirectory.fixedPollingInterval%", + "%configuration.tsserver.watchOptions.watchDirectory.dynamicPriorityPolling%", + "%configuration.tsserver.watchOptions.watchDirectory.useFsEvents%" + ], + "default": "useFsEvents" + }, + "fallbackPolling": { + "type": "string", + "description": "%configuration.tsserver.watchOptions.fallbackPolling%", + "enum": [ + "fixedPollingInterval", + "priorityPollingInterval", + "dynamicPriorityPolling" + ], + "enumDescriptions": [ + "configuration.tsserver.watchOptions.fallbackPolling.fixedPollingInterval", + "configuration.tsserver.watchOptions.fallbackPolling.priorityPollingInterval", + "configuration.tsserver.watchOptions.fallbackPolling.dynamicPriorityPolling" + ] + }, + "synchronousWatchDirectory": { + "type": "boolean", + "description": "%configuration.tsserver.watchOptions.synchronousWatchDirectory%" + } + } + }, + "typescript.workspaceSymbols.scope": { + "type": "string", + "enum": [ + "allOpenProjects", + "currentProject" + ], + "enumDescriptions": [ + "%typescript.workspaceSymbols.scope.allOpenProjects%", + "%typescript.workspaceSymbols.scope.currentProject%" + ], + "default": "allOpenProjects", + "markdownDescription": "%typescript.workspaceSymbols.scope%", + "scope": "window" + } + } + }, + "commands": [ + { + "command": "typescript.reloadProjects", + "title": "%reloadProjects.title%", + "category": "TypeScript" + }, + { + "command": "javascript.reloadProjects", + "title": "%reloadProjects.title%", + "category": "JavaScript" + }, + { + "command": "typescript.selectTypeScriptVersion", + "title": "%typescript.selectTypeScriptVersion.title%", + "category": "TypeScript" + }, + { + "command": "typescript.goToProjectConfig", + "title": "%goToProjectConfig.title%", + "category": "TypeScript" + }, + { + "command": "javascript.goToProjectConfig", + "title": "%goToProjectConfig.title%", + "category": "JavaScript" + }, + { + "command": "typescript.openTsServerLog", + "title": "%typescript.openTsServerLog.title%", + "category": "TypeScript" + }, + { + "command": "typescript.restartTsServer", + "title": "%typescript.restartTsServer%", + "category": "TypeScript" + }, + { + "command": "typescript.findAllFileReferences", + "title": "%typescript.findAllFileReferences%", + "category": "TypeScript" + } + ], + "menus": { + "commandPalette": [ + { + "command": "typescript.reloadProjects", + "when": "editorLangId == typescript && typescript.isManagedFile" + }, + { + "command": "typescript.reloadProjects", + "when": "editorLangId == typescriptreact && typescript.isManagedFile" + }, + { + "command": "javascript.reloadProjects", + "when": "editorLangId == javascript && typescript.isManagedFile" + }, + { + "command": "javascript.reloadProjects", + "when": "editorLangId == javascriptreact && typescript.isManagedFile" + }, + { + "command": "typescript.goToProjectConfig", + "when": "editorLangId == typescript && typescript.isManagedFile" + }, + { + "command": "typescript.goToProjectConfig", + "when": "editorLangId == typescriptreact" + }, + { + "command": "javascript.goToProjectConfig", + "when": "editorLangId == javascript && typescript.isManagedFile" + }, + { + "command": "javascript.goToProjectConfig", + "when": "editorLangId == javascriptreact && typescript.isManagedFile" + }, + { + "command": "typescript.selectTypeScriptVersion", + "when": "typescript.isManagedFile" + }, + { + "command": "typescript.openTsServerLog", + "when": "typescript.isManagedFile" + }, + { + "command": "typescript.restartTsServer", + "when": "typescript.isManagedFile" + }, + { + "command": "typescript.findAllFileReferences", + "when": "tsSupportsFileReferences && typescript.isManagedFile" + } + ], + "explorer/context": [ + { + "command": "typescript.findAllFileReferences", + "when": "tsSupportsFileReferences && (resourceLangId == javascript || resourceLangId == javascriptreact || resourceLangId == typescript || resourceLangId == typescriptreact)", + "group": "4_search" + } + ], + "editor/title/context": [ + { + "command": "typescript.findAllFileReferences", + "when": "tsSupportsFileReferences && resourceLangId == javascript" + }, + { + "command": "typescript.findAllFileReferences", + "when": "tsSupportsFileReferences && resourceLangId == javascriptreact" + }, + { + "command": "typescript.findAllFileReferences", + "when": "tsSupportsFileReferences && resourceLangId == typescript" + }, + { + "command": "typescript.findAllFileReferences", + "when": "tsSupportsFileReferences && resourceLangId == typescriptreact" + } + ] + }, + "breakpoints": [ + { + "language": "typescript" + }, + { + "language": "typescriptreact" + } + ], + "taskDefinitions": [ + { + "type": "typescript", + "required": [ + "tsconfig" + ], + "properties": { + "tsconfig": { + "type": "string", + "description": "%taskDefinition.tsconfig.description%" + }, + "option": { + "type": "string" + } + }, + "when": "shellExecutionSupported" + } + ], + "problemPatterns": [ + { + "name": "tsc", + "regexp": "^([^\\s].*)[\\(:](\\d+)[,:](\\d+)(?:\\):\\s+|\\s+-\\s+)(error|warning|info)\\s+TS(\\d+)\\s*:\\s*(.*)$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "code": 5, + "message": 6 + } + ], + "problemMatchers": [ + { + "name": "tsc", + "label": "%typescript.problemMatchers.tsc.label%", + "owner": "typescript", + "source": "ts", + "applyTo": "closedDocuments", + "fileLocation": [ + "relative", + "${cwd}" + ], + "pattern": "$tsc" + }, + { + "name": "tsc-watch", + "label": "%typescript.problemMatchers.tscWatch.label%", + "owner": "typescript", + "source": "ts", + "applyTo": "closedDocuments", + "fileLocation": [ + "relative", + "${cwd}" + ], + "pattern": "$tsc", + "background": { + "activeOnStart": true, + "beginsPattern": { + "regexp": "^\\s*(?:message TS6032:|\\[?\\D*.{1,2}[:.].{1,2}[:.].{1,2}\\D*(โ”œ\\D*\\d{1,2}\\D+โ”ค)?(?:\\]| -)) File change detected\\. Starting incremental compilation\\.\\.\\." + }, + "endsPattern": { + "regexp": "^\\s*(?:message TS6042:|\\[?\\D*.{1,2}[:.].{1,2}[:.].{1,2}\\D*(โ”œ\\D*\\d{1,2}\\D+โ”ค)?(?:\\]| -)) (?:Compilation complete\\.|Found \\d+ errors?\\.) Watching for file changes\\." + } + } + } + ], + "codeActions": [ + { + "languages": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact" + ], + "actions": [ + { + "kind": "refactor.extract.constant", + "title": "%codeActions.refactor.extract.constant.title%", + "description": "%codeActions.refactor.extract.constant.description%" + }, + { + "kind": "refactor.extract.function", + "title": "%codeActions.refactor.extract.function.title%", + "description": "%codeActions.refactor.extract.function.description%" + }, + { + "kind": "refactor.extract.interface", + "title": "%codeActions.refactor.extract.interface.title%", + "description": "%codeActions.refactor.extract.interface.description%" + }, + { + "kind": "refactor.extract.type", + "title": "%codeActions.refactor.extract.type.title%", + "description": "%codeActions.refactor.extract.type.description%" + }, + { + "kind": "refactor.rewrite.import", + "title": "%codeActions.refactor.rewrite.import.title%", + "description": "%codeActions.refactor.rewrite.import.description%" + }, + { + "kind": "refactor.rewrite.export", + "title": "%codeActions.refactor.rewrite.export.title%", + "description": "%codeActions.refactor.rewrite.export.description%" + }, + { + "kind": "refactor.rewrite.arrow.braces", + "title": "%codeActions.refactor.rewrite.arrow.braces.title%", + "description": "%codeActions.refactor.rewrite.arrow.braces.description%" + }, + { + "kind": "refactor.rewrite.parameters.toDestructured", + "title": "%codeActions.refactor.rewrite.parameters.toDestructured.title%" + }, + { + "kind": "refactor.rewrite.property.generateAccessors", + "title": "%codeActions.refactor.rewrite.property.generateAccessors.title%", + "description": "%codeActions.refactor.rewrite.property.generateAccessors.description%" + }, + { + "kind": "refactor.move.newFile", + "title": "%codeActions.refactor.move.newFile.title%", + "description": "%codeActions.refactor.move.newFile.description%" + }, + { + "kind": "source.organizeImports", + "title": "%codeActions.source.organizeImports.title%" + } + ] + } + ], + "typescriptServerPlugins": [ + { + "name": "typescript-vscode-sh-plugin", + "enableForWorkspaceTypeScriptVersions": true + } + ] + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/extensions/typescript-language-features/package.nls.json b/extensions/typescript-language-features/package.nls.json new file mode 100644 index 000000000000..85c896bef3c2 --- /dev/null +++ b/extensions/typescript-language-features/package.nls.json @@ -0,0 +1,147 @@ +{ + "displayName": "TypeScript and JavaScript Language Features", + "description": "Provides rich language support for JavaScript and TypeScript.", + "workspaceTrust": "The extension requires workspace trust when the workspace version is used because it executes code specified by the workspace.", + "virtualWorkspaces": "In virtual workspaces, resolving and finding references across files is not supported.", + "reloadProjects.title": "Reload Project", + "configuration.typescript": "TypeScript", + "configuration.suggest.completeFunctionCalls": "Complete functions with their parameter signature.", + "configuration.suggest.includeAutomaticOptionalChainCompletions": "Enable/disable showing completions on potentially undefined values that insert an optional chain call. Requires TS 3.7+ and strict null checks to be enabled.", + "configuration.suggest.includeCompletionsForImportStatements": "Enable/disable auto-import-style completions on partially-typed import statements. Requires using TypeScript 4.3+ in the workspace.", + "configuration.suggest.includeCompletionsWithSnippetText": "Enable/disable snippet completions from TS Server. Requires using TypeScript 4.3+ in the workspace.", + "typescript.tsdk.desc": "Specifies the folder path to the tsserver and `lib*.d.ts` files under a TypeScript install to use for IntelliSense, for example: `./node_modules/typescript/lib`.\n\n- When specified as a user setting, the TypeScript version from `typescript.tsdk` automatically replaces the built-in TypeScript version.\n- When specified as a workspace setting, `typescript.tsdk` allows you to switch to use that workspace version of TypeScript for IntelliSense with the `TypeScript: Select TypeScript version` command.\n\nSee the [TypeScript documentation](https://code.visualstudio.com/docs/typescript/typescript-compiling#_using-newer-typescript-versions) for more detail about managing TypeScript versions.", + "typescript.disableAutomaticTypeAcquisition": "Disables [automatic type acquisition](https://code.visualstudio.com/docs/nodejs/working-with-javascript#_typings-and-automatic-type-acquisition). Automatic type acquisition fetches `@types` packages from npm to improve IntelliSense for external libraries.", + "typescript.enablePromptUseWorkspaceTsdk": "Enables prompting of users to use the TypeScript version configured in the workspace for Intellisense.", + "typescript.tsserver.enableTracing": "Enables tracing TS server performance to a directory. These trace files can be used to diagnose TS Server performance issues. The log may contain file paths, source code, and other potentially sensitive information from your project.", + "typescript.tsserver.log": "Enables logging of the TS server to a file. This log can be used to diagnose TS Server issues. The log may contain file paths, source code, and other potentially sensitive information from your project.", + "typescript.tsserver.pluginPaths": "Additional paths to discover TypeScript Language Service plugins.", + "typescript.tsserver.pluginPaths.item": "Either an absolute or relative path. Relative path will be resolved against workspace folder(s).", + "typescript.tsserver.trace": "Enables tracing of messages sent to the TS server. This trace can be used to diagnose TS Server issues. The trace may contain file paths, source code, and other potentially sensitive information from your project.", + "typescript.validate.enable": "Enable/disable TypeScript validation.", + "typescript.format.enable": "Enable/disable default TypeScript formatter.", + "javascript.format.enable": "Enable/disable default JavaScript formatter.", + "format.insertSpaceAfterCommaDelimiter": "Defines space handling after a comma delimiter.", + "format.insertSpaceAfterConstructor": "Defines space handling after the constructor keyword.", + "format.insertSpaceAfterSemicolonInForStatements": "Defines space handling after a semicolon in a for statement.", + "format.insertSpaceBeforeAndAfterBinaryOperators": "Defines space handling after a binary operator.", + "format.insertSpaceAfterKeywordsInControlFlowStatements": "Defines space handling after keywords in a control flow statement.", + "format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": "Defines space handling after function keyword for anonymous functions.", + "format.insertSpaceBeforeFunctionParenthesis": "Defines space handling before function argument parentheses.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Defines space handling after opening and before closing non-empty parenthesis.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Defines space handling after opening and before closing non-empty brackets.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Defines space handling after opening and before closing non-empty braces.", + "format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": "Defines space handling after opening and before closing empty braces.", + "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Defines space handling after opening and before closing template string braces.", + "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Defines space handling after opening and before closing JSX expression braces.", + "format.insertSpaceAfterTypeAssertion": "Defines space handling after type assertions in TypeScript.", + "format.placeOpenBraceOnNewLineForFunctions": "Defines whether an open brace is put onto a new line for functions or not.", + "format.placeOpenBraceOnNewLineForControlBlocks": "Defines whether an open brace is put onto a new line for control blocks or not.", + "format.semicolons": "Defines handling of optional semicolons. Requires using TypeScript 3.7 or newer in the workspace.", + "format.semicolons.ignore": "Don't insert or remove any semicolons.", + "format.semicolons.insert": "Insert semicolons at statement ends.", + "format.semicolons.remove": "Remove unnecessary semicolons.", + "javascript.validate.enable": "Enable/disable JavaScript validation.", + "goToProjectConfig.title": "Go to Project Configuration", + "javascript.referencesCodeLens.enabled": "Enable/disable references CodeLens in JavaScript files.", + "javascript.referencesCodeLens.showOnAllFunctions": "Enable/disable references CodeLens on all functions in JavaScript files.", + "typescript.referencesCodeLens.enabled": "Enable/disable references CodeLens in TypeScript files.", + "typescript.referencesCodeLens.showOnAllFunctions": "Enable/disable references CodeLens on all functions in TypeScript files.", + "typescript.implementationsCodeLens.enabled": "Enable/disable implementations CodeLens. This CodeLens shows the implementers of an interface.", + "typescript.openTsServerLog.title": "Open TS Server log", + "typescript.restartTsServer": "Restart TS server", + "typescript.selectTypeScriptVersion.title": "Select TypeScript Version...", + "typescript.reportStyleChecksAsWarnings": "Report style checks as warnings.", + "typescript.npm": "Specifies the path to the npm executable used for [Automatic Type Acquisition](https://code.visualstudio.com/docs/nodejs/working-with-javascript#_typings-and-automatic-type-acquisition).", + "typescript.check.npmIsInstalled": "Check if npm is installed for [Automatic Type Acquisition](https://code.visualstudio.com/docs/nodejs/working-with-javascript#_typings-and-automatic-type-acquisition).", + "configuration.suggest.names": "Enable/disable including unique names from the file in JavaScript suggestions. Note that name suggestions are always disabled in JavaScript code that is semantically checked using `@ts-check` or `checkJs`.", + "typescript.tsc.autoDetect": "Controls auto detection of tsc tasks.", + "typescript.tsc.autoDetect.off": "Disable this feature.", + "typescript.tsc.autoDetect.on": "Create both build and watch tasks.", + "typescript.tsc.autoDetect.build": "Only create single run compile tasks.", + "typescript.tsc.autoDetect.watch": "Only create compile and watch tasks.", + "typescript.problemMatchers.tsc.label": "TypeScript problems", + "typescript.problemMatchers.tscWatch.label": "TypeScript problems (watch mode)", + "configuration.suggest.paths": "Enable/disable suggestions for paths in import statements and require calls.", + "configuration.tsserver.useSeparateSyntaxServer": "Enable/disable spawning a separate TypeScript server that can more quickly respond to syntax related operations, such as calculating folding or computing document symbols. Requires using TypeScript 3.4.0 or newer in the workspace.", + "configuration.tsserver.maxTsServerMemory": "The maximum amount of memory (in MB) to allocate to the TypeScript server process.", + "configuration.tsserver.experimental.enableProjectDiagnostics": "(Experimental) Enables project wide error reporting.", + "typescript.locale": "Sets the locale used to report JavaScript and TypeScript errors. Default of `null` uses VS Code's locale.", + "configuration.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing `jsconfig.json` or `tsconfig.json` files override this setting.", + "configuration.javascript.checkJs.checkJs.deprecation": "This setting has been deprecated in favor of `js/ts.implicitProjectConfig.checkJs`.", + "configuration.implicitProjectConfig.experimentalDecorators": "Enable/disable `experimentalDecorators` in JavaScript files that are not part of a project. Existing `jsconfig.json` or `tsconfig.json` files override this setting.", + "configuration.javascript.checkJs.experimentalDecorators.deprecation": "This setting has been deprecated in favor of `js/ts.implicitProjectConfig.experimentalDecorators`.", + "configuration.implicitProjectConfig.strictNullChecks": "Enable/disable [strict null checks](https://www.typescriptlang.org/tsconfig#strictNullChecks) in JavaScript and TypeScript files that are not part of a project. Existing `jsconfig.json` or `tsconfig.json` files override this setting.", + "configuration.implicitProjectConfig.strictFunctionTypes": "Enable/disable [strict function types](https://www.typescriptlang.org/tsconfig#strictFunctionTypes) in JavaScript and TypeScript files that are not part of a project. Existing `jsconfig.json` or `tsconfig.json` files override this setting.", + "configuration.suggest.jsdoc.generateReturns": "Enable/disable generating `@return` annotations for JSDoc templates. Requires using TypeScript 4.2+ in the workspace.", + "configuration.suggest.autoImports": "Enable/disable auto import suggestions.", + "taskDefinition.tsconfig.description": "The tsconfig file that defines the TS build.", + "javascript.suggestionActions.enabled": "Enable/disable suggestion diagnostics for JavaScript files in the editor.", + "typescript.suggestionActions.enabled": "Enable/disable suggestion diagnostics for TypeScript files in the editor.", + "typescript.preferences.quoteStyle": "Preferred quote style to use for quick fixes: `single` quotes, `double` quotes, or `auto` infer quote type from existing imports.", + "typescript.preferences.importModuleSpecifier": "Preferred path style for auto imports.", + "typescript.preferences.importModuleSpecifier.shortest": "Prefers a non-relative import only if one is available that has fewer path segments than a relative import.", + "typescript.preferences.importModuleSpecifier.relative": "Prefers a relative path to the imported file location.", + "typescript.preferences.importModuleSpecifier.nonRelative": "Prefers a non-relative import based on the `baseUrl` or `paths` configured in your `jsconfig.json` / `tsconfig.json`.", + "typescript.preferences.importModuleSpecifier.projectRelative": "Prefers a non-relative import only if the relative import path would leave the package or project directory. Requires using TypeScript 4.2+ in the workspace.", + "typescript.preferences.importModuleSpecifierEnding": "Preferred path ending for auto imports.", + "typescript.preferences.importModuleSpecifierEnding.auto": "Use project settings to select a default.", + "typescript.preferences.importModuleSpecifierEnding.minimal": "Shorten `./component/index.js` to `./component`.", + "typescript.preferences.importModuleSpecifierEnding.index": "Shorten `./component/index.js` to `./component/index`.", + "typescript.preferences.importModuleSpecifierEnding.js": "Do not shorten path endings; include the `.js` extension.", + "typescript.preferences.includePackageJsonAutoImports": "Enable/disable searching `package.json` dependencies for available auto imports.", + "typescript.preferences.includePackageJsonAutoImports.auto": "Search dependencies based on estimated performance impact.", + "typescript.preferences.includePackageJsonAutoImports.on": "Always search dependencies.", + "typescript.preferences.includePackageJsonAutoImports.off": "Never search dependencies.", + "typescript.updateImportsOnFileMove.enabled": "Enable/disable automatic updating of import paths when you rename or move a file in VS Code.", + "typescript.updateImportsOnFileMove.enabled.prompt": "Prompt on each rename.", + "typescript.updateImportsOnFileMove.enabled.always": "Always update paths automatically.", + "typescript.updateImportsOnFileMove.enabled.never": "Never rename paths and don't prompt.", + "typescript.autoClosingTags": "Enable/disable automatic closing of JSX tags.", + "typescript.suggest.enabled": "Enabled/disable autocomplete suggestions.", + "configuration.surveys.enabled": "Enabled/disable occasional surveys that help us improve VS Code's JavaScript and TypeScript support.", + "configuration.suggest.completeJSDocs": "Enable/disable suggestion to complete JSDoc comments.", + "configuration.tsserver.watchOptions": "Configure which watching strategies should be used to keep track of files and directories. Requires using TypeScript 3.8+ in the workspace.", + "configuration.tsserver.watchOptions.watchFile": "Strategy for how individual files are watched.", + "configuration.tsserver.watchOptions.watchFile.fixedChunkSizePolling": "Polls files in chunks at regular interval. Requires using TypeScript 4.3+ in the workspace.", + "configuration.tsserver.watchOptions.watchFile.fixedPollingInterval": "Check every file for changes several times a second at a fixed interval.", + "configuration.tsserver.watchOptions.watchFile.priorityPollingInterval": "Check every file for changes several times a second, but use heuristics to check certain types of files less frequently than others.", + "configuration.tsserver.watchOptions.watchFile.dynamicPriorityPolling": "Use a dynamic queue where less-frequently modified files will be checked less often.", + "configuration.tsserver.watchOptions.watchFile.useFsEvents": "Attempt to use the operating system/file systemโ€™s native events for file changes.", + "configuration.tsserver.watchOptions.watchFile.useFsEventsOnParentDirectory": "Attempt to use the operating system/file systemโ€™s native events to listen for changes on a fileโ€™s containing directories. This can use fewer file watchers, but might be less accurate.", + "configuration.tsserver.watchOptions.watchDirectory": "Strategy for how entire directory trees are watched under systems that lack recursive file-watching functionality.", + "configuration.tsserver.watchOptions.watchDirectory.fixedChunkSizePolling": "Polls directories in chunks at regular interval. Requires using TypeScript 4.3+ in the workspace.", + "configuration.tsserver.watchOptions.watchDirectory.fixedPollingInterval": "Check every directory for changes several times a second at a fixed interval.", + "configuration.tsserver.watchOptions.watchDirectory.dynamicPriorityPolling": "Use a dynamic queue where less-frequently modified directories will be checked less often.", + "configuration.tsserver.watchOptions.watchDirectory.useFsEvents": "Attempt to use the operating system/file systemโ€™s native events for directory changes.", + "configuration.tsserver.watchOptions.fallbackPolling": "When using file system events, this option specifies the polling strategy that gets used when the system runs out of native file watchers and/or doesnโ€™t support native file watchers.", + "configuration.tsserver.watchOptions.fallbackPolling.fixedPollingInterval": "Check every file for changes several times a second at a fixed interval.", + "configuration.tsserver.watchOptions.fallbackPolling.priorityPollingInterval": "Check every file for changes several times a second, but use heuristics to check certain types of files less frequently than others.", + "configuration.tsserver.watchOptions.fallbackPolling.dynamicPriorityPolling ": "Use a dynamic queue where less-frequently modified files will be checked less often.", + "configuration.tsserver.watchOptions.synchronousWatchDirectory": "Disable deferred watching on directories. Deferred watching is useful when lots of file changes might occur at once (e.g. a change in node_modules from running npm install), but you might want to disable it with this flag for some less-common setups.", + "typescript.preferences.renameShorthandProperties.deprecationMessage": "The setting 'typescript.preferences.renameShorthandProperties' has been deprecated in favor of 'typescript.preferences.useAliasesForRenames'", + "typescript.preferences.useAliasesForRenames": "Enable/disable introducing aliases for object shorthand properties during renames. Requires using TypeScript 3.4 or newer in the workspace.", + "typescript.workspaceSymbols.scope": "Controls which files are searched by [go to symbol in workspace](https://code.visualstudio.com/docs/editor/editingevolved#_open-symbol-by-name).", + "typescript.workspaceSymbols.scope.allOpenProjects": "Search all open JavaScript or TypeScript projects for symbols. Requires using TypeScript 3.9 or newer in the workspace.", + "typescript.workspaceSymbols.scope.currentProject": "Only search for symbols in the current JavaScript or TypeScript project.", + "codeActions.refactor.extract.constant.title": "Extract constant", + "codeActions.refactor.extract.constant.description": "Extract expression to constant.", + "codeActions.refactor.extract.function.title": "Extract function", + "codeActions.refactor.extract.function.description": "Extract expression to method or function.", + "codeActions.refactor.extract.type.title": "Extract type", + "codeActions.refactor.extract.type.description": "Extract type to a type alias.", + "codeActions.refactor.extract.interface.title": "Extract interface", + "codeActions.refactor.extract.interface.description": "Extract type to an interface.", + "codeActions.refactor.rewrite.import.title": "Convert import", + "codeActions.refactor.rewrite.import.description": "Convert between named imports and namespace imports.", + "codeActions.refactor.rewrite.export.title": "Convert export", + "codeActions.refactor.rewrite.export.description": "Convert between default export and named export.", + "codeActions.refactor.move.newFile.title": "Move to a new file", + "codeActions.refactor.move.newFile.description": "Move the expression to a new file.", + "codeActions.refactor.rewrite.arrow.braces.title": "Rewrite arrow braces", + "codeActions.refactor.rewrite.arrow.braces.description": "Add or remove braces in an arrow function.", + "codeActions.refactor.rewrite.parameters.toDestructured.title": "Convert parameters to destructured object", + "codeActions.refactor.rewrite.property.generateAccessors.title": "Generate accessors", + "codeActions.refactor.rewrite.property.generateAccessors.description": "Generate 'get' and 'set' accessors", + "codeActions.source.organizeImports.title": "Organize imports", + "typescript.findAllFileReferences": "Find File References" +} diff --git a/lib/vscode/extensions/typescript-language-features/schemas/jsconfig.schema.json b/extensions/typescript-language-features/schemas/jsconfig.schema.json similarity index 100% rename from lib/vscode/extensions/typescript-language-features/schemas/jsconfig.schema.json rename to extensions/typescript-language-features/schemas/jsconfig.schema.json diff --git a/lib/vscode/extensions/typescript-language-features/schemas/package.schema.json b/extensions/typescript-language-features/schemas/package.schema.json similarity index 100% rename from lib/vscode/extensions/typescript-language-features/schemas/package.schema.json rename to extensions/typescript-language-features/schemas/package.schema.json diff --git a/lib/vscode/extensions/typescript-language-features/schemas/tsconfig.schema.json b/extensions/typescript-language-features/schemas/tsconfig.schema.json similarity index 100% rename from lib/vscode/extensions/typescript-language-features/schemas/tsconfig.schema.json rename to extensions/typescript-language-features/schemas/tsconfig.schema.json diff --git a/lib/vscode/extensions/typescript-language-features/src/api.ts b/extensions/typescript-language-features/src/api.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/api.ts rename to extensions/typescript-language-features/src/api.ts diff --git a/extensions/typescript-language-features/src/commands/commandManager.ts b/extensions/typescript-language-features/src/commands/commandManager.ts new file mode 100644 index 000000000000..b7b58bf7edee --- /dev/null +++ b/extensions/typescript-language-features/src/commands/commandManager.ts @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; + +export interface Command { + readonly id: string; + + execute(...args: any[]): void; +} + +export class CommandManager { + private readonly commands = new Map(); + + public dispose() { + for (const registration of this.commands.values()) { + registration.dispose(); + } + this.commands.clear(); + } + + public register(command: T): T { + if (!this.commands.has(command.id)) { + this.commands.set(command.id, vscode.commands.registerCommand(command.id, command.execute, command)); + } + return command; + } +} diff --git a/lib/vscode/extensions/typescript-language-features/src/commands/configurePlugin.ts b/extensions/typescript-language-features/src/commands/configurePlugin.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/commands/configurePlugin.ts rename to extensions/typescript-language-features/src/commands/configurePlugin.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/commands/goToProjectConfiguration.ts b/extensions/typescript-language-features/src/commands/goToProjectConfiguration.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/commands/goToProjectConfiguration.ts rename to extensions/typescript-language-features/src/commands/goToProjectConfiguration.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/commands/index.ts b/extensions/typescript-language-features/src/commands/index.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/commands/index.ts rename to extensions/typescript-language-features/src/commands/index.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/commands/learnMoreAboutRefactorings.ts b/extensions/typescript-language-features/src/commands/learnMoreAboutRefactorings.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/commands/learnMoreAboutRefactorings.ts rename to extensions/typescript-language-features/src/commands/learnMoreAboutRefactorings.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/commands/openTsServerLog.ts b/extensions/typescript-language-features/src/commands/openTsServerLog.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/commands/openTsServerLog.ts rename to extensions/typescript-language-features/src/commands/openTsServerLog.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/commands/reloadProject.ts b/extensions/typescript-language-features/src/commands/reloadProject.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/commands/reloadProject.ts rename to extensions/typescript-language-features/src/commands/reloadProject.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/commands/restartTsServer.ts b/extensions/typescript-language-features/src/commands/restartTsServer.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/commands/restartTsServer.ts rename to extensions/typescript-language-features/src/commands/restartTsServer.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/commands/selectTypeScriptVersion.ts b/extensions/typescript-language-features/src/commands/selectTypeScriptVersion.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/commands/selectTypeScriptVersion.ts rename to extensions/typescript-language-features/src/commands/selectTypeScriptVersion.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/extension.browser.ts b/extensions/typescript-language-features/src/extension.browser.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/extension.browser.ts rename to extensions/typescript-language-features/src/extension.browser.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/extension.ts b/extensions/typescript-language-features/src/extension.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/extension.ts rename to extensions/typescript-language-features/src/extension.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/callHierarchy.ts b/extensions/typescript-language-features/src/languageFeatures/callHierarchy.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/callHierarchy.ts rename to extensions/typescript-language-features/src/languageFeatures/callHierarchy.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/codeLens/baseCodeLensProvider.ts b/extensions/typescript-language-features/src/languageFeatures/codeLens/baseCodeLensProvider.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/codeLens/baseCodeLensProvider.ts rename to extensions/typescript-language-features/src/languageFeatures/codeLens/baseCodeLensProvider.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/codeLens/implementationsCodeLens.ts b/extensions/typescript-language-features/src/languageFeatures/codeLens/implementationsCodeLens.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/codeLens/implementationsCodeLens.ts rename to extensions/typescript-language-features/src/languageFeatures/codeLens/implementationsCodeLens.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/codeLens/referencesCodeLens.ts b/extensions/typescript-language-features/src/languageFeatures/codeLens/referencesCodeLens.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/codeLens/referencesCodeLens.ts rename to extensions/typescript-language-features/src/languageFeatures/codeLens/referencesCodeLens.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/completions.ts b/extensions/typescript-language-features/src/languageFeatures/completions.ts similarity index 97% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/completions.ts rename to extensions/typescript-language-features/src/languageFeatures/completions.ts index 37d32399ffc6..b181a122adf8 100644 --- a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/completions.ts +++ b/extensions/typescript-language-features/src/languageFeatures/completions.ts @@ -79,7 +79,6 @@ class MyCompletionItem extends vscode.CompletionItem { this.sortText = tsEntry.sortText; } - // @ts-expect-error until 4.3 protocol update const { sourceDisplay, isSnippet } = tsEntry; if (sourceDisplay) { this.label2 = { name: tsEntry.name, qualifier: Previewer.plainWithLinks(sourceDisplay, client) }; @@ -184,11 +183,9 @@ class MyCompletionItem extends vscode.CompletionItem { const args: Proto.CompletionDetailsRequestArgs = { ...typeConverters.Position.toFileLocationRequestArgs(filepath, this.position), entryNames: [ - // @ts-expect-error until TypeScript 4.3 protocol update this.tsEntry.source || this.tsEntry.data ? { name: this.tsEntry.name, source: this.tsEntry.source, - // @ts-expect-error until TypeScript 4.3 protocol update data: this.tsEntry.data, } : this.tsEntry.name ] @@ -561,7 +558,6 @@ class CompletionAcceptedCommand implements Command { */ this.telemetryReporter.logTelemetry('completions.accept', { isPackageJsonImport: item.tsEntry.isPackageJsonImport ? 'true' : undefined, - // @ts-expect-error until 4.3 protocol update isImportStatementCompletion: item.tsEntry.isImportStatementCompletion ? 'true' : undefined, }); } @@ -753,7 +749,6 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider< dotAccessorContext = { range, text }; } } - // @ts-expect-error until 4.3 protocol update isIncomplete = !!response.body.isIncomplete || (response as any).metadata && (response as any).metadata.isIncomplete; entries = response.body.entries; metadata = response.metadata; @@ -792,7 +787,6 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider< }; items.push(item); includesPackageJsonImport = includesPackageJsonImport || !!entry.isPackageJsonImport; - // @ts-expect-error until 4.3 protocol update includesImportStatementCompletion = includesImportStatementCompletion || !!entry.isImportStatementCompletion; } } @@ -823,11 +817,15 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider< } */ this.telemetryReporter.logTelemetry('completions.execute', { - duration: duration, + duration: String(duration), type: response?.type ?? 'unknown', - count: response?.type === 'response' && response.body ? response.body.entries.length : 0, - updateGraphDurationMs: response?.type === 'response' ? response.performanceData?.updateGraphDurationMs : undefined, - createAutoImportProviderProgramDurationMs: response?.type === 'response' ? response.performanceData?.createAutoImportProviderProgramDurationMs : undefined, + count: String(response?.type === 'response' && response.body ? response.body.entries.length : 0), + updateGraphDurationMs: response?.type === 'response' && typeof response.performanceData?.updateGraphDurationMs === 'number' + ? String(response.performanceData.updateGraphDurationMs) + : undefined, + createAutoImportProviderProgramDurationMs: response?.type === 'response' && typeof response.performanceData?.createAutoImportProviderProgramDurationMs === 'number' + ? String(response.performanceData.createAutoImportProviderProgramDurationMs) + : undefined, includesPackageJsonImport: includesPackageJsonImport ? 'true' : undefined, includesImportStatementCompletion: includesImportStatementCompletion ? 'true' : undefined, }); @@ -842,7 +840,6 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider< return this.client.apiVersion.lt(API.v381) ? undefined : '#'; case ' ': - // @ts-expect-error until 4.3.0 protocol update const space: Proto.CompletionsTriggerCharacter = ' '; return this.client.apiVersion.gte(API.v430) ? space : undefined; diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/definitionProviderBase.ts b/extensions/typescript-language-features/src/languageFeatures/definitionProviderBase.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/definitionProviderBase.ts rename to extensions/typescript-language-features/src/languageFeatures/definitionProviderBase.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/definitions.ts b/extensions/typescript-language-features/src/languageFeatures/definitions.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/definitions.ts rename to extensions/typescript-language-features/src/languageFeatures/definitions.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/diagnostics.ts b/extensions/typescript-language-features/src/languageFeatures/diagnostics.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/diagnostics.ts rename to extensions/typescript-language-features/src/languageFeatures/diagnostics.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/directiveCommentCompletions.ts b/extensions/typescript-language-features/src/languageFeatures/directiveCommentCompletions.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/directiveCommentCompletions.ts rename to extensions/typescript-language-features/src/languageFeatures/directiveCommentCompletions.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/documentHighlight.ts b/extensions/typescript-language-features/src/languageFeatures/documentHighlight.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/documentHighlight.ts rename to extensions/typescript-language-features/src/languageFeatures/documentHighlight.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/documentSymbol.ts b/extensions/typescript-language-features/src/languageFeatures/documentSymbol.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/documentSymbol.ts rename to extensions/typescript-language-features/src/languageFeatures/documentSymbol.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/fileConfigurationManager.ts b/extensions/typescript-language-features/src/languageFeatures/fileConfigurationManager.ts similarity index 99% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/fileConfigurationManager.ts rename to extensions/typescript-language-features/src/languageFeatures/fileConfigurationManager.ts index 69cb3526d5a9..2ab729661d5e 100644 --- a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/fileConfigurationManager.ts +++ b/extensions/typescript-language-features/src/languageFeatures/fileConfigurationManager.ts @@ -183,7 +183,6 @@ export default class FileConfigurationManager extends Disposable { includeAutomaticOptionalChainCompletions: config.get('suggest.includeAutomaticOptionalChainCompletions', true), provideRefactorNotApplicableReason: true, generateReturnInDocTemplate: config.get('suggest.jsdoc.generateReturns', true), - // @ts-expect-error until 4.3 protocol update includeCompletionsForImportStatements: config.get('suggest.includeCompletionsForImportStatements', true), includeCompletionsWithSnippetText: config.get('suggest.includeCompletionsWithSnippetText', true), displayPartsForJSDoc: true, diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/fileReferences.ts b/extensions/typescript-language-features/src/languageFeatures/fileReferences.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/fileReferences.ts rename to extensions/typescript-language-features/src/languageFeatures/fileReferences.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/fixAll.ts b/extensions/typescript-language-features/src/languageFeatures/fixAll.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/fixAll.ts rename to extensions/typescript-language-features/src/languageFeatures/fixAll.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/folding.ts b/extensions/typescript-language-features/src/languageFeatures/folding.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/folding.ts rename to extensions/typescript-language-features/src/languageFeatures/folding.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/formatting.ts b/extensions/typescript-language-features/src/languageFeatures/formatting.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/formatting.ts rename to extensions/typescript-language-features/src/languageFeatures/formatting.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/hover.ts b/extensions/typescript-language-features/src/languageFeatures/hover.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/hover.ts rename to extensions/typescript-language-features/src/languageFeatures/hover.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/implementations.ts b/extensions/typescript-language-features/src/languageFeatures/implementations.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/implementations.ts rename to extensions/typescript-language-features/src/languageFeatures/implementations.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/jsDocCompletions.ts b/extensions/typescript-language-features/src/languageFeatures/jsDocCompletions.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/jsDocCompletions.ts rename to extensions/typescript-language-features/src/languageFeatures/jsDocCompletions.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/languageConfiguration.ts b/extensions/typescript-language-features/src/languageFeatures/languageConfiguration.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/languageConfiguration.ts rename to extensions/typescript-language-features/src/languageFeatures/languageConfiguration.ts diff --git a/extensions/typescript-language-features/src/languageFeatures/organizeImports.ts b/extensions/typescript-language-features/src/languageFeatures/organizeImports.ts new file mode 100644 index 000000000000..10a399bad5b8 --- /dev/null +++ b/extensions/typescript-language-features/src/languageFeatures/organizeImports.ts @@ -0,0 +1,151 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import * as nls from 'vscode-nls'; +import type * as Proto from '../protocol'; +import { ClientCapability, ITypeScriptServiceClient } from '../typescriptService'; +import API from '../utils/api'; +import { nulToken } from '../utils/cancellation'; +import { Command, CommandManager } from '../commands/commandManager'; +import { conditionalRegistration, requireMinVersion, requireSomeCapability } from '../utils/dependentRegistration'; +import { DocumentSelector } from '../utils/documentSelector'; +import { TelemetryReporter } from '../utils/telemetry'; +import * as typeConverters from '../utils/typeConverters'; +import FileConfigurationManager from './fileConfigurationManager'; + +const localize = nls.loadMessageBundle(); + + +class OrganizeImportsCommand implements Command { + public static readonly Id = '_typescript.organizeImports'; + + public readonly id = OrganizeImportsCommand.Id; + + constructor( + private readonly client: ITypeScriptServiceClient, + private readonly telemetryReporter: TelemetryReporter, + ) { } + + public async execute(file: string, sortOnly = false): Promise { + /* __GDPR__ + "organizeImports.execute" : { + "${include}": [ + "${TypeScriptCommonProperties}" + ] + } + */ + this.telemetryReporter.logTelemetry('organizeImports.execute', {}); + + const args: Proto.OrganizeImportsRequestArgs = { + scope: { + type: 'file', + args: { + file + } + }, + skipDestructiveCodeActions: sortOnly, + }; + const response = await this.client.interruptGetErr(() => this.client.execute('organizeImports', args, nulToken)); + if (response.type !== 'response' || !response.body) { + return false; + } + + const edits = typeConverters.WorkspaceEdit.fromFileCodeEdits(this.client, response.body); + return vscode.workspace.applyEdit(edits); + } +} + +class ImportsCodeActionProvider implements vscode.CodeActionProvider { + + static register( + client: ITypeScriptServiceClient, + minVersion: API, + kind: vscode.CodeActionKind, + title: string, + sortOnly: boolean, + commandManager: CommandManager, + fileConfigurationManager: FileConfigurationManager, + telemetryReporter: TelemetryReporter, + selector: DocumentSelector + ): vscode.Disposable { + return conditionalRegistration([ + requireMinVersion(client, minVersion), + requireSomeCapability(client, ClientCapability.Semantic), + ], () => { + const provider = new ImportsCodeActionProvider(client, kind, title, sortOnly, commandManager, fileConfigurationManager, telemetryReporter); + return vscode.languages.registerCodeActionsProvider(selector.semantic, provider, { + providedCodeActionKinds: [kind] + }); + }); + } + + public constructor( + private readonly client: ITypeScriptServiceClient, + private readonly kind: vscode.CodeActionKind, + private readonly title: string, + private readonly sortOnly: boolean, + commandManager: CommandManager, + private readonly fileConfigManager: FileConfigurationManager, + telemetryReporter: TelemetryReporter, + ) { + commandManager.register(new OrganizeImportsCommand(client, telemetryReporter)); + } + + public provideCodeActions( + document: vscode.TextDocument, + _range: vscode.Range, + context: vscode.CodeActionContext, + token: vscode.CancellationToken + ): vscode.CodeAction[] { + const file = this.client.toOpenedFilePath(document); + if (!file) { + return []; + } + + if (!context.only || !context.only.contains(this.kind)) { + return []; + } + + this.fileConfigManager.ensureConfigurationForDocument(document, token); + + const action = new vscode.CodeAction(this.title, this.kind); + action.command = { title: '', command: OrganizeImportsCommand.Id, arguments: [file, this.sortOnly] }; + return [action]; + } +} + +export function register( + selector: DocumentSelector, + client: ITypeScriptServiceClient, + commandManager: CommandManager, + fileConfigurationManager: FileConfigurationManager, + telemetryReporter: TelemetryReporter, +) { + return vscode.Disposable.from( + ImportsCodeActionProvider.register( + client, + API.v280, + vscode.CodeActionKind.SourceOrganizeImports, + localize('organizeImportsAction.title', "Organize Imports"), + false, + commandManager, + fileConfigurationManager, + telemetryReporter, + selector + ), + ImportsCodeActionProvider.register( + client, + API.v430, + vscode.CodeActionKind.Source.append('sortImports'), + localize('sortImportsAction.title', "Sort Imports"), + true, + commandManager, + fileConfigurationManager, + telemetryReporter, + selector + ), + ); +} diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/quickFix.ts b/extensions/typescript-language-features/src/languageFeatures/quickFix.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/quickFix.ts rename to extensions/typescript-language-features/src/languageFeatures/quickFix.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/refactor.ts b/extensions/typescript-language-features/src/languageFeatures/refactor.ts similarity index 98% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/refactor.ts rename to extensions/typescript-language-features/src/languageFeatures/refactor.ts index 4284366e2731..d1b861a97fa3 100644 --- a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/refactor.ts +++ b/extensions/typescript-language-features/src/languageFeatures/refactor.ts @@ -310,10 +310,12 @@ class TypeScriptRefactorProvider implements vscode.CodeActionProvider { - // Don't show 'infer return type' refactoring unless it has been explicitly requested - // https://github.com/microsoft/TypeScript/issues/42993 - if (!context.only && action.kind?.value === 'refactor.rewrite.function.returnType') { - return false; + if (this.client.apiVersion.lt(API.v430)) { + // Don't show 'infer return type' refactoring unless it has been explicitly requested + // https://github.com/microsoft/TypeScript/issues/42993 + if (!context.only && action.kind?.value === 'refactor.rewrite.function.returnType') { + return false; + } } return true; }); diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/references.ts b/extensions/typescript-language-features/src/languageFeatures/references.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/references.ts rename to extensions/typescript-language-features/src/languageFeatures/references.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/rename.ts b/extensions/typescript-language-features/src/languageFeatures/rename.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/rename.ts rename to extensions/typescript-language-features/src/languageFeatures/rename.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/semanticTokens.ts b/extensions/typescript-language-features/src/languageFeatures/semanticTokens.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/semanticTokens.ts rename to extensions/typescript-language-features/src/languageFeatures/semanticTokens.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/signatureHelp.ts b/extensions/typescript-language-features/src/languageFeatures/signatureHelp.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/signatureHelp.ts rename to extensions/typescript-language-features/src/languageFeatures/signatureHelp.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/smartSelect.ts b/extensions/typescript-language-features/src/languageFeatures/smartSelect.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/smartSelect.ts rename to extensions/typescript-language-features/src/languageFeatures/smartSelect.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/tagClosing.ts b/extensions/typescript-language-features/src/languageFeatures/tagClosing.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/tagClosing.ts rename to extensions/typescript-language-features/src/languageFeatures/tagClosing.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/tsconfig.ts b/extensions/typescript-language-features/src/languageFeatures/tsconfig.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/tsconfig.ts rename to extensions/typescript-language-features/src/languageFeatures/tsconfig.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/typeDefinitions.ts b/extensions/typescript-language-features/src/languageFeatures/typeDefinitions.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/typeDefinitions.ts rename to extensions/typescript-language-features/src/languageFeatures/typeDefinitions.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/updatePathsOnRename.ts b/extensions/typescript-language-features/src/languageFeatures/updatePathsOnRename.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/updatePathsOnRename.ts rename to extensions/typescript-language-features/src/languageFeatures/updatePathsOnRename.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/workspaceSymbols.ts b/extensions/typescript-language-features/src/languageFeatures/workspaceSymbols.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageFeatures/workspaceSymbols.ts rename to extensions/typescript-language-features/src/languageFeatures/workspaceSymbols.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/languageProvider.ts b/extensions/typescript-language-features/src/languageProvider.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/languageProvider.ts rename to extensions/typescript-language-features/src/languageProvider.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/lazyClientHost.ts b/extensions/typescript-language-features/src/lazyClientHost.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/lazyClientHost.ts rename to extensions/typescript-language-features/src/lazyClientHost.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/protocol.const.ts b/extensions/typescript-language-features/src/protocol.const.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/protocol.const.ts rename to extensions/typescript-language-features/src/protocol.const.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/protocol.d.ts b/extensions/typescript-language-features/src/protocol.d.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/protocol.d.ts rename to extensions/typescript-language-features/src/protocol.d.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/task/taskProvider.ts b/extensions/typescript-language-features/src/task/taskProvider.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/task/taskProvider.ts rename to extensions/typescript-language-features/src/task/taskProvider.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/task/tsconfigProvider.ts b/extensions/typescript-language-features/src/task/tsconfigProvider.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/task/tsconfigProvider.ts rename to extensions/typescript-language-features/src/task/tsconfigProvider.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test-all.ts b/extensions/typescript-language-features/src/test-all.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test-all.ts rename to extensions/typescript-language-features/src/test-all.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/index.ts b/extensions/typescript-language-features/src/test/index.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/index.ts rename to extensions/typescript-language-features/src/test/index.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/smoke/completions.test.ts b/extensions/typescript-language-features/src/test/smoke/completions.test.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/smoke/completions.test.ts rename to extensions/typescript-language-features/src/test/smoke/completions.test.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/smoke/fixAll.test.ts b/extensions/typescript-language-features/src/test/smoke/fixAll.test.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/smoke/fixAll.test.ts rename to extensions/typescript-language-features/src/test/smoke/fixAll.test.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/smoke/index.ts b/extensions/typescript-language-features/src/test/smoke/index.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/smoke/index.ts rename to extensions/typescript-language-features/src/test/smoke/index.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/smoke/jsDocCompletions.test.ts b/extensions/typescript-language-features/src/test/smoke/jsDocCompletions.test.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/smoke/jsDocCompletions.test.ts rename to extensions/typescript-language-features/src/test/smoke/jsDocCompletions.test.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/smoke/quickFix.test.ts b/extensions/typescript-language-features/src/test/smoke/quickFix.test.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/smoke/quickFix.test.ts rename to extensions/typescript-language-features/src/test/smoke/quickFix.test.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/smoke/referencesCodeLens.test.ts b/extensions/typescript-language-features/src/test/smoke/referencesCodeLens.test.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/smoke/referencesCodeLens.test.ts rename to extensions/typescript-language-features/src/test/smoke/referencesCodeLens.test.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/suggestTestHelpers.ts b/extensions/typescript-language-features/src/test/suggestTestHelpers.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/suggestTestHelpers.ts rename to extensions/typescript-language-features/src/test/suggestTestHelpers.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/testUtils.ts b/extensions/typescript-language-features/src/test/testUtils.ts similarity index 99% rename from lib/vscode/extensions/typescript-language-features/src/test/testUtils.ts rename to extensions/typescript-language-features/src/test/testUtils.ts index c0ba9a477305..28f3dfc7d928 100644 --- a/lib/vscode/extensions/typescript-language-features/src/test/testUtils.ts +++ b/extensions/typescript-language-features/src/test/testUtils.ts @@ -89,7 +89,7 @@ export function assertEditorContents(editor: vscode.TextEditor, expectedDocConte if (cursorIndex >= 0) { const expectedCursorPos = editor.document.positionAt(cursorIndex); - assert.deepEqual( + assert.deepStrictEqual( { line: editor.selection.active.line, character: editor.selection.active.line }, { line: expectedCursorPos.line, character: expectedCursorPos.line }, 'Cursor position' diff --git a/lib/vscode/extensions/typescript-language-features/src/test/unit/cachedResponse.test.ts b/extensions/typescript-language-features/src/test/unit/cachedResponse.test.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/unit/cachedResponse.test.ts rename to extensions/typescript-language-features/src/test/unit/cachedResponse.test.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/unit/functionCallSnippet.test.ts b/extensions/typescript-language-features/src/test/unit/functionCallSnippet.test.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/unit/functionCallSnippet.test.ts rename to extensions/typescript-language-features/src/test/unit/functionCallSnippet.test.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/unit/index.ts b/extensions/typescript-language-features/src/test/unit/index.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/unit/index.ts rename to extensions/typescript-language-features/src/test/unit/index.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/unit/jsdocSnippet.test.ts b/extensions/typescript-language-features/src/test/unit/jsdocSnippet.test.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/unit/jsdocSnippet.test.ts rename to extensions/typescript-language-features/src/test/unit/jsdocSnippet.test.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/unit/onEnter.test.ts b/extensions/typescript-language-features/src/test/unit/onEnter.test.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/unit/onEnter.test.ts rename to extensions/typescript-language-features/src/test/unit/onEnter.test.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/unit/previewer.test.ts b/extensions/typescript-language-features/src/test/unit/previewer.test.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/unit/previewer.test.ts rename to extensions/typescript-language-features/src/test/unit/previewer.test.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/unit/requestQueue.test.ts b/extensions/typescript-language-features/src/test/unit/requestQueue.test.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/unit/requestQueue.test.ts rename to extensions/typescript-language-features/src/test/unit/requestQueue.test.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/test/unit/server.test.ts b/extensions/typescript-language-features/src/test/unit/server.test.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/test/unit/server.test.ts rename to extensions/typescript-language-features/src/test/unit/server.test.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/bufferSyncSupport.ts b/extensions/typescript-language-features/src/tsServer/bufferSyncSupport.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/bufferSyncSupport.ts rename to extensions/typescript-language-features/src/tsServer/bufferSyncSupport.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/cachedResponse.ts b/extensions/typescript-language-features/src/tsServer/cachedResponse.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/cachedResponse.ts rename to extensions/typescript-language-features/src/tsServer/cachedResponse.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/callbackMap.ts b/extensions/typescript-language-features/src/tsServer/callbackMap.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/callbackMap.ts rename to extensions/typescript-language-features/src/tsServer/callbackMap.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/cancellation.electron.ts b/extensions/typescript-language-features/src/tsServer/cancellation.electron.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/cancellation.electron.ts rename to extensions/typescript-language-features/src/tsServer/cancellation.electron.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/cancellation.ts b/extensions/typescript-language-features/src/tsServer/cancellation.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/cancellation.ts rename to extensions/typescript-language-features/src/tsServer/cancellation.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/logDirectoryProvider.electron.ts b/extensions/typescript-language-features/src/tsServer/logDirectoryProvider.electron.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/logDirectoryProvider.electron.ts rename to extensions/typescript-language-features/src/tsServer/logDirectoryProvider.electron.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/logDirectoryProvider.ts b/extensions/typescript-language-features/src/tsServer/logDirectoryProvider.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/logDirectoryProvider.ts rename to extensions/typescript-language-features/src/tsServer/logDirectoryProvider.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/requestQueue.ts b/extensions/typescript-language-features/src/tsServer/requestQueue.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/requestQueue.ts rename to extensions/typescript-language-features/src/tsServer/requestQueue.ts diff --git a/extensions/typescript-language-features/src/tsServer/server.ts b/extensions/typescript-language-features/src/tsServer/server.ts new file mode 100644 index 000000000000..b97a1a8b73de --- /dev/null +++ b/extensions/typescript-language-features/src/tsServer/server.ts @@ -0,0 +1,626 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import type * as Proto from '../protocol'; +import { EventName } from '../protocol.const'; +import { CallbackMap } from '../tsServer/callbackMap'; +import { RequestItem, RequestQueue, RequestQueueingType } from '../tsServer/requestQueue'; +import { TypeScriptServerError } from '../tsServer/serverError'; +import { ServerResponse, ServerType, TypeScriptRequests } from '../typescriptService'; +import { TypeScriptServiceConfiguration } from '../utils/configuration'; +import { Disposable } from '../utils/dispose'; +import { TelemetryReporter } from '../utils/telemetry'; +import Tracer from '../utils/tracer'; +import { OngoingRequestCanceller } from './cancellation'; +import { TypeScriptVersionManager } from './versionManager'; +import { TypeScriptVersion } from './versionProvider'; + +export enum ExecutionTarget { + Semantic, + Syntax +} + +export interface ITypeScriptServer { + readonly onEvent: vscode.Event; + readonly onExit: vscode.Event; + readonly onError: vscode.Event; + + readonly tsServerLogFile: string | undefined; + + kill(): void; + + /** + * @return A list of all execute requests. If there are multiple entries, the first item is the primary + * request while the rest are secondary ones. + */ + executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Array> | undefined>; + + dispose(): void; +} + +export interface TsServerDelegate { + onFatalError(command: string, error: Error): void; +} + +export const enum TsServerProcessKind { + Main = 'main', + Syntax = 'syntax', + Semantic = 'semantic', + Diagnostics = 'diagnostics' +} + +export interface TsServerProcessFactory { + fork( + tsServerPath: string, + args: readonly string[], + kind: TsServerProcessKind, + configuration: TypeScriptServiceConfiguration, + versionManager: TypeScriptVersionManager, + ): TsServerProcess; +} + +export interface TsServerProcess { + write(serverRequest: Proto.Request): void; + + onData(handler: (data: Proto.Response) => void): void; + onExit(handler: (code: number | null) => void): void; + onError(handler: (error: Error) => void): void; + + kill(): void; +} + +export class ProcessBasedTsServer extends Disposable implements ITypeScriptServer { + private readonly _requestQueue = new RequestQueue(); + private readonly _callbacks = new CallbackMap(); + private readonly _pendingResponses = new Set(); + + constructor( + private readonly _serverId: string, + private readonly _serverSource: ServerType, + private readonly _process: TsServerProcess, + private readonly _tsServerLogFile: string | undefined, + private readonly _requestCanceller: OngoingRequestCanceller, + private readonly _version: TypeScriptVersion, + private readonly _telemetryReporter: TelemetryReporter, + private readonly _tracer: Tracer, + ) { + super(); + + this._process.onData(msg => { + this.dispatchMessage(msg); + }); + + this._process.onExit(code => { + this._onExit.fire(code); + this._callbacks.destroy('server exited'); + }); + + this._process.onError(error => { + this._onError.fire(error); + this._callbacks.destroy('server errored'); + }); + } + + private readonly _onEvent = this._register(new vscode.EventEmitter()); + public readonly onEvent = this._onEvent.event; + + private readonly _onExit = this._register(new vscode.EventEmitter()); + public readonly onExit = this._onExit.event; + + private readonly _onError = this._register(new vscode.EventEmitter()); + public readonly onError = this._onError.event; + + public get tsServerLogFile() { return this._tsServerLogFile; } + + private write(serverRequest: Proto.Request) { + this._process.write(serverRequest); + } + + public override dispose() { + super.dispose(); + this._callbacks.destroy('server disposed'); + this._pendingResponses.clear(); + } + + public kill() { + this._process.kill(); + } + + private dispatchMessage(message: Proto.Message) { + try { + switch (message.type) { + case 'response': + if (this._serverSource) { + this.dispatchResponse({ + ...(message as Proto.Response), + _serverType: this._serverSource + }); + } else { + this.dispatchResponse(message as Proto.Response); + } + break; + + case 'event': + const event = message as Proto.Event; + if (event.event === 'requestCompleted') { + const seq = (event as Proto.RequestCompletedEvent).body.request_seq; + const callback = this._callbacks.fetch(seq); + if (callback) { + this._tracer.traceRequestCompleted(this._serverId, 'requestCompleted', seq, callback); + callback.onSuccess(undefined); + } + } else { + this._tracer.traceEvent(this._serverId, event); + this._onEvent.fire(event); + } + break; + + default: + throw new Error(`Unknown message type ${message.type} received`); + } + } finally { + this.sendNextRequests(); + } + } + + private tryCancelRequest(seq: number, command: string): boolean { + try { + if (this._requestQueue.tryDeletePendingRequest(seq)) { + this.logTrace(`Canceled request with sequence number ${seq}`); + return true; + } + + if (this._requestCanceller.tryCancelOngoingRequest(seq)) { + return true; + } + + this.logTrace(`Tried to cancel request with sequence number ${seq}. But request got already delivered.`); + return false; + } finally { + const callback = this.fetchCallback(seq); + if (callback) { + callback.onSuccess(new ServerResponse.Cancelled(`Cancelled request ${seq} - ${command}`)); + } + } + } + + private dispatchResponse(response: Proto.Response) { + const callback = this.fetchCallback(response.request_seq); + if (!callback) { + return; + } + + this._tracer.traceResponse(this._serverId, response, callback); + if (response.success) { + callback.onSuccess(response); + } else if (response.message === 'No content available.') { + // Special case where response itself is successful but there is not any data to return. + callback.onSuccess(ServerResponse.NoContent); + } else { + callback.onError(TypeScriptServerError.create(this._serverId, this._version, response)); + } + } + + public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Array> | undefined> { + const request = this._requestQueue.createRequest(command, args); + const requestInfo: RequestItem = { + request, + expectsResponse: executeInfo.expectsResult, + isAsync: executeInfo.isAsync, + queueingType: ProcessBasedTsServer.getQueueingType(command, executeInfo.lowPriority) + }; + let result: Promise> | undefined; + if (executeInfo.expectsResult) { + result = new Promise>((resolve, reject) => { + this._callbacks.add(request.seq, { onSuccess: resolve as () => ServerResponse.Response | undefined, onError: reject, queuingStartTime: Date.now(), isAsync: executeInfo.isAsync }, executeInfo.isAsync); + + if (executeInfo.token) { + executeInfo.token.onCancellationRequested(() => { + this.tryCancelRequest(request.seq, command); + }); + } + }).catch((err: Error) => { + if (err instanceof TypeScriptServerError) { + if (!executeInfo.token || !executeInfo.token.isCancellationRequested) { + /* __GDPR__ + "languageServiceErrorResponse" : { + "${include}": [ + "${TypeScriptCommonProperties}", + "${TypeScriptRequestErrorProperties}" + ] + } + */ + this._telemetryReporter.logTelemetry('languageServiceErrorResponse', err.telemetry); + } + } + + throw err; + }); + } + + this._requestQueue.enqueue(requestInfo); + this.sendNextRequests(); + + return [result]; + } + + private sendNextRequests(): void { + while (this._pendingResponses.size === 0 && this._requestQueue.length > 0) { + const item = this._requestQueue.dequeue(); + if (item) { + this.sendRequest(item); + } + } + } + + private sendRequest(requestItem: RequestItem): void { + const serverRequest = requestItem.request; + this._tracer.traceRequest(this._serverId, serverRequest, requestItem.expectsResponse, this._requestQueue.length); + + if (requestItem.expectsResponse && !requestItem.isAsync) { + this._pendingResponses.add(requestItem.request.seq); + } + + try { + this.write(serverRequest); + } catch (err) { + const callback = this.fetchCallback(serverRequest.seq); + if (callback) { + callback.onError(err); + } + } + } + + private fetchCallback(seq: number) { + const callback = this._callbacks.fetch(seq); + if (!callback) { + return undefined; + } + + this._pendingResponses.delete(seq); + return callback; + } + + private logTrace(message: string) { + this._tracer.logTrace(this._serverId, message); + } + + private static readonly fenceCommands = new Set(['change', 'close', 'open', 'updateOpen']); + + private static getQueueingType( + command: string, + lowPriority?: boolean + ): RequestQueueingType { + if (ProcessBasedTsServer.fenceCommands.has(command)) { + return RequestQueueingType.Fence; + } + return lowPriority ? RequestQueueingType.LowPriority : RequestQueueingType.Normal; + } +} + + +interface ExecuteInfo { + readonly isAsync: boolean; + readonly token?: vscode.CancellationToken; + readonly expectsResult: boolean; + readonly lowPriority?: boolean; + readonly executionTarget?: ExecutionTarget; +} + +class RequestRouter { + + private static readonly sharedCommands = new Set([ + 'change', + 'close', + 'open', + 'updateOpen', + 'configure', + ]); + + constructor( + private readonly servers: ReadonlyArray<{ + readonly server: ITypeScriptServer; + canRun?(command: keyof TypeScriptRequests, executeInfo: ExecuteInfo): void; + }>, + private readonly delegate: TsServerDelegate, + ) { } + + public execute( + command: keyof TypeScriptRequests, + args: any, + executeInfo: ExecuteInfo, + ): Array> | undefined> { + if (RequestRouter.sharedCommands.has(command) && typeof executeInfo.executionTarget === 'undefined') { + // Dispatch shared commands to all servers but use first one as the primary response + + const requestStates: RequestState.State[] = this.servers.map(() => RequestState.Unresolved); + + // Also make sure we never cancel requests to just one server + let token: vscode.CancellationToken | undefined = undefined; + if (executeInfo.token) { + const source = new vscode.CancellationTokenSource(); + executeInfo.token.onCancellationRequested(() => { + if (requestStates.some(state => state === RequestState.Resolved)) { + // Don't cancel. + // One of the servers completed this request so we don't want to leave the other + // in a different state. + return; + } + source.cancel(); + }); + token = source.token; + } + + const allRequests: Array> | undefined> = []; + + for (let serverIndex = 0; serverIndex < this.servers.length; ++serverIndex) { + const server = this.servers[serverIndex].server; + + const request = server.executeImpl(command, args, { ...executeInfo, token })[0]; + allRequests.push(request); + if (request) { + request + .then(result => { + requestStates[serverIndex] = RequestState.Resolved; + const erroredRequest = requestStates.find(state => state.type === RequestState.Type.Errored) as RequestState.Errored | undefined; + if (erroredRequest) { + // We've gone out of sync + this.delegate.onFatalError(command, erroredRequest.err); + } + return result; + }, err => { + requestStates[serverIndex] = new RequestState.Errored(err); + if (requestStates.some(state => state === RequestState.Resolved)) { + // We've gone out of sync + this.delegate.onFatalError(command, err); + } + throw err; + }); + } + } + + return allRequests; + } + + for (const { canRun, server } of this.servers) { + if (!canRun || canRun(command, executeInfo)) { + return server.executeImpl(command, args, executeInfo); + } + } + + throw new Error(`Could not find server for command: '${command}'`); + } +} + +export class GetErrRoutingTsServer extends Disposable implements ITypeScriptServer { + + private static readonly diagnosticEvents = new Set([ + EventName.configFileDiag, + EventName.syntaxDiag, + EventName.semanticDiag, + EventName.suggestionDiag + ]); + + private readonly getErrServer: ITypeScriptServer; + private readonly mainServer: ITypeScriptServer; + private readonly router: RequestRouter; + + public constructor( + servers: { getErr: ITypeScriptServer, primary: ITypeScriptServer }, + delegate: TsServerDelegate, + ) { + super(); + + this.getErrServer = servers.getErr; + this.mainServer = servers.primary; + + this.router = new RequestRouter( + [ + { server: this.getErrServer, canRun: (command) => ['geterr', 'geterrForProject'].includes(command) }, + { server: this.mainServer, canRun: undefined /* gets all other commands */ } + ], + delegate); + + this._register(this.getErrServer.onEvent(e => { + if (GetErrRoutingTsServer.diagnosticEvents.has(e.event)) { + this._onEvent.fire(e); + } + // Ignore all other events + })); + this._register(this.mainServer.onEvent(e => { + if (!GetErrRoutingTsServer.diagnosticEvents.has(e.event)) { + this._onEvent.fire(e); + } + // Ignore all other events + })); + + this._register(this.getErrServer.onError(e => this._onError.fire(e))); + this._register(this.mainServer.onError(e => this._onError.fire(e))); + + this._register(this.mainServer.onExit(e => { + this._onExit.fire(e); + this.getErrServer.kill(); + })); + } + + private readonly _onEvent = this._register(new vscode.EventEmitter()); + public readonly onEvent = this._onEvent.event; + + private readonly _onExit = this._register(new vscode.EventEmitter()); + public readonly onExit = this._onExit.event; + + private readonly _onError = this._register(new vscode.EventEmitter()); + public readonly onError = this._onError.event; + + public get tsServerLogFile() { return this.mainServer.tsServerLogFile; } + + public kill(): void { + this.getErrServer.kill(); + this.mainServer.kill(); + } + + public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Array> | undefined> { + return this.router.execute(command, args, executeInfo); + } +} + + +export class SyntaxRoutingTsServer extends Disposable implements ITypeScriptServer { + + /** + * Commands that should always be run on the syntax server. + */ + private static readonly syntaxAlwaysCommands = new Set([ + 'navtree', + 'getOutliningSpans', + 'jsxClosingTag', + 'selectionRange', + 'format', + 'formatonkey', + 'docCommentTemplate', + ]); + + /** + * Commands that should always be run on the semantic server. + */ + private static readonly semanticCommands = new Set([ + 'geterr', + 'geterrForProject', + 'projectInfo', + 'configurePlugin', + ]); + + /** + * Commands that can be run on the syntax server but would benefit from being upgraded to the semantic server. + */ + private static readonly syntaxAllowedCommands = new Set([ + 'completions', + 'completionEntryDetails', + 'completionInfo', + 'definition', + 'definitionAndBoundSpan', + 'documentHighlights', + 'implementation', + 'navto', + 'quickinfo', + 'references', + 'rename', + 'signatureHelp', + ]); + + private readonly syntaxServer: ITypeScriptServer; + private readonly semanticServer: ITypeScriptServer; + private readonly router: RequestRouter; + + private _projectLoading = true; + + public constructor( + servers: { syntax: ITypeScriptServer, semantic: ITypeScriptServer }, + delegate: TsServerDelegate, + enableDynamicRouting: boolean, + ) { + super(); + + this.syntaxServer = servers.syntax; + this.semanticServer = servers.semantic; + + this.router = new RequestRouter( + [ + { + server: this.syntaxServer, + canRun: (command, execInfo) => { + switch (execInfo.executionTarget) { + case ExecutionTarget.Semantic: return false; + case ExecutionTarget.Syntax: return true; + } + + if (SyntaxRoutingTsServer.syntaxAlwaysCommands.has(command)) { + return true; + } + if (SyntaxRoutingTsServer.semanticCommands.has(command)) { + return false; + } + if (enableDynamicRouting && this.projectLoading && SyntaxRoutingTsServer.syntaxAllowedCommands.has(command)) { + return true; + } + return false; + } + }, { + server: this.semanticServer, + canRun: undefined /* gets all other commands */ + } + ], + delegate); + + this._register(this.syntaxServer.onEvent(e => { + return this._onEvent.fire(e); + })); + + this._register(this.semanticServer.onEvent(e => { + switch (e.event) { + case EventName.projectLoadingStart: + this._projectLoading = true; + break; + + case EventName.projectLoadingFinish: + case EventName.semanticDiag: + case EventName.syntaxDiag: + case EventName.suggestionDiag: + case EventName.configFileDiag: + this._projectLoading = false; + break; + } + return this._onEvent.fire(e); + })); + + this._register(this.semanticServer.onExit(e => { + this._onExit.fire(e); + this.syntaxServer.kill(); + })); + + this._register(this.semanticServer.onError(e => this._onError.fire(e))); + } + + private get projectLoading() { return this._projectLoading; } + + private readonly _onEvent = this._register(new vscode.EventEmitter()); + public readonly onEvent = this._onEvent.event; + + private readonly _onExit = this._register(new vscode.EventEmitter()); + public readonly onExit = this._onExit.event; + + private readonly _onError = this._register(new vscode.EventEmitter()); + public readonly onError = this._onError.event; + + public get tsServerLogFile() { return this.semanticServer.tsServerLogFile; } + + public kill(): void { + this.syntaxServer.kill(); + this.semanticServer.kill(); + } + + public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Array> | undefined> { + return this.router.execute(command, args, executeInfo); + } +} + +namespace RequestState { + export const enum Type { Unresolved, Resolved, Errored } + + export const Unresolved = { type: Type.Unresolved } as const; + + export const Resolved = { type: Type.Resolved } as const; + + export class Errored { + readonly type = Type.Errored; + + constructor( + public readonly err: Error + ) { } + } + + export type State = typeof Unresolved | typeof Resolved | Errored; +} diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/serverError.ts b/extensions/typescript-language-features/src/tsServer/serverError.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/serverError.ts rename to extensions/typescript-language-features/src/tsServer/serverError.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/serverProcess.browser.ts b/extensions/typescript-language-features/src/tsServer/serverProcess.browser.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/serverProcess.browser.ts rename to extensions/typescript-language-features/src/tsServer/serverProcess.browser.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/serverProcess.electron.ts b/extensions/typescript-language-features/src/tsServer/serverProcess.electron.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/serverProcess.electron.ts rename to extensions/typescript-language-features/src/tsServer/serverProcess.electron.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/spawner.ts b/extensions/typescript-language-features/src/tsServer/spawner.ts similarity index 98% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/spawner.ts rename to extensions/typescript-language-features/src/tsServer/spawner.ts index 58fd431edc72..f499c67465ff 100644 --- a/lib/vscode/extensions/typescript-language-features/src/tsServer/spawner.ts +++ b/extensions/typescript-language-features/src/tsServer/spawner.ts @@ -99,6 +99,9 @@ export class TypeScriptServerSpawner { } switch (configuration.separateSyntaxServer) { + case SeparateSyntaxServerConfiguration.ForAllRequests: + return CompositeServerType.SyntaxOnly; + case SeparateSyntaxServerConfiguration.Disabled: return CompositeServerType.Single; diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/versionManager.ts b/extensions/typescript-language-features/src/tsServer/versionManager.ts similarity index 99% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/versionManager.ts rename to extensions/typescript-language-features/src/tsServer/versionManager.ts index 54d88c1192ec..bb06e4505e27 100644 --- a/lib/vscode/extensions/typescript-language-features/src/tsServer/versionManager.ts +++ b/extensions/typescript-language-features/src/tsServer/versionManager.ts @@ -115,7 +115,7 @@ export class TypeScriptVersionManager extends Disposable { description: version.displayName, detail: version.pathLabel, run: async () => { - const trusted = await vscode.workspace.requestWorkspaceTrust({ modal: true }); + const trusted = await vscode.workspace.requestWorkspaceTrust(); if (trusted) { await this.workspaceState.update(useWorkspaceTsdkStorageKey, true); const tsConfig = vscode.workspace.getConfiguration('typescript'); diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/versionProvider.electron.ts b/extensions/typescript-language-features/src/tsServer/versionProvider.electron.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/versionProvider.electron.ts rename to extensions/typescript-language-features/src/tsServer/versionProvider.electron.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/versionProvider.ts b/extensions/typescript-language-features/src/tsServer/versionProvider.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/versionProvider.ts rename to extensions/typescript-language-features/src/tsServer/versionProvider.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/versionStatus.ts b/extensions/typescript-language-features/src/tsServer/versionStatus.ts similarity index 96% rename from lib/vscode/extensions/typescript-language-features/src/tsServer/versionStatus.ts rename to extensions/typescript-language-features/src/tsServer/versionStatus.ts index a868c3e2502b..2560f3e8be94 100644 --- a/lib/vscode/extensions/typescript-language-features/src/tsServer/versionStatus.ts +++ b/extensions/typescript-language-features/src/tsServer/versionStatus.ts @@ -135,12 +135,8 @@ export default class VersionStatus extends Disposable { ) { super(); - this._statusBarEntry = this._register(vscode.window.createStatusBarItem({ - id: 'status.typescript', - name: localize('projectInfo.name', "TypeScript: Project Info"), - alignment: vscode.StatusBarAlignment.Right, - priority: 99 /* to the right of editor status (100) */ - })); + this._statusBarEntry = this._register(vscode.window.createStatusBarItem('status.typescript', vscode.StatusBarAlignment.Right, 99 /* to the right of editor status (100) */)); + this._statusBarEntry.name = localize('projectInfo.name', "TypeScript: Project Info"); const command = new ProjectStatusCommand(this._client, () => this._state); commandManager.register(command); diff --git a/lib/vscode/extensions/typescript-language-features/src/typeScriptServiceClientHost.ts b/extensions/typescript-language-features/src/typeScriptServiceClientHost.ts similarity index 99% rename from lib/vscode/extensions/typescript-language-features/src/typeScriptServiceClientHost.ts rename to extensions/typescript-language-features/src/typeScriptServiceClientHost.ts index db53b5cf4d34..4f417c27fbfe 100644 --- a/lib/vscode/extensions/typescript-language-features/src/typeScriptServiceClientHost.ts +++ b/extensions/typescript-language-features/src/typeScriptServiceClientHost.ts @@ -30,6 +30,7 @@ import * as typeConverters from './utils/typeConverters'; import TypingsStatus, { AtaProgressReporter } from './utils/typingsStatus'; import * as ProjectStatus from './utils/largeProjectStatus'; import { ActiveJsTsEditorTracker } from './utils/activeJsTsEditorTracker'; +import { LogLevelMonitor } from './utils/logLevelMonitor'; // Style check diagnostics that can be reported as warnings const styleCheckDiagnostics = new Set([ @@ -147,6 +148,7 @@ export default class TypeScriptServiceClientHost extends Disposable { vscode.workspace.onDidChangeConfiguration(this.configurationChanged, this, this._disposables); this.configurationChanged(); + this._register(new LogLevelMonitor(context)); } private registerExtensionLanguageProvider(description: LanguageDescription, onCompletionAccepted: (item: vscode.CompletionItem) => void) { diff --git a/lib/vscode/extensions/typescript-language-features/src/typescriptService.ts b/extensions/typescript-language-features/src/typescriptService.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/typescriptService.ts rename to extensions/typescript-language-features/src/typescriptService.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/typescriptServiceClient.ts b/extensions/typescript-language-features/src/typescriptServiceClient.ts similarity index 96% rename from lib/vscode/extensions/typescript-language-features/src/typescriptServiceClient.ts rename to extensions/typescript-language-features/src/typescriptServiceClient.ts index 2bdf9d855b7a..4990b4ce1c73 100644 --- a/lib/vscode/extensions/typescript-language-features/src/typescriptServiceClient.ts +++ b/extensions/typescript-language-features/src/typescriptServiceClient.ts @@ -19,7 +19,7 @@ import { TypeScriptVersionManager } from './tsServer/versionManager'; import { ITypeScriptVersionProvider, TypeScriptVersion } from './tsServer/versionProvider'; import { ClientCapabilities, ClientCapability, ExecConfig, ITypeScriptServiceClient, ServerResponse, TypeScriptRequests } from './typescriptService'; import API from './utils/api'; -import { TsServerLogLevel, TypeScriptServiceConfiguration } from './utils/configuration'; +import { SeparateSyntaxServerConfiguration, TsServerLogLevel, TypeScriptServiceConfiguration } from './utils/configuration'; import { Disposable } from './utils/dispose'; import * as fileSchemes from './utils/fileSchemes'; import { Logger } from './utils/logger'; @@ -224,6 +224,12 @@ export default class TypeScriptServiceClient extends Disposable implements IType } public get capabilities() { + if (this._configuration.separateSyntaxServer === SeparateSyntaxServerConfiguration.ForAllRequests) { + return new ClientCapabilities( + ClientCapability.Syntax, + ClientCapability.EnhancedSyntax); + } + if (isWeb()) { return new ClientCapabilities( ClientCapability.Syntax, @@ -676,6 +682,10 @@ export default class TypeScriptServiceClient extends Disposable implements IType } public hasCapabilityForResource(resource: vscode.Uri, capability: ClientCapability): boolean { + if (!this.capabilities.has(capability)) { + return false; + } + switch (capability) { case ClientCapability.Semantic: { @@ -727,7 +737,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType } public execute(command: keyof TypeScriptRequests, args: any, token: vscode.CancellationToken, config?: ExecConfig): Promise> { - let execution: Promise>; + let executions: Array> | undefined>; if (config?.cancelOnResourceChange) { const runningServerState = this.service(); @@ -741,17 +751,18 @@ export default class TypeScriptServiceClient extends Disposable implements IType }; runningServerState.toCancelOnResourceChange.add(inFlight); - execution = this.executeImpl(command, args, { + executions = this.executeImpl(command, args, { isAsync: false, token: source.token, expectsResult: true, ...config, - }).finally(() => { + }); + executions[0]!.finally(() => { runningServerState.toCancelOnResourceChange.delete(inFlight); source.dispose(); }); } else { - execution = this.executeImpl(command, args, { + executions = this.executeImpl(command, args, { isAsync: false, token, expectsResult: true, @@ -760,25 +771,25 @@ export default class TypeScriptServiceClient extends Disposable implements IType } if (config?.nonRecoverable) { - execution.catch(err => this.fatalError(command, err)); + executions[0]!.catch(err => this.fatalError(command, err)); } - return execution; + if (command === 'updateOpen') { + // If update open has completed, consider that the project has loaded + Promise.all(executions).then(() => { + this.loadingIndicator.reset(); + }); + } + + return executions[0]!; } public executeWithoutWaitingForResponse(command: keyof TypeScriptRequests, args: any): void { - const promise = this.executeImpl(command, args, { + this.executeImpl(command, args, { isAsync: false, token: undefined, - expectsResult: command === 'updateOpen' + expectsResult: false }); - - if (command === 'updateOpen') { - // If update open has completed, consider that the project has loaded - promise.then(() => { - this.loadingIndicator.reset(); - }); - } } public executeAsync(command: keyof TypeScriptRequests, args: Proto.GeterrRequestArgs, token: vscode.CancellationToken): Promise> { @@ -786,12 +797,10 @@ export default class TypeScriptServiceClient extends Disposable implements IType isAsync: true, token, expectsResult: true - }); + })[0]!; } - private executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: false, lowPriority?: boolean, requireSemantic?: boolean }): undefined; - private executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, requireSemantic?: boolean }): Promise>; - private executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, requireSemantic?: boolean }): Promise> | undefined { + private executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, requireSemantic?: boolean }): Array> | undefined> { this.bufferSyncSupport.beforeCommand(command); const runningServerState = this.service(); return runningServerState.server.executeImpl(command, args, executeInfo); @@ -812,7 +821,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType } */ this.logTelemetry('fatalError', { ...(error instanceof TypeScriptServerError ? error.telemetry : { command }) }); - console.error(`A non-recoverable error occured while executing tsserver command: ${command}`); + console.error(`A non-recoverable error occurred while executing tsserver command: ${command}`); if (error instanceof TypeScriptServerError && error.serverErrorText) { console.error(error.serverErrorText); } @@ -1056,4 +1065,3 @@ class ServerInitializingIndicator extends Disposable { } } } - diff --git a/lib/vscode/extensions/typescript-language-features/src/typings/ref.d.ts b/extensions/typescript-language-features/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/typings/ref.d.ts rename to extensions/typescript-language-features/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/activeJsTsEditorTracker.ts b/extensions/typescript-language-features/src/utils/activeJsTsEditorTracker.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/activeJsTsEditorTracker.ts rename to extensions/typescript-language-features/src/utils/activeJsTsEditorTracker.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/api.ts b/extensions/typescript-language-features/src/utils/api.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/api.ts rename to extensions/typescript-language-features/src/utils/api.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/arrays.ts b/extensions/typescript-language-features/src/utils/arrays.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/arrays.ts rename to extensions/typescript-language-features/src/utils/arrays.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/async.ts b/extensions/typescript-language-features/src/utils/async.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/async.ts rename to extensions/typescript-language-features/src/utils/async.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/cancellation.ts b/extensions/typescript-language-features/src/utils/cancellation.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/cancellation.ts rename to extensions/typescript-language-features/src/utils/cancellation.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/codeAction.ts b/extensions/typescript-language-features/src/utils/codeAction.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/codeAction.ts rename to extensions/typescript-language-features/src/utils/codeAction.ts diff --git a/extensions/typescript-language-features/src/utils/configuration.ts b/extensions/typescript-language-features/src/utils/configuration.ts new file mode 100644 index 000000000000..92d5122bbcd6 --- /dev/null +++ b/extensions/typescript-language-features/src/utils/configuration.ts @@ -0,0 +1,224 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as os from 'os'; +import * as path from 'path'; +import * as vscode from 'vscode'; +import * as objects from '../utils/objects'; + +export enum TsServerLogLevel { + Off, + Normal, + Terse, + Verbose, +} + +export namespace TsServerLogLevel { + export function fromString(value: string): TsServerLogLevel { + switch (value && value.toLowerCase()) { + case 'normal': + return TsServerLogLevel.Normal; + case 'terse': + return TsServerLogLevel.Terse; + case 'verbose': + return TsServerLogLevel.Verbose; + case 'off': + default: + return TsServerLogLevel.Off; + } + } + + export function toString(value: TsServerLogLevel): string { + switch (value) { + case TsServerLogLevel.Normal: + return 'normal'; + case TsServerLogLevel.Terse: + return 'terse'; + case TsServerLogLevel.Verbose: + return 'verbose'; + case TsServerLogLevel.Off: + default: + return 'off'; + } + } +} + +export const enum SeparateSyntaxServerConfiguration { + Disabled, + Enabled, + /** Use a single syntax server for every request, even on desktop */ + ForAllRequests, +} + +export class ImplicitProjectConfiguration { + + public readonly checkJs: boolean; + public readonly experimentalDecorators: boolean; + public readonly strictNullChecks: boolean; + public readonly strictFunctionTypes: boolean; + + constructor(configuration: vscode.WorkspaceConfiguration) { + this.checkJs = ImplicitProjectConfiguration.readCheckJs(configuration); + this.experimentalDecorators = ImplicitProjectConfiguration.readExperimentalDecorators(configuration); + this.strictNullChecks = ImplicitProjectConfiguration.readImplicitStrictNullChecks(configuration); + this.strictFunctionTypes = ImplicitProjectConfiguration.readImplicitStrictFunctionTypes(configuration); + } + + public isEqualTo(other: ImplicitProjectConfiguration): boolean { + return objects.equals(this, other); + } + + private static readCheckJs(configuration: vscode.WorkspaceConfiguration): boolean { + return configuration.get('js/ts.implicitProjectConfig.checkJs') + ?? configuration.get('javascript.implicitProjectConfig.checkJs', false); + } + + private static readExperimentalDecorators(configuration: vscode.WorkspaceConfiguration): boolean { + return configuration.get('js/ts.implicitProjectConfig.experimentalDecorators') + ?? configuration.get('javascript.implicitProjectConfig.experimentalDecorators', false); + } + + private static readImplicitStrictNullChecks(configuration: vscode.WorkspaceConfiguration): boolean { + return configuration.get('js/ts.implicitProjectConfig.strictNullChecks', false); + } + + private static readImplicitStrictFunctionTypes(configuration: vscode.WorkspaceConfiguration): boolean { + return configuration.get('js/ts.implicitProjectConfig.strictFunctionTypes', true); + } +} + +export class TypeScriptServiceConfiguration { + public readonly locale: string | null; + public readonly globalTsdk: string | null; + public readonly localTsdk: string | null; + public readonly npmLocation: string | null; + public readonly tsServerLogLevel: TsServerLogLevel = TsServerLogLevel.Off; + public readonly tsServerPluginPaths: readonly string[]; + public readonly implictProjectConfiguration: ImplicitProjectConfiguration; + public readonly disableAutomaticTypeAcquisition: boolean; + public readonly separateSyntaxServer: SeparateSyntaxServerConfiguration; + public readonly enableProjectDiagnostics: boolean; + public readonly maxTsServerMemory: number; + public readonly enablePromptUseWorkspaceTsdk: boolean; + public readonly watchOptions: protocol.WatchOptions | undefined; + public readonly includePackageJsonAutoImports: 'auto' | 'on' | 'off' | undefined; + public readonly enableTsServerTracing: boolean; + + public static loadFromWorkspace(): TypeScriptServiceConfiguration { + return new TypeScriptServiceConfiguration(); + } + + private constructor() { + const configuration = vscode.workspace.getConfiguration(); + + this.locale = TypeScriptServiceConfiguration.extractLocale(configuration); + this.globalTsdk = TypeScriptServiceConfiguration.extractGlobalTsdk(configuration); + this.localTsdk = TypeScriptServiceConfiguration.extractLocalTsdk(configuration); + this.npmLocation = TypeScriptServiceConfiguration.readNpmLocation(configuration); + this.tsServerLogLevel = TypeScriptServiceConfiguration.readTsServerLogLevel(configuration); + this.tsServerPluginPaths = TypeScriptServiceConfiguration.readTsServerPluginPaths(configuration); + this.implictProjectConfiguration = new ImplicitProjectConfiguration(configuration); + this.disableAutomaticTypeAcquisition = TypeScriptServiceConfiguration.readDisableAutomaticTypeAcquisition(configuration); + this.separateSyntaxServer = TypeScriptServiceConfiguration.readUseSeparateSyntaxServer(configuration); + this.enableProjectDiagnostics = TypeScriptServiceConfiguration.readEnableProjectDiagnostics(configuration); + this.maxTsServerMemory = TypeScriptServiceConfiguration.readMaxTsServerMemory(configuration); + this.enablePromptUseWorkspaceTsdk = TypeScriptServiceConfiguration.readEnablePromptUseWorkspaceTsdk(configuration); + this.watchOptions = TypeScriptServiceConfiguration.readWatchOptions(configuration); + this.includePackageJsonAutoImports = TypeScriptServiceConfiguration.readIncludePackageJsonAutoImports(configuration); + this.enableTsServerTracing = TypeScriptServiceConfiguration.readEnableTsServerTracing(configuration); + } + + public isEqualTo(other: TypeScriptServiceConfiguration): boolean { + return objects.equals(this, other); + } + + private static fixPathPrefixes(inspectValue: string): string { + const pathPrefixes = ['~' + path.sep]; + for (const pathPrefix of pathPrefixes) { + if (inspectValue.startsWith(pathPrefix)) { + return path.join(os.homedir(), inspectValue.slice(pathPrefix.length)); + } + } + return inspectValue; + } + + private static extractGlobalTsdk(configuration: vscode.WorkspaceConfiguration): string | null { + const inspect = configuration.inspect('typescript.tsdk'); + if (inspect && typeof inspect.globalValue === 'string') { + return this.fixPathPrefixes(inspect.globalValue); + } + return null; + } + + private static extractLocalTsdk(configuration: vscode.WorkspaceConfiguration): string | null { + const inspect = configuration.inspect('typescript.tsdk'); + if (inspect && typeof inspect.workspaceValue === 'string') { + return this.fixPathPrefixes(inspect.workspaceValue); + } + return null; + } + + private static readTsServerLogLevel(configuration: vscode.WorkspaceConfiguration): TsServerLogLevel { + const setting = configuration.get('typescript.tsserver.log', 'off'); + return TsServerLogLevel.fromString(setting); + } + + private static readTsServerPluginPaths(configuration: vscode.WorkspaceConfiguration): string[] { + return configuration.get('typescript.tsserver.pluginPaths', []); + } + + private static readNpmLocation(configuration: vscode.WorkspaceConfiguration): string | null { + return configuration.get('typescript.npm', null); + } + + private static readDisableAutomaticTypeAcquisition(configuration: vscode.WorkspaceConfiguration): boolean { + return configuration.get('typescript.disableAutomaticTypeAcquisition', false); + } + + private static extractLocale(configuration: vscode.WorkspaceConfiguration): string | null { + return configuration.get('typescript.locale', null); + } + + private static readUseSeparateSyntaxServer(configuration: vscode.WorkspaceConfiguration): SeparateSyntaxServerConfiguration { + const value = configuration.get('typescript.tsserver.useSeparateSyntaxServer', true); + if (value === 'forAllRequests') { + return SeparateSyntaxServerConfiguration.ForAllRequests; + } + if (value === true) { + return SeparateSyntaxServerConfiguration.Enabled; + } + return SeparateSyntaxServerConfiguration.Disabled; + } + + private static readEnableProjectDiagnostics(configuration: vscode.WorkspaceConfiguration): boolean { + return configuration.get('typescript.tsserver.experimental.enableProjectDiagnostics', false); + } + + private static readWatchOptions(configuration: vscode.WorkspaceConfiguration): protocol.WatchOptions | undefined { + return configuration.get('typescript.tsserver.watchOptions'); + } + + private static readIncludePackageJsonAutoImports(configuration: vscode.WorkspaceConfiguration): 'auto' | 'on' | 'off' | undefined { + return configuration.get<'auto' | 'on' | 'off'>('typescript.preferences.includePackageJsonAutoImports'); + } + + private static readMaxTsServerMemory(configuration: vscode.WorkspaceConfiguration): number { + const defaultMaxMemory = 3072; + const minimumMaxMemory = 128; + const memoryInMB = configuration.get('typescript.tsserver.maxTsServerMemory', defaultMaxMemory); + if (!Number.isSafeInteger(memoryInMB)) { + return defaultMaxMemory; + } + return Math.max(memoryInMB, minimumMaxMemory); + } + + private static readEnablePromptUseWorkspaceTsdk(configuration: vscode.WorkspaceConfiguration): boolean { + return configuration.get('typescript.enablePromptUseWorkspaceTsdk', false); + } + + private static readEnableTsServerTracing(configuration: vscode.WorkspaceConfiguration): boolean { + return configuration.get('typescript.tsserver.enableTracing', false); + } +} diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/dependentRegistration.ts b/extensions/typescript-language-features/src/utils/dependentRegistration.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/dependentRegistration.ts rename to extensions/typescript-language-features/src/utils/dependentRegistration.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/dispose.ts b/extensions/typescript-language-features/src/utils/dispose.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/dispose.ts rename to extensions/typescript-language-features/src/utils/dispose.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/documentSelector.ts b/extensions/typescript-language-features/src/utils/documentSelector.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/documentSelector.ts rename to extensions/typescript-language-features/src/utils/documentSelector.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/errorCodes.ts b/extensions/typescript-language-features/src/utils/errorCodes.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/errorCodes.ts rename to extensions/typescript-language-features/src/utils/errorCodes.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/fileSchemes.ts b/extensions/typescript-language-features/src/utils/fileSchemes.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/fileSchemes.ts rename to extensions/typescript-language-features/src/utils/fileSchemes.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/fileSystem.electron.ts b/extensions/typescript-language-features/src/utils/fileSystem.electron.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/fileSystem.electron.ts rename to extensions/typescript-language-features/src/utils/fileSystem.electron.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/fixNames.ts b/extensions/typescript-language-features/src/utils/fixNames.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/fixNames.ts rename to extensions/typescript-language-features/src/utils/fixNames.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/fs.ts b/extensions/typescript-language-features/src/utils/fs.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/fs.ts rename to extensions/typescript-language-features/src/utils/fs.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/languageDescription.ts b/extensions/typescript-language-features/src/utils/languageDescription.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/languageDescription.ts rename to extensions/typescript-language-features/src/utils/languageDescription.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/languageModeIds.ts b/extensions/typescript-language-features/src/utils/languageModeIds.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/languageModeIds.ts rename to extensions/typescript-language-features/src/utils/languageModeIds.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/largeProjectStatus.ts b/extensions/typescript-language-features/src/utils/largeProjectStatus.ts similarity index 93% rename from lib/vscode/extensions/typescript-language-features/src/utils/largeProjectStatus.ts rename to extensions/typescript-language-features/src/utils/largeProjectStatus.ts index 223d7cb47167..346f95c69796 100644 --- a/lib/vscode/extensions/typescript-language-features/src/utils/largeProjectStatus.ts +++ b/extensions/typescript-language-features/src/utils/largeProjectStatus.ts @@ -23,12 +23,8 @@ class ExcludeHintItem { constructor( private readonly telemetryReporter: TelemetryReporter ) { - this._item = vscode.window.createStatusBarItem({ - id: 'status.typescript.exclude', - name: localize('statusExclude', "TypeScript: Configure Excludes"), - alignment: vscode.StatusBarAlignment.Right, - priority: 98 /* to the right of typescript version status (99) */ - }); + this._item = vscode.window.createStatusBarItem('status.typescript.exclude', vscode.StatusBarAlignment.Right, 98 /* to the right of typescript version status (99) */); + this._item.name = localize('statusExclude', "TypeScript: Configure Excludes"); this._item.command = 'js.projectStatus.command'; } diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/lazy.ts b/extensions/typescript-language-features/src/utils/lazy.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/lazy.ts rename to extensions/typescript-language-features/src/utils/lazy.ts diff --git a/extensions/typescript-language-features/src/utils/logLevelMonitor.ts b/extensions/typescript-language-features/src/utils/logLevelMonitor.ts new file mode 100644 index 000000000000..7a3c752194ea --- /dev/null +++ b/extensions/typescript-language-features/src/utils/logLevelMonitor.ts @@ -0,0 +1,106 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { Disposable } from './dispose'; +import { localize } from '../tsServer/versionProvider'; +import { TsServerLogLevel } from './configuration'; + +export class LogLevelMonitor extends Disposable { + + private static readonly logLevelConfigKey = 'typescript.tsserver.log'; + private static readonly logLevelChangedStorageKey = 'typescript.tsserver.logLevelChanged'; + private static readonly doNotPromptLogLevelStorageKey = 'typescript.tsserver.doNotPromptLogLevel'; + + constructor(private readonly context: vscode.ExtensionContext) { + super(); + + this._register(vscode.workspace.onDidChangeConfiguration(this.onConfigurationChange, this, this._disposables)); + + if (this.shouldNotifyExtendedLogging()) { + this.notifyExtendedLogging(); + } + } + + private onConfigurationChange(event: vscode.ConfigurationChangeEvent) { + const logLevelChanged = event.affectsConfiguration(LogLevelMonitor.logLevelConfigKey); + if (!logLevelChanged) { + return; + } + this.context.globalState.update(LogLevelMonitor.logLevelChangedStorageKey, new Date()); + } + + private get logLevel(): TsServerLogLevel { + return TsServerLogLevel.fromString(vscode.workspace.getConfiguration().get(LogLevelMonitor.logLevelConfigKey, 'off')); + } + + /** + * Last date change if it exists and can be parsed as a date, + * otherwise undefined. + */ + private get lastLogLevelChange(): Date | undefined { + const lastChange = this.context.globalState.get(LogLevelMonitor.logLevelChangedStorageKey); + + if (lastChange) { + const date = new Date(lastChange); + if (date instanceof Date && !isNaN(date.valueOf())) { + return date; + } + } + return undefined; + } + + private get doNotPrompt(): boolean { + return this.context.globalState.get(LogLevelMonitor.doNotPromptLogLevelStorageKey) || false; + } + + private shouldNotifyExtendedLogging(): boolean { + const lastChangeMilliseconds = this.lastLogLevelChange ? new Date(this.lastLogLevelChange).valueOf() : 0; + const lastChangePlusOneWeek = new Date(lastChangeMilliseconds + /* 7 days in milliseconds */ 86400000 * 7); + + if (!this.doNotPrompt && this.logLevel !== TsServerLogLevel.Off && lastChangePlusOneWeek.valueOf() < Date.now()) { + return true; + } + return false; + } + + private notifyExtendedLogging() { + const enum Choice { + DisableLogging = 0, + DoNotShowAgain = 1 + } + interface Item extends vscode.MessageItem { + readonly choice: Choice; + } + + vscode.window.showInformationMessage( + localize( + 'typescript.extendedLogging.isEnabled', + "TS Server logging is currently enabled which may impact performance."), + { + title: localize( + 'typescript.extendedLogging.disableLogging', + "Disable logging"), + choice: Choice.DisableLogging + }, + { + title: localize( + 'typescript.extendedLogging.doNotShowAgain', + "Don't show again"), + choice: Choice.DoNotShowAgain + }) + .then(selection => { + if (!selection) { + return; + } + if (selection.choice === Choice.DisableLogging) { + return vscode.workspace.getConfiguration().update(LogLevelMonitor.logLevelConfigKey, 'off', true); + } else if (selection.choice === Choice.DoNotShowAgain) { + return this.context.globalState.update(LogLevelMonitor.doNotPromptLogLevelStorageKey, true); + } + return; + }); + } +} diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/logger.ts b/extensions/typescript-language-features/src/utils/logger.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/logger.ts rename to extensions/typescript-language-features/src/utils/logger.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/managedFileContext.ts b/extensions/typescript-language-features/src/utils/managedFileContext.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/managedFileContext.ts rename to extensions/typescript-language-features/src/utils/managedFileContext.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/memoize.ts b/extensions/typescript-language-features/src/utils/memoize.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/memoize.ts rename to extensions/typescript-language-features/src/utils/memoize.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/modifiers.ts b/extensions/typescript-language-features/src/utils/modifiers.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/modifiers.ts rename to extensions/typescript-language-features/src/utils/modifiers.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/objects.ts b/extensions/typescript-language-features/src/utils/objects.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/objects.ts rename to extensions/typescript-language-features/src/utils/objects.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/platform.ts b/extensions/typescript-language-features/src/utils/platform.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/platform.ts rename to extensions/typescript-language-features/src/utils/platform.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/pluginPathsProvider.ts b/extensions/typescript-language-features/src/utils/pluginPathsProvider.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/pluginPathsProvider.ts rename to extensions/typescript-language-features/src/utils/pluginPathsProvider.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/plugins.ts b/extensions/typescript-language-features/src/utils/plugins.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/plugins.ts rename to extensions/typescript-language-features/src/utils/plugins.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/previewer.ts b/extensions/typescript-language-features/src/utils/previewer.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/previewer.ts rename to extensions/typescript-language-features/src/utils/previewer.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/regexp.ts b/extensions/typescript-language-features/src/utils/regexp.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/regexp.ts rename to extensions/typescript-language-features/src/utils/regexp.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/relativePathResolver.ts b/extensions/typescript-language-features/src/utils/relativePathResolver.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/relativePathResolver.ts rename to extensions/typescript-language-features/src/utils/relativePathResolver.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/resourceMap.ts b/extensions/typescript-language-features/src/utils/resourceMap.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/resourceMap.ts rename to extensions/typescript-language-features/src/utils/resourceMap.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/snippetForFunctionCall.ts b/extensions/typescript-language-features/src/utils/snippetForFunctionCall.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/snippetForFunctionCall.ts rename to extensions/typescript-language-features/src/utils/snippetForFunctionCall.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/telemetry.ts b/extensions/typescript-language-features/src/utils/telemetry.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/telemetry.ts rename to extensions/typescript-language-features/src/utils/telemetry.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/temp.electron.ts b/extensions/typescript-language-features/src/utils/temp.electron.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/temp.electron.ts rename to extensions/typescript-language-features/src/utils/temp.electron.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/tracer.ts b/extensions/typescript-language-features/src/utils/tracer.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/tracer.ts rename to extensions/typescript-language-features/src/utils/tracer.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/tsconfig.ts b/extensions/typescript-language-features/src/utils/tsconfig.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/tsconfig.ts rename to extensions/typescript-language-features/src/utils/tsconfig.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/typeConverters.ts b/extensions/typescript-language-features/src/utils/typeConverters.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/typeConverters.ts rename to extensions/typescript-language-features/src/utils/typeConverters.ts diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/typingsStatus.ts b/extensions/typescript-language-features/src/utils/typingsStatus.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/src/utils/typingsStatus.ts rename to extensions/typescript-language-features/src/utils/typingsStatus.ts diff --git a/lib/vscode/extensions/typescript-language-features/test-workspace/bar.ts b/extensions/typescript-language-features/test-workspace/bar.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/test-workspace/bar.ts rename to extensions/typescript-language-features/test-workspace/bar.ts diff --git a/lib/vscode/extensions/typescript-language-features/test-workspace/foo.ts b/extensions/typescript-language-features/test-workspace/foo.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/test-workspace/foo.ts rename to extensions/typescript-language-features/test-workspace/foo.ts diff --git a/lib/vscode/extensions/typescript-language-features/test-workspace/foojs.js b/extensions/typescript-language-features/test-workspace/foojs.js similarity index 100% rename from lib/vscode/extensions/typescript-language-features/test-workspace/foojs.js rename to extensions/typescript-language-features/test-workspace/foojs.js diff --git a/lib/vscode/extensions/typescript-language-features/test-workspace/index.ts b/extensions/typescript-language-features/test-workspace/index.ts similarity index 100% rename from lib/vscode/extensions/typescript-language-features/test-workspace/index.ts rename to extensions/typescript-language-features/test-workspace/index.ts diff --git a/lib/vscode/extensions/typescript-language-features/test-workspace/tsconfig.json b/extensions/typescript-language-features/test-workspace/tsconfig.json similarity index 100% rename from lib/vscode/extensions/typescript-language-features/test-workspace/tsconfig.json rename to extensions/typescript-language-features/test-workspace/tsconfig.json diff --git a/lib/vscode/extensions/typescript-language-features/tsconfig.json b/extensions/typescript-language-features/tsconfig.json similarity index 100% rename from lib/vscode/extensions/typescript-language-features/tsconfig.json rename to extensions/typescript-language-features/tsconfig.json diff --git a/extensions/typescript-language-features/yarn.lock b/extensions/typescript-language-features/yarn.lock new file mode 100644 index 000000000000..a94f34e248ee --- /dev/null +++ b/extensions/typescript-language-features/yarn.lock @@ -0,0 +1,116 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +"@types/semver@^5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" + integrity sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ== + +applicationinsights@1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" + integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== + dependencies: + cls-hooked "^4.2.2" + continuation-local-storage "^3.2.1" + diagnostic-channel "0.2.0" + diagnostic-channel-publishers "^0.3.3" + +async-hook-jl@^1.7.6: + version "1.7.6" + resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" + integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== + dependencies: + stack-chain "^1.3.7" + +async-listener@^0.6.0: + version "0.6.10" + resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" + integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== + dependencies: + semver "^5.3.0" + shimmer "^1.1.0" + +cls-hooked@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" + integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== + dependencies: + async-hook-jl "^1.7.6" + emitter-listener "^1.0.1" + semver "^5.4.1" + +continuation-local-storage@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" + integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== + dependencies: + async-listener "^0.6.0" + emitter-listener "^1.1.1" + +diagnostic-channel-publishers@^0.3.3: + version "0.3.5" + resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" + integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== + +diagnostic-channel@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" + integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= + dependencies: + semver "^5.3.0" + +emitter-listener@^1.0.1, emitter-listener@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" + integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== + dependencies: + shimmer "^1.2.0" + +jsonc-parser@^2.2.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.3.1.tgz#59549150b133f2efacca48fe9ce1ec0659af2342" + integrity sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg== + +semver@5.5.1: + version "5.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" + integrity sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw== + +semver@^5.3.0, semver@^5.4.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +shimmer@^1.1.0, shimmer@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + +stack-chain@^1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" + integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= + +typescript-vscode-sh-plugin@^0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/typescript-vscode-sh-plugin/-/typescript-vscode-sh-plugin-0.7.3.tgz#acdc223e5baf2cd43b8e9cf21775fba162b05029" + integrity sha512-IAjOX1fE35G6DiNCJv6oq7JmYkPV7KI/g1SGX6i8Cgauv7hsXbS94fboSZNM2Dai+m3xNGARHG5V6Ka7YcZRgQ== + +vscode-extension-telemetry@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" + integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== + dependencies: + applicationinsights "1.7.4" + +vscode-nls@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" + integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== diff --git a/lib/vscode/extensions/vb/.vscodeignore b/extensions/vb/.vscodeignore similarity index 100% rename from lib/vscode/extensions/vb/.vscodeignore rename to extensions/vb/.vscodeignore diff --git a/lib/vscode/extensions/vb/cgmanifest.json b/extensions/vb/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/vb/cgmanifest.json rename to extensions/vb/cgmanifest.json diff --git a/lib/vscode/extensions/vb/language-configuration.json b/extensions/vb/language-configuration.json similarity index 100% rename from lib/vscode/extensions/vb/language-configuration.json rename to extensions/vb/language-configuration.json diff --git a/lib/vscode/extensions/vb/package.json b/extensions/vb/package.json similarity index 100% rename from lib/vscode/extensions/vb/package.json rename to extensions/vb/package.json diff --git a/lib/vscode/extensions/vb/package.nls.json b/extensions/vb/package.nls.json similarity index 100% rename from lib/vscode/extensions/vb/package.nls.json rename to extensions/vb/package.nls.json diff --git a/lib/vscode/extensions/vb/snippets/vb.code-snippets b/extensions/vb/snippets/vb.code-snippets similarity index 100% rename from lib/vscode/extensions/vb/snippets/vb.code-snippets rename to extensions/vb/snippets/vb.code-snippets diff --git a/lib/vscode/extensions/vb/syntaxes/asp-vb-net.tmlanguage.json b/extensions/vb/syntaxes/asp-vb-net.tmlanguage.json similarity index 100% rename from lib/vscode/extensions/vb/syntaxes/asp-vb-net.tmlanguage.json rename to extensions/vb/syntaxes/asp-vb-net.tmlanguage.json diff --git a/lib/vscode/extensions/vb/yarn.lock b/extensions/vb/yarn.lock similarity index 100% rename from lib/vscode/extensions/vb/yarn.lock rename to extensions/vb/yarn.lock diff --git a/lib/vscode/extensions/vscode-api-tests/.gitignore b/extensions/vscode-api-tests/.gitignore similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/.gitignore rename to extensions/vscode-api-tests/.gitignore diff --git a/lib/vscode/extensions/vscode-api-tests/.vscode/launch.json b/extensions/vscode-api-tests/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/.vscode/launch.json rename to extensions/vscode-api-tests/.vscode/launch.json diff --git a/lib/vscode/extensions/vscode-api-tests/.vscode/tasks.json b/extensions/vscode-api-tests/.vscode/tasks.json similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/.vscode/tasks.json rename to extensions/vscode-api-tests/.vscode/tasks.json diff --git a/lib/vscode/extensions/vscode-api-tests/.vscodeignore b/extensions/vscode-api-tests/.vscodeignore similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/.vscodeignore rename to extensions/vscode-api-tests/.vscodeignore diff --git a/lib/vscode/extensions/vscode-api-tests/media/icon.png b/extensions/vscode-api-tests/media/icon.png similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/media/icon.png rename to extensions/vscode-api-tests/media/icon.png diff --git a/extensions/vscode-api-tests/package.json b/extensions/vscode-api-tests/package.json new file mode 100644 index 000000000000..dcdd8b608a95 --- /dev/null +++ b/extensions/vscode-api-tests/package.json @@ -0,0 +1,163 @@ +{ + "name": "vscode-api-tests", + "description": "API tests for VS Code", + "version": "0.0.1", + "publisher": "vscode", + "license": "MIT", + "enableProposedApi": true, + "private": true, + "activationEvents": [], + "main": "./out/extension", + "engines": { + "vscode": "^1.55.0" + }, + "icon": "media/icon.png", + "contributes": { + "configuration": { + "type": "object", + "title": "Test Config", + "properties": { + "farboo.config0": { + "type": "boolean", + "default": true + }, + "farboo.nested.config1": { + "type": "number", + "default": 42 + }, + "farboo.nested.config2": { + "type": "string", + "default": "Das Pferd frisst kein Reis." + }, + "farboo.config4": { + "type": "string" + }, + "farboo.get": { + "type": "string", + "default": "get-prop" + } + } + }, + "views": { + "remote": [ + { + "id": "test.treeId", + "name": "test-tree", + "when": "never" + } + ] + }, + "configurationDefaults": { + "[abcLang]": { + "editor.lineNumbers": "off", + "editor.tabSize": 2 + } + }, + "taskDefinitions": [ + { + "type": "custombuildscript", + "required": [ + "flavor" + ], + "properties": { + "flavor": { + "type": "string", + "description": "The build flavor. Should be either '32' or '64'." + }, + "flags": { + "type": "array", + "description": "Additional build flags." + } + } + } + ], + "breakpoints": [ + { + "language": "markdown" + } + ], + "debuggers": [ + { + "type": "mock", + "label": "Mock Debug", + "languages": [ + "markdown" + ], + "configurationAttributes": { + "launch": { + "required": [ + "program" + ], + "properties": { + "program": { + "type": "string", + "description": "Absolute path to a text file.", + "default": "${workspaceFolder}/file.md" + }, + "stopOnEntry": { + "type": "boolean", + "description": "Automatically stop after launch.", + "default": true + }, + "trace": { + "type": "boolean", + "description": "Enable logging of the Debug Adapter Protocol.", + "default": true + } + } + } + }, + "initialConfigurations": [ + { + "type": "mock", + "request": "launch", + "name": "Debug file.md", + "program": "${workspaceFolder}/file.md" + } + ] + } + ], + "notebooks": [ + { + "type": "notebookCoreTest", + "displayName": "Notebook Core Test", + "selector": [ + { + "filenamePattern": "*.vsctestnb", + "excludeFileNamePattern": "" + } + ] + }, + { + "type": "notebook.nbdtest", + "displayName": "notebook.nbdtest", + "selector": [ + { + "filenamePattern": "**/*.nbdtest" + } + ] + }, + { + "type": "notebook.nbdserializer", + "displayName": "notebook.nbdserializer", + "selector": [ + { + "filenamePattern": "**/*.nbdserializer" + } + ] + } + ] + }, + "scripts": { + "compile": "node ./node_modules/vscode/bin/compile -watch -p ./", + "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-api-tests ./tsconfig.json" + }, + "devDependencies": { + "@types/mocha": "^8.2.0", + "@types/node": "14.x" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/vscode-api-tests/src/extension.ts b/extensions/vscode-api-tests/src/extension.ts similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/src/extension.ts rename to extensions/vscode-api-tests/src/extension.ts diff --git a/lib/vscode/extensions/vscode-api-tests/src/memfs.ts b/extensions/vscode-api-tests/src/memfs.ts similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/src/memfs.ts rename to extensions/vscode-api-tests/src/memfs.ts diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts similarity index 96% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts index f9f971bdbdab..7c906ba0fe45 100644 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/commands.test.ts @@ -52,8 +52,8 @@ suite('vscode API - commands', () => { await commands.executeCommand('t1', 'start'); registration.dispose(); assert.ok(args!); - assert.equal(args!.length, 1); - assert.equal(args![0], 'start'); + assert.strictEqual(args!.length, 1); + assert.strictEqual(args![0], 'start'); }); test('editorCommand with extra args', function () { @@ -68,7 +68,7 @@ suite('vscode API - commands', () => { return commands.executeCommand('t1', 12345, commands); }).then(() => { assert.ok(args); - assert.equal(args.length, 4); + assert.strictEqual(args.length, 4); assert.ok(args[2] === 12345); assert.ok(args[3] === commands); registration.dispose(); diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/configuration.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/configuration.test.ts new file mode 100644 index 000000000000..9c7fa1acff51 --- /dev/null +++ b/extensions/vscode-api-tests/src/singlefolder-tests/configuration.test.ts @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import 'mocha'; +import * as assert from 'assert'; +import * as vscode from 'vscode'; +import { assertNoRpc } from '../utils'; + +suite('vscode API - configuration', () => { + + teardown(assertNoRpc); + + test('configurations, language defaults', function () { + const defaultLanguageSettings = vscode.workspace.getConfiguration().get('[abcLang]'); + + assert.deepStrictEqual(defaultLanguageSettings, { + 'editor.lineNumbers': 'off', + 'editor.tabSize': 2 + }); + }); + + test('configuration, defaults', () => { + const config = vscode.workspace.getConfiguration('farboo'); + + assert.ok(config.has('config0')); + assert.strictEqual(config.get('config0'), true); + assert.strictEqual(config.get('config4'), ''); + assert.strictEqual(config['config0'], true); + assert.strictEqual(config['config4'], ''); + + assert.throws(() => (config)['config4'] = 'valuevalue'); + + assert.ok(config.has('nested.config1')); + assert.strictEqual(config.get('nested.config1'), 42); + assert.ok(config.has('nested.config2')); + assert.strictEqual(config.get('nested.config2'), 'Das Pferd frisst kein Reis.'); + }); + + test('configuration, name vs property', () => { + const config = vscode.workspace.getConfiguration('farboo'); + + assert.ok(config.has('get')); + assert.strictEqual(config.get('get'), 'get-prop'); + assert.deepStrictEqual(config['get'], config.get); + assert.throws(() => config['get'] = 'get-prop'); + }); +}); diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/debug.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/debug.test.ts similarity index 80% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/debug.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/debug.test.ts index 145c2ee3bce8..f79a2000cb3f 100644 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/debug.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/debug.test.ts @@ -13,7 +13,7 @@ suite('vscode API - debug', function () { teardown(assertNoRpc); test('breakpoints', async function () { - assert.equal(debug.breakpoints.length, 0); + assert.strictEqual(debug.breakpoints.length, 0); let onDidChangeBreakpointsCounter = 0; const toDispose: Disposable[] = []; @@ -22,19 +22,19 @@ suite('vscode API - debug', function () { })); debug.addBreakpoints([{ id: '1', enabled: true }, { id: '2', enabled: false, condition: '2 < 5' }]); - assert.equal(onDidChangeBreakpointsCounter, 1); - assert.equal(debug.breakpoints.length, 2); - assert.equal(debug.breakpoints[0].id, '1'); - assert.equal(debug.breakpoints[1].id, '2'); - assert.equal(debug.breakpoints[1].condition, '2 < 5'); + assert.strictEqual(onDidChangeBreakpointsCounter, 1); + assert.strictEqual(debug.breakpoints.length, 2); + assert.strictEqual(debug.breakpoints[0].id, '1'); + assert.strictEqual(debug.breakpoints[1].id, '2'); + assert.strictEqual(debug.breakpoints[1].condition, '2 < 5'); debug.removeBreakpoints([{ id: '1', enabled: true }]); - assert.equal(onDidChangeBreakpointsCounter, 2); - assert.equal(debug.breakpoints.length, 1); + assert.strictEqual(onDidChangeBreakpointsCounter, 2); + assert.strictEqual(debug.breakpoints.length, 1); debug.removeBreakpoints([{ id: '2', enabled: false }]); - assert.equal(onDidChangeBreakpointsCounter, 3); - assert.equal(debug.breakpoints.length, 0); + assert.strictEqual(onDidChangeBreakpointsCounter, 3); + assert.strictEqual(debug.breakpoints.length, 0); disposeAll(toDispose); }); @@ -79,36 +79,36 @@ suite('vscode API - debug', function () { const initializedPromise = new Promise(resolve => initializedReceived = resolve); const configurationDonePromise = new Promise(resolve => configurationDoneReceived = resolve); const success = await debug.startDebugging(workspace.workspaceFolders![0], 'Launch debug.js'); - assert.equal(success, true); + assert.strictEqual(success, true); await initializedPromise; await configurationDonePromise; await firstVariablesRetrieved; - assert.notEqual(debug.activeDebugSession, undefined); - assert.equal(stoppedEvents, 1); + assert.notStrictEqual(debug.activeDebugSession, undefined); + assert.strictEqual(stoppedEvents, 1); const secondVariablesRetrieved = new Promise(resolve => variablesReceived = resolve); await commands.executeCommand('workbench.action.debug.stepOver'); await secondVariablesRetrieved; - assert.equal(stoppedEvents, 2); + assert.strictEqual(stoppedEvents, 2); const editor = window.activeTextEditor; - assert.notEqual(editor, undefined); - assert.equal(basename(editor!.document.fileName), 'debug.js'); + assert.notStrictEqual(editor, undefined); + assert.strictEqual(basename(editor!.document.fileName), 'debug.js'); const thirdVariablesRetrieved = new Promise(resolve => variablesReceived = resolve); await commands.executeCommand('workbench.action.debug.stepOver'); await thirdVariablesRetrieved; - assert.equal(stoppedEvents, 3); + assert.strictEqual(stoppedEvents, 3); const fourthVariablesRetrieved = new Promise(resolve => variablesReceived = resolve); await commands.executeCommand('workbench.action.debug.stepInto'); await fourthVariablesRetrieved; - assert.equal(stoppedEvents, 4); + assert.strictEqual(stoppedEvents, 4); const fifthVariablesRetrieved = new Promise(resolve => variablesReceived = resolve); await commands.executeCommand('workbench.action.debug.stepOut'); await fifthVariablesRetrieved; - assert.equal(stoppedEvents, 5); + assert.strictEqual(stoppedEvents, 5); let sessionTerminated: () => void; toDispose.push(debug.onDidTerminateDebugSession(() => { @@ -127,6 +127,6 @@ suite('vscode API - debug', function () { } catch (e) { errorCount++; } - assert.equal(errorCount, 1); + assert.strictEqual(errorCount, 1); }); }); diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts new file mode 100644 index 000000000000..faf2f7d80133 --- /dev/null +++ b/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts @@ -0,0 +1,267 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; +import { workspace, window, Position, Range, commands, TextEditor, TextDocument, TextEditorCursorStyle, TextEditorLineNumbersStyle, SnippetString, Selection, Uri, env } from 'vscode'; +import { createRandomFile, deleteFile, closeAllEditors, assertNoRpc } from '../utils'; + +suite('vscode API - editors', () => { + + teardown(async function () { + assertNoRpc(); + await closeAllEditors(); + }); + + function withRandomFileEditor(initialContents: string, run: (editor: TextEditor, doc: TextDocument) => Thenable): Thenable { + return createRandomFile(initialContents).then(file => { + return workspace.openTextDocument(file).then(doc => { + return window.showTextDocument(doc).then((editor) => { + return run(editor, doc).then(_ => { + if (doc.isDirty) { + return doc.save().then(saved => { + assert.ok(saved); + assert.ok(!doc.isDirty); + return deleteFile(file); + }); + } else { + return deleteFile(file); + } + }); + }); + }); + }); + } + + test('insert snippet', () => { + const snippetString = new SnippetString() + .appendText('This is a ') + .appendTabstop() + .appendPlaceholder('placeholder') + .appendText(' snippet'); + + return withRandomFileEditor('', (editor, doc) => { + return editor.insertSnippet(snippetString).then(inserted => { + assert.ok(inserted); + assert.strictEqual(doc.getText(), 'This is a placeholder snippet'); + assert.ok(doc.isDirty); + }); + }); + }); + + test('insert snippet with clipboard variables', async function () { + const old = await env.clipboard.readText(); + + const newValue = 'INTEGRATION-TESTS'; + await env.clipboard.writeText(newValue); + + const actualValue = await env.clipboard.readText(); + + if (actualValue !== newValue) { + // clipboard not working?!? + this.skip(); + return; + } + + const snippetString = new SnippetString('running: $CLIPBOARD'); + + await withRandomFileEditor('', async (editor, doc) => { + const inserted = await editor.insertSnippet(snippetString); + assert.ok(inserted); + assert.strictEqual(doc.getText(), 'running: INTEGRATION-TESTS'); + assert.ok(doc.isDirty); + }); + + await env.clipboard.writeText(old); + }); + + test('insert snippet with replacement, editor selection', () => { + const snippetString = new SnippetString() + .appendText('has been'); + + return withRandomFileEditor('This will be replaced', (editor, doc) => { + editor.selection = new Selection( + new Position(0, 5), + new Position(0, 12) + ); + + return editor.insertSnippet(snippetString).then(inserted => { + assert.ok(inserted); + assert.strictEqual(doc.getText(), 'This has been replaced'); + assert.ok(doc.isDirty); + }); + }); + }); + + test('insert snippet with replacement, selection as argument', () => { + const snippetString = new SnippetString() + .appendText('has been'); + + return withRandomFileEditor('This will be replaced', (editor, doc) => { + const selection = new Selection( + new Position(0, 5), + new Position(0, 12) + ); + + return editor.insertSnippet(snippetString, selection).then(inserted => { + assert.ok(inserted); + assert.strictEqual(doc.getText(), 'This has been replaced'); + assert.ok(doc.isDirty); + }); + }); + }); + + test('make edit', () => { + return withRandomFileEditor('', (editor, doc) => { + return editor.edit((builder) => { + builder.insert(new Position(0, 0), 'Hello World'); + }).then(applied => { + assert.ok(applied); + assert.strictEqual(doc.getText(), 'Hello World'); + assert.ok(doc.isDirty); + }); + }); + }); + + test('issue #6281: Edits fail to validate ranges correctly before applying', () => { + return withRandomFileEditor('Hello world!', (editor, doc) => { + return editor.edit((builder) => { + builder.replace(new Range(0, 0, Number.MAX_VALUE, Number.MAX_VALUE), 'new'); + }).then(applied => { + assert.ok(applied); + assert.strictEqual(doc.getText(), 'new'); + assert.ok(doc.isDirty); + }); + }); + }); + + function executeReplace(editor: TextEditor, range: Range, text: string, undoStopBefore: boolean, undoStopAfter: boolean): Thenable { + return editor.edit((builder) => { + builder.replace(range, text); + }, { undoStopBefore: undoStopBefore, undoStopAfter: undoStopAfter }); + } + + test('TextEditor.edit can control undo/redo stack 1', () => { + return withRandomFileEditor('Hello world!', async (editor, doc) => { + const applied1 = await executeReplace(editor, new Range(0, 0, 0, 1), 'h', false, false); + assert.ok(applied1); + assert.strictEqual(doc.getText(), 'hello world!'); + assert.ok(doc.isDirty); + + const applied2 = await executeReplace(editor, new Range(0, 1, 0, 5), 'ELLO', false, false); + assert.ok(applied2); + assert.strictEqual(doc.getText(), 'hELLO world!'); + assert.ok(doc.isDirty); + + await commands.executeCommand('undo'); + if (doc.getText() === 'hello world!') { + // see https://github.com/microsoft/vscode/issues/109131 + // it looks like an undo stop was inserted in between these two edits + // it is unclear why this happens, but it can happen for a multitude of reasons + await commands.executeCommand('undo'); + } + assert.strictEqual(doc.getText(), 'Hello world!'); + }); + }); + + test('TextEditor.edit can control undo/redo stack 2', () => { + return withRandomFileEditor('Hello world!', (editor, doc) => { + return executeReplace(editor, new Range(0, 0, 0, 1), 'h', false, false).then(applied => { + assert.ok(applied); + assert.strictEqual(doc.getText(), 'hello world!'); + assert.ok(doc.isDirty); + return executeReplace(editor, new Range(0, 1, 0, 5), 'ELLO', true, false); + }).then(applied => { + assert.ok(applied); + assert.strictEqual(doc.getText(), 'hELLO world!'); + assert.ok(doc.isDirty); + return commands.executeCommand('undo'); + }).then(_ => { + assert.strictEqual(doc.getText(), 'hello world!'); + }); + }); + }); + + test('issue #16573: Extension API: insertSpaces and tabSize are undefined', () => { + return withRandomFileEditor('Hello world!\n\tHello world!', (editor, _doc) => { + + assert.strictEqual(editor.options.tabSize, 4); + assert.strictEqual(editor.options.insertSpaces, false); + assert.strictEqual(editor.options.cursorStyle, TextEditorCursorStyle.Line); + assert.strictEqual(editor.options.lineNumbers, TextEditorLineNumbersStyle.On); + + editor.options = { + tabSize: 2 + }; + + assert.strictEqual(editor.options.tabSize, 2); + assert.strictEqual(editor.options.insertSpaces, false); + assert.strictEqual(editor.options.cursorStyle, TextEditorCursorStyle.Line); + assert.strictEqual(editor.options.lineNumbers, TextEditorLineNumbersStyle.On); + + editor.options.tabSize = 'invalid'; + + assert.strictEqual(editor.options.tabSize, 2); + assert.strictEqual(editor.options.insertSpaces, false); + assert.strictEqual(editor.options.cursorStyle, TextEditorCursorStyle.Line); + assert.strictEqual(editor.options.lineNumbers, TextEditorLineNumbersStyle.On); + + return Promise.resolve(); + }); + }); + + test('issue #20757: Overlapping ranges are not allowed!', () => { + return withRandomFileEditor('Hello world!\n\tHello world!', (editor, _doc) => { + return editor.edit((builder) => { + // create two edits that overlap (i.e. are illegal) + builder.replace(new Range(0, 0, 0, 2), 'He'); + builder.replace(new Range(0, 1, 0, 3), 'el'); + }).then( + + (_applied) => { + assert.ok(false, 'edit with overlapping ranges should fail'); + }, + + (_err) => { + assert.ok(true, 'edit with overlapping ranges should fail'); + } + ); + }); + }); + + test('throw when using invalid edit', async function () { + await withRandomFileEditor('foo', editor => { + return new Promise((resolve, reject) => { + editor.edit(edit => { + edit.insert(new Position(0, 0), 'bar'); + setTimeout(() => { + try { + edit.insert(new Position(0, 0), 'bar'); + reject(new Error('expected error')); + } catch (err) { + assert.ok(true); + resolve(); + } + }, 0); + }); + }); + }); + }); + + test('editor contents are correctly read (small file)', function () { + return testEditorContents('/far.js'); + }); + + test('editor contents are correctly read (large file)', async function () { + return testEditorContents('/lorem.txt'); + }); + + async function testEditorContents(relativePath: string) { + const root = workspace.workspaceFolders![0]!.uri; + const file = Uri.parse(root.toString() + relativePath); + const document = await workspace.openTextDocument(file); + + assert.strictEqual(document.getText(), Buffer.from(await workspace.fs.readFile(file)).toString()); + } +}); diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/env.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/env.test.ts similarity index 77% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/env.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/env.test.ts index 42e25bafddd1..73b799525910 100644 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/env.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/env.test.ts @@ -12,12 +12,12 @@ suite('vscode API - env', () => { teardown(assertNoRpc); test('env is set', function () { - assert.equal(typeof env.language, 'string'); - assert.equal(typeof env.appRoot, 'string'); - assert.equal(typeof env.appName, 'string'); - assert.equal(typeof env.machineId, 'string'); - assert.equal(typeof env.sessionId, 'string'); - assert.equal(typeof env.shell, 'string'); + assert.strictEqual(typeof env.language, 'string'); + assert.strictEqual(typeof env.appRoot, 'string'); + assert.strictEqual(typeof env.appName, 'string'); + assert.strictEqual(typeof env.machineId, 'string'); + assert.strictEqual(typeof env.sessionId, 'string'); + assert.strictEqual(typeof env.shell, 'string'); }); test('env is readonly', function () { @@ -37,7 +37,7 @@ suite('vscode API - env', () => { // not running in remote, so we expect both extensions assert.ok(knownWorkspaceExtension); assert.ok(knownUiAndWorkspaceExtension); - assert.equal(ExtensionKind.UI, knownUiAndWorkspaceExtension!.extensionKind); + assert.strictEqual(ExtensionKind.UI, knownUiAndWorkspaceExtension!.extensionKind); } else if (typeof remoteName === 'string') { // running in remote, so we only expect workspace extensions assert.ok(knownWorkspaceExtension); @@ -46,7 +46,7 @@ suite('vscode API - env', () => { } else { assert.ok(knownUiAndWorkspaceExtension); } - assert.equal(ExtensionKind.Workspace, knownWorkspaceExtension!.extensionKind); + assert.strictEqual(ExtensionKind.Workspace, knownWorkspaceExtension!.extensionKind); } else { assert.fail(); } @@ -58,9 +58,9 @@ suite('vscode API - env', () => { const kind = env.uiKind; if (result.scheme === 'http' || result.scheme === 'https') { - assert.equal(kind, UIKind.Web); + assert.strictEqual(kind, UIKind.Web); } else { - assert.equal(kind, UIKind.Desktop); + assert.strictEqual(kind, UIKind.Desktop); } }); @@ -70,9 +70,9 @@ suite('vscode API - env', () => { assert.ok(result); if (env.uiKind === UIKind.Desktop) { - assert.equal(uri.scheme, result.scheme); - assert.equal(uri.authority, result.authority); - assert.equal(uri.path, result.path); + assert.strictEqual(uri.scheme, result.scheme); + assert.strictEqual(uri.authority, result.authority); + assert.strictEqual(uri.path, result.path); } else { assert.ok(result.scheme === 'http' || result.scheme === 'https'); } diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/extensions.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/extensions.test.ts similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/extensions.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/extensions.test.ts diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/index.ts b/extensions/vscode-api-tests/src/singlefolder-tests/index.ts similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/index.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/index.ts diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/languages.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/languages.test.ts similarity index 90% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/languages.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/languages.test.ts index 0553a4444dbe..ed75f597dc5b 100644 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/languages.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/languages.test.ts @@ -23,7 +23,7 @@ suite('vscode API - languages', () => { } function assertEqualRange(actual: vscode.Range, expected: vscode.Range, message?: string) { - assert.equal(rangeToString(actual), rangeToString(expected), message); + assert.strictEqual(rangeToString(actual), rangeToString(expected), message); } test('setTextDocumentLanguage -> close/open event', async function () { @@ -36,8 +36,8 @@ suite('vscode API - languages', () => { let close = new Promise(resolve => { disposables.push(vscode.workspace.onDidCloseTextDocument(e => { if (e === doc) { - assert.equal(doc.languageId, langIdNow); - assert.equal(clock, 0); + assert.strictEqual(doc.languageId, langIdNow); + assert.strictEqual(clock, 0); clock += 1; resolve(); } @@ -46,8 +46,8 @@ suite('vscode API - languages', () => { let open = new Promise(resolve => { disposables.push(vscode.workspace.onDidOpenTextDocument(e => { if (e === doc) { // same instance! - assert.equal(doc.languageId, 'json'); - assert.equal(clock, 1); + assert.strictEqual(doc.languageId, 'json'); + assert.strictEqual(clock, 1); clock += 1; resolve(); } @@ -55,8 +55,8 @@ suite('vscode API - languages', () => { }); let change = vscode.languages.setTextDocumentLanguage(doc, 'json'); await Promise.all([change, close, open]); - assert.equal(clock, 2); - assert.equal(doc.languageId, 'json'); + assert.strictEqual(clock, 2); + assert.strictEqual(doc.languageId, 'json'); disposables.forEach(disposable => disposable.dispose()); disposables.length = 0; }); @@ -82,7 +82,7 @@ suite('vscode API - languages', () => { col2.set(uri, [new vscode.Diagnostic(new vscode.Range(0, 0, 0, 12), 'error1')]); let diag = vscode.languages.getDiagnostics(uri); - assert.equal(diag.length, 2); + assert.strictEqual(diag.length, 2); let tuples = vscode.languages.getDiagnostics(); let found = false; @@ -111,13 +111,13 @@ suite('vscode API - languages', () => { vscode.languages.registerDocumentLinkProvider({ language: 'java', scheme: testFs.scheme }, linkProvider); const links = await vscode.commands.executeCommand('vscode.executeLinkProvider', doc.uri); - assert.equal(2, links && links.length); + assert.strictEqual(2, links && links.length); let [link1, link2] = links!.sort((l1, l2) => l1.range.start.compareTo(l2.range.start)); - assert.equal(target.toString(), link1.target && link1.target.toString()); + assert.strictEqual(target.toString(), link1.target && link1.target.toString()); assertEqualRange(range, link1.range); - assert.equal('http://a.com/', link2.target && link2.target.toString()); + assert.strictEqual('http://a.com/', link2.target && link2.target.toString()); assertEqualRange(new vscode.Range(new vscode.Position(0, 13), new vscode.Position(0, 25)), link2.range); }); @@ -139,7 +139,7 @@ suite('vscode API - languages', () => { let r1 = vscode.languages.registerCodeActionsProvider({ pattern: '*.far', scheme: 'ttt' }, { provideCodeActions(_document, _range, ctx): vscode.Command[] { - assert.equal(ctx.diagnostics.length, 2); + assert.strictEqual(ctx.diagnostics.length, 2); let [first, second] = ctx.diagnostics; assert.ok(first === diag1); assert.ok(second === diag2); diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/notebook.document.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.document.test.ts new file mode 100644 index 000000000000..701de344f331 --- /dev/null +++ b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.document.test.ts @@ -0,0 +1,375 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; +import * as vscode from 'vscode'; +import * as utils from '../utils'; + +suite('Notebook Document', function () { + + const simpleContentProvider = new class implements vscode.NotebookSerializer { + deserializeNotebook(_data: Uint8Array): vscode.NotebookData | Thenable { + return new vscode.NotebookData( + [new vscode.NotebookCellData(vscode.NotebookCellKind.Code, '// SIMPLE', 'javascript')], + ); + } + serializeNotebook(_data: vscode.NotebookData): Uint8Array | Thenable { + return new Uint8Array(); + } + }; + + const complexContentProvider = new class implements vscode.NotebookContentProvider { + async openNotebook(uri: vscode.Uri, _openContext: vscode.NotebookDocumentOpenContext): Promise { + return new vscode.NotebookData( + [new vscode.NotebookCellData(vscode.NotebookCellKind.Code, uri.toString(), 'javascript')], + ); + } + async saveNotebook(_document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) { + // + } + async saveNotebookAs(_targetResource: vscode.Uri, _document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) { + // + } + async backupNotebook(_document: vscode.NotebookDocument, _context: vscode.NotebookDocumentBackupContext, _cancellation: vscode.CancellationToken) { + return { id: '', delete() { } }; + } + }; + + const disposables: vscode.Disposable[] = []; + + suiteTeardown(async function () { + utils.assertNoRpc(); + await utils.revertAllDirty(); + await utils.closeAllEditors(); + utils.disposeAll(disposables); + disposables.length = 0; + }); + + suiteSetup(function () { + disposables.push(vscode.workspace.registerNotebookContentProvider('notebook.nbdtest', complexContentProvider)); + disposables.push(vscode.workspace.registerNotebookSerializer('notebook.nbdserializer', simpleContentProvider)); + }); + + test('cannot register sample provider multiple times', function () { + assert.throws(() => { + vscode.workspace.registerNotebookContentProvider('notebook.nbdtest', complexContentProvider); + }); + // assert.throws(() => { + // vscode.workspace.registerNotebookSerializer('notebook.nbdserializer', simpleContentProvider); + // }); + }); + + test('cannot open unknown types', async function () { + try { + await vscode.workspace.openNotebookDocument(vscode.Uri.parse('some:///thing.notTypeKnown')); + assert.ok(false); + } catch { + assert.ok(true); + } + }); + + test('document basics', async function () { + const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); + const notebook = await vscode.workspace.openNotebookDocument(uri); + + assert.strictEqual(notebook.uri.toString(), uri.toString()); + assert.strictEqual(notebook.isDirty, false); + assert.strictEqual(notebook.isUntitled, false); + assert.strictEqual(notebook.cellCount, 1); + + assert.strictEqual(notebook.notebookType, 'notebook.nbdtest'); + }); + + test('notebook open/close, notebook ready when cell-document open event is fired', async function () { + const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); + let didHappen = false; + + const p = new Promise((resolve, reject) => { + const sub = vscode.workspace.onDidOpenTextDocument(doc => { + if (doc.uri.scheme !== 'vscode-notebook-cell') { + // ignore other open events + return; + } + const notebook = vscode.workspace.notebookDocuments.find(notebook => { + const cell = notebook.getCells().find(cell => cell.document === doc); + return Boolean(cell); + }); + assert.ok(notebook, `notebook for cell ${doc.uri} NOT found`); + didHappen = true; + sub.dispose(); + resolve(); + }); + + setTimeout(() => { + sub.dispose(); + reject(new Error('TIMEOUT')); + }, 15000); + }); + + await vscode.workspace.openNotebookDocument(uri); + await p; + assert.strictEqual(didHappen, true); + }); + + test('notebook open/close, all cell-documents are ready', async function () { + const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); + + const p = utils.asPromise(vscode.workspace.onDidOpenNotebookDocument).then(notebook => { + for (let i = 0; i < notebook.cellCount; i++) { + let cell = notebook.cellAt(i); + + const doc = vscode.workspace.textDocuments.find(doc => doc.uri.toString() === cell.document.uri.toString()); + assert.ok(doc); + assert.strictEqual(doc.notebook === notebook, true); + assert.strictEqual(doc === cell.document, true); + assert.strictEqual(doc?.languageId, cell.document.languageId); + assert.strictEqual(doc?.isDirty, false); + assert.strictEqual(doc?.isClosed, false); + } + }); + + await vscode.workspace.openNotebookDocument(uri); + await p; + }); + + test('open untitled notebook', async function () { + const nb = await vscode.workspace.openNotebookDocument('notebook.nbdserializer'); + assert.strictEqual(nb.isUntitled, true); + assert.strictEqual(nb.isClosed, false); + assert.strictEqual(nb.uri.scheme, 'untitled'); + // assert.strictEqual(nb.cellCount, 0); // NotebookSerializer ALWAYS returns something here + }); + + test('open untitled with data', async function () { + const nb = await vscode.workspace.openNotebookDocument( + 'notebook.nbdserializer', + new vscode.NotebookData([ + new vscode.NotebookCellData(vscode.NotebookCellKind.Code, 'console.log()', 'javascript'), + new vscode.NotebookCellData(vscode.NotebookCellKind.Markup, 'Hey', 'markdown'), + ]) + ); + assert.strictEqual(nb.isUntitled, true); + assert.strictEqual(nb.isClosed, false); + assert.strictEqual(nb.uri.scheme, 'untitled'); + assert.strictEqual(nb.cellCount, 2); + assert.strictEqual(nb.cellAt(0).kind, vscode.NotebookCellKind.Code); + assert.strictEqual(nb.cellAt(1).kind, vscode.NotebookCellKind.Markup); + }); + + + test('workspace edit API (replaceCells)', async function () { + const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); + + const document = await vscode.workspace.openNotebookDocument(uri); + assert.strictEqual(document.cellCount, 1); + + // inserting two new cells + { + const edit = new vscode.WorkspaceEdit(); + edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, 0), [{ + kind: vscode.NotebookCellKind.Markup, + languageId: 'markdown', + metadata: undefined, + outputs: [], + value: 'new_markdown' + }, { + kind: vscode.NotebookCellKind.Code, + languageId: 'fooLang', + metadata: undefined, + outputs: [], + value: 'new_code' + }]); + + const success = await vscode.workspace.applyEdit(edit); + assert.strictEqual(success, true); + } + + assert.strictEqual(document.cellCount, 3); + assert.strictEqual(document.cellAt(0).document.getText(), 'new_markdown'); + assert.strictEqual(document.cellAt(1).document.getText(), 'new_code'); + + // deleting cell 1 and 3 + { + const edit = new vscode.WorkspaceEdit(); + edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, 1), []); + edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(2, 3), []); + const success = await vscode.workspace.applyEdit(edit); + assert.strictEqual(success, true); + } + + assert.strictEqual(document.cellCount, 1); + assert.strictEqual(document.cellAt(0).document.getText(), 'new_code'); + + // replacing all cells + { + const edit = new vscode.WorkspaceEdit(); + edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, 1), [{ + kind: vscode.NotebookCellKind.Markup, + languageId: 'markdown', + metadata: undefined, + outputs: [], + value: 'new2_markdown' + }, { + kind: vscode.NotebookCellKind.Code, + languageId: 'fooLang', + metadata: undefined, + outputs: [], + value: 'new2_code' + }]); + const success = await vscode.workspace.applyEdit(edit); + assert.strictEqual(success, true); + } + assert.strictEqual(document.cellCount, 2); + assert.strictEqual(document.cellAt(0).document.getText(), 'new2_markdown'); + assert.strictEqual(document.cellAt(1).document.getText(), 'new2_code'); + + // remove all cells + { + const edit = new vscode.WorkspaceEdit(); + edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, document.cellCount), []); + const success = await vscode.workspace.applyEdit(edit); + assert.strictEqual(success, true); + } + assert.strictEqual(document.cellCount, 0); + }); + + test('workspace edit API (replaceCells, event)', async function () { + const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); + const document = await vscode.workspace.openNotebookDocument(uri); + assert.strictEqual(document.cellCount, 1); + + const edit = new vscode.WorkspaceEdit(); + edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, 0), [{ + kind: vscode.NotebookCellKind.Markup, + languageId: 'markdown', + metadata: undefined, + outputs: [], + value: 'new_markdown' + }, { + kind: vscode.NotebookCellKind.Code, + languageId: 'fooLang', + metadata: undefined, + outputs: [], + value: 'new_code' + }]); + + const event = utils.asPromise(vscode.notebooks.onDidChangeNotebookCells); + + const success = await vscode.workspace.applyEdit(edit); + assert.strictEqual(success, true); + + const data = await event; + + // check document + assert.strictEqual(document.cellCount, 3); + assert.strictEqual(document.cellAt(0).document.getText(), 'new_markdown'); + assert.strictEqual(document.cellAt(1).document.getText(), 'new_code'); + + // check event data + assert.strictEqual(data.document === document, true); + assert.strictEqual(data.changes.length, 1); + assert.strictEqual(data.changes[0].deletedCount, 0); + assert.strictEqual(data.changes[0].deletedItems.length, 0); + assert.strictEqual(data.changes[0].items.length, 2); + assert.strictEqual(data.changes[0].items[0], document.cellAt(0)); + assert.strictEqual(data.changes[0].items[1], document.cellAt(1)); + }); + + test('document save API', async function () { + const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); + const notebook = await vscode.workspace.openNotebookDocument(uri); + + assert.strictEqual(notebook.uri.toString(), uri.toString()); + assert.strictEqual(notebook.isDirty, false); + assert.strictEqual(notebook.isUntitled, false); + assert.strictEqual(notebook.cellCount, 1); + assert.strictEqual(notebook.notebookType, 'notebook.nbdtest'); + + const edit = new vscode.WorkspaceEdit(); + edit.replaceNotebookCells(notebook.uri, new vscode.NotebookRange(0, 0), [{ + kind: vscode.NotebookCellKind.Markup, + languageId: 'markdown', + metadata: undefined, + outputs: [], + value: 'new_markdown' + }, { + kind: vscode.NotebookCellKind.Code, + languageId: 'fooLang', + metadata: undefined, + outputs: [], + value: 'new_code' + }]); + + const success = await vscode.workspace.applyEdit(edit); + assert.strictEqual(success, true); + assert.strictEqual(notebook.isDirty, true); + + await notebook.save(); + assert.strictEqual(notebook.isDirty, false); + }); + + + test('setTextDocumentLanguage for notebook cells', async function () { + + const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); + const notebook = await vscode.workspace.openNotebookDocument(uri); + const first = notebook.cellAt(0); + assert.strictEqual(first.document.languageId, 'javascript'); + + const pclose = utils.asPromise(vscode.workspace.onDidCloseTextDocument); + const popen = utils.asPromise(vscode.workspace.onDidOpenTextDocument); + + await vscode.languages.setTextDocumentLanguage(first.document, 'css'); + assert.strictEqual(first.document.languageId, 'css'); + + const closed = await pclose; + const opened = await popen; + + assert.strictEqual(closed.uri.toString(), first.document.uri.toString()); + assert.strictEqual(opened.uri.toString(), first.document.uri.toString()); + assert.strictEqual(opened === closed, true); + }); + + test('setTextDocumentLanguage when notebook editor is not open', async function () { + const uri = await utils.createRandomFile('', undefined, '.nbdtest'); + const notebook = await vscode.workspace.openNotebookDocument(uri); + const firstCelUri = notebook.cellAt(0).document.uri; + await vscode.commands.executeCommand('workbench.action.closeActiveEditor'); + + let cellDoc = await vscode.workspace.openTextDocument(firstCelUri); + cellDoc = await vscode.languages.setTextDocumentLanguage(cellDoc, 'css'); + assert.strictEqual(cellDoc.languageId, 'css'); + }); + + test('dirty state - complex', async function () { + const resource = await utils.createRandomFile(undefined, undefined, '.nbdtest'); + const document = await vscode.workspace.openNotebookDocument(resource); + assert.strictEqual(document.isDirty, false); + + const edit = new vscode.WorkspaceEdit(); + edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, document.cellCount), []); + assert.ok(await vscode.workspace.applyEdit(edit)); + + assert.strictEqual(document.isDirty, true); + + await document.save(); + assert.strictEqual(document.isDirty, false); + }); + + test('dirty state - serializer', async function () { + const resource = await utils.createRandomFile(undefined, undefined, '.nbdserializer'); + const document = await vscode.workspace.openNotebookDocument(resource); + assert.strictEqual(document.isDirty, false); + + const edit = new vscode.WorkspaceEdit(); + edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, document.cellCount), []); + assert.ok(await vscode.workspace.applyEdit(edit)); + + assert.strictEqual(document.isDirty, true); + + await document.save(); + assert.strictEqual(document.isDirty, false); + }); +}); diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/notebook.editor.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.editor.test.ts similarity index 83% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/notebook.editor.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/notebook.editor.test.ts index 11792c4f5bbc..c4b290e984b7 100644 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/notebook.editor.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.editor.test.ts @@ -13,7 +13,6 @@ suite('Notebook Editor', function () { deserializeNotebook() { return new vscode.NotebookData( [new vscode.NotebookCellData(vscode.NotebookCellKind.Code, '// code cell', 'javascript')], - new vscode.NotebookDocumentMetadata() ); } serializeNotebook() { @@ -30,21 +29,19 @@ suite('Notebook Editor', function () { utils.disposeAll(disposables); disposables.length = 0; - for (let doc of vscode.notebook.notebookDocuments) { + for (let doc of vscode.workspace.notebookDocuments) { assert.strictEqual(doc.isDirty, false, doc.uri.toString()); } }); suiteSetup(function () { - disposables.push(vscode.notebook.registerNotebookSerializer('notebook.nbdtest', contentSerializer)); + disposables.push(vscode.workspace.registerNotebookSerializer('notebook.nbdtest', contentSerializer)); }); test('showNotebookDocment', async function () { - const count1 = vscode.notebook.notebookDocuments.length; - - const p = utils.asPromise(vscode.notebook.onDidOpenNotebookDocument); + const p = utils.asPromise(vscode.workspace.onDidOpenNotebookDocument); const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); const editor = await vscode.window.showNotebookDocument(uri); @@ -53,12 +50,12 @@ suite('Notebook Editor', function () { const event = await p; assert.strictEqual(event.uri.toString(), uri.toString()); - const count2 = vscode.notebook.notebookDocuments.length; - assert.strictEqual(count1 + 1, count2); - + const includes = vscode.workspace.notebookDocuments.includes(editor.document); + assert.strictEqual(true, includes); }); - test('notebook editor has viewColumn', async function () { + // TODO@rebornix deal with getting started + test.skip('notebook editor has viewColumn', async function () { const uri1 = await utils.createRandomFile(undefined, undefined, '.nbdtest'); const editor1 = await vscode.window.showNotebookDocument(uri1); diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts similarity index 76% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts index 1aff42f1ea64..0e8dc300ed46 100644 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts @@ -7,49 +7,20 @@ import 'mocha'; import * as assert from 'assert'; import * as vscode from 'vscode'; import { createRandomFile, asPromise, disposeAll, closeAllEditors, revertAllDirty, saveAllEditors, assertNoRpc } from '../utils'; +import { TextDecoder } from 'util'; async function createRandomNotebookFile() { return createRandomFile('', undefined, '.vsctestnb'); } -// Since `workbench.action.splitEditor` command does await properly -// Notebook editor/document events are not guaranteed to be sent to the ext host when promise resolves -// The workaround here is waiting for the first visible notebook editor change event. -async function splitEditor() { - const once = asPromise(vscode.window.onDidChangeVisibleNotebookEditors); - await vscode.commands.executeCommand('workbench.action.splitEditor'); - await once; +async function openRandomNotebookDocument() { + const uri = await createRandomNotebookFile(); + return vscode.workspace.openNotebookDocument(uri); } -async function saveFileAndCloseAll(resource: vscode.Uri) { - const documentClosed = new Promise((resolve, _reject) => { - const d = vscode.notebook.onDidCloseNotebookDocument(e => { - if (e.uri.toString() === resource.toString()) { - d.dispose(); - resolve(); - } - }); - }); - await vscode.commands.executeCommand('workbench.action.files.save'); - await closeAllEditors(); - await documentClosed; -} - -async function saveAllFilesAndCloseAll(resource: vscode.Uri | undefined) { - const documentClosed = new Promise((resolve, _reject) => { - if (!resource) { - return resolve(); - } - const d = vscode.notebook.onDidCloseNotebookDocument(e => { - if (e.uri.toString() === resource.toString()) { - d.dispose(); - resolve(); - } - }); - }); - await vscode.commands.executeCommand('workbench.action.files.saveAll'); +async function saveAllFilesAndCloseAll() { + await saveAllEditors(); await closeAllEditors(); - await documentClosed; } async function withEvent(event: vscode.Event, callback: (e: Promise) => Promise) { @@ -62,11 +33,20 @@ class Kernel { readonly controller: vscode.NotebookController; + readonly associatedNotebooks = new Set(); + constructor(id: string, label: string) { - this.controller = vscode.notebook.createNotebookController(id, 'notebookCoreTest', label); + this.controller = vscode.notebooks.createNotebookController(id, 'notebookCoreTest', label); this.controller.executeHandler = this._execute.bind(this); - this.controller.hasExecutionOrder = true; + this.controller.supportsExecutionOrder = true; this.controller.supportedLanguages = ['typescript', 'javascript']; + this.controller.onDidChangeSelectedNotebooks(e => { + if (e.selected) { + this.associatedNotebooks.add(e.notebook.uri.toString()); + } else { + this.associatedNotebooks.delete(e.notebook.uri.toString()); + } + }); } protected async _execute(cells: vscode.NotebookCell[]): Promise { @@ -76,20 +56,20 @@ class Kernel { } protected async _runCell(cell: vscode.NotebookCell) { - const task = this.controller.createNotebookCellExecutionTask(cell); + const task = this.controller.createNotebookCellExecution(cell); task.start(); task.executionOrder = 1; if (cell.notebook.uri.path.endsWith('customRenderer.vsctestnb')) { await task.replaceOutput([new vscode.NotebookCellOutput([ - new vscode.NotebookCellOutputItem('text/custom', ['test'], undefined) + vscode.NotebookCellOutputItem.text('test', 'text/custom') ])]); return; } await task.replaceOutput([new vscode.NotebookCellOutput([ - new vscode.NotebookCellOutputItem('text/plain', ['my output'], undefined) + vscode.NotebookCellOutputItem.text('my output', 'text/plain') ])]); - task.end({ success: true }); + task.end(true); } } @@ -98,12 +78,13 @@ function getFocusedCell(editor?: vscode.NotebookEditor) { return editor ? editor.document.cellAt(editor.selections[0].start) : undefined; } -async function assertKernel(controller: vscode.NotebookController): Promise { +async function assertKernel(kernel: Kernel, notebook: vscode.NotebookDocument): Promise { const success = await vscode.commands.executeCommand('notebook.selectKernel', { extension: 'vscode.vscode-api-tests', - id: controller.id + id: kernel.controller.id }); - assert.ok(success, `expected selected kernel to be ${controller.id}`); + assert.ok(success, `expected selected kernel to be ${kernel.controller.id}`); + assert.ok(kernel.associatedNotebooks.has(notebook.uri.toString())); } suite('Notebook API tests', function () { @@ -123,38 +104,41 @@ suite('Notebook API tests', function () { }); suiteSetup(function () { - suiteDisposables.push(vscode.notebook.registerNotebookContentProvider('notebookCoreTest', { - openNotebook: async (_resource: vscode.Uri): Promise => { - if (/.*empty\-.*\.vsctestnb$/.test(_resource.path)) { + suiteDisposables.push(vscode.workspace.registerNotebookContentProvider('notebookCoreTest', { + openNotebook: async (resource: vscode.Uri): Promise => { + if (/.*empty\-.*\.vsctestnb$/.test(resource.path)) { return { - metadata: new vscode.NotebookDocumentMetadata(), + metadata: {}, cells: [] }; } const dto: vscode.NotebookData = { - metadata: new vscode.NotebookDocumentMetadata().with({ custom: { testMetadata: false } }), + metadata: { custom: { testMetadata: false } }, cells: [ { - source: 'test', - language: 'typescript', + value: 'test', + languageId: 'typescript', kind: vscode.NotebookCellKind.Code, outputs: [], - metadata: new vscode.NotebookCellMetadata().with({ custom: { testCellMetadata: 123 } }), - latestExecutionSummary: { startTime: 10, endTime: 20 } + metadata: { custom: { testCellMetadata: 123 } }, + executionSummary: { timing: { startTime: 10, endTime: 20 } } }, { - source: 'test2', - language: 'typescript', + value: 'test2', + languageId: 'typescript', kind: vscode.NotebookCellKind.Code, outputs: [ new vscode.NotebookCellOutput([ - new vscode.NotebookCellOutputItem('text/plain', 'Hello World', { testOutputItemMetadata: true }) + vscode.NotebookCellOutputItem.text('Hello World', 'text/plain') ], - { testOutputMetadata: true }) + { + testOutputMetadata: true, + ['text/plain']: { testOutputItemMetadata: true } + }) ], - latestExecutionSummary: { executionOrder: 5, success: true }, - metadata: new vscode.NotebookCellMetadata().with({ custom: { testCellMetadata: 456 } }) + executionSummary: { executionOrder: 5, success: true }, + metadata: { custom: { testCellMetadata: 456 } } } ] }; @@ -178,12 +162,12 @@ suite('Notebook API tests', function () { let kernel1: Kernel; let kernel2: Kernel; - setup(() => { + setup(async function () { kernel1 = new Kernel('mainKernel', 'Notebook Primary Test Kernel'); - const listener = vscode.notebook.onDidOpenNotebookDocument(async notebook => { - if (notebook.viewType === kernel1.controller.viewType) { + const listener = vscode.workspace.onDidOpenNotebookDocument(async notebook => { + if (notebook.notebookType === kernel1.controller.notebookType) { await vscode.commands.executeCommand('notebook.selectKernel', { extension: 'vscode.vscode-api-tests', id: kernel1.controller.id @@ -195,52 +179,51 @@ suite('Notebook API tests', function () { kernel2 = new class extends Kernel { constructor() { super('secondaryKernel', 'Notebook Secondary Test Kernel'); - this.controller.hasExecutionOrder = false; + this.controller.supportsExecutionOrder = false; } override async _runCell(cell: vscode.NotebookCell) { - const task = this.controller.createNotebookCellExecutionTask(cell); + const task = this.controller.createNotebookCellExecution(cell); task.start(); await task.replaceOutput([new vscode.NotebookCellOutput([ - new vscode.NotebookCellOutputItem('text/plain', ['my second output'], undefined) + vscode.NotebookCellOutputItem.text('my second output', 'text/plain') ])]); - task.end({ success: true }); + task.end(true); } }; testDisposables.push(kernel1.controller, listener, kernel2.controller); + await saveAllFilesAndCloseAll(); }); - teardown(() => { + teardown(async function () { disposeAll(testDisposables); testDisposables.length = 0; + await saveAllFilesAndCloseAll(); }); test('shared document in notebook editors', async function () { - const resource = await createRandomNotebookFile(); let counter = 0; - const disposables: vscode.Disposable[] = []; - disposables.push(vscode.notebook.onDidOpenNotebookDocument(() => { + testDisposables.push(vscode.workspace.onDidOpenNotebookDocument(() => { counter++; })); - disposables.push(vscode.notebook.onDidCloseNotebookDocument(() => { - counter--; - })); - await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); + + const notebook = await openRandomNotebookDocument(); assert.strictEqual(counter, 1); - await splitEditor(); + await vscode.window.showNotebookDocument(notebook, { viewColumn: vscode.ViewColumn.Active }); assert.strictEqual(counter, 1); - await closeAllEditors(); - assert.strictEqual(counter, 0); + assert.strictEqual(vscode.window.visibleNotebookEditors.length, 1); - disposables.forEach(d => d.dispose()); + await vscode.window.showNotebookDocument(notebook, { viewColumn: vscode.ViewColumn.Beside }); + assert.strictEqual(counter, 1); + assert.strictEqual(vscode.window.visibleNotebookEditors.length, 2); }); - test('editor open/close event', async function () { + test('editor onDidChangeVisibleNotebookEditors-event', async function () { const resource = await createRandomNotebookFile(); const firstEditorOpen = asPromise(vscode.window.onDidChangeVisibleNotebookEditors); - await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); + await vscode.window.showNotebookDocument(resource); await firstEditorOpen; const firstEditorClose = asPromise(vscode.window.onDidChangeVisibleNotebookEditors); @@ -248,7 +231,7 @@ suite('Notebook API tests', function () { await firstEditorClose; }); - test('editor open/close event 2', async function () { + test('editor onDidChangeVisibleNotebookEditors-event 2', async function () { const resource = await createRandomNotebookFile(); let count = 0; const disposables: vscode.Disposable[] = []; @@ -256,10 +239,10 @@ suite('Notebook API tests', function () { count = vscode.window.visibleNotebookEditors.length; })); - await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); + await vscode.window.showNotebookDocument(resource, { viewColumn: vscode.ViewColumn.Active }); assert.strictEqual(count, 1); - await splitEditor(); + await vscode.window.showNotebookDocument(resource, { viewColumn: vscode.ViewColumn.Beside }); assert.strictEqual(count, 2); await closeAllEditors(); @@ -289,7 +272,7 @@ suite('Notebook API tests', function () { const resource = await createRandomNotebookFile(); await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); - const cellsChangeEvent = asPromise(vscode.notebook.onDidChangeNotebookCells); + const cellsChangeEvent = asPromise(vscode.notebooks.onDidChangeNotebookCells); await vscode.commands.executeCommand('notebook.cell.insertCodeCellBelow'); const cellChangeEventRet = await cellsChangeEvent; assert.strictEqual(cellChangeEventRet.document, vscode.window.activeNotebookEditor?.document); @@ -303,11 +286,11 @@ suite('Notebook API tests', function () { ] }); - const moveCellEvent = asPromise(vscode.notebook.onDidChangeNotebookCells); + const moveCellEvent = asPromise(vscode.notebooks.onDidChangeNotebookCells); await vscode.commands.executeCommand('notebook.cell.moveUp'); await moveCellEvent; - const cellOutputChange = asPromise(vscode.notebook.onDidChangeCellOutputs); + const cellOutputChange = asPromise(vscode.notebooks.onDidChangeCellOutputs); await vscode.commands.executeCommand('notebook.cell.execute'); const cellOutputsAddedRet = await cellOutputChange; assert.deepStrictEqual(cellOutputsAddedRet, { @@ -316,7 +299,7 @@ suite('Notebook API tests', function () { }); assert.strictEqual(cellOutputsAddedRet.cells[0].outputs.length, 1); - const cellOutputClear = asPromise(vscode.notebook.onDidChangeCellOutputs); + const cellOutputClear = asPromise(vscode.notebooks.onDidChangeCellOutputs); await vscode.commands.executeCommand('notebook.cell.clearOutputs'); const cellOutputsCleardRet = await cellOutputClear; assert.deepStrictEqual(cellOutputsCleardRet, { @@ -325,7 +308,7 @@ suite('Notebook API tests', function () { }); assert.strictEqual(cellOutputsAddedRet.cells[0].outputs.length, 0); - // const cellChangeLanguage = getEventOncePromise(vscode.notebook.onDidChangeCellLanguage); + // const cellChangeLanguage = getEventOncePromise(vscode.notebooks.onDidChangeCellLanguage); // await vscode.commands.executeCommand('notebook.cell.changeToMarkdown'); // const cellChangeLanguageRet = await cellChangeLanguage; // assert.deepStrictEqual(cellChangeLanguageRet, { @@ -333,8 +316,6 @@ suite('Notebook API tests', function () { // cells: vscode.window.activeNotebookEditor!.document.cellAt(0), // language: 'markdown' // }); - - await saveAllFilesAndCloseAll(undefined); }); test('editor move cell event', async function () { @@ -346,7 +327,7 @@ suite('Notebook API tests', function () { const activeCell = getFocusedCell(vscode.window.activeNotebookEditor); assert.strictEqual(vscode.window.activeNotebookEditor!.document.getCells().indexOf(activeCell!), 0); - const moveChange = asPromise(vscode.notebook.onDidChangeNotebookCells); + const moveChange = asPromise(vscode.notebooks.onDidChangeNotebookCells); await vscode.commands.executeCommand('notebook.cell.moveDown'); await moveChange; await saveAllEditors(); @@ -355,20 +336,20 @@ suite('Notebook API tests', function () { await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); const firstEditor = vscode.window.activeNotebookEditor; assert.strictEqual(firstEditor?.document.cellCount, 2); - await saveAllFilesAndCloseAll(undefined); }); test('notebook editor active/visible', async function () { const resource = await createRandomNotebookFile(); - await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); - const firstEditor = vscode.window.activeNotebookEditor; - assert.strictEqual(firstEditor && vscode.window.visibleNotebookEditors.indexOf(firstEditor) >= 0, true); + const firstEditor = await vscode.window.showNotebookDocument(resource, { viewColumn: vscode.ViewColumn.Active }); + assert.strictEqual(firstEditor === vscode.window.activeNotebookEditor, true); + assert.strictEqual(vscode.window.visibleNotebookEditors.includes(firstEditor), true); + + const secondEditor = await vscode.window.showNotebookDocument(resource, { viewColumn: vscode.ViewColumn.Beside }); + assert.strictEqual(secondEditor === vscode.window.activeNotebookEditor, true); - await splitEditor(); - const secondEditor = vscode.window.activeNotebookEditor; - assert.strictEqual(secondEditor && vscode.window.visibleNotebookEditors.indexOf(secondEditor) >= 0, true); assert.notStrictEqual(firstEditor, secondEditor); - assert.strictEqual(firstEditor && vscode.window.visibleNotebookEditors.indexOf(firstEditor) >= 0, true); + assert.strictEqual(vscode.window.visibleNotebookEditors.includes(secondEditor), true); + assert.strictEqual(vscode.window.visibleNotebookEditors.includes(firstEditor), true); assert.strictEqual(vscode.window.visibleNotebookEditors.length, 2); const untitledEditorChange = asPromise(vscode.window.onDidChangeActiveNotebookEditor); @@ -386,8 +367,6 @@ suite('Notebook API tests', function () { assert.strictEqual(secondEditor, vscode.window.activeNotebookEditor); assert.strictEqual(vscode.window.visibleNotebookEditors.length, 2); assert.strictEqual(secondEditor && vscode.window.visibleNotebookEditors.indexOf(secondEditor) >= 0, true); - - await saveAllFilesAndCloseAll(undefined); }); test('notebook active editor change', async function () { @@ -399,8 +378,6 @@ suite('Notebook API tests', function () { const firstEditorDeactivate = asPromise(vscode.window.onDidChangeActiveNotebookEditor); await vscode.commands.executeCommand('workbench.action.splitEditor'); await firstEditorDeactivate; - - await saveFileAndCloseAll(resource); }); test('edit API (replaceMetadata)', async function () { @@ -408,7 +385,7 @@ suite('Notebook API tests', function () { await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); await vscode.window.activeNotebookEditor!.edit(editBuilder => { - editBuilder.replaceCellMetadata(0, new vscode.NotebookCellMetadata().with({ inputCollapsed: true })); + editBuilder.replaceCellMetadata(0, { inputCollapsed: true }); }); const document = vscode.window.activeNotebookEditor?.document!; @@ -416,17 +393,16 @@ suite('Notebook API tests', function () { assert.strictEqual(document.cellAt(0).metadata.inputCollapsed, true); assert.strictEqual(document.isDirty, true); - await saveFileAndCloseAll(resource); }); test('edit API (replaceMetadata, event)', async function () { const resource = await createRandomNotebookFile(); await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); - const event = asPromise(vscode.notebook.onDidChangeCellMetadata); + const event = asPromise(vscode.notebooks.onDidChangeCellMetadata); await vscode.window.activeNotebookEditor!.edit(editBuilder => { - editBuilder.replaceCellMetadata(0, new vscode.NotebookCellMetadata().with({ inputCollapsed: true })); + editBuilder.replaceCellMetadata(0, { inputCollapsed: true }); }); const data = await event; @@ -434,67 +410,59 @@ suite('Notebook API tests', function () { assert.strictEqual(data.cell.metadata.inputCollapsed, true); assert.strictEqual(data.document.isDirty, true); - await saveFileAndCloseAll(resource); }); test('edit API batch edits', async function () { const resource = await createRandomNotebookFile(); await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); - const cellsChangeEvent = asPromise(vscode.notebook.onDidChangeNotebookCells); - const cellMetadataChangeEvent = asPromise(vscode.notebook.onDidChangeCellMetadata); + const cellsChangeEvent = asPromise(vscode.notebooks.onDidChangeNotebookCells); + const cellMetadataChangeEvent = asPromise(vscode.notebooks.onDidChangeCellMetadata); const version = vscode.window.activeNotebookEditor!.document.version; await vscode.window.activeNotebookEditor!.edit(editBuilder => { - editBuilder.replaceCells(1, 0, [{ kind: vscode.NotebookCellKind.Code, language: 'javascript', source: 'test 2', outputs: [], metadata: undefined }]); - editBuilder.replaceCellMetadata(0, new vscode.NotebookCellMetadata().with({ inputCollapsed: false })); + editBuilder.replaceCells(1, 0, [{ kind: vscode.NotebookCellKind.Code, languageId: 'javascript', value: 'test 2', outputs: [], metadata: undefined }]); + editBuilder.replaceCellMetadata(0, { inputCollapsed: false }); }); await cellsChangeEvent; await cellMetadataChangeEvent; assert.strictEqual(version + 1, vscode.window.activeNotebookEditor!.document.version); - await saveAllFilesAndCloseAll(resource); }); test('edit API batch edits undo/redo', async function () { const resource = await createRandomNotebookFile(); await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); - const cellsChangeEvent = asPromise(vscode.notebook.onDidChangeNotebookCells); - const cellMetadataChangeEvent = asPromise(vscode.notebook.onDidChangeCellMetadata); + const cellsChangeEvent = asPromise(vscode.notebooks.onDidChangeNotebookCells); + const cellMetadataChangeEvent = asPromise(vscode.notebooks.onDidChangeCellMetadata); const version = vscode.window.activeNotebookEditor!.document.version; await vscode.window.activeNotebookEditor!.edit(editBuilder => { - editBuilder.replaceCells(1, 0, [{ kind: vscode.NotebookCellKind.Code, language: 'javascript', source: 'test 2', outputs: [], metadata: undefined }]); - editBuilder.replaceCellMetadata(0, new vscode.NotebookCellMetadata().with({ inputCollapsed: false })); + editBuilder.replaceCells(1, 0, [{ kind: vscode.NotebookCellKind.Code, languageId: 'javascript', value: 'test 2', outputs: [], metadata: undefined }]); + editBuilder.replaceCellMetadata(0, { inputCollapsed: false }); }); await cellsChangeEvent; await cellMetadataChangeEvent; assert.strictEqual(vscode.window.activeNotebookEditor!.document.cellCount, 3); - assert.strictEqual(vscode.window.activeNotebookEditor!.document.cellAt(0)?.metadata?.inputCollapsed, false); + assert.strictEqual(vscode.window.activeNotebookEditor!.document.cellAt(0)?.metadata.inputCollapsed, false); assert.strictEqual(version + 1, vscode.window.activeNotebookEditor!.document.version); await vscode.commands.executeCommand('undo'); assert.strictEqual(version + 2, vscode.window.activeNotebookEditor!.document.version); - assert.strictEqual(vscode.window.activeNotebookEditor!.document.cellAt(0)?.metadata?.inputCollapsed, undefined); + assert.strictEqual(vscode.window.activeNotebookEditor!.document.cellAt(0)?.metadata.inputCollapsed, undefined); assert.strictEqual(vscode.window.activeNotebookEditor!.document.cellCount, 2); - - await saveAllFilesAndCloseAll(resource); }); test('initialzation should not emit cell change events.', async function () { const resource = await createRandomNotebookFile(); let count = 0; - const disposables: vscode.Disposable[] = []; - disposables.push(vscode.notebook.onDidChangeNotebookCells(() => { + + testDisposables.push(vscode.notebooks.onDidChangeNotebookCells(() => { count++; })); await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); assert.strictEqual(count, 0); - - disposables.forEach(d => d.dispose()); - - await saveFileAndCloseAll(resource); }); // }); @@ -509,20 +477,19 @@ suite('Notebook API tests', function () { const secondCell = vscode.window.activeNotebookEditor!.document.cellAt(1); assert.strictEqual(secondCell!.outputs.length, 1); - assert.deepStrictEqual(secondCell!.outputs[0].metadata, { testOutputMetadata: true }); - assert.strictEqual(secondCell!.outputs[0].outputs.length, 1); - assert.strictEqual(secondCell!.outputs[0].outputs[0].mime, 'text/plain'); - assert.strictEqual(secondCell!.outputs[0].outputs[0].value, 'Hello World'); - assert.deepStrictEqual(secondCell!.outputs[0].outputs[0].metadata, { testOutputItemMetadata: true }); - assert.strictEqual(secondCell!.latestExecutionSummary?.executionOrder, 5); - assert.strictEqual(secondCell!.latestExecutionSummary?.success, true); + assert.deepStrictEqual(secondCell!.outputs[0].metadata, { testOutputMetadata: true, ['text/plain']: { testOutputItemMetadata: true } }); + assert.strictEqual(secondCell!.outputs[0].items.length, 1); + assert.strictEqual(secondCell!.outputs[0].items[0].mime, 'text/plain'); + assert.strictEqual(new TextDecoder().decode(secondCell!.outputs[0].items[0].data), 'Hello World'); + assert.strictEqual(secondCell!.executionSummary?.executionOrder, 5); + assert.strictEqual(secondCell!.executionSummary?.success, true); await vscode.commands.executeCommand('notebook.cell.insertCodeCellBelow'); assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor)?.document.getText(), ''); await vscode.commands.executeCommand('notebook.cell.insertCodeCellAbove'); const activeCell = getFocusedCell(vscode.window.activeNotebookEditor); - assert.notEqual(getFocusedCell(vscode.window.activeNotebookEditor), undefined); + assert.notStrictEqual(getFocusedCell(vscode.window.activeNotebookEditor), undefined); assert.strictEqual(activeCell!.document.getText(), ''); assert.strictEqual(vscode.window.activeNotebookEditor!.document.cellCount, 4); assert.strictEqual(vscode.window.activeNotebookEditor!.document.getCells().indexOf(activeCell!), 1); @@ -545,7 +512,7 @@ suite('Notebook API tests', function () { // ---- insert cell above and focus ---- // await vscode.commands.executeCommand('notebook.cell.insertCodeCellAbove'); let activeCell = getFocusedCell(vscode.window.activeNotebookEditor); - assert.notEqual(getFocusedCell(vscode.window.activeNotebookEditor), undefined); + assert.notStrictEqual(getFocusedCell(vscode.window.activeNotebookEditor), undefined); assert.strictEqual(activeCell!.document.getText(), ''); assert.strictEqual(vscode.window.activeNotebookEditor!.document.cellCount, 4); assert.strictEqual(vscode.window.activeNotebookEditor!.document.getCells().indexOf(activeCell!), 1); @@ -617,7 +584,7 @@ suite('Notebook API tests', function () { edit.insert(getFocusedCell(vscode.window.activeNotebookEditor)!.document.uri, new vscode.Position(0, 0), 'var abc = 0;'); await vscode.workspace.applyEdit(edit); - const cellsChangeEvent = asPromise(vscode.notebook.onDidChangeNotebookCells); + const cellsChangeEvent = asPromise(vscode.notebooks.onDidChangeNotebookCells); await vscode.commands.executeCommand('notebook.cell.joinAbove'); await cellsChangeEvent; @@ -641,8 +608,6 @@ suite('Notebook API tests', function () { const newActiveCell = getFocusedCell(vscode.window.activeNotebookEditor); assert.deepStrictEqual(activeCell, newActiveCell); - - await saveFileAndCloseAll(resource); }); // test('document runnable based on kernel count', async () => { @@ -660,7 +625,7 @@ suite('Notebook API tests', function () { // currentKernelProvider.setHasKernels(true); - // await withEvent(vscode.notebook.onDidChangeCellOutputs, async (event) => { + // await withEvent(vscode.notebooks.onDidChangeCellOutputs, async (event) => { // await vscode.commands.executeCommand('notebook.execute'); // await event; // assert.strictEqual(cell.outputs.length, 1, 'should execute'); // runnable, it worked @@ -680,8 +645,6 @@ suite('Notebook API tests', function () { await vscode.commands.executeCommand('notebook.execute'); assert.strictEqual(cell.outputs.length, 0, 'should not execute'); // not runnable, didn't work - - await saveAllFilesAndCloseAll(undefined); }); test('cell execute command takes arguments 2', async () => { @@ -691,13 +654,13 @@ suite('Notebook API tests', function () { const editor = vscode.window.activeNotebookEditor!; const cell = editor.document.cellAt(0); - await withEvent(vscode.notebook.onDidChangeCellOutputs, async (event) => { + await withEvent(vscode.notebooks.onDidChangeCellOutputs, async (event) => { await vscode.commands.executeCommand('notebook.execute'); await event; assert.strictEqual(cell.outputs.length, 1, 'should execute'); // runnable, it worked }); - await withEvent(vscode.notebook.onDidChangeCellOutputs, async event => { + await withEvent(vscode.notebooks.onDidChangeCellOutputs, async event => { await vscode.commands.executeCommand('notebook.cell.clearOutputs'); await event; assert.strictEqual(cell.outputs.length, 0, 'should clear'); @@ -706,14 +669,42 @@ suite('Notebook API tests', function () { const secondResource = await createRandomNotebookFile(); await vscode.commands.executeCommand('vscode.openWith', secondResource, 'notebookCoreTest'); - await withEvent(vscode.notebook.onDidChangeCellOutputs, async (event) => { + await withEvent(vscode.notebooks.onDidChangeCellOutputs, async (event) => { await vscode.commands.executeCommand('notebook.cell.execute', { start: 0, end: 1 }, resource); await event; assert.strictEqual(cell.outputs.length, 1, 'should execute'); // runnable, it worked assert.strictEqual(vscode.window.activeNotebookEditor?.document.uri.fsPath, secondResource.fsPath); }); + }); - await saveAllFilesAndCloseAll(undefined); + test('cell execute command takes arguments ICellRange[]', async () => { + const resource = await createRandomNotebookFile(); + await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); + + vscode.commands.executeCommand('notebook.cell.execute', { ranges: [{ start: 0, end: 1 }, { start: 1, end: 2 }] }); + let firstCellExecuted = false; + let secondCellExecuted = false; + let resolve: () => void; + const p = new Promise(r => resolve = r); + const listener = vscode.notebooks.onDidChangeCellOutputs(e => { + e.cells.forEach(cell => { + if (cell.index === 0) { + firstCellExecuted = true; + } + + if (cell.index === 1) { + secondCellExecuted = true; + } + }); + + if (firstCellExecuted && secondCellExecuted) { + resolve(); + } + }); + + await p; + listener.dispose(); + await saveAllFilesAndCloseAll(); }); test('document execute command takes arguments', async () => { @@ -723,13 +714,13 @@ suite('Notebook API tests', function () { const editor = vscode.window.activeNotebookEditor!; const cell = editor.document.cellAt(0); - await withEvent(vscode.notebook.onDidChangeCellOutputs, async (event) => { + await withEvent(vscode.notebooks.onDidChangeCellOutputs, async (event) => { await vscode.commands.executeCommand('notebook.execute'); await event; assert.strictEqual(cell.outputs.length, 1, 'should execute'); // runnable, it worked }); - const clearChangeEvent = asPromise(vscode.notebook.onDidChangeCellOutputs); + const clearChangeEvent = asPromise(vscode.notebooks.onDidChangeCellOutputs); await vscode.commands.executeCommand('notebook.cell.clearOutputs'); await clearChangeEvent; assert.strictEqual(cell.outputs.length, 0, 'should clear'); @@ -737,47 +728,40 @@ suite('Notebook API tests', function () { const secondResource = await createRandomNotebookFile(); await vscode.commands.executeCommand('vscode.openWith', secondResource, 'notebookCoreTest'); - await withEvent(vscode.notebook.onDidChangeCellOutputs, async (event) => { + await withEvent(vscode.notebooks.onDidChangeCellOutputs, async (event) => { await vscode.commands.executeCommand('notebook.execute', resource); await event; assert.strictEqual(cell.outputs.length, 1, 'should execute'); // runnable, it worked assert.strictEqual(vscode.window.activeNotebookEditor?.document.uri.fsPath, secondResource.fsPath); }); - - await saveAllFilesAndCloseAll(undefined); }); test('cell execute and select kernel', async function () { - const resource = await createRandomNotebookFile(); - await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); - assert.strictEqual(vscode.window.activeNotebookEditor !== undefined, true, 'notebook first'); - const editor = vscode.window.activeNotebookEditor!; + const notebook = await openRandomNotebookDocument(); + const editor = await vscode.window.showNotebookDocument(notebook); + assert.strictEqual(vscode.window.activeNotebookEditor === editor, true, 'notebook first'); + const cell = editor.document.cellAt(0); - await withEvent(vscode.notebook.onDidChangeCellOutputs, async (event) => { + await withEvent(vscode.notebooks.onDidChangeCellOutputs, async (event) => { + await assertKernel(kernel1, notebook); await vscode.commands.executeCommand('notebook.cell.execute'); await event; assert.strictEqual(cell.outputs.length, 1, 'should execute'); // runnable, it worked - assert.strictEqual(cell.outputs[0].outputs.length, 1); - assert.strictEqual(cell.outputs[0].outputs[0].mime, 'text/plain'); - assert.deepStrictEqual(cell.outputs[0].outputs[0].value, [ - 'my output' - ]); + assert.strictEqual(cell.outputs[0].items.length, 1); + assert.strictEqual(cell.outputs[0].items[0].mime, 'text/plain'); + assert.deepStrictEqual(new TextDecoder().decode(cell.outputs[0].items[0].data), 'my output'); }); - await withEvent(vscode.notebook.onDidChangeCellOutputs, async (event) => { - await assertKernel(kernel2.controller); + await withEvent(vscode.notebooks.onDidChangeCellOutputs, async (event) => { + await assertKernel(kernel2, notebook); await vscode.commands.executeCommand('notebook.cell.execute'); await event; assert.strictEqual(cell.outputs.length, 1, 'should execute'); // runnable, it worked - assert.strictEqual(cell.outputs[0].outputs.length, 1); - assert.strictEqual(cell.outputs[0].outputs[0].mime, 'text/plain'); - assert.deepStrictEqual(cell.outputs[0].outputs[0].value, [ - 'my second output' - ]); + assert.strictEqual(cell.outputs[0].items.length, 1); + assert.strictEqual(cell.outputs[0].items[0].mime, 'text/plain'); + assert.deepStrictEqual(new TextDecoder().decode(cell.outputs[0].items[0].data), 'my second output'); }); - - await saveAllFilesAndCloseAll(undefined); }); test('set outputs on cancel', async () => { @@ -790,87 +774,78 @@ suite('Notebook API tests', function () { override async _execute(cells: vscode.NotebookCell[]) { for (const cell of cells) { - const task = this.controller.createNotebookCellExecutionTask(cell); + const task = this.controller.createNotebookCellExecution(cell); task.start(); task.token.onCancellationRequested(async () => { await task.replaceOutput([new vscode.NotebookCellOutput([ - new vscode.NotebookCellOutputItem('text/plain', ['Canceled'], undefined) + vscode.NotebookCellOutputItem.text('Canceled', 'text/plain') ])]); - task.end({}); + task.end(undefined); }); } } }; - const resource = await createRandomNotebookFile(); - await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); - const editor = vscode.window.activeNotebookEditor!; + const notebook = await openRandomNotebookDocument(); + const editor = await vscode.window.showNotebookDocument(notebook); const cell = editor.document.cellAt(0); - await assertKernel(cancelableKernel.controller); - await withEvent(vscode.notebook.onDidChangeCellOutputs, async (event) => { + await withEvent(vscode.notebooks.onDidChangeCellOutputs, async (event) => { + await assertKernel(cancelableKernel, notebook); + assert.ok(editor === vscode.window.activeNotebookEditor); await vscode.commands.executeCommand('notebook.cell.execute'); await vscode.commands.executeCommand('notebook.cell.cancelExecution'); await event; assert.strictEqual(cell.outputs.length, 1, 'should execute'); // runnable, it worked - assert.strictEqual(cell.outputs[0].outputs.length, 1); - assert.strictEqual(cell.outputs[0].outputs[0].mime, 'text/plain'); - assert.deepStrictEqual(cell.outputs[0].outputs[0].value, [ - 'Canceled' - ]); + assert.strictEqual(cell.outputs[0].items.length, 1); + assert.strictEqual(cell.outputs[0].items[0].mime, 'text/plain'); + assert.deepStrictEqual(new TextDecoder().decode(cell.outputs[0].items[0].data), 'Canceled'); }); cancelableKernel.controller.dispose(); - await saveAllFilesAndCloseAll(undefined); }); test('set outputs on interrupt', async () => { const interruptableKernel = new class extends Kernel { - constructor() { super('interruptableKernel', 'Notebook Interruptable Test Kernel'); this.controller.interruptHandler = this.interrupt.bind(this); } - private _task: vscode.NotebookCellExecutionTask | undefined; + private _task: vscode.NotebookCellExecution | undefined; override async _execute(cells: vscode.NotebookCell[]) { - this._task = this.controller.createNotebookCellExecutionTask(cells[0]); + this._task = this.controller.createNotebookCellExecution(cells[0]); this._task.start(); } - async interrupt() { await this._task!.replaceOutput([new vscode.NotebookCellOutput([ - new vscode.NotebookCellOutputItem('text/plain', ['Interrupted'], undefined) + vscode.NotebookCellOutputItem.text('Interrupted', 'text/plain') ])]); - this._task!.end({}); + this._task!.end(undefined); } }; - const resource = await createRandomNotebookFile(); - await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); - const editor = vscode.window.activeNotebookEditor!; + const notebook = await openRandomNotebookDocument(); + const editor = await vscode.window.showNotebookDocument(notebook); const cell = editor.document.cellAt(0); - await assertKernel(interruptableKernel.controller); - - await withEvent(vscode.notebook.onDidChangeCellOutputs, async (event) => { + await withEvent(vscode.notebooks.onDidChangeCellOutputs, async (event) => { + await assertKernel(interruptableKernel, notebook); + assert.ok(editor === vscode.window.activeNotebookEditor); await vscode.commands.executeCommand('notebook.cell.execute'); await vscode.commands.executeCommand('notebook.cell.cancelExecution'); await event; assert.strictEqual(cell.outputs.length, 1, 'should execute'); // runnable, it worked - assert.strictEqual(cell.outputs[0].outputs.length, 1); - assert.strictEqual(cell.outputs[0].outputs[0].mime, 'text/plain'); - assert.deepStrictEqual(cell.outputs[0].outputs[0].value, [ - 'Interrupted' - ]); + assert.strictEqual(cell.outputs[0].items.length, 1); + assert.strictEqual(cell.outputs[0].items[0].mime, 'text/plain'); + assert.deepStrictEqual(new TextDecoder().decode(cell.outputs[0].items[0].data), 'Interrupted'); }); interruptableKernel.controller.dispose(); - await saveAllFilesAndCloseAll(undefined); }); test('onDidChangeCellExecutionState is fired', async () => { @@ -883,14 +858,14 @@ suite('Notebook API tests', function () { let eventCount = 0; let resolve: () => void; const p = new Promise(r => resolve = r); - const listener = vscode.notebook.onDidChangeCellExecutionState(e => { + const listener = vscode.notebooks.onDidChangeNotebookCellExecutionState(e => { if (eventCount === 0) { - assert.strictEqual(e.executionState, vscode.NotebookCellExecutionState.Pending, 'should be set to Pending'); + assert.strictEqual(e.state, vscode.NotebookCellExecutionState.Pending, 'should be set to Pending'); } else if (eventCount === 1) { - assert.strictEqual(e.executionState, vscode.NotebookCellExecutionState.Executing, 'should be set to Executing'); + assert.strictEqual(e.state, vscode.NotebookCellExecutionState.Executing, 'should be set to Executing'); assert.strictEqual(cell.outputs.length, 0, 'no outputs yet: ' + JSON.stringify(cell.outputs[0])); } else if (eventCount === 2) { - assert.strictEqual(e.executionState, vscode.NotebookCellExecutionState.Idle, 'should be set to Idle'); + assert.strictEqual(e.state, vscode.NotebookCellExecutionState.Idle, 'should be set to Idle'); assert.strictEqual(cell.outputs.length, 1, 'should have an output'); resolve(); } @@ -900,7 +875,6 @@ suite('Notebook API tests', function () { await p; listener.dispose(); - await saveAllFilesAndCloseAll(undefined); }); // suite('notebook dirty state', () => { @@ -930,8 +904,6 @@ suite('Notebook API tests', function () { assert.deepStrictEqual(vscode.window.activeNotebookEditor?.document.cellAt(1), getFocusedCell(vscode.window.activeNotebookEditor)); assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor)?.document.getText(), 'var abc = 0;'); }); - - await saveFileAndCloseAll(resource); }); // }); @@ -974,8 +946,6 @@ suite('Notebook API tests', function () { // assert.strictEqual(vscode.window.activeNotebookEditor!.document.cellCount, 2); // assert.strictEqual(vscode.window.activeNotebookEditor!.document.getCells().indexOf(getFocusedCell(vscode.window.activeNotebookEditor)!), 1); // assert.strictEqual(vscode.window.activeNotebookEditor?.selection?.document.getText(), 'test'); - - await saveFileAndCloseAll(resource); }); test('multiple tabs: dirty + clean', async function () { @@ -999,10 +969,9 @@ suite('Notebook API tests', function () { assert.deepStrictEqual(vscode.window.activeNotebookEditor?.document.cellCount, 4); assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor)?.document.getText(), 'var abc = 0;'); - await saveFileAndCloseAll(resource); }); - test('multiple tabs: two dirty tabs and switching', async function () { + test.skip('multiple tabs: two dirty tabs and switching', async function () { const resource = await createRandomNotebookFile(); await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); await vscode.commands.executeCommand('notebook.cell.insertCodeCellBelow'); @@ -1032,27 +1001,26 @@ suite('Notebook API tests', function () { assert.deepStrictEqual(vscode.window.activeNotebookEditor?.document.cellCount, 3); assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor)?.document.getText(), ''); - await saveAllFilesAndCloseAll(secondResource); }); - test.skip('multiple tabs: different editors with same document', async function () { - const resource = await createRandomNotebookFile(); - await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); - const firstNotebookEditor = vscode.window.activeNotebookEditor; + test('multiple tabs: different editors with same document', async function () { + + const notebook = await openRandomNotebookDocument(); + const firstNotebookEditor = await vscode.window.showNotebookDocument(notebook, { viewColumn: vscode.ViewColumn.One }); + assert.ok(firstNotebookEditor === vscode.window.activeNotebookEditor); + assert.strictEqual(firstNotebookEditor !== undefined, true, 'notebook first'); assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor!)?.document.getText(), 'test'); assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor!)?.document.languageId, 'typescript'); - await splitEditor(); - const secondNotebookEditor = vscode.window.activeNotebookEditor; + const secondNotebookEditor = await vscode.window.showNotebookDocument(notebook, { viewColumn: vscode.ViewColumn.Beside }); assert.strictEqual(secondNotebookEditor !== undefined, true, 'notebook first'); assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor!)?.document.getText(), 'test'); assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor!)?.document.languageId, 'typescript'); - assert.notEqual(firstNotebookEditor, secondNotebookEditor); + assert.notStrictEqual(firstNotebookEditor, secondNotebookEditor); assert.strictEqual(firstNotebookEditor?.document, secondNotebookEditor?.document, 'split notebook editors share the same document'); - await saveAllFilesAndCloseAll(resource); }); test('custom metadata should be supported', async function () { @@ -1063,7 +1031,6 @@ suite('Notebook API tests', function () { assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor)?.metadata.custom!['testCellMetadata'] as number, 123); assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor)?.document.languageId, 'typescript'); - await saveFileAndCloseAll(resource); }); @@ -1082,42 +1049,37 @@ suite('Notebook API tests', function () { // assert.strictEqual(vscode.window.activeNotebookEditor!.document.getCells().indexOf(activeCell!), 1); // assert.strictEqual(activeCell?.metadata.custom!['testCellMetadata'] as number, 123); - await saveFileAndCloseAll(resource); }); - test('#106657. Opening a notebook from markers view is broken ', async function () { - const resource = await createRandomNotebookFile(); - await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); + test.skip('#106657. Opening a notebook from markers view is broken ', async function () { - const document = vscode.window.activeNotebookEditor?.document!; + const document = await openRandomNotebookDocument(); const [cell] = document.getCells(); - await saveAllFilesAndCloseAll(document.uri); assert.strictEqual(vscode.window.activeNotebookEditor, undefined); // opening a cell-uri opens a notebook editor - await vscode.commands.executeCommand('vscode.open', cell.document.uri, vscode.ViewColumn.Active); + await vscode.window.showTextDocument(cell.document, { viewColumn: vscode.ViewColumn.Active }); + // await vscode.commands.executeCommand('vscode.open', cell.document.uri, vscode.ViewColumn.Active); assert.strictEqual(!!vscode.window.activeNotebookEditor, true); - assert.strictEqual(vscode.window.activeNotebookEditor!.document.uri.toString(), resource.toString()); + assert.strictEqual(vscode.window.activeNotebookEditor!.document.uri.toString(), document.uri.toString()); }); - test.skip('Cannot open notebook from cell-uri with vscode.open-command', async function () { - const resource = await createRandomNotebookFile(); - await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); + test('Cannot open notebook from cell-uri with vscode.open-command', async function () { - const document = vscode.window.activeNotebookEditor?.document!; + const document = await openRandomNotebookDocument(); const [cell] = document.getCells(); - await saveAllFilesAndCloseAll(document.uri); + await saveAllFilesAndCloseAll(); assert.strictEqual(vscode.window.activeNotebookEditor, undefined); // BUG is that the editor opener (https://github.com/microsoft/vscode/blob/8e7877bdc442f1e83a7fec51920d82b696139129/src/vs/editor/browser/services/openerService.ts#L69) // removes the fragment if it matches something numeric. For notebooks that's not wanted... await vscode.commands.executeCommand('vscode.open', cell.document.uri); - assert.strictEqual(vscode.window.activeNotebookEditor!.document.uri.toString(), resource.toString()); + assert.strictEqual(vscode.window.activeNotebookEditor!.document.uri.toString(), document.uri.toString()); }); test('#97830, #97764. Support switch to other editor types', async function () { @@ -1137,8 +1099,6 @@ suite('Notebook API tests', function () { await vscode.commands.executeCommand('vscode.openWith', resource, 'default'); assert.strictEqual(vscode.window.activeTextEditor?.document.uri.path, resource.path); - - await closeAllEditors(); }); // open text editor, pin, and then open a notebook @@ -1151,15 +1111,14 @@ suite('Notebook API tests', function () { // now it's dirty, open the resource with notebook editor should open a new one await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); - assert.notEqual(vscode.window.activeNotebookEditor, undefined, 'notebook first'); - // assert.notEqual(vscode.window.activeTextEditor, undefined); + assert.notStrictEqual(vscode.window.activeNotebookEditor, undefined, 'notebook first'); + // assert.notStrictEqual(vscode.window.activeTextEditor, undefined); - await closeAllEditors(); }); test('#102411 - untitled notebook creation failed', async function () { await vscode.commands.executeCommand('workbench.action.files.newUntitledFile', { viewType: 'notebookCoreTest' }); - assert.notEqual(vscode.window.activeNotebookEditor, undefined, 'untitled notebook editor is not undefined'); + assert.notStrictEqual(vscode.window.activeNotebookEditor, undefined, 'untitled notebook editor is not undefined'); await closeAllEditors(); }); @@ -1182,26 +1141,26 @@ suite('Notebook API tests', function () { await vscode.workspace.applyEdit(edit); assert.strictEqual(vscode.window.activeNotebookEditor!.document.getCells().length, 3); - assert.notEqual(vscode.window.activeNotebookEditor!.document.cellAt(0).document.getText(), vscode.window.activeNotebookEditor!.document.cellAt(1).document.getText()); + assert.notStrictEqual(vscode.window.activeNotebookEditor!.document.cellAt(0).document.getText(), vscode.window.activeNotebookEditor!.document.cellAt(1).document.getText()); await closeAllEditors(); }); test('#115855 onDidSaveNotebookDocument', async function () { const resource = await createRandomNotebookFile(); - const notebook = await vscode.notebook.openNotebookDocument(resource); + const notebook = await vscode.workspace.openNotebookDocument(resource); const editor = await vscode.window.showNotebookDocument(notebook); - const cellsChangeEvent = asPromise(vscode.notebook.onDidChangeNotebookCells); + const cellsChangeEvent = asPromise(vscode.notebooks.onDidChangeNotebookCells); await editor.edit(editBuilder => { - editBuilder.replaceCells(1, 0, [{ kind: vscode.NotebookCellKind.Code, language: 'javascript', source: 'test 2', outputs: [], metadata: undefined }]); + editBuilder.replaceCells(1, 0, [{ kind: vscode.NotebookCellKind.Code, languageId: 'javascript', value: 'test 2', outputs: [], metadata: undefined }]); }); const cellChangeEventRet = await cellsChangeEvent; assert.strictEqual(cellChangeEventRet.document === notebook, true); assert.strictEqual(cellChangeEventRet.document.isDirty, true); - const saveEvent = asPromise(vscode.notebook.onDidSaveNotebookDocument); + const saveEvent = asPromise(vscode.notebooks.onDidSaveNotebookDocument); await notebook.save(); @@ -1210,6 +1169,9 @@ suite('Notebook API tests', function () { }); test('Output changes are applied once the promise resolves', async function () { + + let called = false; + const verifyOutputSyncKernel = new class extends Kernel { constructor() { @@ -1218,54 +1180,51 @@ suite('Notebook API tests', function () { override async _execute(cells: vscode.NotebookCell[]) { const [cell] = cells; - const task = this.controller.createNotebookCellExecutionTask(cell); + const task = this.controller.createNotebookCellExecution(cell); task.start(); await task.replaceOutput([new vscode.NotebookCellOutput([ - new vscode.NotebookCellOutputItem('text/plain', ['Some output'], undefined) + vscode.NotebookCellOutputItem.text('Some output', 'text/plain') ])]); assert.strictEqual(cell.notebook.cellAt(0).outputs.length, 1); - assert.deepStrictEqual(cell.notebook.cellAt(0).outputs[0].outputs[0].value, ['Some output']); - task.end({}); + assert.deepStrictEqual(new TextDecoder().decode(cell.notebook.cellAt(0).outputs[0].items[0].data), 'Some output'); + task.end(undefined); + called = true; } }; - const resource = await createRandomNotebookFile(); - await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); - await assertKernel(verifyOutputSyncKernel.controller); + const notebook = await openRandomNotebookDocument(); + await vscode.window.showNotebookDocument(notebook); + await assertKernel(verifyOutputSyncKernel, notebook); await vscode.commands.executeCommand('notebook.cell.execute'); - - await saveAllFilesAndCloseAll(undefined); + assert.strictEqual(called, true); verifyOutputSyncKernel.controller.dispose(); }); - test('latestExecutionSummary', async () => { + test('executionSummary', async () => { const resource = await createRandomNotebookFile(); await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); const editor = vscode.window.activeNotebookEditor!; const cell = editor.document.cellAt(0); - assert.strictEqual(cell.latestExecutionSummary?.success, undefined); - assert.strictEqual(cell.latestExecutionSummary?.executionOrder, undefined); + assert.strictEqual(cell.executionSummary?.success, undefined); + assert.strictEqual(cell.executionSummary?.executionOrder, undefined); await vscode.commands.executeCommand('notebook.cell.execute'); assert.strictEqual(cell.outputs.length, 1, 'should execute'); - assert.ok(cell.latestExecutionSummary); - assert.strictEqual(cell.latestExecutionSummary!.success, true); - assert.strictEqual(typeof cell.latestExecutionSummary!.executionOrder, 'number'); + assert.ok(cell.executionSummary); + assert.strictEqual(cell.executionSummary!.success, true); + assert.strictEqual(typeof cell.executionSummary!.executionOrder, 'number'); - await saveAllFilesAndCloseAll(undefined); }); - test('initialize latestExecutionSummary', async () => { - const resource = await createRandomNotebookFile(); - await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); - const editor = vscode.window.activeNotebookEditor!; - const cell = editor.document.cellAt(0); + test('initialize executionSummary', async () => { + + const document = await openRandomNotebookDocument(); + const cell = document.cellAt(0); - assert.strictEqual(cell.latestExecutionSummary?.success, undefined); - assert.strictEqual(cell.latestExecutionSummary?.startTime, 10); - assert.strictEqual(cell.latestExecutionSummary?.endTime, 20); + assert.strictEqual(cell.executionSummary?.success, undefined); + assert.strictEqual(cell.executionSummary?.timing?.startTime, 10); + assert.strictEqual(cell.executionSummary?.timing?.endTime, 20); - await saveAllFilesAndCloseAll(undefined); }); @@ -1273,7 +1232,7 @@ suite('Notebook API tests', function () { const emitter = new vscode.EventEmitter(); const onDidCallProvide = emitter.event; suiteSetup(() => { - vscode.notebook.registerNotebookCellStatusBarItemProvider({ viewType: 'notebookCoreTest' }, { + vscode.notebooks.registerNotebookCellStatusBarItemProvider('notebookCoreTest', { async provideCellStatusBarItems(cell: vscode.NotebookCell, _token: vscode.CancellationToken): Promise { emitter.fire(cell); return []; @@ -1288,7 +1247,7 @@ suite('Notebook API tests', function () { await provideCalled; const edit = new vscode.WorkspaceEdit(); - edit.replaceNotebookCellMetadata(resource, 0, new vscode.NotebookCellMetadata().with({ inputCollapsed: true })); + edit.replaceNotebookCellMetadata(resource, 0, { inputCollapsed: true }); vscode.workspace.applyEdit(edit); await provideCalled; }); diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/quickInput.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/quickInput.test.ts similarity index 85% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/quickInput.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/quickInput.test.ts index 701c947426bc..0b3b4e921023 100644 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/quickInput.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/quickInput.test.ts @@ -216,10 +216,10 @@ function createQuickPick(expected: QuickPickExpected, done: (err?: any) => void, } try { eventIndex++; - assert.equal('active', expected.events.shift(), `onDidChangeActive (event ${eventIndex})`); + assert.strictEqual('active', expected.events.shift(), `onDidChangeActive (event ${eventIndex})`); const expectedItems = expected.activeItems.shift(); - assert.deepEqual(items.map(item => item.label), expectedItems, `onDidChangeActive event items (event ${eventIndex})`); - assert.deepEqual(quickPick.activeItems.map(item => item.label), expectedItems, `onDidChangeActive active items (event ${eventIndex})`); + assert.deepStrictEqual(items.map(item => item.label), expectedItems, `onDidChangeActive event items (event ${eventIndex})`); + assert.deepStrictEqual(quickPick.activeItems.map(item => item.label), expectedItems, `onDidChangeActive active items (event ${eventIndex})`); } catch (err) { done(err); } @@ -231,10 +231,10 @@ function createQuickPick(expected: QuickPickExpected, done: (err?: any) => void, } try { eventIndex++; - assert.equal('selection', expected.events.shift(), `onDidChangeSelection (event ${eventIndex})`); + assert.strictEqual('selection', expected.events.shift(), `onDidChangeSelection (event ${eventIndex})`); const expectedItems = expected.selectionItems.shift(); - assert.deepEqual(items.map(item => item.label), expectedItems, `onDidChangeSelection event items (event ${eventIndex})`); - assert.deepEqual(quickPick.selectedItems.map(item => item.label), expectedItems, `onDidChangeSelection selected items (event ${eventIndex})`); + assert.deepStrictEqual(items.map(item => item.label), expectedItems, `onDidChangeSelection event items (event ${eventIndex})`); + assert.deepStrictEqual(quickPick.selectedItems.map(item => item.label), expectedItems, `onDidChangeSelection selected items (event ${eventIndex})`); } catch (err) { done(err); } @@ -246,11 +246,11 @@ function createQuickPick(expected: QuickPickExpected, done: (err?: any) => void, } try { eventIndex++; - assert.equal('accept', expected.events.shift(), `onDidAccept (event ${eventIndex})`); + assert.strictEqual('accept', expected.events.shift(), `onDidAccept (event ${eventIndex})`); const expectedActive = expected.acceptedItems.active.shift(); - assert.deepEqual(quickPick.activeItems.map(item => item.label), expectedActive, `onDidAccept active items (event ${eventIndex})`); + assert.deepStrictEqual(quickPick.activeItems.map(item => item.label), expectedActive, `onDidAccept active items (event ${eventIndex})`); const expectedSelection = expected.acceptedItems.selection.shift(); - assert.deepEqual(quickPick.selectedItems.map(item => item.label), expectedSelection, `onDidAccept selected items (event ${eventIndex})`); + assert.deepStrictEqual(quickPick.selectedItems.map(item => item.label), expectedSelection, `onDidAccept selected items (event ${eventIndex})`); if (expected.acceptedItems.dispose.shift()) { quickPick.dispose(); } @@ -265,7 +265,7 @@ function createQuickPick(expected: QuickPickExpected, done: (err?: any) => void, return; } try { - assert.equal('hide', expected.events.shift()); + assert.strictEqual('hide', expected.events.shift()); done(); } catch (err) { done(err); diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/rpc.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/rpc.test.ts similarity index 91% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/rpc.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/rpc.test.ts index 2b336f097189..5fdf01fada48 100644 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/rpc.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/rpc.test.ts @@ -90,8 +90,14 @@ suite('vscode', function () { }); test('no rpc, createNotebookEditorDecorationType(...)', function () { - const item = vscode.notebook.createNotebookEditorDecorationType({ top: {} }); + const item = vscode.notebooks.createNotebookEditorDecorationType({ top: {} }); dispo.push(item); assertNoRpcFromEntry([item, 'NotebookEditorDecorationType']); }); + + test('no rpc, createNotebookController(...)', function () { + const ctrl = vscode.notebooks.createNotebookController('foo', 'bar', ''); + dispo.push(ctrl); + assertNoRpcFromEntry([ctrl, 'NotebookController']); + }); }); diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts new file mode 100644 index 000000000000..da2da9499fcc --- /dev/null +++ b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts @@ -0,0 +1,860 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { window, Pseudoterminal, EventEmitter, TerminalDimensions, workspace, ConfigurationTarget, Disposable, UIKind, env, EnvironmentVariableMutatorType, EnvironmentVariableMutator, extensions, ExtensionContext, TerminalOptions, ExtensionTerminalOptions, Terminal } from 'vscode'; +import { doesNotThrow, equal, deepEqual, throws, strictEqual } from 'assert'; +import { assertNoRpc } from '../utils'; + +// Disable terminal tests: +// - Web https://github.com/microsoft/vscode/issues/92826 +(env.uiKind === UIKind.Web ? suite.skip : suite)('vscode API - terminal', () => { + let extensionContext: ExtensionContext; + + suiteSetup(async () => { + // Trigger extension activation and grab the context as some tests depend on it + await extensions.getExtension('vscode.vscode-api-tests')?.activate(); + extensionContext = (global as any).testExtensionContext; + + const config = workspace.getConfiguration('terminal.integrated'); + // Disable conpty in integration tests because of https://github.com/microsoft/vscode/issues/76548 + await config.update('windowsEnableConpty', false, ConfigurationTarget.Global); + // Disable exit alerts as tests may trigger then and we're not testing the notifications + await config.update('showExitAlert', false, ConfigurationTarget.Global); + // Canvas may cause problems when running in a container + await config.update('gpuAcceleration', 'off', ConfigurationTarget.Global); + // Disable env var relaunch for tests to prevent terminals relaunching themselves + await config.update('environmentChangesRelaunch', false, ConfigurationTarget.Global); + }); + + suite('Terminal', () => { + let disposables: Disposable[] = []; + + teardown(() => { + assertNoRpc(); + disposables.forEach(d => d.dispose()); + disposables.length = 0; + }); + + test('sendText immediately after createTerminal should not throw', async () => { + const terminal = window.createTerminal(); + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); + doesNotThrow(terminal.sendText.bind(terminal, 'echo "foo"')); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + r(); + } + })); + terminal.dispose(); + }); + }); + + test('echo works in the default shell', async () => { + const terminal = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(terminal); + } + })); + // Use a single character to avoid winpty/conpty issues with injected sequences + const terminal = window.createTerminal({ + env: { TEST: '`' } + }); + terminal.show(); + }); + + let data = ''; + await new Promise(r => { + disposables.push(window.onDidWriteTerminalData(e => { + if (e.terminal === terminal) { + data += e.data; + if (data.indexOf('`') !== 0) { + r(); + } + } + })); + // Print an environment variable value so the echo statement doesn't get matched + if (process.platform === 'win32') { + terminal.sendText(`$env:TEST`); + } else { + terminal.sendText(`echo $TEST`); + } + }); + + await new Promise(r => { + terminal.dispose(); + disposables.push(window.onDidCloseTerminal(t => { + strictEqual(terminal, t); + r(); + })); + }); + }); + + test('onDidCloseTerminal event fires when terminal is disposed', async () => { + const terminal = window.createTerminal(); + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + r(); + } + })); + terminal.dispose(); + }); + }); + + test('processId immediately after createTerminal should fetch the pid', async () => { + const terminal = window.createTerminal(); + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); + let pid = await result.processId; + equal(true, pid && pid > 0); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + r(); + } + })); + terminal.dispose(); + }); + }); + + test('name in constructor should set terminal.name', async () => { + const terminal = window.createTerminal('a'); + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + r(); + } + })); + terminal.dispose(); + }); + }); + + test('creationOptions should be set and readonly for TerminalOptions terminals', async () => { + const options = { + name: 'foo', + hideFromUser: true + }; + const terminal = window.createTerminal(options); + const terminalOptions = terminal.creationOptions as TerminalOptions; + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + r(); + } + })); + terminal.dispose(); + }); + throws(() => terminalOptions.name = 'bad', 'creationOptions should be readonly at runtime'); + }); + + test('onDidOpenTerminal should fire when a terminal is created', async () => { + const terminal = window.createTerminal('b'); + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + r(); + } + })); + terminal.dispose(); + }); + }); + + test('exitStatus.code should be set to undefined after a terminal is disposed', async () => { + const terminal = window.createTerminal(); + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + deepEqual(t.exitStatus, { code: undefined }); + r(); + } + })); + terminal.dispose(); + }); + }); + + // test('onDidChangeActiveTerminal should fire when new terminals are created', (done) => { + // const reg1 = window.onDidChangeActiveTerminal((active: Terminal | undefined) => { + // equal(active, terminal); + // equal(active, window.activeTerminal); + // reg1.dispose(); + // const reg2 = window.onDidChangeActiveTerminal((active: Terminal | undefined) => { + // equal(active, undefined); + // equal(active, window.activeTerminal); + // reg2.dispose(); + // done(); + // }); + // terminal.dispose(); + // }); + // const terminal = window.createTerminal(); + // terminal.show(); + // }); + + // test('onDidChangeTerminalDimensions should fire when new terminals are created', (done) => { + // const reg1 = window.onDidChangeTerminalDimensions(async (event: TerminalDimensionsChangeEvent) => { + // equal(event.terminal, terminal1); + // equal(typeof event.dimensions.columns, 'number'); + // equal(typeof event.dimensions.rows, 'number'); + // ok(event.dimensions.columns > 0); + // ok(event.dimensions.rows > 0); + // reg1.dispose(); + // let terminal2: Terminal; + // const reg2 = window.onDidOpenTerminal((newTerminal) => { + // // This is guarantees to fire before dimensions change event + // if (newTerminal !== terminal1) { + // terminal2 = newTerminal; + // reg2.dispose(); + // } + // }); + // let firstCalled = false; + // let secondCalled = false; + // const reg3 = window.onDidChangeTerminalDimensions((event: TerminalDimensionsChangeEvent) => { + // if (event.terminal === terminal1) { + // // The original terminal should fire dimension change after a split + // firstCalled = true; + // } else if (event.terminal !== terminal1) { + // // The new split terminal should fire dimension change + // secondCalled = true; + // } + // if (firstCalled && secondCalled) { + // let firstDisposed = false; + // let secondDisposed = false; + // const reg4 = window.onDidCloseTerminal(term => { + // if (term === terminal1) { + // firstDisposed = true; + // } + // if (term === terminal2) { + // secondDisposed = true; + // } + // if (firstDisposed && secondDisposed) { + // reg4.dispose(); + // done(); + // } + // }); + // terminal1.dispose(); + // terminal2.dispose(); + // reg3.dispose(); + // } + // }); + // await timeout(500); + // commands.executeCommand('workbench.action.terminal.split'); + // }); + // const terminal1 = window.createTerminal({ name: 'test' }); + // terminal1.show(); + // }); + + suite('hideFromUser', () => { + test('should be available to terminals API', async () => { + const terminal = window.createTerminal({ name: 'bg', hideFromUser: true }); + const result = await new Promise(r => { + disposables.push(window.onDidOpenTerminal(t => { + if (t === terminal) { + r(t); + } + })); + }); + equal(result, terminal); + equal(true, window.terminals.indexOf(terminal) !== -1); + await new Promise(r => { + disposables.push(window.onDidCloseTerminal(t => { + if (t === terminal) { + r(); + } + })); + terminal.dispose(); + }); + }); + }); + + suite('window.onDidWriteTerminalData', () => { + test('should listen to all future terminal data events', (done) => { + const openEvents: string[] = []; + const dataEvents: { name: string, data: string }[] = []; + const closeEvents: string[] = []; + disposables.push(window.onDidOpenTerminal(e => openEvents.push(e.name))); + + let resolveOnceDataWritten: (() => void) | undefined; + let resolveOnceClosed: (() => void) | undefined; + + disposables.push(window.onDidWriteTerminalData(e => { + dataEvents.push({ name: e.terminal.name, data: e.data }); + + resolveOnceDataWritten!(); + })); + + disposables.push(window.onDidCloseTerminal(e => { + closeEvents.push(e.name); + try { + if (closeEvents.length === 1) { + deepEqual(openEvents, ['test1']); + deepEqual(dataEvents, [{ name: 'test1', data: 'write1' }]); + deepEqual(closeEvents, ['test1']); + } else if (closeEvents.length === 2) { + deepEqual(openEvents, ['test1', 'test2']); + deepEqual(dataEvents, [{ name: 'test1', data: 'write1' }, { name: 'test2', data: 'write2' }]); + deepEqual(closeEvents, ['test1', 'test2']); + } + resolveOnceClosed!(); + } catch (e) { + done(e); + } + })); + + const term1Write = new EventEmitter(); + const term1Close = new EventEmitter(); + window.createTerminal({ + name: 'test1', pty: { + onDidWrite: term1Write.event, + onDidClose: term1Close.event, + open: async () => { + term1Write.fire('write1'); + + // Wait until the data is written + await new Promise(resolve => { resolveOnceDataWritten = resolve; }); + + term1Close.fire(); + + // Wait until the terminal is closed + await new Promise(resolve => { resolveOnceClosed = resolve; }); + + const term2Write = new EventEmitter(); + const term2Close = new EventEmitter(); + window.createTerminal({ + name: 'test2', pty: { + onDidWrite: term2Write.event, + onDidClose: term2Close.event, + open: async () => { + term2Write.fire('write2'); + + // Wait until the data is written + await new Promise(resolve => { resolveOnceDataWritten = resolve; }); + + term2Close.fire(); + + // Wait until the terminal is closed + await new Promise(resolve => { resolveOnceClosed = resolve; }); + + done(); + }, + close: () => { } + } + }); + }, + close: () => { } + } + }); + }); + }); + + suite('Extension pty terminals', () => { + test('should fire onDidOpenTerminal and onDidCloseTerminal', (done) => { + disposables.push(window.onDidOpenTerminal(term => { + try { + equal(term.name, 'c'); + } catch (e) { + done(e); + return; + } + disposables.push(window.onDidCloseTerminal(() => done())); + term.dispose(); + })); + const pty: Pseudoterminal = { + onDidWrite: new EventEmitter().event, + open: () => { }, + close: () => { } + }; + window.createTerminal({ name: 'c', pty }); + }); + + // The below tests depend on global UI state and each other + // test('should not provide dimensions on start as the terminal has not been shown yet', (done) => { + // const reg1 = window.onDidOpenTerminal(term => { + // equal(terminal, term); + // reg1.dispose(); + // }); + // const pty: Pseudoterminal = { + // onDidWrite: new EventEmitter().event, + // open: (dimensions) => { + // equal(dimensions, undefined); + // const reg3 = window.onDidCloseTerminal(() => { + // reg3.dispose(); + // done(); + // }); + // // Show a terminal and wait a brief period before dispose, this will cause + // // the panel to init it's dimenisons and be provided to following terminals. + // // The following test depends on this. + // terminal.show(); + // setTimeout(() => terminal.dispose(), 200); + // }, + // close: () => {} + // }; + // const terminal = window.createTerminal({ name: 'foo', pty }); + // }); + // test('should provide dimensions on start as the terminal has been shown', (done) => { + // const reg1 = window.onDidOpenTerminal(term => { + // equal(terminal, term); + // reg1.dispose(); + // }); + // const pty: Pseudoterminal = { + // onDidWrite: new EventEmitter().event, + // open: (dimensions) => { + // // This test depends on Terminal.show being called some time before such + // // that the panel dimensions are initialized and cached. + // ok(dimensions!.columns > 0); + // ok(dimensions!.rows > 0); + // const reg3 = window.onDidCloseTerminal(() => { + // reg3.dispose(); + // done(); + // }); + // terminal.dispose(); + // }, + // close: () => {} + // }; + // const terminal = window.createTerminal({ name: 'foo', pty }); + // }); + + test.skip('should respect dimension overrides', (done) => { + disposables.push(window.onDidOpenTerminal(term => { + try { + equal(terminal, term); + } catch (e) { + done(e); + return; + } + term.show(); + disposables.push(window.onDidChangeTerminalDimensions(e => { + // The default pty dimensions have a chance to appear here since override + // dimensions happens after the terminal is created. If so just ignore and + // wait for the right dimensions + if (e.dimensions.columns === 10 || e.dimensions.rows === 5) { + try { + equal(e.terminal, terminal); + } catch (e) { + done(e); + return; + } + disposables.push(window.onDidCloseTerminal(() => done())); + terminal.dispose(); + } + })); + })); + const writeEmitter = new EventEmitter(); + const overrideDimensionsEmitter = new EventEmitter(); + const pty: Pseudoterminal = { + onDidWrite: writeEmitter.event, + onDidOverrideDimensions: overrideDimensionsEmitter.event, + open: () => overrideDimensionsEmitter.fire({ columns: 10, rows: 5 }), + close: () => { } + }; + const terminal = window.createTerminal({ name: 'foo', pty }); + }); + + test('should change terminal name', (done) => { + disposables.push(window.onDidOpenTerminal(term => { + try { + equal(terminal, term); + equal(terminal.name, 'foo'); + } catch (e) { + done(e); + return; + } + disposables.push(window.onDidCloseTerminal(t => { + try { + equal(terminal, t); + equal(terminal.name, 'bar'); + } catch (e) { + done(e); + return; + } + done(); + })); + })); + const changeNameEmitter = new EventEmitter(); + const closeEmitter = new EventEmitter(); + const pty: Pseudoterminal = { + onDidWrite: new EventEmitter().event, + onDidChangeName: changeNameEmitter.event, + onDidClose: closeEmitter.event, + open: () => { + changeNameEmitter.fire('bar'); + closeEmitter.fire(undefined); + }, + close: () => { } + }; + const terminal = window.createTerminal({ name: 'foo', pty }); + }); + + test('exitStatus.code should be set to the exit code (undefined)', (done) => { + disposables.push(window.onDidOpenTerminal(term => { + try { + equal(terminal, term); + equal(terminal.exitStatus, undefined); + } catch (e) { + done(e); + return; + } + disposables.push(window.onDidCloseTerminal(t => { + try { + equal(terminal, t); + deepEqual(terminal.exitStatus, { code: undefined }); + } catch (e) { + done(e); + return; + } + done(); + })); + })); + const writeEmitter = new EventEmitter(); + const closeEmitter = new EventEmitter(); + const pty: Pseudoterminal = { + onDidWrite: writeEmitter.event, + onDidClose: closeEmitter.event, + open: () => closeEmitter.fire(undefined), + close: () => { } + }; + const terminal = window.createTerminal({ name: 'foo', pty }); + }); + + test('exitStatus.code should be set to the exit code (zero)', (done) => { + disposables.push(window.onDidOpenTerminal(term => { + try { + equal(terminal, term); + equal(terminal.exitStatus, undefined); + } catch (e) { + done(e); + return; + } + disposables.push(window.onDidCloseTerminal(t => { + try { + equal(terminal, t); + deepEqual(terminal.exitStatus, { code: 0 }); + } catch (e) { + done(e); + return; + } + done(); + })); + })); + const writeEmitter = new EventEmitter(); + const closeEmitter = new EventEmitter(); + const pty: Pseudoterminal = { + onDidWrite: writeEmitter.event, + onDidClose: closeEmitter.event, + open: () => closeEmitter.fire(0), + close: () => { } + }; + const terminal = window.createTerminal({ name: 'foo', pty }); + }); + + test('exitStatus.code should be set to the exit code (non-zero)', (done) => { + disposables.push(window.onDidOpenTerminal(term => { + try { + equal(terminal, term); + equal(terminal.exitStatus, undefined); + } catch (e) { + done(e); + return; + } + disposables.push(window.onDidCloseTerminal(t => { + try { + equal(terminal, t); + deepEqual(terminal.exitStatus, { code: 22 }); + } catch (e) { + done(e); + return; + } + done(); + })); + })); + const writeEmitter = new EventEmitter(); + const closeEmitter = new EventEmitter(); + const pty: Pseudoterminal = { + onDidWrite: writeEmitter.event, + onDidClose: closeEmitter.event, + open: () => { + // Wait 500ms as any exits that occur within 500ms of terminal launch are + // are counted as "exiting during launch" which triggers a notification even + // when showExitAlerts is true + setTimeout(() => closeEmitter.fire(22), 500); + }, + close: () => { } + }; + const terminal = window.createTerminal({ name: 'foo', pty }); + }); + + test('creationOptions should be set and readonly for ExtensionTerminalOptions terminals', (done) => { + disposables.push(window.onDidOpenTerminal(term => { + try { + equal(terminal, term); + } catch (e) { + done(e); + return; + } + terminal.dispose(); + disposables.push(window.onDidCloseTerminal(() => done())); + })); + const writeEmitter = new EventEmitter(); + const pty: Pseudoterminal = { + onDidWrite: writeEmitter.event, + open: () => { }, + close: () => { } + }; + const options = { name: 'foo', pty }; + const terminal = window.createTerminal(options); + try { + equal(terminal.name, 'foo'); + const terminalOptions = terminal.creationOptions as ExtensionTerminalOptions; + equal(terminalOptions.name, 'foo'); + equal(terminalOptions.pty, pty); + throws(() => terminalOptions.name = 'bad', 'creationOptions should be readonly at runtime'); + } catch (e) { + done(e); + } + }); + }); + + // https://github.com/microsoft/vscode/issues/119826 + suite.skip('environmentVariableCollection', () => { + test('should have collection variables apply to terminals immediately after setting', (done) => { + // Text to match on before passing the test + const expectedText = [ + '~a2~', + 'b1~b2~', + '~c2~c1' + ]; + disposables.push(window.onDidWriteTerminalData(e => { + if (terminal !== e.terminal) { + return; + } + // Multiple expected could show up in the same data event + while (expectedText.length > 0 && e.data.indexOf(expectedText[0]) >= 0) { + expectedText.shift(); + // Check if all string are found, if so finish the test + if (expectedText.length === 0) { + disposables.push(window.onDidCloseTerminal(() => done())); + terminal.dispose(); + } + } + })); + const collection = extensionContext.environmentVariableCollection; + disposables.push({ dispose: () => collection.clear() }); + collection.replace('A', '~a2~'); + collection.append('B', '~b2~'); + collection.prepend('C', '~c2~'); + const terminal = window.createTerminal({ + env: { + A: 'a1', + B: 'b1', + C: 'c1' + } + }); + // Run both PowerShell and sh commands, errors don't matter we're just looking for + // the correct output + terminal.sendText('$env:A'); + terminal.sendText('echo $A'); + terminal.sendText('$env:B'); + terminal.sendText('echo $B'); + terminal.sendText('$env:C'); + terminal.sendText('echo $C'); + }); + + test('should have collection variables apply to environment variables that don\'t exist', (done) => { + // Text to match on before passing the test + const expectedText = [ + '~a2~', + '~b2~', + '~c2~' + ]; + disposables.push(window.onDidWriteTerminalData(e => { + if (terminal !== e.terminal) { + return; + } + // Multiple expected could show up in the same data event + while (expectedText.length > 0 && e.data.indexOf(expectedText[0]) >= 0) { + expectedText.shift(); + // Check if all string are found, if so finish the test + if (expectedText.length === 0) { + disposables.push(window.onDidCloseTerminal(() => done())); + terminal.dispose(); + } + } + })); + const collection = extensionContext.environmentVariableCollection; + disposables.push({ dispose: () => collection.clear() }); + collection.replace('A', '~a2~'); + collection.append('B', '~b2~'); + collection.prepend('C', '~c2~'); + const terminal = window.createTerminal({ + env: { + A: null, + B: null, + C: null + } + }); + // Run both PowerShell and sh commands, errors don't matter we're just looking for + // the correct output + terminal.sendText('$env:A'); + terminal.sendText('echo $A'); + terminal.sendText('$env:B'); + terminal.sendText('echo $B'); + terminal.sendText('$env:C'); + terminal.sendText('echo $C'); + }); + + test('should respect clearing entries', (done) => { + // Text to match on before passing the test + const expectedText = [ + '~a1~', + '~b1~' + ]; + disposables.push(window.onDidWriteTerminalData(e => { + if (terminal !== e.terminal) { + return; + } + // Multiple expected could show up in the same data event + while (expectedText.length > 0 && e.data.indexOf(expectedText[0]) >= 0) { + expectedText.shift(); + // Check if all string are found, if so finish the test + if (expectedText.length === 0) { + disposables.push(window.onDidCloseTerminal(() => done())); + terminal.dispose(); + } + } + })); + const collection = extensionContext.environmentVariableCollection; + disposables.push({ dispose: () => collection.clear() }); + collection.replace('A', '~a2~'); + collection.replace('B', '~a2~'); + collection.clear(); + const terminal = window.createTerminal({ + env: { + A: '~a1~', + B: '~b1~' + } + }); + // Run both PowerShell and sh commands, errors don't matter we're just looking for + // the correct output + terminal.sendText('$env:A'); + terminal.sendText('echo $A'); + terminal.sendText('$env:B'); + terminal.sendText('echo $B'); + }); + + test('should respect deleting entries', (done) => { + // Text to match on before passing the test + const expectedText = [ + '~a1~', + '~b2~' + ]; + disposables.push(window.onDidWriteTerminalData(e => { + if (terminal !== e.terminal) { + return; + } + // Multiple expected could show up in the same data event + while (expectedText.length > 0 && e.data.indexOf(expectedText[0]) >= 0) { + expectedText.shift(); + // Check if all string are found, if so finish the test + if (expectedText.length === 0) { + disposables.push(window.onDidCloseTerminal(() => done())); + terminal.dispose(); + } + } + })); + const collection = extensionContext.environmentVariableCollection; + disposables.push({ dispose: () => collection.clear() }); + collection.replace('A', '~a2~'); + collection.replace('B', '~b2~'); + collection.delete('A'); + const terminal = window.createTerminal({ + env: { + A: '~a1~', + B: '~b2~' + } + }); + // Run both PowerShell and sh commands, errors don't matter we're just looking for + // the correct output + terminal.sendText('$env:A'); + terminal.sendText('echo $A'); + terminal.sendText('$env:B'); + terminal.sendText('echo $B'); + }); + + test('get and forEach should work', () => { + const collection = extensionContext.environmentVariableCollection; + disposables.push({ dispose: () => collection.clear() }); + collection.replace('A', '~a2~'); + collection.append('B', '~b2~'); + collection.prepend('C', '~c2~'); + + // Verify get + deepEqual(collection.get('A'), { value: '~a2~', type: EnvironmentVariableMutatorType.Replace }); + deepEqual(collection.get('B'), { value: '~b2~', type: EnvironmentVariableMutatorType.Append }); + deepEqual(collection.get('C'), { value: '~c2~', type: EnvironmentVariableMutatorType.Prepend }); + + // Verify forEach + const entries: [string, EnvironmentVariableMutator][] = []; + collection.forEach((v, m) => entries.push([v, m])); + deepEqual(entries, [ + ['A', { value: '~a2~', type: EnvironmentVariableMutatorType.Replace }], + ['B', { value: '~b2~', type: EnvironmentVariableMutatorType.Append }], + ['C', { value: '~c2~', type: EnvironmentVariableMutatorType.Prepend }] + ]); + }); + }); + }); +}); diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/types.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/types.test.ts similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/types.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/types.test.ts diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/webview.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/webview.test.ts similarity index 98% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/webview.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/webview.test.ts index 629fbaace14b..f706b64677f0 100644 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/webview.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/webview.test.ts @@ -17,7 +17,7 @@ function workspaceFile(...segments: string[]) { const testDocument = workspaceFile('bower.json'); -suite.skip('vscode API - webview', () => { +suite('vscode API - webview', () => { const disposables: vscode.Disposable[] = []; function _register(disposable: T) { @@ -400,7 +400,7 @@ suite.skip('vscode API - webview', () => { }); } - test('webviews should transfer ArrayBuffers to and from webviews', async () => { + test.skip('webviews should transfer ArrayBuffers to and from webviews', async () => { const webview = _register(vscode.window.createWebviewPanel(webviewId, 'title', { viewColumn: vscode.ViewColumn.One }, { enableScripts: true, retainContextWhenHidden: true })); const ready = getMessage(webview); webview.webview.html = createHtmlDocumentWithBody(/*html*/` @@ -451,7 +451,7 @@ suite.skip('vscode API - webview', () => { } }); - test('webviews should transfer Typed arrays to and from webviews', async () => { + test.skip('webviews should transfer Typed arrays to and from webviews', async () => { const webview = _register(vscode.window.createWebviewPanel(webviewId, 'title', { viewColumn: vscode.ViewColumn.One }, { enableScripts: true, retainContextWhenHidden: true })); const ready = getMessage(webview); webview.webview.html = createHtmlDocumentWithBody(/*html*/` diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/window.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/window.test.ts similarity index 86% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/window.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/window.test.ts index c30ab5138373..0a403549ce28 100644 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/window.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/window.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; -import { workspace, window, commands, ViewColumn, TextEditorViewColumnChangeEvent, Uri, Selection, Position, CancellationTokenSource, TextEditorSelectionChangeKind, QuickPickItem, TextEditor } from 'vscode'; +import { workspace, window, commands, ViewColumn, TextEditorViewColumnChangeEvent, Uri, Selection, Position, CancellationTokenSource, TextEditorSelectionChangeKind, QuickPickItem, TextEditor, StatusBarAlignment } from 'vscode'; import { join } from 'path'; import { closeAllEditors, pathEquals, createRandomFile, assertNoRpc } from '../utils'; @@ -34,20 +34,20 @@ suite('vscode API - window', () => { }); // test('editor, UN-active text editor', () => { - // assert.equal(window.visibleTextEditors.length, 0); + // assert.strictEqual(window.visibleTextEditors.length, 0); // assert.ok(window.activeTextEditor === undefined); // }); test('editor, assign and check view columns', async () => { const doc = await workspace.openTextDocument(join(workspace.rootPath || '', './far.js')); let p1 = window.showTextDocument(doc, ViewColumn.One).then(editor => { - assert.equal(editor.viewColumn, ViewColumn.One); + assert.strictEqual(editor.viewColumn, ViewColumn.One); }); let p2 = window.showTextDocument(doc, ViewColumn.Two).then(editor_1 => { - assert.equal(editor_1.viewColumn, ViewColumn.Two); + assert.strictEqual(editor_1.viewColumn, ViewColumn.Two); }); let p3 = window.showTextDocument(doc, ViewColumn.Three).then(editor_2 => { - assert.equal(editor_2.viewColumn, ViewColumn.Three); + assert.strictEqual(editor_2.viewColumn, ViewColumn.Three); }); return Promise.all([p1, p2, p3]); }); @@ -60,13 +60,13 @@ suite('vscode API - window', () => { const doc = await workspace.openTextDocument(join(workspace.rootPath || '', './far.js')); await window.showTextDocument(doc, ViewColumn.One); - assert.equal(eventCounter, 1); + assert.strictEqual(eventCounter, 1); await window.showTextDocument(doc, ViewColumn.Two); - assert.equal(eventCounter, 2); + assert.strictEqual(eventCounter, 2); await window.showTextDocument(doc, ViewColumn.Three); - assert.equal(eventCounter, 3); + assert.strictEqual(eventCounter, 3); reg.dispose(); }); @@ -138,10 +138,10 @@ suite('vscode API - window', () => { return commands.executeCommand('workbench.action.moveActiveEditorGroupLeft'); }).then(() => { - assert.equal(actualEvents.length, 2); + assert.strictEqual(actualEvents.length, 2); for (const event of actualEvents) { - assert.equal(event.viewColumn, event.textEditor.viewColumn); + assert.strictEqual(event.viewColumn, event.textEditor.viewColumn); } registration1.dispose(); @@ -202,7 +202,7 @@ suite('vscode API - window', () => { assert.ok(window.activeTextEditor); assert.ok(window.activeTextEditor!.document === docB); - assert.equal(window.activeTextEditor!.viewColumn, ViewColumn.Two); + assert.strictEqual(window.activeTextEditor!.viewColumn, ViewColumn.Two); const editor = await window.showTextDocument(docC); assert.ok( @@ -210,7 +210,7 @@ suite('vscode API - window', () => { `wanted fileName:${editor.document.fileName}/viewColumn:${editor.viewColumn} but got fileName:${window.activeTextEditor!.document.fileName}/viewColumn:${window.activeTextEditor!.viewColumn}. a:${docA.fileName}, b:${docB.fileName}, c:${docC.fileName}` ); assert.ok(window.activeTextEditor!.document === docC); - assert.equal(window.activeTextEditor!.viewColumn, ViewColumn.Two); + assert.strictEqual(window.activeTextEditor!.viewColumn, ViewColumn.Two); }); test('showTextDocument ViewColumn.BESIDE', async () => { @@ -225,12 +225,12 @@ suite('vscode API - window', () => { assert.ok(window.activeTextEditor); assert.ok(window.activeTextEditor!.document === docB); - assert.equal(window.activeTextEditor!.viewColumn, ViewColumn.Two); + assert.strictEqual(window.activeTextEditor!.viewColumn, ViewColumn.Two); await window.showTextDocument(docC, ViewColumn.Beside); assert.ok(window.activeTextEditor!.document === docC); - assert.equal(window.activeTextEditor!.viewColumn, ViewColumn.Three); + assert.strictEqual(window.activeTextEditor!.viewColumn, ViewColumn.Three); }); test('showTextDocument ViewColumn is always defined (even when opening > ViewColumn.Nine)', async () => { @@ -260,7 +260,7 @@ suite('vscode API - window', () => { assert.ok(window.activeTextEditor); assert.ok(window.activeTextEditor!.document === doc10); - assert.equal(window.activeTextEditor!.viewColumn, 10); + assert.strictEqual(window.activeTextEditor!.viewColumn, 10); }); test('issue #27408 - showTextDocument & vscode.diff always default to ViewColumn.One', async () => { @@ -275,12 +275,12 @@ suite('vscode API - window', () => { assert.ok(window.activeTextEditor); assert.ok(window.activeTextEditor!.document === docB); - assert.equal(window.activeTextEditor!.viewColumn, ViewColumn.Two); + assert.strictEqual(window.activeTextEditor!.viewColumn, ViewColumn.Two); await window.showTextDocument(docC, ViewColumn.Active); assert.ok(window.activeTextEditor!.document === docC); - assert.equal(window.activeTextEditor!.viewColumn, ViewColumn.Two); + assert.strictEqual(window.activeTextEditor!.viewColumn, ViewColumn.Two); }); test('issue #5362 - Incorrect TextEditor passed by onDidChangeTextEditorSelection', (done) => { @@ -359,7 +359,7 @@ suite('vscode API - window', () => { const p = window.showInputBox(undefined, source.token); source.cancel(); const value = await p; - assert.equal(value, undefined); + assert.strictEqual(value, undefined); }); test('showInputBox - cancel early', async function () { @@ -367,21 +367,21 @@ suite('vscode API - window', () => { source.cancel(); const p = window.showInputBox(undefined, source.token); const value = await p; - assert.equal(value, undefined); + assert.strictEqual(value, undefined); }); test('showInputBox - \'\' on Enter', function () { const p = window.showInputBox(); return Promise.all([ commands.executeCommand('workbench.action.acceptSelectedQuickOpenItem'), - p.then(value => assert.equal(value, '')) + p.then(value => assert.strictEqual(value, '')) ]); }); test('showInputBox - default value on Enter', function () { const p = window.showInputBox({ value: 'farboo' }); return Promise.all([ - p.then(value => assert.equal(value, 'farboo')), + p.then(value => assert.strictEqual(value, 'farboo')), commands.executeCommand('workbench.action.acceptSelectedQuickOpenItem'), ]); }); @@ -390,7 +390,7 @@ suite('vscode API - window', () => { const p = window.showInputBox(); return Promise.all([ commands.executeCommand('workbench.action.closeQuickOpen'), - p.then(value => assert.equal(value, undefined)) + p.then(value => assert.strictEqual(value, undefined)) ]); }); @@ -398,17 +398,17 @@ suite('vscode API - window', () => { const p = window.showInputBox({ value: 'farboo' }); return Promise.all([ commands.executeCommand('workbench.action.closeQuickOpen'), - p.then(value => assert.equal(value, undefined)) + p.then(value => assert.strictEqual(value, undefined)) ]); }); test('showInputBox - value not empty on second try', async function () { const one = window.showInputBox({ value: 'notempty' }); await commands.executeCommand('workbench.action.acceptSelectedQuickOpenItem'); - assert.equal(await one, 'notempty'); + assert.strictEqual(await one, 'notempty'); const two = window.showInputBox({ value: 'notempty' }); await commands.executeCommand('workbench.action.acceptSelectedQuickOpenItem'); - assert.equal(await two, 'notempty'); + assert.strictEqual(await two, 'notempty'); }); test('showQuickPick, accept first', async function () { @@ -417,9 +417,9 @@ suite('vscode API - window', () => { const pick = window.showQuickPick(['eins', 'zwei', 'drei'], { onDidSelectItem: tracker.onDidSelectItem }); - assert.equal(await first, 'eins'); + assert.strictEqual(await first, 'eins'); await commands.executeCommand('workbench.action.acceptSelectedQuickOpenItem'); - assert.equal(await pick, 'eins'); + assert.strictEqual(await pick, 'eins'); return tracker.done(); }); @@ -429,12 +429,12 @@ suite('vscode API - window', () => { const pick = window.showQuickPick(['eins', 'zwei', 'drei'], { onDidSelectItem: tracker.onDidSelectItem }); - assert.equal(await first, 'eins'); + assert.strictEqual(await first, 'eins'); const second = tracker.nextItem(); await commands.executeCommand('workbench.action.quickOpenSelectNext'); - assert.equal(await second, 'zwei'); + assert.strictEqual(await second, 'zwei'); await commands.executeCommand('workbench.action.acceptSelectedQuickOpenItem'); - assert.equal(await pick, 'zwei'); + assert.strictEqual(await pick, 'zwei'); return tracker.done(); }); @@ -457,14 +457,14 @@ suite('vscode API - window', () => { // console.log(`${label}: ${++i}`); await commands.executeCommand('workbench.action.quickOpenSelectNext'); // console.log(`${label}: ${++i}`); - assert.equal(await first, 'eins'); + assert.strictEqual(await first, 'eins'); // console.log(`${label}: ${++i}`); await commands.executeCommand('workbench.action.quickPickManyToggle'); // console.log(`${label}: ${++i}`); const second = new Promise(resolve => resolves.push(resolve)); await commands.executeCommand('workbench.action.quickOpenSelectNext'); // console.log(`${label}: ${++i}`); - assert.equal(await second, 'zwei'); + assert.strictEqual(await second, 'zwei'); // console.log(`${label}: ${++i}`); await commands.executeCommand('workbench.action.quickPickManyToggle'); // console.log(`${label}: ${++i}`); @@ -503,7 +503,7 @@ suite('vscode API - window', () => { const p = window.showQuickPick(['eins', 'zwei', 'drei'], undefined, source.token); source.cancel(); return p.then(value => { - assert.equal(value, undefined); + assert.strictEqual(value, undefined); }); }); @@ -512,7 +512,7 @@ suite('vscode API - window', () => { source.cancel(); const p = window.showQuickPick(['eins', 'zwei', 'drei'], undefined, source.token); return p.then(value => { - assert.equal(value, undefined); + assert.strictEqual(value, undefined); }); }); @@ -522,7 +522,7 @@ suite('vscode API - window', () => { const result = window.showQuickPick(['eins', 'zwei', 'drei'], { ignoreFocusOut: true }).then(result => { source.cancel(); - assert.equal(result, undefined); + assert.strictEqual(result, undefined); }); window.showQuickPick(['eins', 'zwei', 'drei'], undefined, source.token); @@ -533,7 +533,7 @@ suite('vscode API - window', () => { test('showQuickPick, canceled by input', function () { const result = window.showQuickPick(['eins', 'zwei', 'drei'], { ignoreFocusOut: true }).then(result => { - assert.equal(result, undefined); + assert.strictEqual(result, undefined); }); const source = new CancellationTokenSource(); @@ -553,7 +553,7 @@ suite('vscode API - window', () => { const result = window.showQuickPick(data, undefined, source.token); source.cancel(); const value_1 = await result; - assert.equal(value_1, undefined); + assert.strictEqual(value_1, undefined); }); test('showQuickPick, never resolve promise and cancel - #22453', function () { @@ -561,7 +561,7 @@ suite('vscode API - window', () => { const result = window.showQuickPick(new Promise(_resolve => { })); const a = result.then(value => { - assert.equal(value, undefined); + assert.strictEqual(value, undefined); }); const b = commands.executeCommand('workbench.action.closeQuickOpen'); return Promise.all([a, b]); @@ -598,7 +598,7 @@ suite('vscode API - window', () => { await commands.executeCommand('workbench.action.acceptSelectedQuickOpenItem'); await commands.executeCommand('workbench.action.closeQuickOpen'); - assert.equal(await result, undefined); + assert.strictEqual(await result, undefined); }); function createQuickPickTracker() { @@ -627,7 +627,7 @@ suite('vscode API - window', () => { let subscription = window.onDidChangeTextEditorSelection(e => { assert.ok(e.textEditor === editor); - assert.equal(e.kind, TextEditorSelectionChangeKind.Command); + assert.strictEqual(e.kind, TextEditorSelectionChangeKind.Command); subscription.dispose(); resolve(); @@ -638,4 +638,22 @@ suite('vscode API - window', () => { }); }); + + test('createStatusBar', async function () { + const statusBarEntryWithoutId = window.createStatusBarItem(StatusBarAlignment.Left, 100); + assert.strictEqual(statusBarEntryWithoutId.id, 'vscode.vscode-api-tests'); + assert.strictEqual(statusBarEntryWithoutId.alignment, StatusBarAlignment.Left); + assert.strictEqual(statusBarEntryWithoutId.priority, 100); + assert.strictEqual(statusBarEntryWithoutId.name, undefined); + statusBarEntryWithoutId.name = 'Test Name'; + assert.strictEqual(statusBarEntryWithoutId.name, 'Test Name'); + + const statusBarEntryWithId = window.createStatusBarItem('testId', StatusBarAlignment.Right, 200); + assert.strictEqual(statusBarEntryWithId.alignment, StatusBarAlignment.Right); + assert.strictEqual(statusBarEntryWithId.priority, 200); + assert.strictEqual(statusBarEntryWithId.id, 'testId'); + assert.strictEqual(statusBarEntryWithId.name, undefined); + statusBarEntryWithId.name = 'Test Name'; + assert.strictEqual(statusBarEntryWithId.name, 'Test Name'); + }); }); diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/workspace.event.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.event.test.ts similarity index 82% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/workspace.event.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/workspace.event.test.ts index 10ef9563c874..cdb2217512bb 100644 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/workspace.event.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.event.test.ts @@ -35,12 +35,12 @@ suite('vscode API - workspace events', () => { assert.ok(success); assert.ok(onWillCreate); - assert.equal(onWillCreate?.files.length, 1); - assert.equal(onWillCreate?.files[0].toString(), newUri.toString()); + assert.strictEqual(onWillCreate?.files.length, 1); + assert.strictEqual(onWillCreate?.files[0].toString(), newUri.toString()); assert.ok(onDidCreate); - assert.equal(onDidCreate?.files.length, 1); - assert.equal(onDidCreate?.files[0].toString(), newUri.toString()); + assert.strictEqual(onDidCreate?.files.length, 1); + assert.strictEqual(onDidCreate?.files[0].toString(), newUri.toString()); })); test('onWillCreate/onDidCreate, make changes, edit another file', withLogDisabled(async function () { @@ -62,7 +62,7 @@ suite('vscode API - workspace events', () => { const success = await vscode.workspace.applyEdit(edit); assert.ok(success); - assert.equal(baseDoc.getText(), 'HALLO_NEW'); + assert.strictEqual(baseDoc.getText(), 'HALLO_NEW'); })); test('onWillCreate/onDidCreate, make changes, edit new file fails', withLogDisabled(async function () { @@ -83,8 +83,8 @@ suite('vscode API - workspace events', () => { const success = await vscode.workspace.applyEdit(edit); assert.ok(success); - assert.equal((await vscode.workspace.fs.readFile(newUri)).toString(), ''); - assert.equal((await vscode.workspace.openTextDocument(newUri)).getText(), ''); + assert.strictEqual((await vscode.workspace.fs.readFile(newUri)).toString(), ''); + assert.strictEqual((await vscode.workspace.openTextDocument(newUri)).getText(), ''); })); test('onWillDelete/onDidDelete', withLogDisabled(async function () { @@ -104,12 +104,12 @@ suite('vscode API - workspace events', () => { assert.ok(success); assert.ok(onWilldelete); - assert.equal(onWilldelete?.files.length, 1); - assert.equal(onWilldelete?.files[0].toString(), base.toString()); + assert.strictEqual(onWilldelete?.files.length, 1); + assert.strictEqual(onWilldelete?.files[0].toString(), base.toString()); assert.ok(onDiddelete); - assert.equal(onDiddelete?.files.length, 1); - assert.equal(onDiddelete?.files[0].toString(), base.toString()); + assert.strictEqual(onDiddelete?.files.length, 1); + assert.strictEqual(onDiddelete?.files[0].toString(), base.toString()); })); test('onWillDelete/onDidDelete, make changes', withLogDisabled(async function () { @@ -190,14 +190,14 @@ suite('vscode API - workspace events', () => { assert.ok(success); assert.ok(onWillRename); - assert.equal(onWillRename?.files.length, 1); - assert.equal(onWillRename?.files[0].oldUri.toString(), oldUri.toString()); - assert.equal(onWillRename?.files[0].newUri.toString(), newUri.toString()); + assert.strictEqual(onWillRename?.files.length, 1); + assert.strictEqual(onWillRename?.files[0].oldUri.toString(), oldUri.toString()); + assert.strictEqual(onWillRename?.files[0].newUri.toString(), newUri.toString()); assert.ok(onDidRename); - assert.equal(onDidRename?.files.length, 1); - assert.equal(onDidRename?.files[0].oldUri.toString(), oldUri.toString()); - assert.equal(onDidRename?.files[0].newUri.toString(), newUri.toString()); + assert.strictEqual(onDidRename?.files.length, 1); + assert.strictEqual(onDidRename?.files[0].oldUri.toString(), oldUri.toString()); + assert.strictEqual(onDidRename?.files[0].newUri.toString(), newUri.toString()); })); test('onWillRename - make changes (saved file)', withLogDisabled(function () { @@ -244,15 +244,15 @@ suite('vscode API - workspace events', () => { assert.ok(success); assert.ok(onWillRename); - assert.equal(onWillRename?.files.length, 1); - assert.equal(onWillRename?.files[0].oldUri.toString(), oldUri.toString()); - assert.equal(onWillRename?.files[0].newUri.toString(), newUri.toString()); + assert.strictEqual(onWillRename?.files.length, 1); + assert.strictEqual(onWillRename?.files[0].oldUri.toString(), oldUri.toString()); + assert.strictEqual(onWillRename?.files[0].newUri.toString(), newUri.toString()); const newDocument = await vscode.workspace.openTextDocument(newUri); const anotherDocument = await vscode.workspace.openTextDocument(anotherFile); - assert.equal(newDocument.getText(), withDirtyFile ? 'FOOBARBAR' : 'FOOBAR'); - assert.equal(anotherDocument.getText(), 'FARBOO'); + assert.strictEqual(newDocument.getText(), withDirtyFile ? 'FOOBARBAR' : 'FOOBAR'); + assert.strictEqual(anotherDocument.getText(), 'FARBOO'); assert.ok(newDocument.isDirty); assert.ok(anotherDocument.isDirty); diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/workspace.fs.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.fs.test.ts similarity index 90% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/workspace.fs.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/workspace.fs.test.ts index 193ab54be61d..a59c0f85fc13 100644 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/workspace.fs.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.fs.test.ts @@ -20,11 +20,11 @@ suite('vscode API - workspace-fs', () => { test('fs.stat', async function () { const stat = await vscode.workspace.fs.stat(root); - assert.equal(stat.type, vscode.FileType.Directory); + assert.strictEqual(stat.type, vscode.FileType.Directory); - assert.equal(typeof stat.size, 'number'); - assert.equal(typeof stat.mtime, 'number'); - assert.equal(typeof stat.ctime, 'number'); + assert.strictEqual(typeof stat.size, 'number'); + assert.strictEqual(typeof stat.mtime, 'number'); + assert.strictEqual(typeof stat.ctime, 'number'); assert.ok(stat.mtime > 0); assert.ok(stat.ctime > 0); @@ -35,8 +35,8 @@ suite('vscode API - workspace-fs', () => { // find far.js const tuple = entries.find(tuple => tuple[0] === 'far.js')!; assert.ok(tuple); - assert.equal(tuple[0], 'far.js'); - assert.equal(tuple[1], vscode.FileType.File); + assert.strictEqual(tuple[0], 'far.js'); + assert.strictEqual(tuple[1], vscode.FileType.File); }); test('fs.stat - bad scheme', async function () { @@ -63,7 +63,7 @@ suite('vscode API - workspace-fs', () => { await vscode.workspace.fs.writeFile(uri, Buffer.from('HELLO')); const stat = await vscode.workspace.fs.stat(uri); - assert.equal(stat.type, vscode.FileType.File); + assert.strictEqual(stat.type, vscode.FileType.File); await vscode.workspace.fs.delete(uri); @@ -129,7 +129,7 @@ suite('vscode API - workspace-fs', () => { assert.ok(false); } catch (e) { assert.ok(e instanceof vscode.FileSystemError); - assert.equal(e.name, vscode.FileSystemError.FileNotFound().name); + assert.strictEqual(e.name, vscode.FileSystemError.FileNotFound().name); } }); @@ -140,7 +140,7 @@ suite('vscode API - workspace-fs', () => { assert.ok(false); } catch (e) { assert.ok(e instanceof vscode.FileSystemError); - assert.equal(e.name, vscode.FileSystemError.Unavailable().name); + assert.strictEqual(e.name, vscode.FileSystemError.Unavailable().name); } }); diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts rename to extensions/vscode-api-tests/src/singlefolder-tests/workspace.tasks.test.ts diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts new file mode 100644 index 000000000000..b17ebdbd5c6b --- /dev/null +++ b/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts @@ -0,0 +1,1132 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; +import * as vscode from 'vscode'; +import { createRandomFile, deleteFile, closeAllEditors, pathEquals, rndName, disposeAll, testFs, delay, withLogDisabled, revertAllDirty, assertNoRpc } from '../utils'; +import { join, posix, basename } from 'path'; +import * as fs from 'fs'; +import { TestFS } from '../memfs'; + +suite('vscode API - workspace', () => { + + teardown(async function () { + assertNoRpc(); + await closeAllEditors(); + }); + + test('MarkdownString', function () { + let md = new vscode.MarkdownString(); + assert.strictEqual(md.value, ''); + assert.strictEqual(md.isTrusted, undefined); + + md = new vscode.MarkdownString('**bold**'); + assert.strictEqual(md.value, '**bold**'); + + md.appendText('**bold?**'); + assert.strictEqual(md.value, '**bold**\\*\\*bold?\\*\\*'); + + md.appendMarkdown('**bold**'); + assert.strictEqual(md.value, '**bold**\\*\\*bold?\\*\\***bold**'); + }); + + + test('textDocuments', () => { + assert.ok(Array.isArray(vscode.workspace.textDocuments)); + assert.throws(() => (vscode.workspace).textDocuments = null); + }); + + test('rootPath', () => { + assert.ok(pathEquals(vscode.workspace.rootPath!, join(__dirname, '../../testWorkspace'))); + assert.throws(() => (vscode.workspace as any).rootPath = 'farboo'); + }); + + test('workspaceFile', () => { + assert.ok(!vscode.workspace.workspaceFile); + }); + + test('workspaceFolders', () => { + if (vscode.workspace.workspaceFolders) { + assert.strictEqual(vscode.workspace.workspaceFolders.length, 1); + assert.ok(pathEquals(vscode.workspace.workspaceFolders[0].uri.fsPath, join(__dirname, '../../testWorkspace'))); + } + }); + + test('getWorkspaceFolder', () => { + const folder = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(join(__dirname, '../../testWorkspace/far.js'))); + assert.ok(!!folder); + + if (folder) { + assert.ok(pathEquals(folder.uri.fsPath, join(__dirname, '../../testWorkspace'))); + } + }); + + test('openTextDocument', async () => { + const uri = await createRandomFile(); + + // not yet there + const existing1 = vscode.workspace.textDocuments.find(doc => doc.uri.toString() === uri.toString()); + assert.strictEqual(existing1, undefined); + + // open and assert its there + const doc = await vscode.workspace.openTextDocument(uri); + assert.ok(doc); + assert.strictEqual(doc.uri.toString(), uri.toString()); + const existing2 = vscode.workspace.textDocuments.find(doc => doc.uri.toString() === uri.toString()); + assert.strictEqual(existing2 === doc, true); + }); + + test('openTextDocument, illegal path', () => { + return vscode.workspace.openTextDocument('funkydonky.txt').then(_doc => { + throw new Error('missing error'); + }, _err => { + // good! + }); + }); + + test('openTextDocument, untitled is dirty', async function () { + return vscode.workspace.openTextDocument(vscode.workspace.workspaceFolders![0].uri.with({ scheme: 'untitled', path: posix.join(vscode.workspace.workspaceFolders![0].uri.path, 'newfile.txt') })).then(doc => { + assert.strictEqual(doc.uri.scheme, 'untitled'); + assert.ok(doc.isDirty); + }); + }); + + test('openTextDocument, untitled with host', function () { + const uri = vscode.Uri.parse('untitled://localhost/c%24/Users/jrieken/code/samples/foobar.txt'); + return vscode.workspace.openTextDocument(uri).then(doc => { + assert.strictEqual(doc.uri.scheme, 'untitled'); + }); + }); + + test('openTextDocument, untitled without path', function () { + return vscode.workspace.openTextDocument().then(doc => { + assert.strictEqual(doc.uri.scheme, 'untitled'); + assert.ok(doc.isDirty); + }); + }); + + test('openTextDocument, untitled without path but language ID', function () { + return vscode.workspace.openTextDocument({ language: 'xml' }).then(doc => { + assert.strictEqual(doc.uri.scheme, 'untitled'); + assert.strictEqual(doc.languageId, 'xml'); + assert.ok(doc.isDirty); + }); + }); + + test('openTextDocument, untitled without path but language ID and content', function () { + return vscode.workspace.openTextDocument({ language: 'html', content: '

    Hello world!

    ' }).then(doc => { + assert.strictEqual(doc.uri.scheme, 'untitled'); + assert.strictEqual(doc.languageId, 'html'); + assert.ok(doc.isDirty); + assert.strictEqual(doc.getText(), '

    Hello world!

    '); + }); + }); + + test('openTextDocument, untitled closes on save', function () { + const path = join(vscode.workspace.rootPath || '', './newfile.txt'); + + return vscode.workspace.openTextDocument(vscode.Uri.parse('untitled:' + path)).then(doc => { + assert.strictEqual(doc.uri.scheme, 'untitled'); + assert.ok(doc.isDirty); + + let closed: vscode.TextDocument; + let d0 = vscode.workspace.onDidCloseTextDocument(e => closed = e); + + return vscode.window.showTextDocument(doc).then(() => { + return doc.save().then((didSave: boolean) => { + + assert.strictEqual(didSave, true, `FAILED to save${doc.uri.toString()}`); + + assert.ok(closed === doc); + assert.ok(!doc.isDirty); + assert.ok(fs.existsSync(path)); + + d0.dispose(); + fs.unlinkSync(join(vscode.workspace.rootPath || '', './newfile.txt')); + }); + }); + + }); + }); + + test('openTextDocument, uri scheme/auth/path', function () { + + let registration = vscode.workspace.registerTextDocumentContentProvider('sc', { + provideTextDocumentContent() { + return 'SC'; + } + }); + + return Promise.all([ + vscode.workspace.openTextDocument(vscode.Uri.parse('sc://auth')).then(doc => { + assert.strictEqual(doc.uri.authority, 'auth'); + assert.strictEqual(doc.uri.path, ''); + }), + vscode.workspace.openTextDocument(vscode.Uri.parse('sc:///path')).then(doc => { + assert.strictEqual(doc.uri.authority, ''); + assert.strictEqual(doc.uri.path, '/path'); + }), + vscode.workspace.openTextDocument(vscode.Uri.parse('sc://auth/path')).then(doc => { + assert.strictEqual(doc.uri.authority, 'auth'); + assert.strictEqual(doc.uri.path, '/path'); + }) + ]).then(() => { + registration.dispose(); + }); + }); + + test('openTextDocument, actual casing first', async function () { + + const fs = new TestFS('this-fs', false); + const reg = vscode.workspace.registerFileSystemProvider(fs.scheme, fs, { isCaseSensitive: fs.isCaseSensitive }); + + let uriOne = vscode.Uri.parse('this-fs:/one'); + let uriTwo = vscode.Uri.parse('this-fs:/two'); + let uriONE = vscode.Uri.parse('this-fs:/ONE'); // same resource, different uri + let uriTWO = vscode.Uri.parse('this-fs:/TWO'); + + fs.writeFile(uriOne, Buffer.from('one'), { create: true, overwrite: true }); + fs.writeFile(uriTwo, Buffer.from('two'), { create: true, overwrite: true }); + + // lower case (actual case) comes first + let docOne = await vscode.workspace.openTextDocument(uriOne); + assert.strictEqual(docOne.uri.toString(), uriOne.toString()); + + let docONE = await vscode.workspace.openTextDocument(uriONE); + assert.strictEqual(docONE === docOne, true); + assert.strictEqual(docONE.uri.toString(), uriOne.toString()); + assert.strictEqual(docONE.uri.toString() !== uriONE.toString(), true); // yep + + // upper case (NOT the actual case) comes first + let docTWO = await vscode.workspace.openTextDocument(uriTWO); + assert.strictEqual(docTWO.uri.toString(), uriTWO.toString()); + + let docTwo = await vscode.workspace.openTextDocument(uriTwo); + assert.strictEqual(docTWO === docTwo, true); + assert.strictEqual(docTwo.uri.toString(), uriTWO.toString()); + assert.strictEqual(docTwo.uri.toString() !== uriTwo.toString(), true); // yep + + reg.dispose(); + }); + + test('eol, read', () => { + const a = createRandomFile('foo\nbar\nbar').then(file => { + return vscode.workspace.openTextDocument(file).then(doc => { + assert.strictEqual(doc.eol, vscode.EndOfLine.LF); + }); + }); + const b = createRandomFile('foo\nbar\nbar\r\nbaz').then(file => { + return vscode.workspace.openTextDocument(file).then(doc => { + assert.strictEqual(doc.eol, vscode.EndOfLine.LF); + }); + }); + const c = createRandomFile('foo\r\nbar\r\nbar').then(file => { + return vscode.workspace.openTextDocument(file).then(doc => { + assert.strictEqual(doc.eol, vscode.EndOfLine.CRLF); + }); + }); + return Promise.all([a, b, c]); + }); + + test('eol, change via editor', () => { + return createRandomFile('foo\nbar\nbar').then(file => { + return vscode.workspace.openTextDocument(file).then(doc => { + assert.strictEqual(doc.eol, vscode.EndOfLine.LF); + return vscode.window.showTextDocument(doc).then(editor => { + return editor.edit(builder => builder.setEndOfLine(vscode.EndOfLine.CRLF)); + + }).then(value => { + assert.ok(value); + assert.ok(doc.isDirty); + assert.strictEqual(doc.eol, vscode.EndOfLine.CRLF); + }); + }); + }); + }); + + test('eol, change via applyEdit', () => { + return createRandomFile('foo\nbar\nbar').then(file => { + return vscode.workspace.openTextDocument(file).then(doc => { + assert.strictEqual(doc.eol, vscode.EndOfLine.LF); + + const edit = new vscode.WorkspaceEdit(); + edit.set(file, [vscode.TextEdit.setEndOfLine(vscode.EndOfLine.CRLF)]); + return vscode.workspace.applyEdit(edit).then(value => { + assert.ok(value); + assert.ok(doc.isDirty); + assert.strictEqual(doc.eol, vscode.EndOfLine.CRLF); + }); + }); + }); + }); + + test('eol, change via onWillSave', async function () { + let called = false; + let sub = vscode.workspace.onWillSaveTextDocument(e => { + called = true; + e.waitUntil(Promise.resolve([vscode.TextEdit.setEndOfLine(vscode.EndOfLine.LF)])); + }); + + const file = await createRandomFile('foo\r\nbar\r\nbar'); + const doc = await vscode.workspace.openTextDocument(file); + assert.strictEqual(doc.eol, vscode.EndOfLine.CRLF); + + const edit = new vscode.WorkspaceEdit(); + edit.set(file, [vscode.TextEdit.insert(new vscode.Position(0, 0), '-changes-')]); + const successEdit = await vscode.workspace.applyEdit(edit); + assert.ok(successEdit); + + const successSave = await doc.save(); + assert.ok(successSave); + assert.ok(called); + assert.ok(!doc.isDirty); + assert.strictEqual(doc.eol, vscode.EndOfLine.LF); + sub.dispose(); + }); + + function assertEqualPath(a: string, b: string): void { + assert.ok(pathEquals(a, b), `${a} <-> ${b}`); + } + + test('events: onDidOpenTextDocument, onDidChangeTextDocument, onDidSaveTextDocument', async () => { + const file = await createRandomFile(); + let disposables: vscode.Disposable[] = []; + + await revertAllDirty(); // needed for a clean state for `onDidSaveTextDocument` (#102365) + + let pendingAsserts: Function[] = []; + let onDidOpenTextDocument = false; + disposables.push(vscode.workspace.onDidOpenTextDocument(e => { + pendingAsserts.push(() => assertEqualPath(e.uri.fsPath, file.fsPath)); + onDidOpenTextDocument = true; + })); + + let onDidChangeTextDocument = false; + disposables.push(vscode.workspace.onDidChangeTextDocument(e => { + pendingAsserts.push(() => assertEqualPath(e.document.uri.fsPath, file.fsPath)); + onDidChangeTextDocument = true; + })); + + let onDidSaveTextDocument = false; + disposables.push(vscode.workspace.onDidSaveTextDocument(e => { + pendingAsserts.push(() => assertEqualPath(e.uri.fsPath, file.fsPath)); + onDidSaveTextDocument = true; + })); + + const doc = await vscode.workspace.openTextDocument(file); + const editor = await vscode.window.showTextDocument(doc); + + await editor.edit((builder) => { + builder.insert(new vscode.Position(0, 0), 'Hello World'); + }); + await doc.save(); + + assert.ok(onDidOpenTextDocument); + assert.ok(onDidChangeTextDocument); + assert.ok(onDidSaveTextDocument); + pendingAsserts.forEach(assert => assert()); + disposeAll(disposables); + return deleteFile(file); + }); + + test('events: onDidSaveTextDocument fires even for non dirty file when saved', async () => { + const file = await createRandomFile(); + let disposables: vscode.Disposable[] = []; + let pendingAsserts: Function[] = []; + + await revertAllDirty(); // needed for a clean state for `onDidSaveTextDocument` (#102365) + + let onDidSaveTextDocument = false; + disposables.push(vscode.workspace.onDidSaveTextDocument(e => { + pendingAsserts.push(() => assertEqualPath(e.uri.fsPath, file.fsPath)); + onDidSaveTextDocument = true; + })); + + const doc = await vscode.workspace.openTextDocument(file); + await vscode.window.showTextDocument(doc); + await vscode.commands.executeCommand('workbench.action.files.save'); + + assert.ok(onDidSaveTextDocument); + pendingAsserts.forEach(fn => fn()); + disposeAll(disposables); + return deleteFile(file); + }); + + test('openTextDocument, with selection', function () { + return createRandomFile('foo\nbar\nbar').then(file => { + return vscode.workspace.openTextDocument(file).then(doc => { + return vscode.window.showTextDocument(doc, { selection: new vscode.Range(new vscode.Position(1, 1), new vscode.Position(1, 2)) }).then(editor => { + assert.strictEqual(editor.selection.start.line, 1); + assert.strictEqual(editor.selection.start.character, 1); + assert.strictEqual(editor.selection.end.line, 1); + assert.strictEqual(editor.selection.end.character, 2); + }); + }); + }); + }); + + test('registerTextDocumentContentProvider, simple', function () { + + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { + provideTextDocumentContent(uri) { + return uri.toString(); + } + }); + + const uri = vscode.Uri.parse('foo://testing/virtual.js'); + return vscode.workspace.openTextDocument(uri).then(doc => { + assert.strictEqual(doc.getText(), uri.toString()); + assert.strictEqual(doc.isDirty, false); + assert.strictEqual(doc.uri.toString(), uri.toString()); + registration.dispose(); + }); + }); + + test('registerTextDocumentContentProvider, constrains', function () { + + // built-in + assert.throws(function () { + vscode.workspace.registerTextDocumentContentProvider('untitled', { provideTextDocumentContent() { return null; } }); + }); + // built-in + assert.throws(function () { + vscode.workspace.registerTextDocumentContentProvider('file', { provideTextDocumentContent() { return null; } }); + }); + + // missing scheme + return vscode.workspace.openTextDocument(vscode.Uri.parse('notThere://foo/far/boo/bar')).then(() => { + assert.ok(false, 'expected failure'); + }, _err => { + // expected + }); + }); + + test('registerTextDocumentContentProvider, multiple', function () { + + // duplicate registration + let registration1 = vscode.workspace.registerTextDocumentContentProvider('foo', { + provideTextDocumentContent(uri) { + if (uri.authority === 'foo') { + return '1'; + } + return undefined; + } + }); + let registration2 = vscode.workspace.registerTextDocumentContentProvider('foo', { + provideTextDocumentContent(uri) { + if (uri.authority === 'bar') { + return '2'; + } + return undefined; + } + }); + + return Promise.all([ + vscode.workspace.openTextDocument(vscode.Uri.parse('foo://foo/bla')).then(doc => { assert.strictEqual(doc.getText(), '1'); }), + vscode.workspace.openTextDocument(vscode.Uri.parse('foo://bar/bla')).then(doc => { assert.strictEqual(doc.getText(), '2'); }) + ]).then(() => { + registration1.dispose(); + registration2.dispose(); + }); + }); + + test('registerTextDocumentContentProvider, evil provider', function () { + + // duplicate registration + let registration1 = vscode.workspace.registerTextDocumentContentProvider('foo', { + provideTextDocumentContent(_uri) { + return '1'; + } + }); + let registration2 = vscode.workspace.registerTextDocumentContentProvider('foo', { + provideTextDocumentContent(_uri): string { + throw new Error('fail'); + } + }); + + return vscode.workspace.openTextDocument(vscode.Uri.parse('foo://foo/bla')).then(doc => { + assert.strictEqual(doc.getText(), '1'); + registration1.dispose(); + registration2.dispose(); + }); + }); + + test('registerTextDocumentContentProvider, invalid text', function () { + + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { + provideTextDocumentContent(_uri) { + return 123; + } + }); + return vscode.workspace.openTextDocument(vscode.Uri.parse('foo://auth/path')).then(() => { + assert.ok(false, 'expected failure'); + }, _err => { + // expected + registration.dispose(); + }); + }); + + test('registerTextDocumentContentProvider, show virtual document', function () { + + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { + provideTextDocumentContent(_uri) { + return 'I am virtual'; + } + }); + + return vscode.workspace.openTextDocument(vscode.Uri.parse('foo://something/path')).then(doc => { + return vscode.window.showTextDocument(doc).then(editor => { + + assert.ok(editor.document === doc); + assert.strictEqual(editor.document.getText(), 'I am virtual'); + registration.dispose(); + }); + }); + }); + + test('registerTextDocumentContentProvider, open/open document', function () { + + let callCount = 0; + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { + provideTextDocumentContent(_uri) { + callCount += 1; + return 'I am virtual'; + } + }); + + const uri = vscode.Uri.parse('foo://testing/path'); + + return Promise.all([vscode.workspace.openTextDocument(uri), vscode.workspace.openTextDocument(uri)]).then(docs => { + let [first, second] = docs; + assert.ok(first === second); + assert.ok(vscode.workspace.textDocuments.some(doc => doc.uri.toString() === uri.toString())); + assert.strictEqual(callCount, 1); + registration.dispose(); + }); + }); + + test('registerTextDocumentContentProvider, empty doc', function () { + + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { + provideTextDocumentContent(_uri) { + return ''; + } + }); + + const uri = vscode.Uri.parse('foo:doc/empty'); + + return vscode.workspace.openTextDocument(uri).then(doc => { + assert.strictEqual(doc.getText(), ''); + assert.strictEqual(doc.uri.toString(), uri.toString()); + registration.dispose(); + }); + }); + + test('registerTextDocumentContentProvider, change event', async function () { + + let callCount = 0; + let emitter = new vscode.EventEmitter(); + + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { + onDidChange: emitter.event, + provideTextDocumentContent(_uri) { + return 'call' + (callCount++); + } + }); + + const uri = vscode.Uri.parse('foo://testing/path3'); + const doc = await vscode.workspace.openTextDocument(uri); + + assert.strictEqual(callCount, 1); + assert.strictEqual(doc.getText(), 'call0'); + + return new Promise(resolve => { + + let subscription = vscode.workspace.onDidChangeTextDocument(event => { + assert.ok(event.document === doc); + assert.strictEqual(event.document.getText(), 'call1'); + subscription.dispose(); + registration.dispose(); + resolve(); + }); + + emitter.fire(doc.uri); + }); + }); + + test('findFiles', () => { + return vscode.workspace.findFiles('**/image.png').then((res) => { + assert.strictEqual(res.length, 2); + assert.strictEqual(basename(vscode.workspace.asRelativePath(res[0])), 'image.png'); + }); + }); + + test('findFiles - null exclude', async () => { + await vscode.workspace.findFiles('**/file.txt').then((res) => { + // search.exclude folder is still searched, files.exclude folder is not + assert.strictEqual(res.length, 1); + assert.strictEqual(basename(vscode.workspace.asRelativePath(res[0])), 'file.txt'); + }); + + await vscode.workspace.findFiles('**/file.txt', null).then((res) => { + // search.exclude and files.exclude folders are both searched + assert.strictEqual(res.length, 2); + assert.strictEqual(basename(vscode.workspace.asRelativePath(res[0])), 'file.txt'); + }); + }); + + test('findFiles - exclude', () => { + return vscode.workspace.findFiles('**/image.png').then((res) => { + assert.strictEqual(res.length, 2); + assert.strictEqual(basename(vscode.workspace.asRelativePath(res[0])), 'image.png'); + }); + }); + + test('findFiles, exclude', () => { + return vscode.workspace.findFiles('**/image.png', '**/sub/**').then((res) => { + assert.strictEqual(res.length, 1); + assert.strictEqual(basename(vscode.workspace.asRelativePath(res[0])), 'image.png'); + }); + }); + + test('findFiles, cancellation', () => { + + const source = new vscode.CancellationTokenSource(); + const token = source.token; // just to get an instance first + source.cancel(); + + return vscode.workspace.findFiles('*.js', null, 100, token).then((res) => { + assert.deepStrictEqual(res, []); + }); + }); + + test('findTextInFiles', async () => { + const options: vscode.FindTextInFilesOptions = { + include: '*.ts', + previewOptions: { + matchLines: 1, + charsPerLine: 100 + } + }; + + const results: vscode.TextSearchResult[] = []; + await vscode.workspace.findTextInFiles({ pattern: 'foo' }, options, result => { + results.push(result); + }); + + assert.strictEqual(results.length, 1); + const match = results[0]; + assert(match.preview.text.indexOf('foo') >= 0); + assert.strictEqual(basename(vscode.workspace.asRelativePath(match.uri)), '10linefile.ts'); + }); + + test('findTextInFiles, cancellation', async () => { + const results: vscode.TextSearchResult[] = []; + const cancellation = new vscode.CancellationTokenSource(); + cancellation.cancel(); + + await vscode.workspace.findTextInFiles({ pattern: 'foo' }, result => { + results.push(result); + }, cancellation.token); + }); + + test('applyEdit', async () => { + const doc = await vscode.workspace.openTextDocument(vscode.Uri.parse('untitled:' + join(vscode.workspace.rootPath || '', './new2.txt'))); + + let edit = new vscode.WorkspaceEdit(); + edit.insert(doc.uri, new vscode.Position(0, 0), new Array(1000).join('Hello World')); + + let success = await vscode.workspace.applyEdit(edit); + assert.strictEqual(success, true); + assert.strictEqual(doc.isDirty, true); + }); + + test('applyEdit should fail when editing deleted resource', withLogDisabled(async () => { + const resource = await createRandomFile(); + + const edit = new vscode.WorkspaceEdit(); + edit.deleteFile(resource); + edit.insert(resource, new vscode.Position(0, 0), ''); + + let success = await vscode.workspace.applyEdit(edit); + assert.strictEqual(success, false); + })); + + test('applyEdit should fail when renaming deleted resource', withLogDisabled(async () => { + const resource = await createRandomFile(); + + const edit = new vscode.WorkspaceEdit(); + edit.deleteFile(resource); + edit.renameFile(resource, resource); + + let success = await vscode.workspace.applyEdit(edit); + assert.strictEqual(success, false); + })); + + test('applyEdit should fail when editing renamed from resource', withLogDisabled(async () => { + const resource = await createRandomFile(); + const newResource = vscode.Uri.file(resource.fsPath + '.1'); + const edit = new vscode.WorkspaceEdit(); + edit.renameFile(resource, newResource); + edit.insert(resource, new vscode.Position(0, 0), ''); + + let success = await vscode.workspace.applyEdit(edit); + assert.strictEqual(success, false); + })); + + test('applyEdit "edit A -> rename A to B -> edit B"', async () => { + await testEditRenameEdit(oldUri => oldUri.with({ path: oldUri.path + 'NEW' })); + }); + + test('applyEdit "edit A -> rename A to B (different case)" -> edit B', async () => { + await testEditRenameEdit(oldUri => oldUri.with({ path: oldUri.path.toUpperCase() })); + }); + + test('applyEdit "edit A -> rename A to B (same case)" -> edit B', async () => { + await testEditRenameEdit(oldUri => oldUri); + }); + + async function testEditRenameEdit(newUriCreator: (oldUri: vscode.Uri) => vscode.Uri): Promise { + const oldUri = await createRandomFile(); + const newUri = newUriCreator(oldUri); + const edit = new vscode.WorkspaceEdit(); + edit.insert(oldUri, new vscode.Position(0, 0), 'BEFORE'); + edit.renameFile(oldUri, newUri); + edit.insert(newUri, new vscode.Position(0, 0), 'AFTER'); + + assert.ok(await vscode.workspace.applyEdit(edit)); + + let doc = await vscode.workspace.openTextDocument(newUri); + assert.strictEqual(doc.getText(), 'AFTERBEFORE'); + assert.strictEqual(doc.isDirty, true); + } + + function nameWithUnderscore(uri: vscode.Uri) { + return uri.with({ path: posix.join(posix.dirname(uri.path), `_${posix.basename(uri.path)}`) }); + } + + test('WorkspaceEdit: applying edits before and after rename duplicates resource #42633', withLogDisabled(async function () { + let docUri = await createRandomFile(); + let newUri = nameWithUnderscore(docUri); + + let we = new vscode.WorkspaceEdit(); + we.insert(docUri, new vscode.Position(0, 0), 'Hello'); + we.insert(docUri, new vscode.Position(0, 0), 'Foo'); + we.renameFile(docUri, newUri); + we.insert(newUri, new vscode.Position(0, 0), 'Bar'); + + assert.ok(await vscode.workspace.applyEdit(we)); + let doc = await vscode.workspace.openTextDocument(newUri); + assert.strictEqual(doc.getText(), 'BarHelloFoo'); + })); + + test('WorkspaceEdit: Problem recreating a renamed resource #42634', withLogDisabled(async function () { + let docUri = await createRandomFile(); + let newUri = nameWithUnderscore(docUri); + + let we = new vscode.WorkspaceEdit(); + we.insert(docUri, new vscode.Position(0, 0), 'Hello'); + we.insert(docUri, new vscode.Position(0, 0), 'Foo'); + we.renameFile(docUri, newUri); + + we.createFile(docUri); + we.insert(docUri, new vscode.Position(0, 0), 'Bar'); + + assert.ok(await vscode.workspace.applyEdit(we)); + + let newDoc = await vscode.workspace.openTextDocument(newUri); + assert.strictEqual(newDoc.getText(), 'HelloFoo'); + let doc = await vscode.workspace.openTextDocument(docUri); + assert.strictEqual(doc.getText(), 'Bar'); + })); + + test('WorkspaceEdit api - after saving a deleted file, it still shows up as deleted. #42667', withLogDisabled(async function () { + let docUri = await createRandomFile(); + let we = new vscode.WorkspaceEdit(); + we.deleteFile(docUri); + we.insert(docUri, new vscode.Position(0, 0), 'InsertText'); + + assert.ok(!(await vscode.workspace.applyEdit(we))); + try { + await vscode.workspace.openTextDocument(docUri); + assert.ok(false); + } catch (e) { + assert.ok(true); + } + })); + + test('WorkspaceEdit: edit and rename parent folder duplicates resource #42641', async function () { + + let dir = vscode.Uri.parse(`${testFs.scheme}:/before-${rndName()}`); + await testFs.createDirectory(dir); + + let docUri = await createRandomFile('', dir); + let docParent = docUri.with({ path: posix.dirname(docUri.path) }); + let newParent = nameWithUnderscore(docParent); + + let we = new vscode.WorkspaceEdit(); + we.insert(docUri, new vscode.Position(0, 0), 'Hello'); + we.renameFile(docParent, newParent); + + assert.ok(await vscode.workspace.applyEdit(we)); + + try { + await vscode.workspace.openTextDocument(docUri); + assert.ok(false); + } catch (e) { + assert.ok(true); + } + + let newUri = newParent.with({ path: posix.join(newParent.path, posix.basename(docUri.path)) }); + let doc = await vscode.workspace.openTextDocument(newUri); + assert.ok(doc); + + assert.strictEqual(doc.getText(), 'Hello'); + }); + + test('WorkspaceEdit: rename resource followed by edit does not work #42638', withLogDisabled(async function () { + let docUri = await createRandomFile(); + let newUri = nameWithUnderscore(docUri); + + let we = new vscode.WorkspaceEdit(); + we.renameFile(docUri, newUri); + we.insert(newUri, new vscode.Position(0, 0), 'Hello'); + + assert.ok(await vscode.workspace.applyEdit(we)); + + let doc = await vscode.workspace.openTextDocument(newUri); + assert.strictEqual(doc.getText(), 'Hello'); + })); + + test('WorkspaceEdit: create & override', withLogDisabled(async function () { + + let docUri = await createRandomFile('before'); + + let we = new vscode.WorkspaceEdit(); + we.createFile(docUri); + assert.ok(!await vscode.workspace.applyEdit(we)); + assert.strictEqual((await vscode.workspace.openTextDocument(docUri)).getText(), 'before'); + + we = new vscode.WorkspaceEdit(); + we.createFile(docUri, { overwrite: true }); + assert.ok(await vscode.workspace.applyEdit(we)); + assert.strictEqual((await vscode.workspace.openTextDocument(docUri)).getText(), ''); + })); + + test('WorkspaceEdit: create & ignoreIfExists', withLogDisabled(async function () { + let docUri = await createRandomFile('before'); + + let we = new vscode.WorkspaceEdit(); + we.createFile(docUri, { ignoreIfExists: true }); + assert.ok(await vscode.workspace.applyEdit(we)); + assert.strictEqual((await vscode.workspace.openTextDocument(docUri)).getText(), 'before'); + + we = new vscode.WorkspaceEdit(); + we.createFile(docUri, { overwrite: true, ignoreIfExists: true }); + assert.ok(await vscode.workspace.applyEdit(we)); + assert.strictEqual((await vscode.workspace.openTextDocument(docUri)).getText(), ''); + })); + + test('WorkspaceEdit: rename & ignoreIfExists', withLogDisabled(async function () { + let aUri = await createRandomFile('aaa'); + let bUri = await createRandomFile('bbb'); + + let we = new vscode.WorkspaceEdit(); + we.renameFile(aUri, bUri); + assert.ok(!await vscode.workspace.applyEdit(we)); + + we = new vscode.WorkspaceEdit(); + we.renameFile(aUri, bUri, { ignoreIfExists: true }); + assert.ok(await vscode.workspace.applyEdit(we)); + + we = new vscode.WorkspaceEdit(); + we.renameFile(aUri, bUri, { overwrite: false, ignoreIfExists: true }); + assert.ok(!await vscode.workspace.applyEdit(we)); + + we = new vscode.WorkspaceEdit(); + we.renameFile(aUri, bUri, { overwrite: true, ignoreIfExists: true }); + assert.ok(await vscode.workspace.applyEdit(we)); + })); + + test('WorkspaceEdit: delete & ignoreIfNotExists', withLogDisabled(async function () { + + let docUri = await createRandomFile(); + let we = new vscode.WorkspaceEdit(); + we.deleteFile(docUri, { ignoreIfNotExists: false }); + assert.ok(await vscode.workspace.applyEdit(we)); + + we = new vscode.WorkspaceEdit(); + we.deleteFile(docUri, { ignoreIfNotExists: false }); + assert.ok(!await vscode.workspace.applyEdit(we)); + + we = new vscode.WorkspaceEdit(); + we.deleteFile(docUri, { ignoreIfNotExists: true }); + assert.ok(await vscode.workspace.applyEdit(we)); + })); + + test('WorkspaceEdit: insert & rename multiple', async function () { + + let [f1, f2, f3] = await Promise.all([createRandomFile(), createRandomFile(), createRandomFile()]); + + let we = new vscode.WorkspaceEdit(); + we.insert(f1, new vscode.Position(0, 0), 'f1'); + we.insert(f2, new vscode.Position(0, 0), 'f2'); + we.insert(f3, new vscode.Position(0, 0), 'f3'); + + let f1_ = nameWithUnderscore(f1); + we.renameFile(f1, f1_); + + assert.ok(await vscode.workspace.applyEdit(we)); + + assert.strictEqual((await vscode.workspace.openTextDocument(f3)).getText(), 'f3'); + assert.strictEqual((await vscode.workspace.openTextDocument(f2)).getText(), 'f2'); + assert.strictEqual((await vscode.workspace.openTextDocument(f1_)).getText(), 'f1'); + try { + await vscode.workspace.fs.stat(f1); + assert.ok(false); + } catch { + assert.ok(true); + } + }); + + test('workspace.applyEdit drops the TextEdit if there is a RenameFile later #77735 (with opened editor)', async function () { + await test77735(true); + }); + + test('workspace.applyEdit drops the TextEdit if there is a RenameFile later #77735 (without opened editor)', async function () { + await test77735(false); + }); + + async function test77735(withOpenedEditor: boolean): Promise { + const docUriOriginal = await createRandomFile(); + const docUriMoved = docUriOriginal.with({ path: `${docUriOriginal.path}.moved` }); + + if (withOpenedEditor) { + const document = await vscode.workspace.openTextDocument(docUriOriginal); + await vscode.window.showTextDocument(document); + } else { + await vscode.commands.executeCommand('workbench.action.closeAllEditors'); + } + + for (let i = 0; i < 4; i++) { + let we = new vscode.WorkspaceEdit(); + let oldUri: vscode.Uri; + let newUri: vscode.Uri; + let expected: string; + + if (i % 2 === 0) { + oldUri = docUriOriginal; + newUri = docUriMoved; + we.insert(oldUri, new vscode.Position(0, 0), 'Hello'); + expected = 'Hello'; + } else { + oldUri = docUriMoved; + newUri = docUriOriginal; + we.delete(oldUri, new vscode.Range(new vscode.Position(0, 0), new vscode.Position(0, 5))); + expected = ''; + } + + we.renameFile(oldUri, newUri); + assert.ok(await vscode.workspace.applyEdit(we)); + + const document = await vscode.workspace.openTextDocument(newUri); + assert.strictEqual(document.isDirty, true); + + await document.save(); + assert.strictEqual(document.isDirty, false); + + assert.strictEqual(document.getText(), expected); + + await delay(10); + } + } + + test('The api workspace.applyEdit failed for some case of mixing resourceChange and textEdit #80688', async function () { + const file1 = await createRandomFile(); + const file2 = await createRandomFile(); + let we = new vscode.WorkspaceEdit(); + we.insert(file1, new vscode.Position(0, 0), 'import1;'); + + const file2Name = basename(file2.fsPath); + const file2NewUri = vscode.Uri.parse(file2.toString().replace(file2Name, `new/${file2Name}`)); + we.renameFile(file2, file2NewUri); + + we.insert(file1, new vscode.Position(0, 0), 'import2;'); + await vscode.workspace.applyEdit(we); + + const document = await vscode.workspace.openTextDocument(file1); + // const expected = 'import1;import2;'; + const expected2 = 'import2;import1;'; + assert.strictEqual(document.getText(), expected2); + }); + + test('The api workspace.applyEdit failed for some case of mixing resourceChange and textEdit #80688', async function () { + const file1 = await createRandomFile(); + const file2 = await createRandomFile(); + let we = new vscode.WorkspaceEdit(); + we.insert(file1, new vscode.Position(0, 0), 'import1;'); + we.insert(file1, new vscode.Position(0, 0), 'import2;'); + + const file2Name = basename(file2.fsPath); + const file2NewUri = vscode.Uri.parse(file2.toString().replace(file2Name, `new/${file2Name}`)); + we.renameFile(file2, file2NewUri); + + await vscode.workspace.applyEdit(we); + + const document = await vscode.workspace.openTextDocument(file1); + const expected = 'import1;import2;'; + // const expected2 = 'import2;import1;'; + assert.strictEqual(document.getText(), expected); + }); + + test('Should send a single FileWillRenameEvent instead of separate events when moving multiple files at once#111867', async function () { + + const file1 = await createRandomFile(); + const file2 = await createRandomFile(); + + const file1New = await createRandomFile(); + const file2New = await createRandomFile(); + + const event = new Promise(resolve => { + let sub = vscode.workspace.onWillRenameFiles(e => { + sub.dispose(); + resolve(e); + }); + }); + + const we = new vscode.WorkspaceEdit(); + we.renameFile(file1, file1New, { overwrite: true }); + we.renameFile(file2, file2New, { overwrite: true }); + await vscode.workspace.applyEdit(we); + + const e = await event; + + assert.strictEqual(e.files.length, 2); + assert.strictEqual(e.files[0].oldUri.toString(), file1.toString()); + assert.strictEqual(e.files[1].oldUri.toString(), file2.toString()); + }); + + test('Should send a single FileWillRenameEvent instead of separate events when moving multiple files at once#111867', async function () { + + const event = new Promise(resolve => { + let sub = vscode.workspace.onWillCreateFiles(e => { + sub.dispose(); + resolve(e); + }); + }); + + const file1 = vscode.Uri.parse(`fake-fs:/${rndName()}`); + const file2 = vscode.Uri.parse(`fake-fs:/${rndName()}`); + + const we = new vscode.WorkspaceEdit(); + we.createFile(file1, { overwrite: true }); + we.createFile(file2, { overwrite: true }); + await vscode.workspace.applyEdit(we); + + const e = await event; + + assert.strictEqual(e.files.length, 2); + assert.strictEqual(e.files[0].toString(), file1.toString()); + assert.strictEqual(e.files[1].toString(), file2.toString()); + }); + + test('Should send a single FileWillRenameEvent instead of separate events when moving multiple files at once#111867', async function () { + + const file1 = await createRandomFile(); + const file2 = await createRandomFile(); + + const event = new Promise(resolve => { + let sub = vscode.workspace.onWillDeleteFiles(e => { + sub.dispose(); + resolve(e); + }); + }); + + const we = new vscode.WorkspaceEdit(); + we.deleteFile(file1); + we.deleteFile(file2); + await vscode.workspace.applyEdit(we); + + const e = await event; + + assert.strictEqual(e.files.length, 2); + assert.strictEqual(e.files[0].toString(), file1.toString()); + assert.strictEqual(e.files[1].toString(), file2.toString()); + }); + + test('issue #107739 - Redo of rename Java Class name has no effect', async () => { + const file = await createRandomFile('hello'); + const fileName = basename(file.fsPath); + const newFile = vscode.Uri.parse(file.toString().replace(fileName, `${fileName}2`)); + + // apply edit + { + const we = new vscode.WorkspaceEdit(); + we.insert(file, new vscode.Position(0, 5), '2'); + we.renameFile(file, newFile); + await vscode.workspace.applyEdit(we); + } + + // show the new document + { + const document = await vscode.workspace.openTextDocument(newFile); + await vscode.window.showTextDocument(document); + assert.strictEqual(document.getText(), 'hello2'); + assert.strictEqual(document.isDirty, true); + } + + // undo and show the old document + { + await vscode.commands.executeCommand('undo'); + const document = await vscode.workspace.openTextDocument(file); + await vscode.window.showTextDocument(document); + assert.strictEqual(document.getText(), 'hello'); + } + + // redo and show the new document + { + await vscode.commands.executeCommand('redo'); + const document = await vscode.workspace.openTextDocument(newFile); + await vscode.window.showTextDocument(document); + assert.strictEqual(document.getText(), 'hello2'); + assert.strictEqual(document.isDirty, true); + } + + }); + + test('issue #110141 - TextEdit.setEndOfLine applies an edit and invalidates redo stack even when no change is made', async () => { + const file = await createRandomFile('hello\nworld'); + + const document = await vscode.workspace.openTextDocument(file); + await vscode.window.showTextDocument(document); + + // apply edit + { + const we = new vscode.WorkspaceEdit(); + we.insert(file, new vscode.Position(0, 5), '2'); + await vscode.workspace.applyEdit(we); + } + + // check the document + { + assert.strictEqual(document.getText(), 'hello2\nworld'); + assert.strictEqual(document.isDirty, true); + } + + // apply no-op edit + { + const we = new vscode.WorkspaceEdit(); + we.set(file, [vscode.TextEdit.setEndOfLine(vscode.EndOfLine.LF)]); + await vscode.workspace.applyEdit(we); + } + + // undo + { + await vscode.commands.executeCommand('undo'); + assert.strictEqual(document.getText(), 'hello\nworld'); + assert.strictEqual(document.isDirty, false); + } + }); +}); diff --git a/lib/vscode/extensions/vscode-api-tests/src/typings/ref.d.ts b/extensions/vscode-api-tests/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/src/typings/ref.d.ts rename to extensions/vscode-api-tests/src/typings/ref.d.ts diff --git a/extensions/vscode-api-tests/src/utils.ts b/extensions/vscode-api-tests/src/utils.ts new file mode 100644 index 000000000000..b346efefce96 --- /dev/null +++ b/extensions/vscode-api-tests/src/utils.ts @@ -0,0 +1,151 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { TestFS } from './memfs'; +import * as assert from 'assert'; + +export function rndName() { + return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 10); +} + +export const testFs = new TestFS('fake-fs', true); +vscode.workspace.registerFileSystemProvider(testFs.scheme, testFs, { isCaseSensitive: testFs.isCaseSensitive }); + +export async function createRandomFile(contents = '', dir: vscode.Uri | undefined = undefined, ext = ''): Promise { + let fakeFile: vscode.Uri; + if (dir) { + assert.strictEqual(dir.scheme, testFs.scheme); + fakeFile = dir.with({ path: dir.path + '/' + rndName() + ext }); + } else { + fakeFile = vscode.Uri.parse(`${testFs.scheme}:/${rndName() + ext}`); + } + testFs.writeFile(fakeFile, Buffer.from(contents), { create: true, overwrite: true }); + return fakeFile; +} + +export async function deleteFile(file: vscode.Uri): Promise { + try { + testFs.delete(file); + return true; + } catch { + return false; + } +} + +export function pathEquals(path1: string, path2: string): boolean { + if (process.platform !== 'linux') { + path1 = path1.toLowerCase(); + path2 = path2.toLowerCase(); + } + + return path1 === path2; +} + +export function closeAllEditors(): Thenable { + return vscode.commands.executeCommand('workbench.action.closeAllEditors'); +} + +export function saveAllEditors(): Thenable { + return vscode.commands.executeCommand('workbench.action.files.saveAll'); +} + +export async function revertAllDirty(): Promise { + return vscode.commands.executeCommand('_workbench.revertAllDirty'); +} + +export function disposeAll(disposables: vscode.Disposable[]) { + vscode.Disposable.from(...disposables).dispose(); +} + +export function delay(ms: number) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +export function withLogDisabled(runnable: () => Promise): () => Promise { + return async (): Promise => { + const logLevel = await vscode.commands.executeCommand('_extensionTests.getLogLevel'); + await vscode.commands.executeCommand('_extensionTests.setLogLevel', 6 /* critical */); + + try { + await runnable(); + } finally { + await vscode.commands.executeCommand('_extensionTests.setLogLevel', logLevel); + } + }; +} + +export function assertNoRpc() { + assertNoRpcFromEntry([vscode, 'vscode']); +} + +export function assertNoRpcFromEntry(entry: [obj: any, name: string]) { + + const symProxy = Symbol.for('rpcProxy'); + const symProtocol = Symbol.for('rpcProtocol'); + + const proxyPaths: string[] = []; + const rpcPaths: string[] = []; + + function walk(obj: any, path: string, seen: Set) { + if (!obj) { + return; + } + if (typeof obj !== 'object' && typeof obj !== 'function') { + return; + } + if (seen.has(obj)) { + return; + } + seen.add(obj); + + if (obj[symProtocol]) { + rpcPaths.push(`PROTOCOL via ${path}`); + } + if (obj[symProxy]) { + proxyPaths.push(`PROXY '${obj[symProxy]}' via ${path}`); + } + + for (const key in obj) { + walk(obj[key], `${path}.${String(key)}`, seen); + } + } + + try { + walk(entry[0], entry[1], new Set()); + } catch (err) { + assert.fail(err); + } + assert.strictEqual(rpcPaths.length, 0, rpcPaths.join('\n')); + assert.strictEqual(proxyPaths.length, 0, proxyPaths.join('\n')); // happens... +} + +export async function asPromise(event: vscode.Event, timeout = vscode.env.uiKind === vscode.UIKind.Desktop ? 5000 : 15000): Promise { + return new Promise((resolve, reject) => { + + const handle = setTimeout(() => { + sub.dispose(); + reject(new Error('asPromise TIMEOUT reached')); + }, timeout); + + const sub = event(e => { + clearTimeout(handle); + sub.dispose(); + resolve(e); + }); + }); +} + +export function testRepeat(n: number, description: string, callback: (this: any) => any): void { + for (let i = 0; i < n; i++) { + test(`${description} (iteration ${i})`, callback); + } +} + +export function suiteRepeat(n: number, description: string, callback: (this: any) => any): void { + for (let i = 0; i < n; i++) { + suite(`${description} (iteration ${i})`, callback); + } +} diff --git a/lib/vscode/extensions/vscode-api-tests/src/workspace-tests/index.ts b/extensions/vscode-api-tests/src/workspace-tests/index.ts similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/src/workspace-tests/index.ts rename to extensions/vscode-api-tests/src/workspace-tests/index.ts diff --git a/extensions/vscode-api-tests/src/workspace-tests/workspace.test.ts b/extensions/vscode-api-tests/src/workspace-tests/workspace.test.ts new file mode 100644 index 000000000000..5721e1ddf1be --- /dev/null +++ b/extensions/vscode-api-tests/src/workspace-tests/workspace.test.ts @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; +import * as vscode from 'vscode'; +import { closeAllEditors, pathEquals } from '../utils'; +import { join } from 'path'; + +suite('vscode API - workspace', () => { + + teardown(closeAllEditors); + + test('rootPath', () => { + assert.ok(pathEquals(vscode.workspace.rootPath!, join(__dirname, '../../testWorkspace'))); + }); + + test('workspaceFile', () => { + assert.ok(pathEquals(vscode.workspace.workspaceFile!.fsPath, join(__dirname, '../../testworkspace.code-workspace'))); + }); + + test('workspaceFolders', () => { + assert.strictEqual(vscode.workspace.workspaceFolders!.length, 2); + assert.ok(pathEquals(vscode.workspace.workspaceFolders![0].uri.fsPath, join(__dirname, '../../testWorkspace'))); + assert.ok(pathEquals(vscode.workspace.workspaceFolders![1].uri.fsPath, join(__dirname, '../../testWorkspace2'))); + assert.ok(pathEquals(vscode.workspace.workspaceFolders![1].name, 'Test Workspace 2')); + }); + + test('getWorkspaceFolder', () => { + const folder = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(join(__dirname, '../../testWorkspace2/far.js'))); + assert.ok(!!folder); + + if (folder) { + assert.ok(pathEquals(folder.uri.fsPath, join(__dirname, '../../testWorkspace2'))); + } + }); +}); diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/.vscode/launch.json b/extensions/vscode-api-tests/testWorkspace/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/.vscode/launch.json rename to extensions/vscode-api-tests/testWorkspace/.vscode/launch.json diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/.vscode/settings.json b/extensions/vscode-api-tests/testWorkspace/.vscode/settings.json similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/.vscode/settings.json rename to extensions/vscode-api-tests/testWorkspace/.vscode/settings.json diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/10linefile.ts b/extensions/vscode-api-tests/testWorkspace/10linefile.ts similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/10linefile.ts rename to extensions/vscode-api-tests/testWorkspace/10linefile.ts diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/30linefile.ts b/extensions/vscode-api-tests/testWorkspace/30linefile.ts similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/30linefile.ts rename to extensions/vscode-api-tests/testWorkspace/30linefile.ts diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/bower.json b/extensions/vscode-api-tests/testWorkspace/bower.json similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/bower.json rename to extensions/vscode-api-tests/testWorkspace/bower.json diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/debug.js b/extensions/vscode-api-tests/testWorkspace/debug.js similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/debug.js rename to extensions/vscode-api-tests/testWorkspace/debug.js diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/far.js b/extensions/vscode-api-tests/testWorkspace/far.js similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/far.js rename to extensions/vscode-api-tests/testWorkspace/far.js diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/files-exclude/file.txt b/extensions/vscode-api-tests/testWorkspace/files-exclude/file.txt similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/files-exclude/file.txt rename to extensions/vscode-api-tests/testWorkspace/files-exclude/file.txt diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/image%.png b/extensions/vscode-api-tests/testWorkspace/image%.png similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/image%.png rename to extensions/vscode-api-tests/testWorkspace/image%.png diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/image%02.png b/extensions/vscode-api-tests/testWorkspace/image%02.png similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/image%02.png rename to extensions/vscode-api-tests/testWorkspace/image%02.png diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/image.png b/extensions/vscode-api-tests/testWorkspace/image.png similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/image.png rename to extensions/vscode-api-tests/testWorkspace/image.png diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/lorem.txt b/extensions/vscode-api-tests/testWorkspace/lorem.txt similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/lorem.txt rename to extensions/vscode-api-tests/testWorkspace/lorem.txt diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/search-exclude/file.txt b/extensions/vscode-api-tests/testWorkspace/search-exclude/file.txt similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/search-exclude/file.txt rename to extensions/vscode-api-tests/testWorkspace/search-exclude/file.txt diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/simple.txt b/extensions/vscode-api-tests/testWorkspace/simple.txt similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/simple.txt rename to extensions/vscode-api-tests/testWorkspace/simple.txt diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace/sub/image.png b/extensions/vscode-api-tests/testWorkspace/sub/image.png similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace/sub/image.png rename to extensions/vscode-api-tests/testWorkspace/sub/image.png diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace2/.vscode/settings.json b/extensions/vscode-api-tests/testWorkspace2/.vscode/settings.json similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace2/.vscode/settings.json rename to extensions/vscode-api-tests/testWorkspace2/.vscode/settings.json diff --git a/lib/vscode/extensions/vscode-api-tests/testWorkspace2/simple.txt b/extensions/vscode-api-tests/testWorkspace2/simple.txt similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testWorkspace2/simple.txt rename to extensions/vscode-api-tests/testWorkspace2/simple.txt diff --git a/lib/vscode/extensions/vscode-api-tests/testworkspace.code-workspace b/extensions/vscode-api-tests/testworkspace.code-workspace similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/testworkspace.code-workspace rename to extensions/vscode-api-tests/testworkspace.code-workspace diff --git a/lib/vscode/extensions/vscode-api-tests/tsconfig.json b/extensions/vscode-api-tests/tsconfig.json similarity index 100% rename from lib/vscode/extensions/vscode-api-tests/tsconfig.json rename to extensions/vscode-api-tests/tsconfig.json diff --git a/extensions/vscode-api-tests/yarn.lock b/extensions/vscode-api-tests/yarn.lock new file mode 100644 index 000000000000..b54d6b488365 --- /dev/null +++ b/extensions/vscode-api-tests/yarn.lock @@ -0,0 +1,13 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/mocha@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44" + integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ== + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== diff --git a/lib/vscode/extensions/vscode-colorize-tests/.gitignore b/extensions/vscode-colorize-tests/.gitignore similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/.gitignore rename to extensions/vscode-colorize-tests/.gitignore diff --git a/lib/vscode/extensions/vscode-colorize-tests/.vscode/launch.json b/extensions/vscode-colorize-tests/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/.vscode/launch.json rename to extensions/vscode-colorize-tests/.vscode/launch.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/.vscode/tasks.json b/extensions/vscode-colorize-tests/.vscode/tasks.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/.vscode/tasks.json rename to extensions/vscode-colorize-tests/.vscode/tasks.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/media/icon.png b/extensions/vscode-colorize-tests/media/icon.png similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/media/icon.png rename to extensions/vscode-colorize-tests/media/icon.png diff --git a/extensions/vscode-colorize-tests/package.json b/extensions/vscode-colorize-tests/package.json new file mode 100644 index 000000000000..b2ce2e9d9cfa --- /dev/null +++ b/extensions/vscode-colorize-tests/package.json @@ -0,0 +1,61 @@ +{ + "name": "vscode-colorize-tests", + "description": "Colorize tests for VS Code", + "version": "0.0.1", + "publisher": "vscode", + "license": "MIT", + "private": true, + "activationEvents": [ + "onLanguage:json" + ], + "main": "./out/colorizerTestMain", + "enableProposedApi": true, + "engines": { + "vscode": "*" + }, + "icon": "media/icon.png", + "scripts": { + "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-colorize-tests ./tsconfig.json" + }, + "dependencies": { + "jsonc-parser": "2.2.1" + }, + "devDependencies": { + "@types/node": "14.x" + }, + "contributes": { + "semanticTokenTypes": [ + { + "id": "testToken", + "description": "A test token" + } + ], + "semanticTokenModifiers": [ + { + "id": "testModifier", + "description": "A test modifier" + } + ], + "semanticTokenScopes": [ + { + "scopes": { + "testToken": [ + "entity.name.function.special" + ] + } + } + ], + "productIconThemes": [ + { + "id": "Test Product Icons", + "label": "The Test Product Icon Theme", + "path": "./producticons/test-product-icon-theme.json", + "_watch": true + } + ] + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/vscode-colorize-tests/producticons/ElegantIcons.woff b/extensions/vscode-colorize-tests/producticons/ElegantIcons.woff similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/producticons/ElegantIcons.woff rename to extensions/vscode-colorize-tests/producticons/ElegantIcons.woff diff --git a/lib/vscode/extensions/vscode-colorize-tests/producticons/index.html b/extensions/vscode-colorize-tests/producticons/index.html similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/producticons/index.html rename to extensions/vscode-colorize-tests/producticons/index.html diff --git a/lib/vscode/extensions/vscode-colorize-tests/producticons/mit_license.txt b/extensions/vscode-colorize-tests/producticons/mit_license.txt similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/producticons/mit_license.txt rename to extensions/vscode-colorize-tests/producticons/mit_license.txt diff --git a/lib/vscode/extensions/vscode-colorize-tests/producticons/test-product-icon-theme.json b/extensions/vscode-colorize-tests/producticons/test-product-icon-theme.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/producticons/test-product-icon-theme.json rename to extensions/vscode-colorize-tests/producticons/test-product-icon-theme.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/src/colorizer.test.ts b/extensions/vscode-colorize-tests/src/colorizer.test.ts similarity index 93% rename from lib/vscode/extensions/vscode-colorize-tests/src/colorizer.test.ts rename to extensions/vscode-colorize-tests/src/colorizer.test.ts index 9d809409b401..8c4c70fd0b5c 100644 --- a/lib/vscode/extensions/vscode-colorize-tests/src/colorizer.test.ts +++ b/extensions/vscode-colorize-tests/src/colorizer.test.ts @@ -64,7 +64,9 @@ suite('colorization', () => { for (const fixture of fs.readdirSync(fixturesPath)) { test(`colorize: ${fixture}`, function (done) { - assertUnchangedTokens(fixturesPath, resultsPath, fixture, done); + commands.executeCommand('workbench.action.closeAllEditors').then(() => { + assertUnchangedTokens(fixturesPath, resultsPath, fixture, done); + }); }); } }); diff --git a/lib/vscode/extensions/vscode-colorize-tests/src/colorizerTestMain.ts b/extensions/vscode-colorize-tests/src/colorizerTestMain.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/src/colorizerTestMain.ts rename to extensions/vscode-colorize-tests/src/colorizerTestMain.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/src/index.ts b/extensions/vscode-colorize-tests/src/index.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/src/index.ts rename to extensions/vscode-colorize-tests/src/index.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/src/typings/ref.d.ts b/extensions/vscode-colorize-tests/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/src/typings/ref.d.ts rename to extensions/vscode-colorize-tests/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/12750.html b/extensions/vscode-colorize-tests/test/colorize-fixtures/12750.html similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/12750.html rename to extensions/vscode-colorize-tests/test/colorize-fixtures/12750.html diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/13448.html b/extensions/vscode-colorize-tests/test/colorize-fixtures/13448.html similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/13448.html rename to extensions/vscode-colorize-tests/test/colorize-fixtures/13448.html diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/14119.less b/extensions/vscode-colorize-tests/test/colorize-fixtures/14119.less similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/14119.less rename to extensions/vscode-colorize-tests/test/colorize-fixtures/14119.less diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/25920.html b/extensions/vscode-colorize-tests/test/colorize-fixtures/25920.html similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/25920.html rename to extensions/vscode-colorize-tests/test/colorize-fixtures/25920.html diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/Dockerfile b/extensions/vscode-colorize-tests/test/colorize-fixtures/Dockerfile similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/Dockerfile rename to extensions/vscode-colorize-tests/test/colorize-fixtures/Dockerfile diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/basic.java b/extensions/vscode-colorize-tests/test/colorize-fixtures/basic.java similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/basic.java rename to extensions/vscode-colorize-tests/test/colorize-fixtures/basic.java diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-1550.yaml b/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-1550.yaml similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-1550.yaml rename to extensions/vscode-colorize-tests/test/colorize-fixtures/issue-1550.yaml diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-28354.php b/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-28354.php similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-28354.php rename to extensions/vscode-colorize-tests/test/colorize-fixtures/issue-28354.php diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-4008.yaml b/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-4008.yaml similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-4008.yaml rename to extensions/vscode-colorize-tests/test/colorize-fixtures/issue-4008.yaml diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-6303.yaml b/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-6303.yaml similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-6303.yaml rename to extensions/vscode-colorize-tests/test/colorize-fixtures/issue-6303.yaml diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-76997.php b/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-76997.php similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/issue-76997.php rename to extensions/vscode-colorize-tests/test/colorize-fixtures/issue-76997.php diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/makefile b/extensions/vscode-colorize-tests/test/colorize-fixtures/makefile similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/makefile rename to extensions/vscode-colorize-tests/test/colorize-fixtures/makefile diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-13777.go b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-13777.go similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-13777.go rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-13777.go diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-23630.cpp b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-23630.cpp similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-23630.cpp rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-23630.cpp diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-23850.cpp b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-23850.cpp similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-23850.cpp rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-23850.cpp diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-33886.md b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-33886.md similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-33886.md rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-33886.md diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-4287.pug b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-4287.pug similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-4287.pug rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-4287.pug diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-6611.rs b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-6611.rs similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-6611.rs rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-6611.rs diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-7115.xml b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-7115.xml similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-7115.xml rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-7115.xml diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-78769.cpp b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-78769.cpp similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-78769.cpp rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-78769.cpp diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-80644.cpp b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-80644.cpp similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-80644.cpp rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-80644.cpp diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-brackets.tsx b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-brackets.tsx similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-brackets.tsx rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-brackets.tsx diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-cssvariables.less b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-cssvariables.less similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-cssvariables.less rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-cssvariables.less diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-cssvariables.scss b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-cssvariables.scss similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-cssvariables.scss rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-cssvariables.scss diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-embedding.html b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-embedding.html similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-embedding.html rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-embedding.html diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-freeze-56476.ps1 b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-freeze-56476.ps1 similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-freeze-56476.ps1 rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-freeze-56476.ps1 diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-function-inv.ts b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-function-inv.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-function-inv.ts rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-function-inv.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue11.ts b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue11.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue11.ts rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue11.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue5431.ts b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue5431.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue5431.ts rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue5431.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue5465.ts b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue5465.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue5465.ts rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue5465.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue5566.ts b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue5566.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue5566.ts rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-issue5566.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-jsdoc-multiline-type.ts b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-jsdoc-multiline-type.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-jsdoc-multiline-type.ts rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-jsdoc-multiline-type.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-keywords.ts b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-keywords.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-keywords.ts rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-keywords.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-members.ts b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-members.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-members.ts rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-members.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-object-literals.ts b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-object-literals.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-object-literals.ts rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-object-literals.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-regex.coffee b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-regex.coffee similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-regex.coffee rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-regex.coffee diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-strings.ts b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-strings.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-strings.ts rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-strings.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-this.ts b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-this.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-this.ts rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-this.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-variables.css b/extensions/vscode-colorize-tests/test/colorize-fixtures/test-variables.css similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test-variables.css rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test-variables.css diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.bat b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.bat similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.bat rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.bat diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.c b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.c similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.c rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.c diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cc b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cc similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cc rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.cc diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.clj b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.clj similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.clj rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.clj diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.coffee b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.coffee similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.coffee rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.coffee diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cpp b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cpp similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cpp rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.cpp diff --git a/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cs b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cs new file mode 100644 index 000000000000..c7098217742c --- /dev/null +++ b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cs @@ -0,0 +1,27 @@ +using System; +namespace SampleNamespace +{ + class TestClass + { + static void Main(string[] args) + { + int[] radii = { 15, 32, 108, 74, 9 }; + const double pi = 3.14159; + foreach (int radius in radii) { + double circumference = pi * (2 * radius); + // Display the number of command line arguments: + System.Console.WriteLine("Circumference = {0:N2}", circumference); + } + } + + public void TestMethod() + { + ListField = new List(); + + List localVar; + localVar = new List(); + + List localVar2 = new List(); + } + } +} diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cshtml b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cshtml similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cshtml rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.cshtml diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.css b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.css similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.css rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.css diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cu b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cu similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cu rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.cu diff --git a/extensions/vscode-colorize-tests/test/colorize-fixtures/test.dart b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.dart new file mode 100644 index 000000000000..e26254197bcd --- /dev/null +++ b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.dart @@ -0,0 +1,19 @@ +// from https://flutter.dev/ + +import 'package:flutter/material.dart'; + +void main() async { + runApp( + MaterialApp( + debugShowCheckedModeBanner: false, + home: Scaffold( + body: MyApp(), + ), + ), + ); +} + +class MyApp extends StatefulWidget { + @override + _MyAppState createState() => _MyAppState(); +} \ No newline at end of file diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.fs b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.fs similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.fs rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.fs diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.go b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.go similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.go rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.go diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.groovy b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.groovy similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.groovy rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.groovy diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.handlebars b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.handlebars similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.handlebars rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.handlebars diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.hbs b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.hbs similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.hbs rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.hbs diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.hlsl b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.hlsl similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.hlsl rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.hlsl diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.html b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.html similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.html rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.html diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.ini b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.ini similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.ini rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.ini diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.jl b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.jl similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.jl rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.jl diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.js b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.js similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.js rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.js diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.json b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.json rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.jsx b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.jsx similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.jsx rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.jsx diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.less b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.less similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.less rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.less diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.log b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.log similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.log rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.log diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.lua b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.lua similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.lua rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.lua diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.m b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.m similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.m rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.m diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.md b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.md similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.md rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.md diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.mm b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.mm similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.mm rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.mm diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.php b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.php similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.php rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.php diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.pl b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.pl similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.pl rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.pl diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.ps1 b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.ps1 similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.ps1 rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.ps1 diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.pug b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.pug similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.pug rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.pug diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.r b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.r similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.r rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.r diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.rb b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.rb similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.rb rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.rb diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.rs b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.rs similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.rs rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.rs diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.scss b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.scss similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.scss rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.scss diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.sh b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.sh similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.sh rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.sh diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.shader b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.shader similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.shader rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.shader diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.sql b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.sql similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.sql rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.sql diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.swift b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.swift similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.swift rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.swift diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.ts b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.ts similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.ts rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.ts diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.vb b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.vb similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.vb rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.vb diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.xml b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.xml similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.xml rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.xml diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.yaml b/extensions/vscode-colorize-tests/test/colorize-fixtures/test.yaml similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.yaml rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test.yaml diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test2.pl b/extensions/vscode-colorize-tests/test/colorize-fixtures/test2.pl similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test2.pl rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test2.pl diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test6916.js b/extensions/vscode-colorize-tests/test/colorize-fixtures/test6916.js similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test6916.js rename to extensions/vscode-colorize-tests/test/colorize-fixtures/test6916.js diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/tsconfig_off.json b/extensions/vscode-colorize-tests/test/colorize-fixtures/tsconfig_off.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/tsconfig_off.json rename to extensions/vscode-colorize-tests/test/colorize-fixtures/tsconfig_off.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/12750_html.json b/extensions/vscode-colorize-tests/test/colorize-results/12750_html.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/12750_html.json rename to extensions/vscode-colorize-tests/test/colorize-results/12750_html.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/13448_html.json b/extensions/vscode-colorize-tests/test/colorize-results/13448_html.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/13448_html.json rename to extensions/vscode-colorize-tests/test/colorize-results/13448_html.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/14119_less.json b/extensions/vscode-colorize-tests/test/colorize-results/14119_less.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/14119_less.json rename to extensions/vscode-colorize-tests/test/colorize-results/14119_less.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/25920_html.json b/extensions/vscode-colorize-tests/test/colorize-results/25920_html.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/25920_html.json rename to extensions/vscode-colorize-tests/test/colorize-results/25920_html.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/Dockerfile.json b/extensions/vscode-colorize-tests/test/colorize-results/Dockerfile.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/Dockerfile.json rename to extensions/vscode-colorize-tests/test/colorize-results/Dockerfile.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/basic_java.json b/extensions/vscode-colorize-tests/test/colorize-results/basic_java.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/basic_java.json rename to extensions/vscode-colorize-tests/test/colorize-results/basic_java.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/issue-1550_yaml.json b/extensions/vscode-colorize-tests/test/colorize-results/issue-1550_yaml.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/issue-1550_yaml.json rename to extensions/vscode-colorize-tests/test/colorize-results/issue-1550_yaml.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/issue-28354_php.json b/extensions/vscode-colorize-tests/test/colorize-results/issue-28354_php.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/issue-28354_php.json rename to extensions/vscode-colorize-tests/test/colorize-results/issue-28354_php.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/issue-4008_yaml.json b/extensions/vscode-colorize-tests/test/colorize-results/issue-4008_yaml.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/issue-4008_yaml.json rename to extensions/vscode-colorize-tests/test/colorize-results/issue-4008_yaml.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/issue-6303_yaml.json b/extensions/vscode-colorize-tests/test/colorize-results/issue-6303_yaml.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/issue-6303_yaml.json rename to extensions/vscode-colorize-tests/test/colorize-results/issue-6303_yaml.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/issue-76997_php.json b/extensions/vscode-colorize-tests/test/colorize-results/issue-76997_php.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/issue-76997_php.json rename to extensions/vscode-colorize-tests/test/colorize-results/issue-76997_php.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/makefile.json b/extensions/vscode-colorize-tests/test/colorize-results/makefile.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/makefile.json rename to extensions/vscode-colorize-tests/test/colorize-results/makefile.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-13777_go.json b/extensions/vscode-colorize-tests/test/colorize-results/test-13777_go.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-13777_go.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-13777_go.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-23630_cpp.json b/extensions/vscode-colorize-tests/test/colorize-results/test-23630_cpp.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-23630_cpp.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-23630_cpp.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-23850_cpp.json b/extensions/vscode-colorize-tests/test/colorize-results/test-23850_cpp.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-23850_cpp.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-23850_cpp.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-33886_md.json b/extensions/vscode-colorize-tests/test/colorize-results/test-33886_md.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-33886_md.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-33886_md.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-4287_pug.json b/extensions/vscode-colorize-tests/test/colorize-results/test-4287_pug.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-4287_pug.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-4287_pug.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-6611_rs.json b/extensions/vscode-colorize-tests/test/colorize-results/test-6611_rs.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-6611_rs.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-6611_rs.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-7115_xml.json b/extensions/vscode-colorize-tests/test/colorize-results/test-7115_xml.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-7115_xml.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-7115_xml.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-78769_cpp.json b/extensions/vscode-colorize-tests/test/colorize-results/test-78769_cpp.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-78769_cpp.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-78769_cpp.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-80644_cpp.json b/extensions/vscode-colorize-tests/test/colorize-results/test-80644_cpp.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-80644_cpp.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-80644_cpp.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-brackets_tsx.json b/extensions/vscode-colorize-tests/test/colorize-results/test-brackets_tsx.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-brackets_tsx.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-brackets_tsx.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-cssvariables_less.json b/extensions/vscode-colorize-tests/test/colorize-results/test-cssvariables_less.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-cssvariables_less.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-cssvariables_less.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-cssvariables_scss.json b/extensions/vscode-colorize-tests/test/colorize-results/test-cssvariables_scss.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-cssvariables_scss.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-cssvariables_scss.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-embedding_html.json b/extensions/vscode-colorize-tests/test/colorize-results/test-embedding_html.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-embedding_html.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-embedding_html.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-freeze-56476_ps1.json b/extensions/vscode-colorize-tests/test/colorize-results/test-freeze-56476_ps1.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-freeze-56476_ps1.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-freeze-56476_ps1.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-function-inv_ts.json b/extensions/vscode-colorize-tests/test/colorize-results/test-function-inv_ts.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-function-inv_ts.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-function-inv_ts.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-issue11_ts.json b/extensions/vscode-colorize-tests/test/colorize-results/test-issue11_ts.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-issue11_ts.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-issue11_ts.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-issue5431_ts.json b/extensions/vscode-colorize-tests/test/colorize-results/test-issue5431_ts.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-issue5431_ts.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-issue5431_ts.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-issue5465_ts.json b/extensions/vscode-colorize-tests/test/colorize-results/test-issue5465_ts.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-issue5465_ts.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-issue5465_ts.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-issue5566_ts.json b/extensions/vscode-colorize-tests/test/colorize-results/test-issue5566_ts.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-issue5566_ts.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-issue5566_ts.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-jsdoc-multiline-type_ts.json b/extensions/vscode-colorize-tests/test/colorize-results/test-jsdoc-multiline-type_ts.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-jsdoc-multiline-type_ts.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-jsdoc-multiline-type_ts.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-keywords_ts.json b/extensions/vscode-colorize-tests/test/colorize-results/test-keywords_ts.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-keywords_ts.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-keywords_ts.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-members_ts.json b/extensions/vscode-colorize-tests/test/colorize-results/test-members_ts.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-members_ts.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-members_ts.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-object-literals_ts.json b/extensions/vscode-colorize-tests/test/colorize-results/test-object-literals_ts.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-object-literals_ts.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-object-literals_ts.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-regex_coffee.json b/extensions/vscode-colorize-tests/test/colorize-results/test-regex_coffee.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-regex_coffee.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-regex_coffee.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-strings_ts.json b/extensions/vscode-colorize-tests/test/colorize-results/test-strings_ts.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-strings_ts.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-strings_ts.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-this_ts.json b/extensions/vscode-colorize-tests/test/colorize-results/test-this_ts.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-this_ts.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-this_ts.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-variables_css.json b/extensions/vscode-colorize-tests/test/colorize-results/test-variables_css.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test-variables_css.json rename to extensions/vscode-colorize-tests/test/colorize-results/test-variables_css.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test2_pl.json b/extensions/vscode-colorize-tests/test/colorize-results/test2_pl.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test2_pl.json rename to extensions/vscode-colorize-tests/test/colorize-results/test2_pl.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test6916_js.json b/extensions/vscode-colorize-tests/test/colorize-results/test6916_js.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test6916_js.json rename to extensions/vscode-colorize-tests/test/colorize-results/test6916_js.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_bat.json b/extensions/vscode-colorize-tests/test/colorize-results/test_bat.json similarity index 98% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_bat.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_bat.json index eb76b0e1d041..399fd0c22084 100644 --- a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_bat.json +++ b/extensions/vscode-colorize-tests/test/colorize-results/test_bat.json @@ -100,13 +100,13 @@ }, { "c": "%", - "t": "source.batchfile punctuation.definition.variable.batchfile", + "t": "source.batchfile variable.parameter.batchfile punctuation.definition.variable.batchfile", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_c.json b/extensions/vscode-colorize-tests/test/colorize-results/test_c.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_c.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_c.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_cc.json b/extensions/vscode-colorize-tests/test/colorize-results/test_cc.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_cc.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_cc.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_clj.json b/extensions/vscode-colorize-tests/test/colorize-results/test_clj.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_clj.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_clj.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_coffee.json b/extensions/vscode-colorize-tests/test/colorize-results/test_coffee.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_coffee.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_coffee.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_cpp.json b/extensions/vscode-colorize-tests/test/colorize-results/test_cpp.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_cpp.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_cpp.json diff --git a/extensions/vscode-colorize-tests/test/colorize-results/test_cs.json b/extensions/vscode-colorize-tests/test/colorize-results/test_cs.json new file mode 100644 index 000000000000..5ebe142cb8f0 --- /dev/null +++ b/extensions/vscode-colorize-tests/test/colorize-results/test_cs.json @@ -0,0 +1,2114 @@ +[ + { + "c": "using", + "t": "source.cs keyword.other.using.cs", + "r": { + "dark_plus": "keyword.other.using: #C586C0", + "light_plus": "keyword.other.using: #AF00DB", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword.other.using: #C586C0" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "System", + "t": "source.cs entity.name.type.namespace.cs", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, + { + "c": ";", + "t": "source.cs punctuation.terminator.statement.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "namespace", + "t": "source.cs keyword.other.namespace.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "SampleNamespace", + "t": "source.cs entity.name.type.namespace.cs", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, + { + "c": "{", + "t": "source.cs punctuation.curlybrace.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "class", + "t": "source.cs keyword.other.class.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "TestClass", + "t": "source.cs entity.name.type.class.cs", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "{", + "t": "source.cs punctuation.curlybrace.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "static", + "t": "source.cs storage.modifier.cs", + "r": { + "dark_plus": "storage.modifier: #569CD6", + "light_plus": "storage.modifier: #0000FF", + "dark_vs": "storage.modifier: #569CD6", + "light_vs": "storage.modifier: #0000FF", + "hc_black": "storage.modifier: #569CD6" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "void", + "t": "source.cs keyword.type.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "Main", + "t": "source.cs entity.name.function.cs", + "r": { + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.function: #DCDCAA" + } + }, + { + "c": "(", + "t": "source.cs punctuation.parenthesis.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "string", + "t": "source.cs keyword.type.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": "[", + "t": "source.cs punctuation.squarebracket.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "]", + "t": "source.cs punctuation.squarebracket.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "args", + "t": "source.cs entity.name.variable.parameter.cs", + "r": { + "dark_plus": "entity.name.variable: #9CDCFE", + "light_plus": "entity.name.variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.cs punctuation.parenthesis.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "{", + "t": "source.cs punctuation.curlybrace.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "int", + "t": "source.cs keyword.type.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": "[", + "t": "source.cs punctuation.squarebracket.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "]", + "t": "source.cs punctuation.squarebracket.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "radii", + "t": "source.cs entity.name.variable.local.cs", + "r": { + "dark_plus": "entity.name.variable: #9CDCFE", + "light_plus": "entity.name.variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.cs keyword.operator.assignment.cs", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "{", + "t": "source.cs punctuation.curlybrace.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "15", + "t": "source.cs constant.numeric.decimal.cs", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #098658", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #098658", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": ",", + "t": "source.cs punctuation.separator.comma.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "32", + "t": "source.cs constant.numeric.decimal.cs", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #098658", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #098658", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": ",", + "t": "source.cs punctuation.separator.comma.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "108", + "t": "source.cs constant.numeric.decimal.cs", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #098658", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #098658", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": ",", + "t": "source.cs punctuation.separator.comma.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "74", + "t": "source.cs constant.numeric.decimal.cs", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #098658", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #098658", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": ",", + "t": "source.cs punctuation.separator.comma.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "9", + "t": "source.cs constant.numeric.decimal.cs", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #098658", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #098658", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "}", + "t": "source.cs punctuation.curlybrace.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ";", + "t": "source.cs punctuation.terminator.statement.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "const", + "t": "source.cs storage.modifier.cs", + "r": { + "dark_plus": "storage.modifier: #569CD6", + "light_plus": "storage.modifier: #0000FF", + "dark_vs": "storage.modifier: #569CD6", + "light_vs": "storage.modifier: #0000FF", + "hc_black": "storage.modifier: #569CD6" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "double", + "t": "source.cs keyword.type.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "pi", + "t": "source.cs entity.name.variable.local.cs", + "r": { + "dark_plus": "entity.name.variable: #9CDCFE", + "light_plus": "entity.name.variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.cs keyword.operator.assignment.cs", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "3.14159", + "t": "source.cs constant.numeric.decimal.cs", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #098658", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #098658", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": ";", + "t": "source.cs punctuation.terminator.statement.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "foreach", + "t": "source.cs keyword.control.loop.foreach.cs", + "r": { + "dark_plus": "keyword.control: #C586C0", + "light_plus": "keyword.control: #AF00DB", + "dark_vs": "keyword.control: #569CD6", + "light_vs": "keyword.control: #0000FF", + "hc_black": "keyword.control: #C586C0" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "(", + "t": "source.cs punctuation.parenthesis.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "int", + "t": "source.cs keyword.type.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "radius", + "t": "source.cs entity.name.variable.local.cs", + "r": { + "dark_plus": "entity.name.variable: #9CDCFE", + "light_plus": "entity.name.variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "in", + "t": "source.cs keyword.control.loop.in.cs", + "r": { + "dark_plus": "keyword.control: #C586C0", + "light_plus": "keyword.control: #AF00DB", + "dark_vs": "keyword.control: #569CD6", + "light_vs": "keyword.control: #0000FF", + "hc_black": "keyword.control: #C586C0" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "radii", + "t": "source.cs variable.other.readwrite.cs", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": ")", + "t": "source.cs punctuation.parenthesis.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "{", + "t": "source.cs punctuation.curlybrace.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "double", + "t": "source.cs keyword.type.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "circumference", + "t": "source.cs entity.name.variable.local.cs", + "r": { + "dark_plus": "entity.name.variable: #9CDCFE", + "light_plus": "entity.name.variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.cs keyword.operator.assignment.cs", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "pi", + "t": "source.cs variable.other.readwrite.cs", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "*", + "t": "source.cs keyword.operator.arithmetic.cs", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "(", + "t": "source.cs punctuation.parenthesis.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "2", + "t": "source.cs constant.numeric.decimal.cs", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #098658", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #098658", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "*", + "t": "source.cs keyword.operator.arithmetic.cs", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "radius", + "t": "source.cs variable.other.readwrite.cs", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": ")", + "t": "source.cs punctuation.parenthesis.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ";", + "t": "source.cs punctuation.terminator.statement.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs punctuation.whitespace.comment.leading.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "//", + "t": "source.cs comment.line.double-slash.cs punctuation.definition.comment.cs", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668" + } + }, + { + "c": " Display the number of command line arguments:", + "t": "source.cs comment.line.double-slash.cs", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "System", + "t": "source.cs variable.other.object.cs", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": ".", + "t": "source.cs punctuation.accessor.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "Console", + "t": "source.cs variable.other.object.property.cs", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": ".", + "t": "source.cs punctuation.accessor.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "WriteLine", + "t": "source.cs entity.name.function.cs", + "r": { + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.function: #DCDCAA" + } + }, + { + "c": "(", + "t": "source.cs punctuation.parenthesis.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "\"", + "t": "source.cs string.quoted.double.cs punctuation.definition.string.begin.cs", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": "Circumference = {0:N2}", + "t": "source.cs string.quoted.double.cs", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": "\"", + "t": "source.cs string.quoted.double.cs punctuation.definition.string.end.cs", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": ",", + "t": "source.cs punctuation.separator.comma.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "circumference", + "t": "source.cs variable.other.readwrite.cs", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": ")", + "t": "source.cs punctuation.parenthesis.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ";", + "t": "source.cs punctuation.terminator.statement.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "}", + "t": "source.cs punctuation.curlybrace.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "}", + "t": "source.cs punctuation.curlybrace.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "public", + "t": "source.cs storage.modifier.cs", + "r": { + "dark_plus": "storage.modifier: #569CD6", + "light_plus": "storage.modifier: #0000FF", + "dark_vs": "storage.modifier: #569CD6", + "light_vs": "storage.modifier: #0000FF", + "hc_black": "storage.modifier: #569CD6" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "void", + "t": "source.cs keyword.type.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "TestMethod", + "t": "source.cs entity.name.function.cs", + "r": { + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.function: #DCDCAA" + } + }, + { + "c": "(", + "t": "source.cs punctuation.parenthesis.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.cs punctuation.parenthesis.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "{", + "t": "source.cs punctuation.curlybrace.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "ListField", + "t": "source.cs variable.other.readwrite.cs", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.cs keyword.operator.assignment.cs", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "new", + "t": "source.cs keyword.other.new.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "List", + "t": "source.cs storage.type.cs", + "r": { + "dark_plus": "storage.type.cs: #4EC9B0", + "light_plus": "storage.type.cs: #267F99", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type.cs: #4EC9B0" + } + }, + { + "c": "<", + "t": "source.cs punctuation.definition.typeparameters.begin.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "int", + "t": "source.cs keyword.type.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": ">", + "t": "source.cs punctuation.definition.typeparameters.end.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "(", + "t": "source.cs punctuation.parenthesis.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.cs punctuation.parenthesis.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ";", + "t": "source.cs punctuation.terminator.statement.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "List", + "t": "source.cs storage.type.cs", + "r": { + "dark_plus": "storage.type.cs: #4EC9B0", + "light_plus": "storage.type.cs: #267F99", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type.cs: #4EC9B0" + } + }, + { + "c": "<", + "t": "source.cs punctuation.definition.typeparameters.begin.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "int", + "t": "source.cs keyword.type.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": ">", + "t": "source.cs punctuation.definition.typeparameters.end.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "localVar", + "t": "source.cs entity.name.variable.local.cs", + "r": { + "dark_plus": "entity.name.variable: #9CDCFE", + "light_plus": "entity.name.variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ";", + "t": "source.cs punctuation.terminator.statement.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "localVar", + "t": "source.cs variable.other.readwrite.cs", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.cs keyword.operator.assignment.cs", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "new", + "t": "source.cs keyword.other.new.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "List", + "t": "source.cs storage.type.cs", + "r": { + "dark_plus": "storage.type.cs: #4EC9B0", + "light_plus": "storage.type.cs: #267F99", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type.cs: #4EC9B0" + } + }, + { + "c": "<", + "t": "source.cs punctuation.definition.typeparameters.begin.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "int", + "t": "source.cs keyword.type.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": ">", + "t": "source.cs punctuation.definition.typeparameters.end.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "(", + "t": "source.cs punctuation.parenthesis.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.cs punctuation.parenthesis.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ";", + "t": "source.cs punctuation.terminator.statement.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "List", + "t": "source.cs storage.type.cs", + "r": { + "dark_plus": "storage.type.cs: #4EC9B0", + "light_plus": "storage.type.cs: #267F99", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type.cs: #4EC9B0" + } + }, + { + "c": "<", + "t": "source.cs punctuation.definition.typeparameters.begin.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "int", + "t": "source.cs keyword.type.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": ">", + "t": "source.cs punctuation.definition.typeparameters.end.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "localVar2", + "t": "source.cs entity.name.variable.local.cs", + "r": { + "dark_plus": "entity.name.variable: #9CDCFE", + "light_plus": "entity.name.variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "source.cs keyword.operator.assignment.cs", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "new", + "t": "source.cs keyword.other.new.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "List", + "t": "source.cs storage.type.cs", + "r": { + "dark_plus": "storage.type.cs: #4EC9B0", + "light_plus": "storage.type.cs: #267F99", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type.cs: #4EC9B0" + } + }, + { + "c": "<", + "t": "source.cs punctuation.definition.typeparameters.begin.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "int", + "t": "source.cs keyword.type.cs", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": ">", + "t": "source.cs punctuation.definition.typeparameters.end.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "(", + "t": "source.cs punctuation.parenthesis.open.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.cs punctuation.parenthesis.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ";", + "t": "source.cs punctuation.terminator.statement.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "}", + "t": "source.cs punctuation.curlybrace.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "}", + "t": "source.cs punctuation.curlybrace.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "}", + "t": "source.cs punctuation.curlybrace.close.cs", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + } +] \ No newline at end of file diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_cshtml.json b/extensions/vscode-colorize-tests/test/colorize-results/test_cshtml.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_cshtml.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_cshtml.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_css.json b/extensions/vscode-colorize-tests/test/colorize-results/test_css.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_css.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_css.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_cu.json b/extensions/vscode-colorize-tests/test/colorize-results/test_cu.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_cu.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_cu.json diff --git a/extensions/vscode-colorize-tests/test/colorize-results/test_dart.json b/extensions/vscode-colorize-tests/test/colorize-results/test_dart.json new file mode 100644 index 000000000000..0d944b2b5a5f --- /dev/null +++ b/extensions/vscode-colorize-tests/test/colorize-results/test_dart.json @@ -0,0 +1,673 @@ +[ + { + "c": "// from https://flutter.dev/", + "t": "source.dart comment.line.double-slash.dart", + "r": { + "dark_plus": "comment: #6A9955", + "light_plus": "comment: #008000", + "dark_vs": "comment: #6A9955", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668" + } + }, + { + "c": "import", + "t": "source.dart meta.declaration.dart keyword.other.import.dart", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " ", + "t": "source.dart meta.declaration.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "'package:flutter/material.dart'", + "t": "source.dart meta.declaration.dart string.interpolated.single.dart", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": ";", + "t": "source.dart meta.declaration.dart punctuation.terminator.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "void", + "t": "source.dart storage.type.primitive.dart", + "r": { + "dark_plus": "storage.type: #569CD6", + "light_plus": "storage.type: #0000FF", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type: #569CD6" + } + }, + { + "c": " ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "main", + "t": "source.dart entity.name.function.dart", + "r": { + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.function: #DCDCAA" + } + }, + { + "c": "() ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "async", + "t": "source.dart keyword.control.dart", + "r": { + "dark_plus": "keyword.control: #C586C0", + "light_plus": "keyword.control: #AF00DB", + "dark_vs": "keyword.control: #569CD6", + "light_vs": "keyword.control: #0000FF", + "hc_black": "keyword.control: #C586C0" + } + }, + { + "c": " {", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "runApp", + "t": "source.dart entity.name.function.dart", + "r": { + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.function: #DCDCAA" + } + }, + { + "c": "(", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "MaterialApp", + "t": "source.dart support.class.dart", + "r": { + "dark_plus": "support.class: #4EC9B0", + "light_plus": "support.class: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.class: #4EC9B0" + } + }, + { + "c": "(", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " debugShowCheckedModeBanner", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ":", + "t": "source.dart keyword.operator.ternary.dart", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "false", + "t": "source.dart constant.language.dart", + "r": { + "dark_plus": "constant.language: #569CD6", + "light_plus": "constant.language: #0000FF", + "dark_vs": "constant.language: #569CD6", + "light_vs": "constant.language: #0000FF", + "hc_black": "constant.language: #569CD6" + } + }, + { + "c": ",", + "t": "source.dart punctuation.comma.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " home", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ":", + "t": "source.dart keyword.operator.ternary.dart", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "Scaffold", + "t": "source.dart support.class.dart", + "r": { + "dark_plus": "support.class: #4EC9B0", + "light_plus": "support.class: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.class: #4EC9B0" + } + }, + { + "c": "(", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " body", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ":", + "t": "source.dart keyword.operator.ternary.dart", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "MyApp", + "t": "source.dart support.class.dart", + "r": { + "dark_plus": "support.class: #4EC9B0", + "light_plus": "support.class: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.class: #4EC9B0" + } + }, + { + "c": "()", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.dart punctuation.comma.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " )", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.dart punctuation.comma.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " )", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ",", + "t": "source.dart punctuation.comma.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " )", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ";", + "t": "source.dart punctuation.terminator.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "}", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "class", + "t": "source.dart keyword.declaration.dart", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "MyApp", + "t": "source.dart support.class.dart", + "r": { + "dark_plus": "support.class: #4EC9B0", + "light_plus": "support.class: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.class: #4EC9B0" + } + }, + { + "c": " ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "extends", + "t": "source.dart keyword.declaration.dart", + "r": { + "dark_plus": "keyword: #569CD6", + "light_plus": "keyword: #0000FF", + "dark_vs": "keyword: #569CD6", + "light_vs": "keyword: #0000FF", + "hc_black": "keyword: #569CD6" + } + }, + { + "c": " ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "StatefulWidget", + "t": "source.dart support.class.dart", + "r": { + "dark_plus": "support.class: #4EC9B0", + "light_plus": "support.class: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.class: #4EC9B0" + } + }, + { + "c": " {", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "@override", + "t": "source.dart storage.type.annotation.dart", + "r": { + "dark_plus": "storage.type: #569CD6", + "light_plus": "storage.type: #0000FF", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type: #569CD6" + } + }, + { + "c": " ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "_MyAppState", + "t": "source.dart support.class.dart", + "r": { + "dark_plus": "support.class: #4EC9B0", + "light_plus": "support.class: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.class: #4EC9B0" + } + }, + { + "c": " ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "createState", + "t": "source.dart entity.name.function.dart", + "r": { + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.function: #DCDCAA" + } + }, + { + "c": "() ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=>", + "t": "source.dart keyword.operator.closure.dart", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "_MyAppState", + "t": "source.dart support.class.dart", + "r": { + "dark_plus": "support.class: #4EC9B0", + "light_plus": "support.class: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.class: #4EC9B0" + } + }, + { + "c": "()", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ";", + "t": "source.dart punctuation.terminator.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "}", + "t": "source.dart", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + } +] \ No newline at end of file diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_fs.json b/extensions/vscode-colorize-tests/test/colorize-results/test_fs.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_fs.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_fs.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_go.json b/extensions/vscode-colorize-tests/test/colorize-results/test_go.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_go.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_go.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_groovy.json b/extensions/vscode-colorize-tests/test/colorize-results/test_groovy.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_groovy.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_groovy.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_handlebars.json b/extensions/vscode-colorize-tests/test/colorize-results/test_handlebars.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_handlebars.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_handlebars.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_hbs.json b/extensions/vscode-colorize-tests/test/colorize-results/test_hbs.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_hbs.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_hbs.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_hlsl.json b/extensions/vscode-colorize-tests/test/colorize-results/test_hlsl.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_hlsl.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_hlsl.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_html.json b/extensions/vscode-colorize-tests/test/colorize-results/test_html.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_html.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_html.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_ini.json b/extensions/vscode-colorize-tests/test/colorize-results/test_ini.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_ini.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_ini.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_jl.json b/extensions/vscode-colorize-tests/test/colorize-results/test_jl.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_jl.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_jl.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_js.json b/extensions/vscode-colorize-tests/test/colorize-results/test_js.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_js.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_js.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_json.json b/extensions/vscode-colorize-tests/test/colorize-results/test_json.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_json.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_json.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_jsx.json b/extensions/vscode-colorize-tests/test/colorize-results/test_jsx.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_jsx.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_jsx.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_less.json b/extensions/vscode-colorize-tests/test/colorize-results/test_less.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_less.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_less.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_log.json b/extensions/vscode-colorize-tests/test/colorize-results/test_log.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_log.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_log.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_lua.json b/extensions/vscode-colorize-tests/test/colorize-results/test_lua.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_lua.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_lua.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_m.json b/extensions/vscode-colorize-tests/test/colorize-results/test_m.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_m.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_m.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_md.json b/extensions/vscode-colorize-tests/test/colorize-results/test_md.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_md.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_md.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_mm.json b/extensions/vscode-colorize-tests/test/colorize-results/test_mm.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_mm.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_mm.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_php.json b/extensions/vscode-colorize-tests/test/colorize-results/test_php.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_php.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_php.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_pl.json b/extensions/vscode-colorize-tests/test/colorize-results/test_pl.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_pl.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_pl.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_ps1.json b/extensions/vscode-colorize-tests/test/colorize-results/test_ps1.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_ps1.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_ps1.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_pug.json b/extensions/vscode-colorize-tests/test/colorize-results/test_pug.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_pug.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_pug.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_r.json b/extensions/vscode-colorize-tests/test/colorize-results/test_r.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_r.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_r.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_rb.json b/extensions/vscode-colorize-tests/test/colorize-results/test_rb.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_rb.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_rb.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_rs.json b/extensions/vscode-colorize-tests/test/colorize-results/test_rs.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_rs.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_rs.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_scss.json b/extensions/vscode-colorize-tests/test/colorize-results/test_scss.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_scss.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_scss.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_sh.json b/extensions/vscode-colorize-tests/test/colorize-results/test_sh.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_sh.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_sh.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_shader.json b/extensions/vscode-colorize-tests/test/colorize-results/test_shader.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_shader.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_shader.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_sql.json b/extensions/vscode-colorize-tests/test/colorize-results/test_sql.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_sql.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_sql.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_swift.json b/extensions/vscode-colorize-tests/test/colorize-results/test_swift.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_swift.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_swift.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_ts.json b/extensions/vscode-colorize-tests/test/colorize-results/test_ts.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_ts.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_ts.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_vb.json b/extensions/vscode-colorize-tests/test/colorize-results/test_vb.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_vb.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_vb.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_xml.json b/extensions/vscode-colorize-tests/test/colorize-results/test_xml.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_xml.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_xml.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_yaml.json b/extensions/vscode-colorize-tests/test/colorize-results/test_yaml.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_yaml.json rename to extensions/vscode-colorize-tests/test/colorize-results/test_yaml.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/tsconfig_off_json.json b/extensions/vscode-colorize-tests/test/colorize-results/tsconfig_off_json.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/tsconfig_off_json.json rename to extensions/vscode-colorize-tests/test/colorize-results/tsconfig_off_json.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/semantic-test/.vscode/settings.json b/extensions/vscode-colorize-tests/test/semantic-test/.vscode/settings.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/semantic-test/.vscode/settings.json rename to extensions/vscode-colorize-tests/test/semantic-test/.vscode/settings.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/semantic-test/semantic-test.json b/extensions/vscode-colorize-tests/test/semantic-test/semantic-test.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/test/semantic-test/semantic-test.json rename to extensions/vscode-colorize-tests/test/semantic-test/semantic-test.json diff --git a/lib/vscode/extensions/vscode-colorize-tests/tsconfig.json b/extensions/vscode-colorize-tests/tsconfig.json similarity index 100% rename from lib/vscode/extensions/vscode-colorize-tests/tsconfig.json rename to extensions/vscode-colorize-tests/tsconfig.json diff --git a/extensions/vscode-colorize-tests/yarn.lock b/extensions/vscode-colorize-tests/yarn.lock new file mode 100644 index 000000000000..15725cff5029 --- /dev/null +++ b/extensions/vscode-colorize-tests/yarn.lock @@ -0,0 +1,13 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +jsonc-parser@2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc" + integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w== diff --git a/lib/vscode/extensions/vscode-custom-editor-tests/.vscodeignore b/extensions/vscode-custom-editor-tests/.vscodeignore similarity index 100% rename from lib/vscode/extensions/vscode-custom-editor-tests/.vscodeignore rename to extensions/vscode-custom-editor-tests/.vscodeignore diff --git a/lib/vscode/extensions/vscode-custom-editor-tests/customEditorMedia/textEditor.js b/extensions/vscode-custom-editor-tests/customEditorMedia/textEditor.js similarity index 100% rename from lib/vscode/extensions/vscode-custom-editor-tests/customEditorMedia/textEditor.js rename to extensions/vscode-custom-editor-tests/customEditorMedia/textEditor.js diff --git a/lib/vscode/extensions/vscode-custom-editor-tests/media/icon.png b/extensions/vscode-custom-editor-tests/media/icon.png similarity index 100% rename from lib/vscode/extensions/vscode-custom-editor-tests/media/icon.png rename to extensions/vscode-custom-editor-tests/media/icon.png diff --git a/extensions/vscode-custom-editor-tests/package.json b/extensions/vscode-custom-editor-tests/package.json new file mode 100644 index 000000000000..997c3a94da6e --- /dev/null +++ b/extensions/vscode-custom-editor-tests/package.json @@ -0,0 +1,45 @@ +{ + "name": "vscode-custom-editor-tests", + "description": "Custom editor tests for VS Code", + "version": "0.0.1", + "publisher": "vscode", + "license": "MIT", + "private": true, + "activationEvents": [ + "onCustomEditor:testWebviewEditor.abc" + ], + "main": "./out/extension", + "enableProposedApi": true, + "engines": { + "vscode": "^1.48.0" + }, + "icon": "media/icon.png", + "scripts": { + "compile": "node ./node_modules/vscode/bin/compile -watch -p ./", + "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-notebook-tests ./tsconfig.json" + }, + "dependencies": { + "p-limit": "^3.0.2" + }, + "devDependencies": { + "@types/node": "14.x", + "@types/p-limit": "^2.2.0" + }, + "contributes": { + "customEditors": [ + { + "viewType": "testWebviewEditor.abc", + "displayName": "Test ABC editor", + "selector": [ + { + "filenamePattern": "*.abc" + } + ] + } + ] + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/vscode-custom-editor-tests/src/customTextEditor.ts b/extensions/vscode-custom-editor-tests/src/customTextEditor.ts similarity index 100% rename from lib/vscode/extensions/vscode-custom-editor-tests/src/customTextEditor.ts rename to extensions/vscode-custom-editor-tests/src/customTextEditor.ts diff --git a/lib/vscode/extensions/vscode-custom-editor-tests/src/dispose.ts b/extensions/vscode-custom-editor-tests/src/dispose.ts similarity index 100% rename from lib/vscode/extensions/vscode-custom-editor-tests/src/dispose.ts rename to extensions/vscode-custom-editor-tests/src/dispose.ts diff --git a/lib/vscode/extensions/vscode-custom-editor-tests/src/extension.ts b/extensions/vscode-custom-editor-tests/src/extension.ts similarity index 100% rename from lib/vscode/extensions/vscode-custom-editor-tests/src/extension.ts rename to extensions/vscode-custom-editor-tests/src/extension.ts diff --git a/lib/vscode/extensions/vscode-custom-editor-tests/src/test/customEditor.test.ts b/extensions/vscode-custom-editor-tests/src/test/customEditor.test.ts similarity index 92% rename from lib/vscode/extensions/vscode-custom-editor-tests/src/test/customEditor.test.ts rename to extensions/vscode-custom-editor-tests/src/test/customEditor.test.ts index b4725c22de3e..654afb84cd78 100644 --- a/lib/vscode/extensions/vscode-custom-editor-tests/src/test/customEditor.test.ts +++ b/extensions/vscode-custom-editor-tests/src/test/customEditor.test.ts @@ -92,7 +92,7 @@ suite('CustomEditor tests', () => { await vscode.commands.executeCommand(commands.open, testDocument); const { content } = await listener.nextResponse(); - assert.equal(content, startingContent); + assert.strictEqual(content, startingContent); }); test('Should support basic edits', async () => { @@ -107,7 +107,7 @@ suite('CustomEditor tests', () => { const newContent = `basic edit test`; await vscode.commands.executeCommand(Testing.abcEditorTypeCommand, newContent); const { content } = await listener.nextResponse(); - assert.equal(content, newContent); + assert.strictEqual(content, newContent); }); test('Should support single undo', async () => { @@ -123,13 +123,13 @@ suite('CustomEditor tests', () => { { await vscode.commands.executeCommand(Testing.abcEditorTypeCommand, newContent); const { content } = await listener.nextResponse(); - assert.equal(content, newContent); + assert.strictEqual(content, newContent); } await delay(100); { await vscode.commands.executeCommand(commands.undo); const { content } = await listener.nextResponse(); - assert.equal(content, startingContent); + assert.strictEqual(content, startingContent); } }); @@ -148,7 +148,7 @@ suite('CustomEditor tests', () => { for (let i = 0; i < count; ++i) { await vscode.commands.executeCommand(Testing.abcEditorTypeCommand, `${i}`); const { content } = await listener.nextResponse(); - assert.equal(`${i}`, content); + assert.strictEqual(`${i}`, content); } // Then undo them in order @@ -156,14 +156,14 @@ suite('CustomEditor tests', () => { await delay(100); await vscode.commands.executeCommand(commands.undo); const { content } = await listener.nextResponse(); - assert.equal(`${i - 1}`, content); + assert.strictEqual(`${i - 1}`, content); } { await delay(100); await vscode.commands.executeCommand(commands.undo); const { content } = await listener.nextResponse(); - assert.equal(content, startingContent); + assert.strictEqual(content, startingContent); } }); @@ -184,8 +184,8 @@ suite('CustomEditor tests', () => { await vscode.workspace.applyEdit(edit); const response = (await listener.nextResponse()); - assert.equal(response.content, startingContent); - assert.equal(response.source.toString(), newFileName.toString()); + assert.strictEqual(response.content, startingContent); + assert.strictEqual(response.source.toString(), newFileName.toString()); }); test('Should support saving custom editors', async () => { @@ -201,12 +201,12 @@ suite('CustomEditor tests', () => { { await vscode.commands.executeCommand(Testing.abcEditorTypeCommand, newContent); const { content } = await listener.nextResponse(); - assert.equal(content, newContent); + assert.strictEqual(content, newContent); } { await vscode.commands.executeCommand(commands.save); const fileContent = (await fs.promises.readFile(testDocument.fsPath)).toString(); - assert.equal(fileContent, newContent); + assert.strictEqual(fileContent, newContent); } }); @@ -223,18 +223,18 @@ suite('CustomEditor tests', () => { { await vscode.commands.executeCommand(Testing.abcEditorTypeCommand, newContent); const { content } = await listener.nextResponse(); - assert.equal(content, newContent); + assert.strictEqual(content, newContent); } { await vscode.commands.executeCommand(commands.save); const fileContent = (await fs.promises.readFile(testDocument.fsPath)).toString(); - assert.equal(fileContent, newContent); + assert.strictEqual(fileContent, newContent); } await delay(100); { await vscode.commands.executeCommand(commands.undo); const { content } = await listener.nextResponse(); - assert.equal(content, startingContent); + assert.strictEqual(content, startingContent); } }); @@ -244,14 +244,14 @@ suite('CustomEditor tests', () => { const untitledFile = randomFilePath({ root: testWorkspaceRoot, ext: '.abc' }).with({ scheme: 'untitled' }); await vscode.commands.executeCommand(commands.open, untitledFile); - assert.equal((await listener.nextResponse()).content, ''); + assert.strictEqual((await listener.nextResponse()).content, ''); await vscode.commands.executeCommand(Testing.abcEditorTypeCommand, `123`); - assert.equal((await listener.nextResponse()).content, '123'); + assert.strictEqual((await listener.nextResponse()).content, '123'); await vscode.commands.executeCommand(commands.save); const content = await fs.promises.readFile(untitledFile.fsPath); - assert.equal(content.toString(), '123'); + assert.strictEqual(content.toString(), '123'); }); test.skip('When switching away from a non-default custom editors and then back, we should continue using the non-default editor', async () => { diff --git a/lib/vscode/extensions/vscode-custom-editor-tests/src/test/index.ts b/extensions/vscode-custom-editor-tests/src/test/index.ts similarity index 100% rename from lib/vscode/extensions/vscode-custom-editor-tests/src/test/index.ts rename to extensions/vscode-custom-editor-tests/src/test/index.ts diff --git a/lib/vscode/extensions/vscode-custom-editor-tests/src/test/utils.ts b/extensions/vscode-custom-editor-tests/src/test/utils.ts similarity index 100% rename from lib/vscode/extensions/vscode-custom-editor-tests/src/test/utils.ts rename to extensions/vscode-custom-editor-tests/src/test/utils.ts diff --git a/lib/vscode/extensions/vscode-custom-editor-tests/src/typings/ref.d.ts b/extensions/vscode-custom-editor-tests/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/vscode-custom-editor-tests/src/typings/ref.d.ts rename to extensions/vscode-custom-editor-tests/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/vscode-custom-editor-tests/test-workspace/index.abc b/extensions/vscode-custom-editor-tests/test-workspace/index.abc similarity index 100% rename from lib/vscode/extensions/vscode-custom-editor-tests/test-workspace/index.abc rename to extensions/vscode-custom-editor-tests/test-workspace/index.abc diff --git a/lib/vscode/extensions/vscode-custom-editor-tests/tsconfig.json b/extensions/vscode-custom-editor-tests/tsconfig.json similarity index 100% rename from lib/vscode/extensions/vscode-custom-editor-tests/tsconfig.json rename to extensions/vscode-custom-editor-tests/tsconfig.json diff --git a/extensions/vscode-custom-editor-tests/yarn.lock b/extensions/vscode-custom-editor-tests/yarn.lock new file mode 100644 index 000000000000..76cc46da4b7e --- /dev/null +++ b/extensions/vscode-custom-editor-tests/yarn.lock @@ -0,0 +1,27 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + +"@types/p-limit@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@types/p-limit/-/p-limit-2.2.0.tgz#94a608e9b258a6c6156a13d1a14fd720dba70b97" + integrity sha512-fGFbybl1r0oE9mqgfc2EHHUin9ZL5rbQIexWI6jYRU1ADVn4I3LHzT+g/kpPpZsfp8PB94CQ655pfAjNF8LP6A== + dependencies: + p-limit "*" + +p-limit@*, p-limit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.0.2.tgz#1664e010af3cadc681baafd3e2a437be7b0fb5fe" + integrity sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg== + dependencies: + p-try "^2.0.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== diff --git a/lib/vscode/extensions/vscode-notebook-tests/.vscode/launch.json b/extensions/vscode-notebook-tests/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/vscode-notebook-tests/.vscode/launch.json rename to extensions/vscode-notebook-tests/.vscode/launch.json diff --git a/lib/vscode/extensions/vscode-notebook-tests/.vscode/tasks.json b/extensions/vscode-notebook-tests/.vscode/tasks.json similarity index 100% rename from lib/vscode/extensions/vscode-notebook-tests/.vscode/tasks.json rename to extensions/vscode-notebook-tests/.vscode/tasks.json diff --git a/lib/vscode/extensions/vscode-notebook-tests/media/icon.png b/extensions/vscode-notebook-tests/media/icon.png similarity index 100% rename from lib/vscode/extensions/vscode-notebook-tests/media/icon.png rename to extensions/vscode-notebook-tests/media/icon.png diff --git a/extensions/vscode-notebook-tests/package.json b/extensions/vscode-notebook-tests/package.json new file mode 100644 index 000000000000..cc0264bb1a3a --- /dev/null +++ b/extensions/vscode-notebook-tests/package.json @@ -0,0 +1,79 @@ +{ + "name": "vscode-notebook-tests", + "description": "Notebook tests for VS Code", + "version": "0.0.1", + "publisher": "vscode", + "license": "MIT", + "private": true, + "activationEvents": [ + "*" + ], + "main": "./out/extension", + "enableProposedApi": true, + "engines": { + "vscode": "^1.25.0" + }, + "icon": "media/icon.png", + "scripts": { + "compile": "node ./node_modules/vscode/bin/compile -watch -p ./", + "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-notebook-tests ./tsconfig.json" + }, + "dependencies": {}, + "devDependencies": { + "@types/node": "14.x" + }, + "contributes": { + "commands": [ + { + "command": "vscode-notebook-tests.createNewNotebook", + "title": "Create New Notebook" + }, + { + "command": "vscode-notebook-tests.debugAction", + "title": "Debug Notebook Test Cell Action", + "icon": "$(debug)" + } + ], + "notebooks": [ + { + "type": "notebookSmokeTest", + "displayName": "Notebook Smoke Test", + "selector": [ + { + "filenamePattern": "*.smoke-nb", + "excludeFileNamePattern": "" + } + ] + } + ], + "notebookRenderer": [ + { + "id": "notebookCoreTestRenderer", + "displayName": "Notebook Core Test Renderer", + "entrypoint": "./src/customRenderer.js", + "mimeTypes": [ + "text/custom" + ] + } + ], + "menus": { + "notebook/cell/title": [ + { + "command": "vscode-notebook-tests.debugAction", + "when": "notebookType == notebookSmokeTest", + "group": "inline@1" + } + ] + }, + "jsonValidation": [ + { + "fileMatch": "vscode://vscode-notebook-cell-metadata/*", + "url": "vscode://schemas/notebook/cellmetadata" + } + ] + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/vscode-notebook-tests/src/customRenderer.js b/extensions/vscode-notebook-tests/src/customRenderer.js similarity index 76% rename from lib/vscode/extensions/vscode-notebook-tests/src/customRenderer.js rename to extensions/vscode-notebook-tests/src/customRenderer.js index f23538e38a76..94fd028eee72 100644 --- a/lib/vscode/extensions/vscode-notebook-tests/src/customRenderer.js +++ b/extensions/vscode-notebook-tests/src/customRenderer.js @@ -5,14 +5,7 @@ const vscode = acquireVsCodeApi(); -vscode.postMessage({ - type: 'custom_renderer_initialize', - payload: { - firstMessage: true - } -}); - -const notebook = acquireNotebookRendererApi('notebookCoreTestRenderer'); +const notebook = acquireNotebookRendererApi(); notebook.onDidCreateOutput(({ element, mimeType }) => { const div = document.createElement('div'); diff --git a/extensions/vscode-notebook-tests/src/extension.ts b/extensions/vscode-notebook-tests/src/extension.ts new file mode 100644 index 000000000000..7160f07c1a10 --- /dev/null +++ b/extensions/vscode-notebook-tests/src/extension.ts @@ -0,0 +1,90 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import * as child_process from 'child_process'; +import * as path from 'path'; + +function wait(ms: number): Promise { + return new Promise(r => setTimeout(r, ms)); +} + +export function activate(context: vscode.ExtensionContext): any { + context.subscriptions.push(vscode.commands.registerCommand('vscode-notebook-tests.createNewNotebook', async () => { + const workspacePath = vscode.workspace.workspaceFolders![0].uri.fsPath; + const notebookPath = path.join(workspacePath, 'test.smoke-nb'); + child_process.execSync('echo \'\' > ' + notebookPath); + await wait(500); + await vscode.commands.executeCommand('vscode.open', vscode.Uri.file(notebookPath)); + })); + + context.subscriptions.push(vscode.workspace.registerNotebookContentProvider('notebookSmokeTest', { + openNotebook: async (_resource: vscode.Uri) => { + const dto: vscode.NotebookData = { + metadata: {}, + cells: [ + { + value: 'code()', + languageId: 'typescript', + kind: vscode.NotebookCellKind.Code, + outputs: [], + metadata: { custom: { testCellMetadata: 123 } } + }, + { + value: 'Markdown Cell', + languageId: 'markdown', + kind: vscode.NotebookCellKind.Markup, + outputs: [], + metadata: { custom: { testCellMetadata: 123 } } + } + ] + }; + + return dto; + }, + saveNotebook: async (_document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) => { + return; + }, + saveNotebookAs: async (_targetResource: vscode.Uri, _document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) => { + return; + }, + backupNotebook: async (_document: vscode.NotebookDocument, _context: vscode.NotebookDocumentBackupContext, _cancellation: vscode.CancellationToken) => { + return { + id: '1', + delete: () => { } + }; + } + })); + + const controller = vscode.notebooks.createNotebookController( + 'notebookSmokeTest', + 'notebookSmokeTest', + 'notebookSmokeTest' + ); + + controller.executeHandler = (cells) => { + for (const cell of cells) { + const task = controller.createNotebookCellExecution(cell); + task.start(); + task.replaceOutput([new vscode.NotebookCellOutput([ + vscode.NotebookCellOutputItem.text('test output', 'text/html') + ])]); + task.end(true); + } + }; + + context.subscriptions.push(controller); + + context.subscriptions.push(vscode.commands.registerCommand('vscode-notebook-tests.debugAction', async (cell: vscode.NotebookCell) => { + if (cell) { + const edit = new vscode.WorkspaceEdit(); + const fullRange = new vscode.Range(0, 0, cell.document.lineCount - 1, cell.document.lineAt(cell.document.lineCount - 1).range.end.character); + edit.replace(cell.document.uri, fullRange, 'test'); + await vscode.workspace.applyEdit(edit); + } else { + throw new Error('Cell not set correctly'); + } + })); +} diff --git a/lib/vscode/extensions/vscode-notebook-tests/src/index.ts b/extensions/vscode-notebook-tests/src/index.ts similarity index 100% rename from lib/vscode/extensions/vscode-notebook-tests/src/index.ts rename to extensions/vscode-notebook-tests/src/index.ts diff --git a/lib/vscode/extensions/vscode-notebook-tests/src/typings/ref.d.ts b/extensions/vscode-notebook-tests/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/vscode-notebook-tests/src/typings/ref.d.ts rename to extensions/vscode-notebook-tests/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/vscode-notebook-tests/src/utils.ts b/extensions/vscode-notebook-tests/src/utils.ts similarity index 100% rename from lib/vscode/extensions/vscode-notebook-tests/src/utils.ts rename to extensions/vscode-notebook-tests/src/utils.ts diff --git a/lib/vscode/extensions/vscode-notebook-tests/test/customRenderer.vsctestnb b/extensions/vscode-notebook-tests/test/customRenderer.vsctestnb similarity index 100% rename from lib/vscode/extensions/vscode-notebook-tests/test/customRenderer.vsctestnb rename to extensions/vscode-notebook-tests/test/customRenderer.vsctestnb diff --git a/lib/vscode/extensions/vscode-notebook-tests/test/empty.vsctestnb b/extensions/vscode-notebook-tests/test/empty.vsctestnb similarity index 100% rename from lib/vscode/extensions/vscode-notebook-tests/test/empty.vsctestnb rename to extensions/vscode-notebook-tests/test/empty.vsctestnb diff --git a/lib/vscode/extensions/vscode-notebook-tests/test/first.vsctestnb b/extensions/vscode-notebook-tests/test/first.vsctestnb similarity index 100% rename from lib/vscode/extensions/vscode-notebook-tests/test/first.vsctestnb rename to extensions/vscode-notebook-tests/test/first.vsctestnb diff --git a/lib/vscode/extensions/vscode-notebook-tests/test/second.vsctestnb b/extensions/vscode-notebook-tests/test/second.vsctestnb similarity index 100% rename from lib/vscode/extensions/vscode-notebook-tests/test/second.vsctestnb rename to extensions/vscode-notebook-tests/test/second.vsctestnb diff --git a/lib/vscode/extensions/vscode-notebook-tests/tsconfig.json b/extensions/vscode-notebook-tests/tsconfig.json similarity index 100% rename from lib/vscode/extensions/vscode-notebook-tests/tsconfig.json rename to extensions/vscode-notebook-tests/tsconfig.json diff --git a/extensions/vscode-notebook-tests/yarn.lock b/extensions/vscode-notebook-tests/yarn.lock new file mode 100644 index 000000000000..995b2c2f8b32 --- /dev/null +++ b/extensions/vscode-notebook-tests/yarn.lock @@ -0,0 +1,8 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== diff --git a/lib/vscode/extensions/vscode-test-resolver/.gitignore b/extensions/vscode-test-resolver/.gitignore similarity index 100% rename from lib/vscode/extensions/vscode-test-resolver/.gitignore rename to extensions/vscode-test-resolver/.gitignore diff --git a/lib/vscode/extensions/vscode-test-resolver/.vscode/launch.json b/extensions/vscode-test-resolver/.vscode/launch.json similarity index 100% rename from lib/vscode/extensions/vscode-test-resolver/.vscode/launch.json rename to extensions/vscode-test-resolver/.vscode/launch.json diff --git a/lib/vscode/extensions/vscode-test-resolver/.vscodeignore b/extensions/vscode-test-resolver/.vscodeignore similarity index 100% rename from lib/vscode/extensions/vscode-test-resolver/.vscodeignore rename to extensions/vscode-test-resolver/.vscodeignore diff --git a/lib/vscode/extensions/vscode-test-resolver/media/icon.png b/extensions/vscode-test-resolver/media/icon.png similarity index 100% rename from lib/vscode/extensions/vscode-test-resolver/media/icon.png rename to extensions/vscode-test-resolver/media/icon.png diff --git a/extensions/vscode-test-resolver/package.json b/extensions/vscode-test-resolver/package.json new file mode 100644 index 000000000000..9aa252ea5110 --- /dev/null +++ b/extensions/vscode-test-resolver/package.json @@ -0,0 +1,146 @@ +{ + "name": "vscode-test-resolver", + "description": "Test resolver for VS Code", + "version": "0.0.1", + "publisher": "vscode", + "license": "MIT", + "enableProposedApi": true, + "private": true, + "engines": { + "vscode": "^1.25.0" + }, + "icon": "media/icon.png", + "extensionKind": [ + "ui" + ], + "scripts": { + "compile": "node ./node_modules/vscode/bin/compile -watch -p ./", + "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-test-resolver" + }, + "activationEvents": [ + "onResolveRemoteAuthority:test", + "onCommand:vscode-testresolver.newWindow", + "onCommand:vscode-testresolver.newWindowWithError", + "onCommand:vscode-testresolver.showLog", + "onCommand:vscode-testresolver.openTunnel", + "onCommand:vscode-testresolver.startRemoteServer" + ], + "main": "./out/extension", + "devDependencies": { + "@types/node": "14.x" + }, + "capabilities": { + "untrustedWorkspaces": { + "supported": true + }, + "virtualWorkspaces": true + }, + "contributes": { + "resourceLabelFormatters": [ + { + "scheme": "vscode-remote", + "authority": "test+*", + "formatting": { + "label": "${path}", + "separator": "/", + "tildify": true, + "workspaceSuffix": "TestResolver" + } + } + ], + "commands": [ + { + "title": "New TestResolver Window", + "category": "Remote-TestResolver", + "command": "vscode-testresolver.newWindow" + }, + { + "title": "Show TestResolver Log", + "category": "Remote-TestResolver", + "command": "vscode-testresolver.showLog" + }, + { + "title": "Kill Remote Server and Trigger Handled Error", + "category": "Remote-TestResolver", + "command": "vscode-testresolver.killServerAndTriggerHandledError" + }, + { + "title": "Open Tunnel...", + "category": "Remote-TestResolver", + "command": "vscode-testresolver.openTunnel" + }, + { + "title": "Open Remote Server...", + "category": "Remote-TestResolver", + "command": "vscode-testresolver.startRemoteServer" + } + ], + "menus": { + "commandPalette": [ + { + "command": "vscode-testresolver.openTunnel", + "when": "remoteName == test" + }, + { + "command": "vscode-testresolver.startRemoteServer", + "when": "remoteName == test" + } + ], + "statusBar/remoteIndicator": [ + { + "command": "vscode-testresolver.newWindow", + "when": "!remoteName && !virtualWorkspace", + "group": "remote_90_test_1_local@2" + }, + { + "command": "vscode-testresolver.showLog", + "when": "remoteName == test", + "group": "remote_90_test_1_open@3" + }, + { + "command": "vscode-testresolver.newWindow", + "when": "remoteName == test", + "group": "remote_90_test_1_open@1" + }, + { + "command": "vscode-testresolver.openTunnel", + "when": "remoteName == test", + "group": "remote_90_test_2_more@4" + }, + { + "command": "vscode-testresolver.startRemoteServer", + "when": "remoteName == test", + "group": "remote_90_test_2_more@5" + } + ] + }, + "configuration": { + "properties": { + "testresolver.startupDelay": { + "description": "If set, the resolver will delay for the given amount of seconds. Use ths setting for testing a slow resolver", + "type": "number", + "default": 0 + }, + "testresolver.startupError": { + "description": "If set, the resolver will fail. Use ths setting for testing the failure of a resolver.", + "type": "boolean", + "default": false + }, + "testresolver.pause": { + "description": "If set, connection is paused", + "type": "boolean", + "default": false + }, + "testresolver.supportPublicPorts": { + "description": "If set, the test resolver tunnel factory will support mock public ports. Forwarded ports will not actually be public. Requires reload.", + "type": "boolean", + "default": false + } + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/vscode.git" + } +} diff --git a/lib/vscode/extensions/vscode-test-resolver/scripts/terminateProcess.sh b/extensions/vscode-test-resolver/scripts/terminateProcess.sh similarity index 100% rename from lib/vscode/extensions/vscode-test-resolver/scripts/terminateProcess.sh rename to extensions/vscode-test-resolver/scripts/terminateProcess.sh diff --git a/lib/vscode/extensions/vscode-test-resolver/src/download.ts b/extensions/vscode-test-resolver/src/download.ts similarity index 100% rename from lib/vscode/extensions/vscode-test-resolver/src/download.ts rename to extensions/vscode-test-resolver/src/download.ts diff --git a/extensions/vscode-test-resolver/src/extension.ts b/extensions/vscode-test-resolver/src/extension.ts new file mode 100644 index 000000000000..78301260ea7f --- /dev/null +++ b/extensions/vscode-test-resolver/src/extension.ts @@ -0,0 +1,439 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import * as cp from 'child_process'; +import * as path from 'path'; +import * as fs from 'fs'; +import * as os from 'os'; +import * as net from 'net'; +import * as http from 'http'; +import { downloadAndUnzipVSCodeServer } from './download'; +import { terminateProcess } from './util/processes'; + +let extHostProcess: cp.ChildProcess | undefined; +const enum CharCode { + Backspace = 8, + LineFeed = 10 +} + +let outputChannel: vscode.OutputChannel; + +export function activate(context: vscode.ExtensionContext) { + + function doResolve(_authority: string, progress: vscode.Progress<{ message?: string; increment?: number }>): Promise { + const serverPromise = new Promise(async (res, rej) => { + progress.report({ message: 'Starting Test Resolver' }); + outputChannel = vscode.window.createOutputChannel('TestResolver'); + + let isResolved = false; + async function processError(message: string) { + outputChannel.appendLine(message); + if (!isResolved) { + isResolved = true; + outputChannel.show(); + + const result = await vscode.window.showErrorMessage(message, { modal: true }, ...getActions()); + if (result) { + await result.execute(); + } + rej(vscode.RemoteAuthorityResolverError.NotAvailable(message, true)); + } + } + + let lastProgressLine = ''; + function processOutput(output: string) { + outputChannel.append(output); + for (let i = 0; i < output.length; i++) { + const chr = output.charCodeAt(i); + if (chr === CharCode.LineFeed) { + const match = lastProgressLine.match(/Extension host agent listening on (\d+)/); + if (match) { + isResolved = true; + res(new vscode.ResolvedAuthority('127.0.0.1', parseInt(match[1], 10))); // success! + } + lastProgressLine = ''; + } else if (chr === CharCode.Backspace) { + lastProgressLine = lastProgressLine.substr(0, lastProgressLine.length - 1); + } else { + lastProgressLine += output.charAt(i); + } + } + } + const delay = getConfiguration('startupDelay'); + if (typeof delay === 'number') { + let remaining = Math.ceil(delay); + outputChannel.append(`Delaying startup by ${remaining} seconds (configured by "testresolver.startupDelay").`); + while (remaining > 0) { + progress.report({ message: `Delayed resolving: Remaining ${remaining}s` }); + await (sleep(1000)); + remaining--; + } + } + + if (getConfiguration('startupError') === true) { + processError('Test Resolver failed for testing purposes (configured by "testresolver.startupError").'); + return; + } + + const { updateUrl, commit, quality, serverDataFolderName, dataFolderName } = getProductConfiguration(); + const commandArgs = ['--port=0', '--disable-telemetry']; + const env = getNewEnv(); + const remoteDataDir = process.env['TESTRESOLVER_DATA_FOLDER'] || path.join(os.homedir(), serverDataFolderName || `${dataFolderName}-testresolver`); + + env['VSCODE_AGENT_FOLDER'] = remoteDataDir; + outputChannel.appendLine(`Using data folder at ${remoteDataDir}`); + + if (!commit) { // dev mode + const serverCommand = process.platform === 'win32' ? 'server.bat' : 'server.sh'; + const vscodePath = path.resolve(path.join(context.extensionPath, '..', '..')); + const serverCommandPath = path.join(vscodePath, 'resources', 'server', 'bin-dev', serverCommand); + extHostProcess = cp.spawn(serverCommandPath, commandArgs, { env, cwd: vscodePath }); + } else { + const extensionToInstall = process.env['TESTRESOLVER_INSTALL_BUILTIN_EXTENSION']; + if (extensionToInstall) { + commandArgs.push('--install-builtin-extension', extensionToInstall); + commandArgs.push('--start-server'); + } + const serverCommand = process.platform === 'win32' ? 'server.cmd' : 'server.sh'; + let serverLocation = env['VSCODE_REMOTE_SERVER_PATH']; // support environment variable to specify location of server on disk + if (!serverLocation) { + const serverBin = path.join(remoteDataDir, 'bin'); + progress.report({ message: 'Installing VSCode Server' }); + serverLocation = await downloadAndUnzipVSCodeServer(updateUrl, commit, quality, serverBin, m => outputChannel.appendLine(m)); + } + + outputChannel.appendLine(`Using server build at ${serverLocation}`); + outputChannel.appendLine(`Server arguments ${commandArgs.join(' ')}`); + + extHostProcess = cp.spawn(path.join(serverLocation, serverCommand), commandArgs, { env, cwd: serverLocation }); + } + extHostProcess.stdout!.on('data', (data: Buffer) => processOutput(data.toString())); + extHostProcess.stderr!.on('data', (data: Buffer) => processOutput(data.toString())); + extHostProcess.on('error', (error: Error) => { + processError(`server failed with error:\n${error.message}`); + extHostProcess = undefined; + }); + extHostProcess.on('close', (code: number) => { + processError(`server closed unexpectedly.\nError code: ${code}`); + extHostProcess = undefined; + }); + context.subscriptions.push({ + dispose: () => { + if (extHostProcess) { + terminateProcess(extHostProcess, context.extensionPath); + } + } + }); + }); + return serverPromise.then(serverAddr => { + return new Promise(async (res, _rej) => { + const proxyServer = net.createServer(proxySocket => { + outputChannel.appendLine(`Proxy connection accepted`); + let remoteReady = true, localReady = true; + const remoteSocket = net.createConnection({ port: serverAddr.port }); + + let isDisconnected = getConfiguration('pause') === true; + vscode.workspace.onDidChangeConfiguration(_ => { + let newIsDisconnected = getConfiguration('pause') === true; + if (isDisconnected !== newIsDisconnected) { + outputChannel.appendLine(`Connection state: ${newIsDisconnected ? 'open' : 'paused'}`); + isDisconnected = newIsDisconnected; + if (!isDisconnected) { + outputChannel.appendLine(`Resume remote and proxy sockets.`); + if (remoteSocket.isPaused() && localReady) { + remoteSocket.resume(); + } + if (proxySocket.isPaused() && remoteReady) { + proxySocket.resume(); + } + } else { + outputChannel.appendLine(`Pausing remote and proxy sockets.`); + if (!remoteSocket.isPaused()) { + remoteSocket.pause(); + } + if (!proxySocket.isPaused()) { + proxySocket.pause(); + } + } + } + }); + + proxySocket.on('data', (data) => { + remoteReady = remoteSocket.write(data); + if (!remoteReady) { + proxySocket.pause(); + } + }); + remoteSocket.on('data', (data) => { + localReady = proxySocket.write(data); + if (!localReady) { + remoteSocket.pause(); + } + }); + proxySocket.on('drain', () => { + localReady = true; + if (!isDisconnected) { + remoteSocket.resume(); + } + }); + remoteSocket.on('drain', () => { + remoteReady = true; + if (!isDisconnected) { + proxySocket.resume(); + } + }); + proxySocket.on('close', () => { + outputChannel.appendLine(`Proxy socket closed, closing remote socket.`); + remoteSocket.end(); + }); + remoteSocket.on('close', () => { + outputChannel.appendLine(`Remote socket closed, closing proxy socket.`); + proxySocket.end(); + }); + context.subscriptions.push({ + dispose: () => { + proxySocket.end(); + remoteSocket.end(); + } + }); + }); + proxyServer.listen(0, '127.0.0.1', () => { + const port = (proxyServer.address()).port; + outputChannel.appendLine(`Going through proxy at port ${port}`); + const r: vscode.ResolverResult = new vscode.ResolvedAuthority('127.0.0.1', port); + res(r); + }); + context.subscriptions.push({ + dispose: () => { + proxyServer.close(); + } + }); + }); + }); + } + + const authorityResolverDisposable = vscode.workspace.registerRemoteAuthorityResolver('test', { + async getCanonicalURI(uri: vscode.Uri): Promise { + return vscode.Uri.file(uri.path); + }, + resolve(_authority: string): Thenable { + return vscode.window.withProgress({ + location: vscode.ProgressLocation.Notification, + title: 'Open TestResolver Remote ([details](command:vscode-testresolver.showLog))', + cancellable: false + }, (progress) => doResolve(_authority, progress)); + }, + tunnelFactory, + tunnelFeatures: { elevation: true, public: !!vscode.workspace.getConfiguration('testresolver').get('supportPublicPorts') }, + showCandidatePort + }); + context.subscriptions.push(authorityResolverDisposable); + + context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.newWindow', () => { + return vscode.commands.executeCommand('vscode.newWindow', { remoteAuthority: 'test+test' }); + })); + context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.newWindowWithError', () => { + return vscode.commands.executeCommand('vscode.newWindow', { remoteAuthority: 'test+error' }); + })); + context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.killServerAndTriggerHandledError', () => { + authorityResolverDisposable.dispose(); + if (extHostProcess) { + terminateProcess(extHostProcess, context.extensionPath); + } + vscode.workspace.registerRemoteAuthorityResolver('test', { + async resolve(_authority: string): Promise { + setTimeout(async () => { + await vscode.window.showErrorMessage('Just a custom message.', { modal: true, useCustom: true }, 'OK', 'Great'); + }, 2000); + throw vscode.RemoteAuthorityResolverError.NotAvailable('Intentional Error', true); + } + }); + })); + context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.showLog', () => { + if (outputChannel) { + outputChannel.show(); + } + })); + + context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.openTunnel', async () => { + const result = await vscode.window.showInputBox({ + prompt: 'Enter the remote port for the tunnel', + value: '5000', + validateInput: input => /^[\d]+$/.test(input) ? undefined : 'Not a valid number' + }); + if (result) { + const port = Number.parseInt(result); + vscode.workspace.openTunnel({ + remoteAddress: { + host: '127.0.0.1', + port: port + }, + localAddressPort: port + 1 + }); + } + + })); + context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.startRemoteServer', async () => { + const result = await vscode.window.showInputBox({ + prompt: 'Enter the port for the remote server', + value: '5000', + validateInput: input => /^[\d]+$/.test(input) ? undefined : 'Not a valid number' + }); + if (result) { + runHTTPTestServer(Number.parseInt(result)); + } + + })); + vscode.commands.executeCommand('setContext', 'forwardedPortsViewEnabled', true); +} + +type ActionItem = (vscode.MessageItem & { execute: () => void; }); + +function getActions(): ActionItem[] { + const actions: ActionItem[] = []; + const isDirty = vscode.workspace.textDocuments.some(d => d.isDirty) || vscode.workspace.workspaceFile && vscode.workspace.workspaceFile.scheme === 'untitled'; + + actions.push({ + title: 'Retry', + execute: async () => { + await vscode.commands.executeCommand('workbench.action.reloadWindow'); + } + }); + if (!isDirty) { + actions.push({ + title: 'Close Remote', + execute: async () => { + await vscode.commands.executeCommand('vscode.newWindow', { reuseWindow: true, remoteAuthority: null }); + } + }); + } + actions.push({ + title: 'Ignore', + isCloseAffordance: true, + execute: async () => { + vscode.commands.executeCommand('vscode-testresolver.showLog'); // no need to wait + } + }); + return actions; +} + +export interface IProductConfiguration { + updateUrl: string; + commit: string; + quality: string; + dataFolderName: string; + serverDataFolderName?: string; +} + +function getProductConfiguration(): IProductConfiguration { + const content = fs.readFileSync(path.join(vscode.env.appRoot, 'product.json')).toString(); + return JSON.parse(content) as IProductConfiguration; +} + +function getNewEnv(): { [x: string]: string | undefined } { + const env = { ...process.env }; + delete env['ELECTRON_RUN_AS_NODE']; + return env; +} + +function sleep(ms: number): Promise { + return new Promise(resolve => { + setTimeout(resolve, ms); + }); +} + +function getConfiguration(id: string): T | undefined { + return vscode.workspace.getConfiguration('testresolver').get(id); +} + +const remoteServers: number[] = []; + +async function showCandidatePort(_host: string, port: number, _detail: string): Promise { + return remoteServers.includes(port) || port === 100; +} + +async function tunnelFactory(tunnelOptions: vscode.TunnelOptions, tunnelCreationOptions: vscode.TunnelCreationOptions): Promise { + outputChannel.appendLine(`Tunnel factory request: Remote ${tunnelOptions.remoteAddress.port} -> local ${tunnelOptions.localAddressPort}`); + if (tunnelCreationOptions.elevationRequired) { + await vscode.window.showInformationMessage('This is a fake elevation message. A real resolver would show a native elevation prompt.', { modal: true }, 'Ok'); + } + + return createTunnelService(); + + function newTunnel(localAddress: { host: string, port: number }) { + const onDidDispose: vscode.EventEmitter = new vscode.EventEmitter(); + let isDisposed = false; + return { + localAddress, + remoteAddress: tunnelOptions.remoteAddress, + public: !!vscode.workspace.getConfiguration('testresolver').get('supportPublicPorts') && tunnelOptions.public, + onDidDispose: onDidDispose.event, + dispose: () => { + if (!isDisposed) { + isDisposed = true; + onDidDispose.fire(); + } + } + }; + } + + function createTunnelService(): Promise { + return new Promise((res, _rej) => { + const proxyServer = net.createServer(proxySocket => { + const remoteSocket = net.createConnection({ host: tunnelOptions.remoteAddress.host, port: tunnelOptions.remoteAddress.port }); + remoteSocket.pipe(proxySocket); + proxySocket.pipe(remoteSocket); + }); + let localPort = 0; + + if (tunnelOptions.localAddressPort) { + // When the tunnelOptions include a localAddressPort, we should use that. + // However, the test resolver all runs on one machine, so if the localAddressPort is the same as the remote port, + // then we must use a different port number. + localPort = tunnelOptions.localAddressPort; + } else { + localPort = tunnelOptions.remoteAddress.port; + } + + if (localPort === tunnelOptions.remoteAddress.port) { + localPort += 1; + } + + // The test resolver can't actually handle privileged ports, it only pretends to. + if (localPort < 1024 && process.platform !== 'win32') { + localPort = 0; + } + proxyServer.listen(localPort, '127.0.0.1', () => { + const localPort = (proxyServer.address()).port; + outputChannel.appendLine(`New test resolver tunnel service: Remote ${tunnelOptions.remoteAddress.port} -> local ${localPort}`); + const tunnel = newTunnel({ host: '127.0.0.1', port: localPort }); + tunnel.onDidDispose(() => proxyServer.close()); + res(tunnel); + }); + }); + } +} + +function runHTTPTestServer(port: number): vscode.Disposable { + const server = http.createServer((_req, res) => { + res.writeHead(200); + res.end(`Hello, World from test server running on port ${port}!`); + }); + remoteServers.push(port); + server.listen(port, '127.0.0.1'); + const message = `Opened HTTP server on http://127.0.0.1:${port}`; + console.log(message); + outputChannel.appendLine(message); + return { + dispose: () => { + server.close(); + const index = remoteServers.indexOf(port); + if (index !== -1) { + remoteServers.splice(index, 1); + } + } + }; +} diff --git a/lib/vscode/extensions/vscode-test-resolver/src/typings/ref.d.ts b/extensions/vscode-test-resolver/src/typings/ref.d.ts similarity index 100% rename from lib/vscode/extensions/vscode-test-resolver/src/typings/ref.d.ts rename to extensions/vscode-test-resolver/src/typings/ref.d.ts diff --git a/lib/vscode/extensions/vscode-test-resolver/src/util/processes.ts b/extensions/vscode-test-resolver/src/util/processes.ts similarity index 100% rename from lib/vscode/extensions/vscode-test-resolver/src/util/processes.ts rename to extensions/vscode-test-resolver/src/util/processes.ts diff --git a/lib/vscode/extensions/vscode-test-resolver/tsconfig.json b/extensions/vscode-test-resolver/tsconfig.json similarity index 100% rename from lib/vscode/extensions/vscode-test-resolver/tsconfig.json rename to extensions/vscode-test-resolver/tsconfig.json diff --git a/extensions/vscode-test-resolver/yarn.lock b/extensions/vscode-test-resolver/yarn.lock new file mode 100644 index 000000000000..995b2c2f8b32 --- /dev/null +++ b/extensions/vscode-test-resolver/yarn.lock @@ -0,0 +1,8 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@14.x": + version "14.14.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" + integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== diff --git a/lib/vscode/extensions/xml/.vscodeignore b/extensions/xml/.vscodeignore similarity index 100% rename from lib/vscode/extensions/xml/.vscodeignore rename to extensions/xml/.vscodeignore diff --git a/lib/vscode/extensions/xml/cgmanifest.json b/extensions/xml/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/xml/cgmanifest.json rename to extensions/xml/cgmanifest.json diff --git a/lib/vscode/extensions/xml/package.json b/extensions/xml/package.json similarity index 100% rename from lib/vscode/extensions/xml/package.json rename to extensions/xml/package.json diff --git a/lib/vscode/extensions/xml/package.nls.json b/extensions/xml/package.nls.json similarity index 100% rename from lib/vscode/extensions/xml/package.nls.json rename to extensions/xml/package.nls.json diff --git a/lib/vscode/extensions/xml/syntaxes/xml.tmLanguage.json b/extensions/xml/syntaxes/xml.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/xml/syntaxes/xml.tmLanguage.json rename to extensions/xml/syntaxes/xml.tmLanguage.json diff --git a/lib/vscode/extensions/xml/syntaxes/xsl.tmLanguage.json b/extensions/xml/syntaxes/xsl.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/xml/syntaxes/xsl.tmLanguage.json rename to extensions/xml/syntaxes/xsl.tmLanguage.json diff --git a/lib/vscode/extensions/xml/xml.language-configuration.json b/extensions/xml/xml.language-configuration.json similarity index 100% rename from lib/vscode/extensions/xml/xml.language-configuration.json rename to extensions/xml/xml.language-configuration.json diff --git a/lib/vscode/extensions/xml/xsl.language-configuration.json b/extensions/xml/xsl.language-configuration.json similarity index 100% rename from lib/vscode/extensions/xml/xsl.language-configuration.json rename to extensions/xml/xsl.language-configuration.json diff --git a/lib/vscode/extensions/xml/yarn.lock b/extensions/xml/yarn.lock similarity index 100% rename from lib/vscode/extensions/xml/yarn.lock rename to extensions/xml/yarn.lock diff --git a/lib/vscode/extensions/yaml/.vscodeignore b/extensions/yaml/.vscodeignore similarity index 100% rename from lib/vscode/extensions/yaml/.vscodeignore rename to extensions/yaml/.vscodeignore diff --git a/lib/vscode/extensions/yaml/cgmanifest.json b/extensions/yaml/cgmanifest.json similarity index 100% rename from lib/vscode/extensions/yaml/cgmanifest.json rename to extensions/yaml/cgmanifest.json diff --git a/lib/vscode/extensions/yaml/language-configuration.json b/extensions/yaml/language-configuration.json similarity index 100% rename from lib/vscode/extensions/yaml/language-configuration.json rename to extensions/yaml/language-configuration.json diff --git a/lib/vscode/extensions/yaml/package.json b/extensions/yaml/package.json similarity index 100% rename from lib/vscode/extensions/yaml/package.json rename to extensions/yaml/package.json diff --git a/lib/vscode/extensions/yaml/package.nls.json b/extensions/yaml/package.nls.json similarity index 100% rename from lib/vscode/extensions/yaml/package.nls.json rename to extensions/yaml/package.nls.json diff --git a/lib/vscode/extensions/yaml/syntaxes/yaml.tmLanguage.json b/extensions/yaml/syntaxes/yaml.tmLanguage.json similarity index 100% rename from lib/vscode/extensions/yaml/syntaxes/yaml.tmLanguage.json rename to extensions/yaml/syntaxes/yaml.tmLanguage.json diff --git a/lib/vscode/extensions/yaml/yarn.lock b/extensions/yaml/yarn.lock similarity index 100% rename from lib/vscode/extensions/yaml/yarn.lock rename to extensions/yaml/yarn.lock diff --git a/extensions/yarn.lock b/extensions/yarn.lock new file mode 100644 index 000000000000..78b52f40dfb9 --- /dev/null +++ b/extensions/yarn.lock @@ -0,0 +1,38 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +coffee-script@^1.10.0: + version "1.12.7" + resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.12.7.tgz#c05dae0cb79591d05b3070a8433a98c9a89ccc53" + integrity sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw== + +cson-parser@^1.3.3: + version "1.3.5" + resolved "https://registry.yarnpkg.com/cson-parser/-/cson-parser-1.3.5.tgz#7ec675e039145533bf2a6a856073f1599d9c2d24" + integrity sha1-fsZ14DkUVTO/KmqFYHPxWZ2cLSQ= + dependencies: + coffee-script "^1.10.0" + +esbuild@^0.11.12: + version "0.11.12" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.11.12.tgz#8cbe15bcb44212624c3e77c896a835f74dc71c3c" + integrity sha512-c8cso/1RwVj+fbDvLtUgSG4ZJQ0y9Zdrl6Ot/GAjyy4pdMCHaFnDMts5gqFnWRPLajWtEnI+3hlET4R9fVoZng== + +fast-plist@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/fast-plist/-/fast-plist-0.1.2.tgz#a45aff345196006d406ca6cdcd05f69051ef35b8" + integrity sha1-pFr/NFGWAG1AbKbNzQX2kFHvNbg= + +typescript@4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805" + integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw== + +vscode-grammar-updater@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/vscode-grammar-updater/-/vscode-grammar-updater-1.0.3.tgz#695ccaf0567c6a000005a969cd87ecc3b5c25018" + integrity sha512-V/OnMGyAk7Ldv5NC2p+NovidsAghdfbFFnimEzQ7F/TYIqDLJCVe28RcvaU2gywCSCtxNfS5MYe0egiaRIWNEw== + dependencies: + cson-parser "^1.3.3" + fast-plist "0.1.2" diff --git a/lib/vscode/gulpfile.js b/gulpfile.js similarity index 100% rename from lib/vscode/gulpfile.js rename to gulpfile.js diff --git a/install.sh b/install.sh deleted file mode 100755 index a3e0df08c685..000000000000 --- a/install.sh +++ /dev/null @@ -1,577 +0,0 @@ -#!/bin/sh -set -eu - -# code-server's automatic install script. -# See https://github.com/cdr/code-server/blob/main/docs/install.md - -usage() { - arg0="$0" - if [ "$0" = sh ]; then - arg0="curl -fsSL https://code-server.dev/install.sh | sh -s --" - else - not_curl_usage="The latest script is available at https://code-server.dev/install.sh -" - fi - - cath < - Sets the prefix used by standalone release archives. Defaults to ~/.local - The release is unarchived into ~/.local/lib/code-server-X.X.X - and the binary symlinked into ~/.local/bin/code-server - To install system wide pass ---prefix=/usr/local - - --rsh - Specifies the remote shell for remote installation. Defaults to ssh. - -- For Debian, Ubuntu and Raspbian it will install the latest deb package. -- For Fedora, CentOS, RHEL and openSUSE it will install the latest rpm package. -- For Arch Linux it will install the AUR package. -- For any unrecognized Linux operating system it will install the latest standalone - release into ~/.local - -- For macOS it will install the Homebrew package. - - If Homebrew is not installed it will install the latest standalone release - into ~/.local - -- For FreeBSD, it will install the npm package with yarn or npm. - -- If ran on an architecture with no releases, it will install the - npm package with yarn or npm. - - We only have releases for amd64 and arm64 presently. - - The npm package builds the native modules on postinstall. - -It will cache all downloaded assets into ~/.cache/code-server - -More installation docs are at https://github.com/cdr/code-server/blob/main/docs/install.md -EOF -} - -echo_latest_version() { - # https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-2758860 - version="$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://github.com/cdr/code-server/releases/latest)" - version="${version#https://github.com/cdr/code-server/releases/tag/}" - version="${version#v}" - echo "$version" -} - -echo_npm_postinstall() { - echoh - cath < macos -# - freebsd -> freebsd -# - ubuntu, raspbian, debian ... -> debian -# - amzn, centos, rhel, fedora, ... -> fedora -# - opensuse-{leap,tumbleweed} -> opensuse -# - alpine -> alpine -# - arch -> arch -# -# Inspired by https://github.com/docker/docker-install/blob/26ff363bcf3b3f5a00498ac43694bf1c7d9ce16c/install.sh#L111-L120. -distro() { - if [ "$OS" = "macos" ] || [ "$OS" = "freebsd" ]; then - echo "$OS" - return - fi - - if [ -f /etc/os-release ]; then - ( - . /etc/os-release - if [ "${ID_LIKE-}" ]; then - for id_like in $ID_LIKE; do - case "$id_like" in debian | fedora | opensuse) - echo "$id_like" - return - ;; - esac - done - fi - - echo "$ID" - ) - return - fi -} - -# os_name prints a pretty human readable name for the OS/Distro. -distro_name() { - if [ "$(uname)" = "Darwin" ]; then - echo "macOS v$(sw_vers -productVersion)" - return - fi - - if [ -f /etc/os-release ]; then - ( - . /etc/os-release - echo "$PRETTY_NAME" - ) - return - fi - - # Prints something like: Linux 4.19.0-9-amd64 - uname -sr -} - -arch() { - case "$(uname -m)" in - aarch64) - echo arm64 - ;; - x86_64) - echo amd64 - ;; - amd64) # FreeBSD. - echo amd64 - ;; - esac -} - -command_exists() { - command -v "$@" >/dev/null -} - -sh_c() { - echoh "+ $*" - if [ ! "${DRY_RUN-}" ]; then - sh -c "$*" - fi -} - -sudo_sh_c() { - if [ "$(id -u)" = 0 ]; then - sh_c "$@" - elif command_exists sudo; then - sh_c "sudo $*" - elif command_exists su; then - sh_c "su - -c '$*'" - else - echoh - echoerr "This script needs to run the following command as root." - echoerr " $*" - echoerr "Please install sudo or su." - exit 1 - fi -} - -echo_cache_dir() { - if [ "${XDG_CACHE_HOME-}" ]; then - echo "$XDG_CACHE_HOME/code-server" - elif [ "${HOME-}" ]; then - echo "$HOME/.cache/code-server" - else - echo "/tmp/code-server-cache" - fi -} - -echoh() { - echo "$@" | humanpath -} - -cath() { - humanpath -} - -echoerr() { - echoh "$@" >&2 -} - -# humanpath replaces all occurrences of " $HOME" with " ~" -# and all occurrences of '"$HOME' with the literal '"$HOME'. -humanpath() { - sed "s# $HOME# ~#g; s#\"$HOME#\"\$HOME#g" -} - -# We need to make sure we exit with a non zero exit if the command fails. -# /bin/sh does not support -o pipefail unfortunately. -prefix() { - PREFIX="$1" - shift - fifo="$(mktemp -d)/fifo" - mkfifo "$fifo" - sed -e "s#^#$PREFIX: #" "$fifo" & - "$@" >"$fifo" 2>&1 -} - -main "$@" diff --git a/lib/vscode/.devcontainer/README.md b/lib/vscode/.devcontainer/README.md deleted file mode 100644 index 8262d411570b..000000000000 --- a/lib/vscode/.devcontainer/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# Code - OSS Development Container - -This repository includes configuration for a development container for working with Code - OSS in an isolated local container or using [GitHub Codespaces](https://github.com/features/codespaces). - -> **Tip:** The default VNC password is `vscode`. The VNC server runs on port `5901` with a web client at `6080`. For better performance, we recommend using a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/). Applications like the macOS Screen Sharing app will not perform as well. - -## Quick start - local - -1. Install Docker Desktop or Docker for Linux on your local machine. (See [docs](https://aka.ms/vscode-remote/containers/getting-started) for additional details.) - -2. **Important**: Docker needs at least **4 Cores and 6 GB of RAM (8 GB recommended)** to run full build. If you on macOS, or using the old Hyper-V engine for Windows, update these values for Docker Desktop by right-clicking on the Docker status bar item, going to **Preferences/Settings > Resources > Advanced**. - - > **Note:** The [Resource Monitor](https://marketplace.visualstudio.com/items?itemName=mutantdino.resourcemonitor) extension is included in the container so you can keep an eye on CPU/Memory in the status bar. - -3. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the [Remote - Containers](https://aka.ms/vscode-remote/download/containers) extension. - - ![Image of Remote - Containers extension](https://microsoft.github.io/vscode-remote-release/images/remote-containers-extn.png) - - > Note that the Remote - Containers extension requires the Visual Studio Code distribution of Code - OSS. See the [FAQ](https://aka.ms/vscode-remote/faq/license) for details. - -4. Press Ctrl/Cmd + Shift + P and select **Remote-Containers: Clone Repository in Container Volume...**. - - > **Tip:** While you can use your local source tree instead, operations like `yarn install` can be slow on macOS or using the Hyper-V engine on Windows. We recommend the "clone repository in container" approach instead since it uses "named volume" rather than the local filesystem. - -5. Type `https://github.com/microsoft/vscode` (or a branch or PR URL) in the input box and press Enter. - -6. After the container is running, open a web browser and go to [http://localhost:6080](http://localhost:6080) or use a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) to connect to `localhost:5901` and enter `vscode` as the password. - -Anything you start in VS Code or the integrated terminal will appear here. - -Next: **[Try it out!](#try-it)** - -## Quick start - GitHub Codespaces - -> **IMPORTANT:** You need to use a "Standard" sized codespace or larger (4-core, 8GB) since VS Code needs 6GB of RAM to compile. This is now the default for GitHub Codespaces, but do not downgrade to "Basic" unless you do not intend to compile. - -1. From the [microsoft/vscode GitHub repository](https://github.com/microsoft/vscode), click on the **Code** dropdown, select **Open with Codespaces**, and the **New codespace** - - > Note that you will not see these options if you are not in the beta yet. - -2. After the codespace is up and running in your browser, press F1 and select **Ports: Focus on Ports View**. - -3. You should see port `6080` under **Forwarded Ports**. Select the line and click on the globe icon to open it in a browser tab. - - > If you do not see port `6080`, press F1, select **Forward a Port** and enter port `6080`. - -4. In the new tab, you should see noVNC. Click **Connect** and enter `vscode` as the password. - -Anything you start in VS Code or the integrated terminal will appear here. - -Next: **[Try it out!](#try-it)** - -### Using VS Code with GitHub Codespaces - -You will likely see better performance when accessing the codespace you created from VS Code since you can use a[VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/). Here's how to do it. - -1. [Create a codespace](#quick-start---github-codespaces) if you have not already. - -2. Set up [VS Code for use with GitHub Codespaces](https://docs.github.com/github/developing-online-with-codespaces/using-codespaces-in-visual-studio-code) - -3. After the VS Code is up and running, press F1, choose **Codespaces: Connect to Codespace**, and select the codespace you created. - -4. After you've connected to the codespace, use a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) to connect to `localhost:5901` and enter `vscode` as the password. - -5. Anything you start in VS Code or the integrated terminal will appear here. - -Next: **[Try it out!](#try-it)** - -## Try it! - -This container uses the [Fluxbox](http://fluxbox.org/) window manager to keep things lean. **Right-click on the desktop** to see menu options. It works with GNOME and GTK applications, so other tools can be installed if needed. - -Note you can also set the resolution from the command line by typing `set-resolution`. - -To start working with Code - OSS, follow these steps: - -1. In your local VS Code, open a terminal (Ctrl/Cmd + Shift + \`) and type the following commands: - - ```bash - yarn install - bash scripts/code.sh - ``` - - Note that a previous run of `yarn install` will already be cached, so this step should simply pick up any recent differences. - -2. After the build is complete, open a web browser or a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) to the desktop environnement as described in the quick start and enter `vscode` as the password. - -3. You should now see Code - OSS! - -Next, let's try debugging. - -1. Shut down Code - OSS by clicking the box in the upper right corner of the Code - OSS window through your browser or VNC viewer. - -2. Go to your local VS Code client, and use Run / Debug view to launch the **VS Code** configuration. (Typically the default, so you can likely just press F5). - - > **Note:** If launching times out, you can increase the value of `timeout` in the "VS Code", "Attach Main Process", "Attach Extension Host", and "Attach to Shared Process" configurations in [launch.json](../.vscode/launch.json). However, running `scripts/code.sh` first will set up Electron which will usually solve timeout issues. - -3. After a bit, Code - OSS will appear with the debugger attached! - -Enjoy! diff --git a/lib/vscode/.devcontainer/devcontainer.json b/lib/vscode/.devcontainer/devcontainer.json deleted file mode 100644 index 3b82cd9028d2..000000000000 --- a/lib/vscode/.devcontainer/devcontainer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "Code - OSS", - - // Image contents: https://github.com/microsoft/vscode-dev-containers/blob/master/repository-containers/images/github.com/microsoft/vscode/.devcontainer/base.Dockerfile - "image": "mcr.microsoft.com/vscode/devcontainers/repos/microsoft/vscode:branch-main", - - "workspaceMount": "source=${localWorkspaceFolder},target=/home/node/workspace/vscode,type=bind,consistency=cached", - "workspaceFolder": "/home/node/workspace/vscode", - "overrideCommand": false, - "runArgs": [ "--init", "--security-opt", "seccomp=unconfined"], - - "settings": { - "terminal.integrated.shell.linux": "/bin/bash", - "resmon.show.battery": false, - "resmon.show.cpufreq": false - }, - - // noVNC, VNC, debug ports - "forwardPorts": [6080, 5901, 9222], - - "extensions": [ - "dbaeumer.vscode-eslint", - "mutantdino.resourcemonitor" - ], - - // Optionally loads a cached yarn install for the repo - "postCreateCommand": ".devcontainer/cache/restore-diff.sh", - - "remoteUser": "node" -} diff --git a/lib/vscode/.editorconfig b/lib/vscode/.editorconfig deleted file mode 100644 index e7e99b5bcb52..000000000000 --- a/lib/vscode/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -# EditorConfig is awesome: https://EditorConfig.org - -# top-most EditorConfig file -root = true - -# Tab indentation -[*] -indent_style = tab -trim_trailing_whitespace = true - -# The indent size used in the `package.json` file cannot be changed -# https://github.com/npm/npm/pull/3180#issuecomment-16336516 -[{*.yml,*.yaml,package.json}] -indent_style = space -indent_size = 2 diff --git a/lib/vscode/.eslintrc.json b/lib/vscode/.eslintrc.json deleted file mode 100644 index e7ff9be00a1f..000000000000 --- a/lib/vscode/.eslintrc.json +++ /dev/null @@ -1,1035 +0,0 @@ -{ - "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module" - }, - "plugins": [ - "@typescript-eslint", - "jsdoc" - ], - "rules": { - "constructor-super": "warn", - "curly": "warn", - "eqeqeq": "warn", - "no-buffer-constructor": "warn", - "no-caller": "warn", - "no-debugger": "warn", - "no-duplicate-case": "warn", - "no-duplicate-imports": "warn", - "no-eval": "warn", - "no-extra-semi": "warn", - "no-new-wrappers": "warn", - "no-redeclare": "off", - "no-sparse-arrays": "warn", - "no-throw-literal": "warn", - "no-unsafe-finally": "warn", - "no-unused-labels": "warn", - "no-restricted-globals": [ - "warn", - "name", - "length", - "event", - "closed", - "external", - "status", - "origin", - "orientation", - "context" - ], // non-complete list of globals that are easy to access unintentionally - "no-var": "warn", - "jsdoc/no-types": "warn", - "semi": "off", - "@typescript-eslint/semi": "warn", - "@typescript-eslint/naming-convention": [ - "warn", - { - "selector": "class", - "format": [ - "PascalCase" - ] - } - ], - "code-no-unused-expressions": [ - "warn", - { - "allowTernary": true - } - ], - "code-translation-remind": "warn", - "code-no-nls-in-standalone-editor": "warn", - "code-no-standalone-editor": "warn", - "code-no-unexternalized-strings": "warn", - "code-layering": [ - "off", - { - "common": [], - "node": [ - "common" - ], - "browser": [ - "common" - ], - "electron-sandbox": [ - "common", - "browser" - ], - "electron-browser": [ - "common", - "browser", - "node", - "electron-sandbox" - ], - "electron-main": [ - "common", - "node" - ] - } - ], - "code-import-patterns": [ - "off", - // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - // !!! Do not relax these rules !!! - // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - { - "target": "**/vs/base/common/**", - "restrictions": [ - "vs/nls", - "**/vs/base/common/**" - ] - }, - { - "target": "**/vs/base/test/common/**", - "restrictions": [ - "assert", - "sinon", - "vs/nls", - "**/vs/base/common/**", - "**/vs/base/test/common/**" - ] - }, - { - "target": "**/vs/base/browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/{common,browser}/**" - ] - }, - { - "target": "**/vs/base/electron-sandbox/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/{common,browser,electron-sandbox}/**" - ] - }, - { - "target": "**/vs/base/node/**", - "restrictions": [ - "vs/nls", - "**/vs/base/{common,node}/**", - "*" // node modules - ] - }, - { - // vs/base/test/browser contains tests for vs/base/browser - "target": "**/vs/base/test/browser/**", - "restrictions": [ - "assert", - "sinon", - "vs/nls", - "**/vs/base/{common,browser}/**", - "**/vs/base/test/{common,browser}/**" - ] - }, - { - "target": "**/vs/base/parts/*/common/**", - "restrictions": [ - "vs/nls", - "**/vs/base/common/**", - "**/vs/base/parts/*/common/**" - ] - }, - { - "target": "**/vs/base/parts/*/browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/{common,browser}/**", - "**/vs/base/parts/*/{common,browser}/**" - ] - }, - { - "target": "**/vs/base/parts/*/node/**", - "restrictions": [ - "vs/nls", - "**/vs/base/{common,node}/**", - "**/vs/base/parts/*/{common,node}/**", - "*" // node modules - ] - }, - { - "target": "**/vs/base/parts/*/electron-sandbox/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/{common,browser,electron-sandbox}/**", - "**/vs/base/parts/*/{common,browser,electron-sandbox}/**" - ] - }, - { - "target": "**/vs/base/parts/*/electron-browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/base/parts/*/{common,browser,node,electron-sandbox,electron-browser}/**", - "*" // node modules - ] - }, - { - "target": "**/vs/base/parts/*/electron-main/**", - "restrictions": [ - "vs/nls", - "**/vs/base/{common,node,electron-main}/**", - "**/vs/base/parts/*/{common,node,electron-main}/**", - "*" // node modules - ] - }, - { - "target": "**/vs/platform/*/common/**", - "restrictions": [ - "vs/nls", - "**/vs/base/common/**", - "**/vs/base/parts/*/common/**", - "**/vs/platform/*/common/**" - ] - }, - { - "target": "**/vs/platform/*/test/common/**", - "restrictions": [ - "assert", - "sinon", - "vs/nls", - "**/vs/base/common/**", - "**/vs/base/parts/*/common/**", - "**/vs/base/test/common/**", - "**/vs/platform/*/common/**", - "**/vs/platform/*/test/common/**" - ] - }, - { - "target": "**/vs/platform/*/browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/{common,browser}/**", - "**/vs/base/parts/*/{common,browser}/**", - "**/vs/platform/*/{common,browser}/**" - ] - }, - { - "target": "**/vs/platform/*/node/**", - "restrictions": [ - "vs/nls", - "**/vs/base/{common,node}/**", - "**/vs/base/parts/*/{common,node}/**", - "**/vs/platform/*/{common,node}/**", - "*" // node modules - ] - }, - { - "target": "**/vs/platform/*/electron-sandbox/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/{common,browser,electron-sandbox}/**", - "**/vs/base/parts/*/{common,browser,electron-sandbox}/**", - "**/vs/platform/*/{common,browser,electron-sandbox}/**" - ] - }, - { - "target": "**/vs/platform/*/electron-browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/base/parts/*/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/platform/*/{common,browser,node,electron-sandbox,electron-browser}/**", - "*" // node modules - ] - }, - { - "target": "**/vs/platform/*/electron-main/**", - "restrictions": [ - "vs/nls", - "**/vs/base/{common,node,electron-main}/**", - "**/vs/base/parts/*/{common,node,electron-main}/**", - "**/vs/platform/*/{common,node,electron-main}/**", - "*" // node modules - ] - }, - { - "target": "**/vs/platform/*/test/browser/**", - "restrictions": [ - "assert", - "sinon", - "vs/nls", - "**/vs/base/{common,browser}/**", - "**/vs/base/parts/*/{common,browser}/**", - "**/vs/platform/*/{common,browser}/**", - "**/vs/platform/*/test/{common,browser}/**" - ] - }, - { - "target": "**/vs/editor/common/**", - "restrictions": [ - "vs/nls", - "**/vs/base/common/**", - "**/vs/base/worker/**", - "**/vs/platform/*/common/**", - "**/vs/editor/common/**" - ] - }, - { - "target": "**/vs/editor/test/common/**", - "restrictions": [ - "assert", - "sinon", - "vs/nls", - "**/vs/base/common/**", - "**/vs/platform/*/common/**", - "**/vs/platform/*/test/common/**", - "**/vs/editor/common/**", - "**/vs/editor/test/common/**" - ] - }, - { - "target": "**/vs/editor/browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/{common,browser}/**", - "**/vs/platform/*/{common,browser}/**", - "**/vs/editor/{common,browser}/**" - ] - }, - { - "target": "**/vs/editor/test/browser/**", - "restrictions": [ - "assert", - "sinon", - "vs/nls", - "**/vs/base/{common,browser}/**", - "**/vs/platform/*/{common,browser}/**", - "**/vs/platform/*/test/{common,browser}/**", - "**/vs/editor/{common,browser}/**", - "**/vs/editor/test/{common,browser}/**" - ] - }, - { - "target": "**/vs/editor/standalone/common/**", - "restrictions": [ - "vs/nls", - "**/vs/base/common/**", - "**/vs/platform/*/common/**", - "**/vs/editor/common/**", - "**/vs/editor/standalone/common/**" - ] - }, - { - "target": "**/vs/editor/standalone/test/common/**", - "restrictions": [ - "assert", - "sinon", - "vs/nls", - "**/vs/base/common/**", - "**/vs/platform/*/common/**", - "**/vs/platform/*/test/common/**", - "**/vs/editor/common/**", - "**/vs/editor/test/common/**" - ] - }, - { - "target": "**/vs/editor/standalone/browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/{common,browser}/**", - "**/vs/base/parts/*/{common,browser}/**", - "**/vs/platform/*/{common,browser}/**", - "**/vs/editor/{common,browser}/**", - "**/vs/editor/contrib/**", - "**/vs/editor/standalone/{common,browser}/**" - ] - }, - { - "target": "**/vs/editor/standalone/test/browser/**", - "restrictions": [ - "assert", - "sinon", - "vs/nls", - "**/vs/base/{common,browser}/**", - "**/vs/platform/*/{common,browser}/**", - "**/vs/platform/*/test/{common,browser}/**", - "**/vs/editor/{common,browser}/**", - "**/vs/editor/standalone/{common,browser}/**", - "**/vs/editor/test/{common,browser}/**" - ] - }, - { - "target": "**/vs/editor/contrib/*/test/**", - "restrictions": [ - "assert", - "sinon", - "vs/nls", - "**/vs/base/{common,browser}/**", - "**/vs/base/test/{common,browser}/**", - "**/vs/base/parts/*/{common,browser}/**", - "**/vs/platform/*/{common,browser}/**", - "**/vs/platform/*/test/{common,browser}/**", - "**/vs/editor/{common,browser}/**", - "**/vs/editor/test/{common,browser}/**", - "**/vs/editor/contrib/**" - ] - }, - { - "target": "**/vs/editor/contrib/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/{common,browser}/**", - "**/vs/base/parts/*/{common,browser}/**", - "**/vs/platform/{common,browser}/**", - "**/vs/platform/*/{common,browser}/**", - "**/vs/editor/{common,browser}/**", - "**/vs/editor/contrib/**" - ] - }, - { - "target": "**/vs/workbench/common/**", - "restrictions": [ - "vs/nls", - "**/vs/base/common/**", - "**/vs/base/parts/*/common/**", - "**/vs/platform/*/common/**", - "**/vs/editor/common/**", - "**/vs/editor/contrib/*/common/**", - "**/vs/workbench/common/**", - "**/vs/workbench/services/*/common/**", - "assert" - ] - }, - { - "target": "**/vs/workbench/browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/{common,browser}/**", - "**/vs/base/parts/*/{common,browser}/**", - "**/vs/platform/*/{common,browser}/**", - "**/vs/editor/{common,browser}/**", - "**/vs/editor/contrib/**", // editor/contrib is equivalent to /browser/ by convention - "**/vs/workbench/workbench.web.api", - "**/vs/workbench/{common,browser}/**", - "**/vs/workbench/services/*/{common,browser}/**", - "assert" - ] - }, - { - "target": "**/vs/workbench/api/common/**", - "restrictions": [ - "vscode", - "vs/nls", - "**/vs/base/common/**", - "**/vs/platform/*/common/**", - "**/vs/editor/common/**", - "**/vs/editor/contrib/*/common/**", - "**/vs/workbench/api/common/**", - "**/vs/workbench/common/**", - "**/vs/workbench/services/*/common/**", - "**/vs/workbench/contrib/*/common/**" - ] - }, - { - "target": "**/vs/workbench/api/worker/**", - "restrictions": [ - "vscode", - "vs/nls", - "**/vs/**/{common,worker}/**" - ] - }, - { - "target": "**/vs/workbench/electron-sandbox/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/{common,browser,electron-sandbox}/**", - "**/vs/base/parts/*/{common,browser,electron-sandbox}/**", - "**/vs/platform/*/{common,browser,electron-sandbox}/**", - "**/vs/editor/{common,browser,electron-sandbox}/**", - "**/vs/editor/contrib/**", // editor/contrib is equivalent to /browser/ by convention - "**/vs/workbench/{common,browser,electron-sandbox}/**", - "**/vs/workbench/api/{common,browser,electron-sandbox}/**", - "**/vs/workbench/services/*/{common,browser,electron-sandbox}/**" - ] - }, - { - "target": "**/vs/workbench/electron-browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/base/parts/*/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/platform/*/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/editor/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/editor/contrib/**", // editor/contrib is equivalent to /browser/ by convention - "**/vs/workbench/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/workbench/api/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/workbench/services/*/{common,browser,node,electron-sandbox,electron-browser}/**", - "*" // node modules - ] - }, - { - "target": "**/vs/workbench/services/**/test/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**", - "**/vs/platform/**", - "**/vs/editor/**", - "**/vs/workbench/{common,browser,node,electron-sandbox,electron-browser}/**", - "vs/workbench/contrib/files/common/editors/fileEditorInput", - "**/vs/workbench/services/**", - "**/vs/workbench/test/**", - "*" // node modules - ] - }, - { - "target": "**/vs/workbench/services/**/common/**", - "restrictions": [ - "vs/nls", - "**/vs/base/**/common/**", - "**/vs/platform/**/common/**", - "**/vs/editor/common/**", - "**/vs/workbench/workbench.web.api", - "**/vs/workbench/common/**", - "**/vs/workbench/services/**/common/**", - "**/vs/workbench/api/**/common/**", - "vscode-textmate", - "vscode-oniguruma", - "iconv-lite-umd", - "tas-client-umd", - "jschardet" - ] - }, - { - "target": "**/vs/workbench/services/**/worker/**", - "restrictions": [ - "vs/nls", - "**/vs/base/**/common/**", - "**/vs/platform/**/common/**", - "**/vs/editor/common/**", - "**/vs/workbench/**/common/**", - "**/vs/workbench/**/worker/**", - "**/vs/workbench/services/**/common/**", - "vscode" - ] - }, - { - "target": "**/vs/workbench/services/**/browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**/{common,browser,worker}/**", - "**/vs/platform/**/{common,browser}/**", - "**/vs/editor/{common,browser}/**", - "**/vs/workbench/workbench.web.api", - "**/vs/workbench/{common,browser}/**", - "**/vs/workbench/api/{common,browser}/**", - "**/vs/workbench/services/**/{common,browser}/**", - "vscode-textmate", - "vscode-oniguruma", - "iconv-lite-umd", - "jschardet" - ] - }, - { - "target": "**/vs/workbench/services/**/node/**", - "restrictions": [ - "vs/nls", - "**/vs/base/**/{common,node}/**", - "**/vs/platform/**/{common,node}/**", - "**/vs/editor/{common,node}/**", - "**/vs/workbench/{common,node}/**", - "**/vs/workbench/api/{common,node}/**", - "**/vs/workbench/services/**/{common,node}/**", - "*" // node modules - ] - }, - { - "target": "**/vs/workbench/services/**/electron-sandbox/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**/{common,browser,worker,electron-sandbox}/**", - "**/vs/platform/**/{common,browser,electron-sandbox}/**", - "**/vs/editor/**", - "**/vs/workbench/{common,browser,electron-sandbox}/**", - "**/vs/workbench/api/{common,browser,electron-sandbox}/**", - "**/vs/workbench/services/**/{common,browser,electron-sandbox}/**", - "vscode-textmate", - "vscode-oniguruma", - "iconv-lite-umd", - "jschardet" - ] - }, - { - "target": "**/vs/workbench/services/**/electron-browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**/{common,browser,worker,node,electron-sandbox,electron-browser}/**", - "**/vs/platform/**/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/editor/**", - "**/vs/workbench/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/workbench/api/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/workbench/services/**/{common,browser,node,electron-sandbox,electron-browser}/**", - "*" // node modules - ] - }, - { - "target": "**/vs/workbench/contrib/**/test/**", - "restrictions": [ - "assert", - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**", - "**/vs/platform/**", - "**/vs/editor/**", - "**/vs/workbench/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/workbench/services/**", - "**/vs/workbench/contrib/**", - "**/vs/workbench/test/**", - "*" - ] - }, - { - "target": "**/vs/workbench/contrib/terminal/browser/**", - "restrictions": [ - // xterm and its addons are strictly browser-only components - "xterm", - "xterm-addon-*", - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**/{common,browser}/**", - "**/vs/platform/**/{common,browser}/**", - "**/vs/editor/**", - "**/vs/workbench/{common,browser}/**", - "**/vs/workbench/contrib/**/{common,browser}/**", - "**/vs/workbench/services/**/{common,browser}/**" - ] - }, - { - "target": "**/vs/workbench/contrib/extensions/browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**/{common,browser}/**", - "**/vs/platform/**/{common,browser}/**", - "**/vs/editor/**", - "**/vs/workbench/{common,browser}/**", - "**/vs/workbench/contrib/**/{common,browser}/**", - "**/vs/workbench/services/**/{common,browser}/**" - ] - }, - { - "target": "**/vs/workbench/contrib/update/browser/update.ts", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**/{common,browser}/**", - "**/vs/platform/**/{common,browser}/**", - "**/vs/editor/**", - "**/vs/workbench/{common,browser}/**", - "**/vs/workbench/contrib/**/{common,browser}/**", - "**/vs/workbench/services/**/{common,browser}/**" - ] - }, - { - "target": "**/vs/workbench/contrib/notebook/common/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**/{common,worker}/**", - "**/vs/platform/**/common/**", - "**/vs/editor/**", - "**/vs/workbench/common/**", - "**/vs/workbench/api/common/**", - "**/vs/workbench/services/**/common/**", - "**/vs/workbench/contrib/**/common/**" - ] - }, - { - "target": "**/vs/workbench/contrib/**/common/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**/common/**", - "**/vs/platform/**/common/**", - "**/vs/editor/**", - "**/vs/workbench/common/**", - "**/vs/workbench/api/common/**", - "**/vs/workbench/services/**/common/**", - "**/vs/workbench/contrib/**/common/**" - ] - }, - { - "target": "**/vs/workbench/contrib/**/browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**/{common,browser}/**", - "**/vs/platform/**/{common,browser}/**", - "**/vs/editor/**", - "**/vs/workbench/{common,browser}/**", - "**/vs/workbench/api/{common,browser}/**", - "**/vs/workbench/services/**/{common,browser}/**", - "**/vs/workbench/contrib/**/{common,browser}/**", - "vscode-textmate", - "vscode-oniguruma", - "iconv-lite-umd", - "jschardet" - ] - }, - { - "target": "**/vs/workbench/contrib/**/node/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**/{common,node}/**", - "**/vs/platform/**/{common,node}/**", - "**/vs/editor/**/common/**", - "**/vs/workbench/{common,node}/**", - "**/vs/workbench/api/{common,node}/**", - "**/vs/workbench/services/**/{common,node}/**", - "**/vs/workbench/contrib/**/{common,node}/**", - "*" // node modules - ] - }, - { - "target": "**/vs/workbench/contrib/**/electron-sandbox/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**/{common,browser,worker,electron-sandbox}/**", - "**/vs/platform/**/{common,browser,electron-sandbox}/**", - "**/vs/editor/**", - "**/vs/workbench/{common,browser,electron-sandbox}/**", - "**/vs/workbench/api/{common,browser,electron-sandbox}/**", - "**/vs/workbench/services/**/{common,browser,electron-sandbox}/**", - "**/vs/workbench/contrib/**/{common,browser,electron-sandbox}/**", - "vscode-textmate", - "vscode-oniguruma", - "iconv-lite-umd", - "jschardet" - ] - }, - { - "target": "**/vs/workbench/contrib/**/electron-browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**/{common,browser,worker,node,electron-sandbox,electron-browser}/**", - "**/vs/platform/**/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/editor/**", - "**/vs/workbench/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/workbench/api/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/workbench/services/**/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/workbench/contrib/**/{common,browser,node,electron-sandbox,electron-browser}/**", - "*" // node modules - ] - }, - { - "target": "**/vs/code/browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**/{common,browser}/**", - "**/vs/base/parts/**/{common,browser}/**", - "**/vs/platform/**/{common,browser}/**", - "**/vs/code/**/{common,browser}/**", - "**/vs/workbench/workbench.web.api" - ] - }, - { - "target": "**/vs/code/node/**", - "restrictions": [ - "vs/nls", - "**/vs/base/**/{common,node}/**", - "**/vs/base/parts/**/{common,node}/**", - "**/vs/platform/**/{common,node}/**", - "**/vs/code/**/{common,node}/**", - "*" // node modules - ] - }, - { - "target": "**/vs/code/electron-browser/**", - "restrictions": [ - "vs/nls", - "vs/css!./**/*", - "**/vs/base/**/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/base/parts/**/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/platform/**/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/code/**/{common,browser,node,electron-sandbox,electron-browser}/**", - "*" // node modules - ] - }, - { - "target": "**/vs/code/electron-main/**", - "restrictions": [ - "vs/nls", - "**/vs/base/**/{common,node,electron-main}/**", - "**/vs/base/parts/**/{common,node,electron-main}/**", - "**/vs/platform/**/{common,node,electron-main}/**", - "**/vs/code/**/{common,node,electron-main}/**", - "*" // node modules - ] - }, - { - "target": "**/vs/server/**", - "restrictions": [ - "vs/nls", - "**/vs/base/**/{common,node}/**", - "**/vs/base/parts/**/{common,node}/**", - "**/vs/platform/**/{common,node}/**", - "**/vs/workbench/**/{common,node}/**", - "**/vs/server/**", - "*" // node modules - ] - }, - { - "target": "**/src/vs/workbench/workbench.common.main.ts", - "restrictions": [ - "vs/nls", - "**/vs/base/**/{common,browser}/**", - "**/vs/base/parts/**/{common,browser}/**", - "**/vs/platform/**/{common,browser}/**", - "**/vs/editor/**", - "**/vs/workbench/**/{common,browser}/**" - ] - }, - { - "target": "**/src/vs/workbench/workbench.web.main.ts", - "restrictions": [ - "vs/nls", - "**/vs/base/**/{common,browser}/**", - "**/vs/base/parts/**/{common,browser}/**", - "**/vs/platform/**/{common,browser}/**", - "**/vs/editor/**", - "**/vs/workbench/**/{common,browser}/**", - "**/vs/workbench/workbench.common.main" - ] - }, - { - "target": "**/src/vs/workbench/workbench.web.api.ts", - "restrictions": [ - "vs/nls", - "**/vs/base/**/{common,browser}/**", - "**/vs/base/parts/**/{common,browser}/**", - "**/vs/platform/**/{common,browser}/**", - "**/vs/editor/**", - "**/vs/workbench/**/{common,browser}/**", - "**/vs/workbench/workbench.web.main" - ] - }, - { - "target": "**/src/vs/workbench/workbench.sandbox.main.ts", - "restrictions": [ - "vs/nls", - "**/vs/base/**/{common,browser,electron-sandbox}/**", - "**/vs/base/parts/**/{common,browser,electron-sandbox}/**", - "**/vs/platform/**/{common,browser,electron-sandbox}/**", - "**/vs/editor/**", - "**/vs/workbench/**/{common,browser,electron-sandbox}/**", - "**/vs/workbench/workbench.common.main" - ] - }, - { - "target": "**/src/vs/workbench/workbench.desktop.main.ts", - "restrictions": [ - "vs/nls", - "**/vs/base/**/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/base/parts/**/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/platform/**/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/editor/**", - "**/vs/workbench/**/{common,browser,node,electron-sandbox,electron-browser}/**", - "**/vs/workbench/workbench.common.main", - "**/vs/workbench/workbench.sandbox.main" - ] - }, - { - "target": "**/extensions/**", - "restrictions": "**/*" - }, - { - "target": "**/test/smoke/**", - "restrictions": [ - "**/test/smoke/**", - "*" // node modules - ] - }, - { - "target": "**/test/automation/**", - "restrictions": [ - "**/test/automation/**", - "*" // node modules - ] - }, - { - "target": "**/test/integration/**", - "restrictions": [ - "**/test/integration/**", - "*" // node modules - ] - }, - { - "target": "**/test/monaco/**", - "restrictions": [ - "**/test/monaco/**", - "*" // node modules - ] - }, - { - "target": "**/api/**.test.ts", - "restrictions": [ - "**/vs/**", - "assert", - "sinon", - "crypto", - "vscode" - ] - }, - { - "target": "**/{node,electron-browser,electron-main}/**/*.test.ts", - "restrictions": [ - "**/vs/**", - "*" // node modules - ] - }, - { - "target": "**/{node,electron-browser,electron-main}/**/test/**", - "restrictions": [ - "**/vs/**", - "*" // node modules - ] - }, - { - "target": "**/test/{node,electron-browser,electron-main}/**", - "restrictions": [ - "**/vs/**", - "*" // node modules - ] - }, - { - "target": "**/**.test.ts", - "restrictions": [ - "**/vs/**", - "assert", - "sinon", - "crypto", - "xterm*" - ] - }, - { - "target": "**/test/**", - "restrictions": [ - "**/vs/**", - "assert", - "sinon", - "crypto", - "xterm*" - ] - } - ] - }, - "overrides": [ - { - "files": [ - "*.js" - ], - "rules": { - "jsdoc/no-types": "off" - } - }, - { - "files": [ - "**/vscode.d.ts", - "**/vscode.proposed.d.ts" - ], - "rules": { - "vscode-dts-create-func": "warn", - "vscode-dts-literal-or-types": "warn", - "vscode-dts-interface-naming": "warn", - "vscode-dts-cancellation": "warn", - "vscode-dts-use-thenable": "warn", - "vscode-dts-region-comments": "warn", - "vscode-dts-provider-naming": [ - "warn", - { - "allowed": [ - "FileSystemProvider", - "TreeDataProvider", - "TestProvider", - "CustomEditorProvider", - "CustomReadonlyEditorProvider", - "TerminalLinkProvider", - "AuthenticationProvider", - "NotebookContentProvider" - ] - } - ], - "vscode-dts-event-naming": [ - "warn", - { - "allowed": [ - "onCancellationRequested", - "event" - ], - "verbs": [ - "accept", - "change", - "close", - "collapse", - "create", - "delete", - "discover", - "dispose", - "edit", - "end", - "expand", - "grant", - "hide", - "invalidate", - "open", - "override", - "receive", - "register", - "remove", - "rename", - "save", - "send", - "start", - "terminate", - "trigger", - "unregister", - "write" - ] - } - ] - } - } - ] -} diff --git a/lib/vscode/.gitattributes b/lib/vscode/.gitattributes deleted file mode 100644 index 5a817c30b6d7..000000000000 --- a/lib/vscode/.gitattributes +++ /dev/null @@ -1,10 +0,0 @@ -* text=auto - -LICENSE.txt eol=crlf -ThirdPartyNotices.txt eol=crlf - -*.bat eol=crlf -*.cmd eol=crlf -*.ps1 eol=lf -*.sh eol=lf -*.rtf -text \ No newline at end of file diff --git a/lib/vscode/.github/ISSUE_TEMPLATE/config.yml b/lib/vscode/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 51e7f3660431..000000000000 --- a/lib/vscode/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Question - url: https://stackoverflow.com/questions/tagged/visual-studio-code - about: Please ask and answer questions here. diff --git a/lib/vscode/.github/subscribers.json b/lib/vscode/.github/subscribers.json deleted file mode 100644 index 7ee6e5cdadd3..000000000000 --- a/lib/vscode/.github/subscribers.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "notebook": [ - "claudiaregio", - "rchiodo", - "greazer", - "donjayamanne", - "jilljac" - ] -} diff --git a/lib/vscode/.gitignore b/lib/vscode/.gitignore deleted file mode 100644 index c53681396d35..000000000000 --- a/lib/vscode/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -.DS_Store -.cache -npm-debug.log -Thumbs.db -node_modules/ -.build/ -extensions/**/dist/ -/out*/ -/extensions/**/out/ -# src/vs/server NOTE@coder: So our code isn't ignored. -resources/server -build/node_modules -coverage/ -test_data/ -test-results/ -yarn-error.log -vscode.lsif -vscode.db diff --git a/lib/vscode/.vscode/notebooks/api.github-issues b/lib/vscode/.vscode/notebooks/api.github-issues deleted file mode 100644 index b9e25a7c914f..000000000000 --- a/lib/vscode/.vscode/notebooks/api.github-issues +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "kind": 1, - "language": "markdown", - "value": "#### Config", - "editable": true - }, - { - "kind": 2, - "language": "github-issues", - "value": "$repo=repo:microsoft/vscode\n$milestone=milestone:\"April 2021\"", - "editable": true - }, - { - "kind": 1, - "language": "markdown", - "value": "### Finalization", - "editable": true - }, - { - "kind": 2, - "language": "github-issues", - "value": "$repo $milestone label:api-finalization", - "editable": true - }, - { - "kind": 1, - "language": "markdown", - "value": "### Proposals", - "editable": true - }, - { - "kind": 2, - "language": "github-issues", - "value": "$repo $milestone is:open label:api-proposal ", - "editable": true - } -] \ No newline at end of file diff --git a/lib/vscode/.vscode/notebooks/my-work.github-issues b/lib/vscode/.vscode/notebooks/my-work.github-issues deleted file mode 100644 index 4e288133b7a2..000000000000 --- a/lib/vscode/.vscode/notebooks/my-work.github-issues +++ /dev/null @@ -1,116 +0,0 @@ -[ - { - "kind": 1, - "language": "markdown", - "value": "##### `Config`: This should be changed every month/milestone", - "editable": true - }, - { - "kind": 2, - "language": "github-issues", - "value": "// list of repos we work in\n$repos=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog\n\n// current milestone name\n$milestone=milestone:\"April 2021\"", - "editable": true - }, - { - "kind": 1, - "language": "github-issues", - "value": "## Milestone Work", - "editable": true - }, - { - "kind": 2, - "language": "github-issues", - "value": "$repos $milestone assignee:@me is:open", - "editable": true - }, - { - "kind": 1, - "language": "github-issues", - "value": "## Bugs, Debt, Features...", - "editable": true - }, - { - "kind": 1, - "language": "markdown", - "value": "#### My Bugs", - "editable": true - }, - { - "kind": 2, - "language": "github-issues", - "value": "$repos assignee:@me is:open label:bug", - "editable": true - }, - { - "kind": 1, - "language": "markdown", - "value": "#### Debt & Engineering", - "editable": true - }, - { - "kind": 2, - "language": "github-issues", - "value": "$repos assignee:@me is:open label:debt OR $repos assignee:@me is:open label:engineering", - "editable": true - }, - { - "kind": 1, - "language": "markdown", - "value": "#### Performance ๐ŸŒ ๐Ÿ”œ ๐ŸŽ", - "editable": true - }, - { - "kind": 2, - "language": "github-issues", - "value": "$repos assignee:@me is:open label:perf OR $repos assignee:@me is:open label:perf-startup OR $repos assignee:@me is:open label:perf-bloat OR $repos assignee:@me is:open label:freeze-slow-crash-leak", - "editable": true - }, - { - "kind": 1, - "language": "markdown", - "value": "#### Feature Requests", - "editable": true - }, - { - "kind": 2, - "language": "github-issues", - "value": "$repos assignee:@me is:open label:feature-request milestone:Backlog sort:reactions-+1-desc", - "editable": true - }, - { - "kind": 2, - "language": "github-issues", - "value": "$repos assignee:@me is:open milestone:\"Backlog Candidates\"", - "editable": true - }, - { - "kind": 1, - "language": "markdown", - "value": "### Personal Inbox\n", - "editable": true - }, - { - "kind": 1, - "language": "markdown", - "value": "\n#### Missing Type label", - "editable": true - }, - { - "kind": 2, - "language": "github-issues", - "value": "$repos assignee:@me is:open type:issue -label:bug -label:\"needs more info\" -label:feature-request -label:under-discussion -label:debt -label:plan-item -label:upstream", - "editable": true - }, - { - "kind": 1, - "language": "markdown", - "value": "#### Not Actionable", - "editable": true - }, - { - "kind": 2, - "language": "github-issues", - "value": "$repos assignee:@me is:open label:\"needs more info\"", - "editable": true - } -] \ No newline at end of file diff --git a/lib/vscode/LICENSE.txt b/lib/vscode/LICENSE.txt deleted file mode 100644 index 0ac28ee234d2..000000000000 --- a/lib/vscode/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2015 - present Microsoft Corporation - -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/lib/vscode/README.md b/lib/vscode/README.md deleted file mode 100644 index 0a9a62d9b7f3..000000000000 --- a/lib/vscode/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# Visual Studio Code - Open Source ("Code - OSS") -[![Feature Requests](https://img.shields.io/github/issues/microsoft/vscode/feature-request.svg)](https://github.com/microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+sort%3Areactions-%2B1-desc) -[![Bugs](https://img.shields.io/github/issues/microsoft/vscode/bug.svg)](https://github.com/microsoft/vscode/issues?utf8=โœ“&q=is%3Aissue+is%3Aopen+label%3Abug) -[![Gitter](https://img.shields.io/badge/chat-on%20gitter-yellow.svg)](https://gitter.im/Microsoft/vscode) - -## The Repository - -This repository ("`Code - OSS`") is where we (Microsoft) develop the [Visual Studio Code](https://code.visualstudio.com) product together with the community. Not only do we work on code and issues here, we also publish our [roadmap](https://github.com/microsoft/vscode/wiki/Roadmap), [monthly iteration plans](https://github.com/microsoft/vscode/wiki/Iteration-Plans), and our [endgame plans](https://github.com/microsoft/vscode/wiki/Running-the-Endgame). This source code is available to everyone under the standard [MIT license](https://github.com/microsoft/vscode/blob/main/LICENSE.txt). - -## Visual Studio Code - -

    - VS Code in action -

    - -[Visual Studio Code](https://code.visualstudio.com) is a distribution of the `Code - OSS` repository with Microsoft specific customizations released under a traditional [Microsoft product license](https://code.visualstudio.com/License/). - -[Visual Studio Code](https://code.visualstudio.com) combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle. It provides comprehensive code editing, navigation, and understanding support along with lightweight debugging, a rich extensibility model, and lightweight integration with existing tools. - -Visual Studio Code is updated monthly with new features and bug fixes. You can download it for Windows, macOS, and Linux on [Visual Studio Code's website](https://code.visualstudio.com/Download). To get the latest releases every day, install the [Insiders build](https://code.visualstudio.com/insiders). - -## Contributing - -There are many ways in which you can participate in the project, for example: - -* [Submit bugs and feature requests](https://github.com/microsoft/vscode/issues), and help us verify as they are checked in -* Review [source code changes](https://github.com/microsoft/vscode/pulls) -* Review the [documentation](https://github.com/microsoft/vscode-docs) and make pull requests for anything from typos to new content - -If you are interested in fixing issues and contributing directly to the code base, -please see the document [How to Contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute), which covers the following: - -* [How to build and run from source](https://github.com/microsoft/vscode/wiki/How-to-Contribute) -* [The development workflow, including debugging and running tests](https://github.com/microsoft/vscode/wiki/How-to-Contribute#debugging) -* [Coding guidelines](https://github.com/microsoft/vscode/wiki/Coding-Guidelines) -* [Submitting pull requests](https://github.com/microsoft/vscode/wiki/How-to-Contribute#pull-requests) -* [Finding an issue to work on](https://github.com/microsoft/vscode/wiki/How-to-Contribute#where-to-contribute) -* [Contributing to translations](https://aka.ms/vscodeloc) - -## Feedback - -* Ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/vscode) -* [Request a new feature](CONTRIBUTING.md) -* Upvote [popular feature requests](https://github.com/microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+sort%3Areactions-%2B1-desc) -* [File an issue](https://github.com/microsoft/vscode/issues) -* Follow [@code](https://twitter.com/code) and let us know what you think! - -See our [wiki](https://github.com/microsoft/vscode/wiki/Feedback-Channels) for a description of each of these channels and information on some other available community-driven channels. - -## Related Projects - -Many of the core components and extensions to VS Code live in their own repositories on GitHub. For example, the [node debug adapter](https://github.com/microsoft/vscode-node-debug) and the [mono debug adapter](https://github.com/microsoft/vscode-mono-debug) have their own repositories. For a complete list, please visit the [Related Projects](https://github.com/microsoft/vscode/wiki/Related-Projects) page on our [wiki](https://github.com/microsoft/vscode/wiki). - -## Bundled Extensions - -VS Code includes a set of built-in extensions located in the [extensions](extensions) folder, including grammars and snippets for many languages. Extensions that provide rich language support (code completion, Go to Definition) for a language have the suffix `language-features`. For example, the `json` extension provides coloring for `JSON` and the `json-language-features` provides rich language support for `JSON`. - -## Development Container - -This repository includes a Visual Studio Code Remote - Containers / Codespaces development container. - -- For [Remote - Containers](https://aka.ms/vscode-remote/download/containers), use the **Remote-Containers: Open Repository in Container...** command which creates a Docker volume for better disk I/O on macOS and Windows. -- For Codespaces, install the [Visual Studio Codespaces](https://aka.ms/vscs-ext-vscode) extension in VS Code, and use the **Codespaces: Create New Codespace** command. - -Docker / the Codespace should have at least **4 Cores and 6 GB of RAM (8 GB recommended)** to run full build. See the [development container README](.devcontainer/README.md) for more information. - -## 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. - -## License - -Copyright (c) Microsoft Corporation. All rights reserved. - -Licensed under the [MIT](LICENSE.txt) license. diff --git a/lib/vscode/ThirdPartyNotices.txt b/lib/vscode/ThirdPartyNotices.txt deleted file mode 100644 index e30e71ee4a21..000000000000 --- a/lib/vscode/ThirdPartyNotices.txt +++ /dev/null @@ -1,2853 +0,0 @@ -microsoft-vscode - -THIRD-PARTY SOFTWARE NOTICES AND INFORMATION -Do Not Translate or Localize - -This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise. - -1. JuliaEditorSupport/atom-language-julia version 0.21.0 (https://github.com/JuliaEditorSupport/atom-language-julia) -2. atom/language-clojure version 0.22.7 (https://github.com/atom/language-clojure) -3. atom/language-coffee-script version 0.49.3 (https://github.com/atom/language-coffee-script) -4. atom/language-css version 0.44.4 (https://github.com/atom/language-css) -5. atom/language-java version 0.32.1 (https://github.com/atom/language-java) -6. atom/language-sass version 0.61.4 (https://github.com/atom/language-sass) -7. atom/language-shellscript version 0.26.0 (https://github.com/atom/language-shellscript) -8. atom/language-xml version 0.35.2 (https://github.com/atom/language-xml) -9. better-go-syntax version 1.0.0 (https://github.com/jeff-hykin/better-go-syntax/ ) -10. Colorsublime-Themes version 0.1.0 (https://github.com/Colorsublime/Colorsublime-Themes) -11. daaain/Handlebars version 1.8.0 (https://github.com/daaain/Handlebars) -12. davidrios/pug-tmbundle (https://github.com/davidrios/pug-tmbundle) -13. definitelytyped (https://github.com/DefinitelyTyped/DefinitelyTyped) -14. demyte/language-cshtml version 0.3.0 (https://github.com/demyte/language-cshtml) -15. Document Object Model version 4.0.0 (https://www.w3.org/DOM/) -16. dotnet/csharp-tmLanguage version 0.1.0 (https://github.com/dotnet/csharp-tmLanguage) -17. expand-abbreviation version 0.5.8 (https://github.com/emmetio/expand-abbreviation) -18. fadeevab/make.tmbundle (https://github.com/fadeevab/make.tmbundle) -19. freebroccolo/atom-language-swift (https://github.com/freebroccolo/atom-language-swift) -20. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/) -21. Ikuyadeu/vscode-R version 1.3.0 (https://github.com/Ikuyadeu/vscode-R) -22. insane version 2.6.2 (https://github.com/bevacqua/insane) -23. Ionic documentation version 1.2.4 (https://github.com/ionic-team/ionic-site) -24. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar) -25. jeff-hykin/cpp-textmate-grammar version 1.12.11 (https://github.com/jeff-hykin/cpp-textmate-grammar) -26. jeff-hykin/cpp-textmate-grammar version 1.15.5 (https://github.com/jeff-hykin/cpp-textmate-grammar) -27. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify) -28. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert) -29. language-docker (https://github.com/moby/moby) -30. language-less version 0.34.2 (https://github.com/atom/language-less) -31. language-php version 0.46.0 (https://github.com/atom/language-php) -32. MagicStack/MagicPython version 1.1.1 (https://github.com/MagicStack/MagicPython) -33. marked version 1.1.0 (https://github.com/markedjs/marked) -34. mdn-data version 1.1.12 (https://github.com/mdn/data) -35. microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/microsoft/TypeScript-TmLanguage) -36. microsoft/vscode-JSON.tmLanguage (https://github.com/microsoft/vscode-JSON.tmLanguage) -37. microsoft/vscode-markdown-tm-grammar version 1.0.0 (https://github.com/microsoft/vscode-markdown-tm-grammar) -38. microsoft/vscode-mssql version 1.9.0 (https://github.com/microsoft/vscode-mssql) -39. mmims/language-batchfile version 0.7.5 (https://github.com/mmims/language-batchfile) -40. NVIDIA/cuda-cpp-grammar (https://github.com/NVIDIA/cuda-cpp-grammar) -41. PowerShell/EditorSyntax version 1.0.0 (https://github.com/PowerShell/EditorSyntax) -42. rust-syntax version 0.4.3 (https://github.com/dustypomerleau/rust-syntax) -43. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui) -44. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage) -45. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle) -46. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle) -47. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle) -48. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle) -49. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle) -50. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle) -51. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle) -52. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle) -53. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle) -54. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle) -55. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle) -56. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle) -57. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle) -58. TypeScript-TmLanguage version 0.1.8 (https://github.com/microsoft/TypeScript-TmLanguage) -59. TypeScript-TmLanguage version 1.0.0 (https://github.com/microsoft/TypeScript-TmLanguage) -60. Unicode version 12.0.0 (https://home.unicode.org/) -61. vscode-codicons version 0.0.14 (https://github.com/microsoft/vscode-codicons) -62. vscode-logfile-highlighter version 2.11.0 (https://github.com/emilast/vscode-logfile-highlighter) -63. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift) -64. Web Background Synchronization (https://github.com/WICG/background-sync) - - -%% JuliaEditorSupport/atom-language-julia NOTICES AND INFORMATION BEGIN HERE -========================================= -The atom-language-julia package is licensed under the MIT "Expat" License: - -> Copyright (c) 2015 -> -> 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 JuliaEditorSupport/atom-language-julia NOTICES AND INFORMATION - -%% atom/language-clojure NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) 2014 GitHub Inc. - -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. - - -This package was derived from a TextMate bundle located at -https://github.com/mmcgrana/textmate-clojure and distributed under the -following license, located in `LICENSE.md`: - -The MIT License (MIT) - -Copyright (c) 2010- Mark McGranaghan - -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 atom/language-clojure NOTICES AND INFORMATION - -%% atom/language-coffee-script NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2014 GitHub Inc. - -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. - - -This package was derived from a TextMate bundle located at -https://github.com/jashkenas/coffee-script-tmbundle and distributed under the -following license, located in `LICENSE`: - -Copyright (c) 2009-2014 Jeremy Ashkenas - -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 atom/language-coffee-script NOTICES AND INFORMATION - -%% atom/language-css NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) 2014 GitHub Inc. - -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. - --------------------------------------------------------------------- - -This package was derived from a TextMate bundle located at -https://github.com/textmate/css.tmbundle and distributed under the following -license, located in `README.mdown`: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. -========================================= -END OF atom/language-css NOTICES AND INFORMATION - -%% atom/language-java NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2014 GitHub Inc. - -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. - - -This package was derived from a TextMate bundle located at -https://github.com/textmate/java.tmbundle and distributed under the following -license, located in `README.mdown`: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. -========================================= -END OF atom/language-java NOTICES AND INFORMATION - -%% atom/language-sass NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2014 GitHub Inc. - -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. - - -This package was derived from a TextMate bundle located at -https://github.com/alexsancho/Sass.tmbundle and distributed under the following -license, located in `LICENSE.md`: - -Copyright (c) 2012 Alex Sancho, http://alexsancho.name/ - -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 atom/language-sass NOTICES AND INFORMATION - -%% atom/language-shellscript NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2014 GitHub Inc. - -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. - - -This package was derived from a TextMate bundle located at -https://github.com/textmate/shellscript.tmbundle and distributed under the -following license, located in `README.mdown`: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. -========================================= -END OF atom/language-shellscript NOTICES AND INFORMATION - -%% atom/language-xml NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2014 GitHub Inc. - -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. - - -This package was derived from a TextMate bundle located at -https://github.com/textmate/xml.tmbundle and distributed under the following -license, located in `README.mdown`: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. -========================================= -END OF atom/language-xml NOTICES AND INFORMATION - -%% better-go-syntax NOTICES AND INFORMATION BEGIN HERE -========================================= -MIT License - -Copyright (c) 2019 Jeff Hykin - -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 better-go-syntax NOTICES AND INFORMATION - -%% Colorsublime-Themes NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) 2015 Colorsublime.com - -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 Colorsublime-Themes NOTICES AND INFORMATION - -%% daaain/Handlebars NOTICES AND INFORMATION BEGIN HERE -========================================= --- Credits - -Adapted from the great sublime-text-handlebars package by Nicholas Westlake. - -Thanks a lot to all the generous contributors (in alphabetical order): @bittersweetryan, @bradcliffe, @calumbrodie, @duncanbeevers, @hlvnst, @jonschlinkert, @Krutius, @samselikoff, @utkarshkukreti, @zeppelin - --- License - -(The MIT License) - -Copyright (c) daaain/Handlebars project authors - -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 daaain/Handlebars NOTICES AND INFORMATION - -%% davidrios/pug-tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2016 David Rios - -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 davidrios/pug-tmbundle NOTICES AND INFORMATION - -%% 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 - -%% demyte/language-cshtml NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2014 James Summerton - -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 demyte/language-cshtml NOTICES AND INFORMATION - -%% Document Object Model NOTICES AND INFORMATION BEGIN HERE -========================================= -W3C License -This work is being provided by the copyright holders under the following license. -By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions. -Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following -on ALL copies of the work or portions thereof, including modifications: -* The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. -* Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included. -* Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived -from Document Object Model. Copyright ยฉ 2015 W3Cยฎ (MIT, ERCIM, Keio, Beihang)." -Disclaimers -THIS WORK IS PROVIDED "AS IS - AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR -FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT 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 SOFTWARE OR DOCUMENT. -The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. -Title to copyright in this work will at all times remain with copyright holders. -========================================= -END OF Document Object Model NOTICES AND INFORMATION - -%% dotnet/csharp-tmLanguage NOTICES AND INFORMATION BEGIN HERE -========================================= -MIT License - -Copyright (c) 2016 .NET Foundation - -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 dotnet/csharp-tmLanguage NOTICES AND INFORMATION - -%% expand-abbreviation NOTICES AND INFORMATION BEGIN HERE -========================================= -MIT License - -Copyright (c) 2017 Emmet.io - -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 expand-abbreviation NOTICES AND INFORMATION - -%% fadeevab/make.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-make.tmbundle project authors - -If not otherwise specified (see below), files in this repository fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF fadeevab/make.tmbundle NOTICES AND INFORMATION - -%% freebroccolo/atom-language-swift NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2014 Darin Morrison - -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 freebroccolo/atom-language-swift NOTICES AND INFORMATION - -%% 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 - -%% Ikuyadeu/vscode-R NOTICES AND INFORMATION BEGIN HERE -========================================= -MIT License - -Copyright (c) 2019 Yuki Ueda - -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 Ikuyadeu/vscode-R NOTICES AND INFORMATION - -%% insane NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright ยฉ 2015 Nicolas Bevacqua - -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 insane NOTICES AND INFORMATION - -%% Ionic documentation NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright Drifty Co. http://drifty.com/. - -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS -========================================= -END OF Ionic documentation NOTICES AND INFORMATION - -%% ionide/ionide-fsgrammar NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2015 Krzysztof Cieslak - -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 ionide/ionide-fsgrammar NOTICES AND INFORMATION - -%% jeff-hykin/cpp-textmate-grammar NOTICES AND INFORMATION BEGIN HERE -========================================= -MIT License - -Copyright (c) 2019 Jeff Hykin - -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 jeff-hykin/cpp-textmate-grammar NOTICES AND INFORMATION - -%% js-beautify NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2007-2018 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. -========================================= -END OF js-beautify NOTICES AND INFORMATION - -%% Jxck/assert NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2011 Jxck - -Originally from node.js (http://nodejs.org) -Copyright Joyent, Inc. - -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 Jxck/assert NOTICES AND INFORMATION - -%% language-docker NOTICES AND INFORMATION BEGIN HERE -========================================= -Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2013-2018 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -========================================= -END OF language-docker NOTICES AND INFORMATION - -%% language-less NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2014 GitHub Inc. - -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. - - -This package was derived from a TextMate bundle located at -https://github.com/textmate/less.tmbundle and distributed under the following -license, located in `LICENSE.md`: - -Copyright (c) 2010 Scott Kyle and Rasmus Andersson - -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 language-less NOTICES AND INFORMATION - -%% language-php NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2014 GitHub Inc. - -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. - - -This package was derived from a TextMate bundle located at -https://github.com/textmate/php.tmbundle and distributed under the following -license, located in `README.mdown`: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. -========================================= -END OF language-php NOTICES AND INFORMATION - -%% MagicStack/MagicPython NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License - -Copyright (c) 2015-present MagicStack Inc. http://magic.io - -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 MagicStack/MagicPython NOTICES AND INFORMATION - -%% marked NOTICES AND INFORMATION BEGIN HERE -========================================= -information - -## Contribution License Agreement - -If you contribute code to this project, you are implicitly allowing your code -to be distributed under the MIT license. You are also implicitly verifying that -all code is your original work. `` - -## Marked - -Copyright (c) 2018+, MarkedJS (https://github.com/markedjs/) -Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/) - -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. - -## Markdown - -Copyright ยฉ 2004, John Gruber -http://daringfireball.net/ -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. -* Neither the name "Markdown" nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -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 owner 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. -========================================= -END OF marked NOTICES AND INFORMATION - -%% mdn-data NOTICES AND INFORMATION BEGIN HERE -========================================= -Mozilla Public License Version 2.0 - -Copyright (c) 2018 Mozilla Corporation - -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. -========================================= -END OF mdn-data NOTICES AND INFORMATION - -%% microsoft/TypeScript-TmLanguage NOTICES AND INFORMATION BEGIN HERE -========================================= -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. -========================================= -END OF microsoft/TypeScript-TmLanguage NOTICES AND INFORMATION - -%% microsoft/vscode-JSON.tmLanguage NOTICES AND INFORMATION BEGIN HERE -========================================= -vscode-JSON.tmLanguage - -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. -========================================= -END OF microsoft/vscode-JSON.tmLanguage NOTICES AND INFORMATION - -%% microsoft/vscode-markdown-tm-grammar NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) Microsoft 2018 - -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 microsoft/vscode-markdown-tm-grammar NOTICES AND INFORMATION - -%% microsoft/vscode-mssql NOTICES AND INFORMATION BEGIN HERE -========================================= ------------------------------------------- START OF LICENSE ----------------------------------------- -vscode-mssql -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: -Copyright (c) 2016 Microsoft -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 LICENSE ----------------------------------------- -========================================= -END OF microsoft/vscode-mssql NOTICES AND INFORMATION - -%% mmims/language-batchfile NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2021 Michael Mims - -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 mmims/language-batchfile NOTICES AND INFORMATION - -%% NVIDIA/cuda-cpp-grammar NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright 2021 NVIDIA Corporation - -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 NVIDIA/cuda-cpp-grammar NOTICES AND INFORMATION - -%% PowerShell/EditorSyntax NOTICES AND INFORMATION BEGIN HERE -========================================= -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. -========================================= -END OF PowerShell/EditorSyntax NOTICES AND INFORMATION - -%% rust-syntax NOTICES AND INFORMATION BEGIN HERE -========================================= -MIT License - -Copyright (c) 2020 Dustin Pomerleau - -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 rust-syntax NOTICES AND INFORMATION - -%% seti-ui NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) 2014 Jesse Weed - -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 seti-ui NOTICES AND INFORMATION - -%% shaders-tmLanguage NOTICES AND INFORMATION BEGIN HERE -========================================= -MIT License - -Copyright (c) 2017 Tim Jones - -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 shaders-tmLanguage NOTICES AND INFORMATION - -%% textmate/asp.vb.net.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-asp.vb.net.tmbundle project authors - -If not otherwise specified (see below), files in this folder fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/asp.vb.net.tmbundle NOTICES AND INFORMATION - -%% textmate/c.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-c.tmbundle authors - -If not otherwise specified (see below), files in this repository fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/c.tmbundle NOTICES AND INFORMATION - -%% textmate/diff.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-diff.tmbundle project authors - -If not otherwise specified (see below), files in this repository fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/diff.tmbundle NOTICES AND INFORMATION - -%% textmate/git.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2008 Tim Harper - -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 textmate/git.tmbundle NOTICES AND INFORMATION - -%% textmate/groovy.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-groovy.tmbundle project authors - -If not otherwise specified (see below), files in this repository fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/groovy.tmbundle NOTICES AND INFORMATION - -%% textmate/html.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-html.tmbundle project authors - -If not otherwise specified (see below), files in this repository fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/html.tmbundle NOTICES AND INFORMATION - -%% textmate/ini.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-ini.tmbundle project authors - -If not otherwise specified (see below), files in this folder fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/ini.tmbundle NOTICES AND INFORMATION - -%% textmate/javascript.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-javascript.tmbundle project authors - -If not otherwise specified (see below), files in this repository fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/javascript.tmbundle NOTICES AND INFORMATION - -%% textmate/lua.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-lua.tmbundle project authors - -If not otherwise specified (see below), files in this repository fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/lua.tmbundle NOTICES AND INFORMATION - -%% textmate/markdown.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) markdown.tmbundle authors - -If not otherwise specified (see below), files in this repository fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/markdown.tmbundle NOTICES AND INFORMATION - -%% textmate/perl.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-perl.tmbundle project authors - -If not otherwise specified (see below), files in this repository fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/perl.tmbundle NOTICES AND INFORMATION - -%% textmate/ruby.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-ruby.tmbundle project authors - -If not otherwise specified (see below), files in this folder fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/ruby.tmbundle NOTICES AND INFORMATION - -%% textmate/yaml.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) 2015 FichteFoll - -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 textmate/yaml.tmbundle NOTICES AND INFORMATION - -%% TypeScript-TmLanguage NOTICES AND INFORMATION BEGIN HERE -========================================= -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. -========================================= -END OF TypeScript-TmLanguage NOTICES AND INFORMATION - -%% Unicode NOTICES AND INFORMATION BEGIN HERE -========================================= -Unicode Data Files include all data files under the directories -http://www.unicode.org/Public/, http://www.unicode.org/reports/, -http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and -http://www.unicode.org/utility/trac/browser/. - -Unicode Data Files do not include PDF online code charts under the -directory http://www.unicode.org/Public/. - -Software includes any source code published in the Unicode Standard -or under the directories -http://www.unicode.org/Public/, http://www.unicode.org/reports/, -http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and -http://www.unicode.org/utility/trac/browser/. - -NOTICE TO USER: Carefully read the following legal agreement. -BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S -DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), -YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE -TERMS AND CONDITIONS OF THIS AGREEMENT. -IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE -THE DATA FILES OR SOFTWARE. - -COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 1991-2017 Unicode, Inc. All rights reserved. -Distributed under the Terms of Use in http://www.unicode.org/copyright.html. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Unicode data files and any associated documentation -(the "Data Files") or Unicode software and any associated documentation -(the "Software") to deal in the Data Files or Software -without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, and/or sell copies of -the Data Files or Software, and to permit persons to whom the Data Files -or Software are furnished to do so, provided that either -(a) this copyright and permission notice appear with all copies -of the Data Files or Software, or -(b) this copyright and permission notice appear in associated -Documentation. - -THE DATA FILES AND SOFTWARE ARE 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 OF THIRD PARTY RIGHTS. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS -NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 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 THE DATA FILES OR SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, -use or other dealings in these Data Files or Software without prior -written authorization of the copyright holder. -========================================= -END OF Unicode NOTICES AND INFORMATION - -%% vscode-codicons NOTICES AND INFORMATION BEGIN HERE -========================================= -Attribution 4.0 International - -======================================================================= - -Creative Commons Corporation ("Creative Commons") is not a law firm and -does not provide legal services or legal advice. Distribution of -Creative Commons public licenses does not create a lawyer-client or -other relationship. Creative Commons makes its licenses and related -information available on an "as-is" basis. Creative Commons gives no -warranties regarding its licenses, any material licensed under their -terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the -fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and -conditions that creators and other rights holders may use to share -original works of authorship and other material subject to copyright -and certain other rights specified in the public license below. The -following considerations are for informational purposes only, are not -exhaustive, and do not form part of our licenses. - - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More_considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - -======================================================================= - -Creative Commons Attribution 4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree -to be bound by the terms and conditions of this Creative Commons -Attribution 4.0 International Public License ("Public License"). To the -extent this Public License may be interpreted as a contract, You are -granted the Licensed Rights in consideration of Your acceptance of -these terms and conditions, and the Licensor grants You such rights in -consideration of benefits the Licensor receives from making the -Licensed Material available under these terms and conditions. - - -Section 1 -- Definitions. - - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - - c. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - - d. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - - e. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - - f. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - - g. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - - h. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - - i. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - - j. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. - - k. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. - - -Section 2 -- Scope. - - a. License grant. - - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - - a. reproduce and Share the Licensed Material, in whole or - in part; and - - b. produce, reproduce, and Share Adapted Material. - - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - - 3. Term. The term of this Public License is specified in Section - 6(a). - - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - - 5. Downstream recipients. - - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - - b. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - - b. Other rights. - - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this - Public License. - - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - - -Section 3 -- License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the -following conditions. - - a. Attribution. - - 1. If You Share the Licensed Material (including in modified - form), You must: - - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of - warranties; - - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - - 4. If You Share Adapted Material You produce, the Adapter's - License You apply must not prevent recipients of the Adapted - Material from complying with this Public License. - - -Section 4 -- Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that -apply to Your use of the Licensed Material: - - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material; and - - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not -replace Your obligations under this Public License where the Licensed -Rights include other Copyright and Similar Rights. - - -Section 5 -- Disclaimer of Warranties and Limitation of Liability. - - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - - -Section 6 -- Term and Termination. - - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. - - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. - - -Section 7 -- Other Terms and Conditions. - - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. - - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. - - -Section 8 -- Interpretation. - - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. - - -======================================================================= - -Creative Commons is not a party to its public -licenses. Notwithstanding, Creative Commons may elect to apply one of -its public licenses to material it publishes and in those instances -will be considered the "Licensor." The text of the Creative Commons -public licenses is dedicated to the public domain under the CC0 Public -Domain Dedication. Except for the limited purpose of indicating that -material is shared under a Creative Commons public license or as -otherwise permitted by the Creative Commons policies published at -creativecommons.org/policies, Creative Commons does not authorize the -use of the trademark "Creative Commons" or any other trademark or logo -of Creative Commons without its prior written consent including, -without limitation, in connection with any unauthorized modifications -to any of its public licenses or any other arrangements, -understandings, or agreements concerning use of licensed material. For -the avoidance of doubt, this paragraph does not form part of the -public licenses. - -Creative Commons may be contacted at creativecommons.org. -========================================= -END OF vscode-codicons NOTICES AND INFORMATION - -%% vscode-logfile-highlighter NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2015 emilast - -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 vscode-logfile-highlighter NOTICES AND INFORMATION - -%% vscode-swift NOTICES AND INFORMATION BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2015 David Owens II - -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 vscode-swift NOTICES AND INFORMATION - -%% Web Background Synchronization NOTICES AND INFORMATION BEGIN HERE -========================================= -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -========================================= -END OF Web Background Synchronization NOTICES AND INFORMATION \ No newline at end of file diff --git a/lib/vscode/build/azure-pipelines/common/createAsset.js b/lib/vscode/build/azure-pipelines/common/createAsset.js deleted file mode 100644 index 3038ff62b825..000000000000 --- a/lib/vscode/build/azure-pipelines/common/createAsset.js +++ /dev/null @@ -1,94 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * 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 }); -const fs = require("fs"); -const crypto = require("crypto"); -const azure = require("azure-storage"); -const mime = require("mime"); -const cosmos_1 = require("@azure/cosmos"); -const retry_1 = require("./retry"); -if (process.argv.length !== 6) { - console.error('Usage: node createAsset.js PLATFORM TYPE NAME FILE'); - process.exit(-1); -} -function hashStream(hashName, stream) { - return new Promise((c, e) => { - const shasum = crypto.createHash(hashName); - stream - .on('data', shasum.update.bind(shasum)) - .on('error', e) - .on('close', () => c(shasum.digest('hex'))); - }); -} -async function doesAssetExist(blobService, quality, blobName) { - const existsResult = await new Promise((c, e) => blobService.doesBlobExist(quality, blobName, (err, r) => err ? e(err) : c(r))); - return existsResult.exists; -} -async function uploadBlob(blobService, quality, blobName, filePath, fileName) { - const blobOptions = { - contentSettings: { - contentType: mime.lookup(filePath), - contentDisposition: `attachment; filename="${fileName}"`, - cacheControl: 'max-age=31536000, public' - } - }; - await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, filePath, blobOptions, err => err ? e(err) : c())); -} -function getEnv(name) { - const result = process.env[name]; - if (typeof result === 'undefined') { - throw new Error('Missing env: ' + name); - } - return result; -} -async function main() { - const [, , platform, type, fileName, filePath] = process.argv; - const quality = getEnv('VSCODE_QUALITY'); - const commit = getEnv('BUILD_SOURCEVERSION'); - console.log('Creating asset...'); - const stat = await new Promise((c, e) => fs.stat(filePath, (err, stat) => err ? e(err) : c(stat))); - const size = stat.size; - console.log('Size:', size); - const stream = fs.createReadStream(filePath); - const [sha1hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]); - console.log('SHA1:', sha1hash); - console.log('SHA256:', sha256hash); - const blobName = commit + '/' + fileName; - const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']; - const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']) - .withFilter(new azure.ExponentialRetryPolicyFilter(20)); - const blobExists = await doesAssetExist(blobService, quality, blobName); - if (blobExists) { - console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`); - return; - } - console.log('Uploading blobs to Azure storage...'); - await uploadBlob(blobService, quality, blobName, filePath, fileName); - console.log('Blobs successfully uploaded.'); - const asset = { - platform, - type, - url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`, - hash: sha1hash, - sha256hash, - size - }; - // Remove this if we ever need to rollback fast updates for windows - if (/win32/.test(platform)) { - asset.supportsFastUpdate = true; - } - console.log('Asset:', JSON.stringify(asset, null, ' ')); - const client = new cosmos_1.CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT'], key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] }); - const scripts = client.database('builds').container(quality).scripts; - await retry_1.retry(() => scripts.storedProcedure('createAsset').execute('', [commit, asset, true])); -} -main().then(() => { - console.log('Asset successfully created'); - process.exit(0); -}, err => { - console.error(err); - process.exit(1); -}); diff --git a/lib/vscode/build/azure-pipelines/common/createAsset.ts b/lib/vscode/build/azure-pipelines/common/createAsset.ts deleted file mode 100644 index daf60d710eec..000000000000 --- a/lib/vscode/build/azure-pipelines/common/createAsset.ts +++ /dev/null @@ -1,134 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * 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 fs from 'fs'; -import { Readable } from 'stream'; -import * as crypto from 'crypto'; -import * as azure from 'azure-storage'; -import * as mime from 'mime'; -import { CosmosClient } from '@azure/cosmos'; -import { retry } from './retry'; - -interface Asset { - platform: string; - type: string; - url: string; - mooncakeUrl?: string; - hash: string; - sha256hash: string; - size: number; - supportsFastUpdate?: boolean; -} - -if (process.argv.length !== 6) { - console.error('Usage: node createAsset.js PLATFORM TYPE NAME FILE'); - process.exit(-1); -} - -function hashStream(hashName: string, stream: Readable): Promise { - return new Promise((c, e) => { - const shasum = crypto.createHash(hashName); - - stream - .on('data', shasum.update.bind(shasum)) - .on('error', e) - .on('close', () => c(shasum.digest('hex'))); - }); -} - -async function doesAssetExist(blobService: azure.BlobService, quality: string, blobName: string): Promise { - const existsResult = await new Promise((c, e) => blobService.doesBlobExist(quality, blobName, (err, r) => err ? e(err) : c(r))); - return existsResult.exists; -} - -async function uploadBlob(blobService: azure.BlobService, quality: string, blobName: string, filePath: string, fileName: string): Promise { - const blobOptions: azure.BlobService.CreateBlockBlobRequestOptions = { - contentSettings: { - contentType: mime.lookup(filePath), - contentDisposition: `attachment; filename="${fileName}"`, - cacheControl: 'max-age=31536000, public' - } - }; - - await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, filePath, blobOptions, err => err ? e(err) : c())); -} - -function getEnv(name: string): string { - const result = process.env[name]; - - if (typeof result === 'undefined') { - throw new Error('Missing env: ' + name); - } - - return result; -} - -async function main(): Promise { - const [, , platform, type, fileName, filePath] = process.argv; - const quality = getEnv('VSCODE_QUALITY'); - const commit = getEnv('BUILD_SOURCEVERSION'); - - console.log('Creating asset...'); - - const stat = await new Promise((c, e) => fs.stat(filePath, (err, stat) => err ? e(err) : c(stat))); - const size = stat.size; - - console.log('Size:', size); - - const stream = fs.createReadStream(filePath); - const [sha1hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]); - - console.log('SHA1:', sha1hash); - console.log('SHA256:', sha256hash); - - const blobName = commit + '/' + fileName; - const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']!; - - const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!) - .withFilter(new azure.ExponentialRetryPolicyFilter(20)); - - const blobExists = await doesAssetExist(blobService, quality, blobName); - - if (blobExists) { - console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`); - return; - } - - console.log('Uploading blobs to Azure storage...'); - - await uploadBlob(blobService, quality, blobName, filePath, fileName); - - console.log('Blobs successfully uploaded.'); - - const asset: Asset = { - platform, - type, - url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`, - hash: sha1hash, - sha256hash, - size - }; - - // Remove this if we ever need to rollback fast updates for windows - if (/win32/.test(platform)) { - asset.supportsFastUpdate = true; - } - - console.log('Asset:', JSON.stringify(asset, null, ' ')); - - const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] }); - const scripts = client.database('builds').container(quality).scripts; - await retry(() => scripts.storedProcedure('createAsset').execute('', [commit, asset, true])); -} - -main().then(() => { - console.log('Asset successfully created'); - process.exit(0); -}, err => { - console.error(err); - process.exit(1); -}); diff --git a/lib/vscode/build/azure-pipelines/common/sync-mooncake.js b/lib/vscode/build/azure-pipelines/common/sync-mooncake.js deleted file mode 100644 index 1f3354226519..000000000000 --- a/lib/vscode/build/azure-pipelines/common/sync-mooncake.js +++ /dev/null @@ -1,87 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * 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 }); -const url = require("url"); -const azure = require("azure-storage"); -const mime = require("mime"); -const cosmos_1 = require("@azure/cosmos"); -const retry_1 = require("./retry"); -function log(...args) { - console.log(...[`[${new Date().toISOString()}]`, ...args]); -} -function error(...args) { - console.error(...[`[${new Date().toISOString()}]`, ...args]); -} -if (process.argv.length < 3) { - error('Usage: node sync-mooncake.js '); - process.exit(-1); -} -async function sync(commit, quality) { - log(`Synchronizing Mooncake assets for ${quality}, ${commit}...`); - const client = new cosmos_1.CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT'], key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] }); - const container = client.database('builds').container(quality); - const query = `SELECT TOP 1 * FROM c WHERE c.id = "${commit}"`; - const res = await container.items.query(query, {}).fetchAll(); - if (res.resources.length !== 1) { - throw new Error(`No builds found for ${commit}`); - } - const build = res.resources[0]; - log(`Found build for ${commit}, with ${build.assets.length} assets`); - const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']; - const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']) - .withFilter(new azure.ExponentialRetryPolicyFilter(20)); - const mooncakeBlobService = azure.createBlobService(storageAccount, process.env['MOONCAKE_STORAGE_ACCESS_KEY'], `${storageAccount}.blob.core.chinacloudapi.cn`) - .withFilter(new azure.ExponentialRetryPolicyFilter(20)); - // mooncake is fussy and far away, this is needed! - blobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000; - mooncakeBlobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000; - for (const asset of build.assets) { - try { - const blobPath = url.parse(asset.url).path; - if (!blobPath) { - throw new Error(`Failed to parse URL: ${asset.url}`); - } - const blobName = blobPath.replace(/^\/\w+\//, ''); - log(`Found ${blobName}`); - if (asset.mooncakeUrl) { - log(` Already in Mooncake โœ”๏ธ`); - continue; - } - const readStream = blobService.createReadStream(quality, blobName, undefined); - const blobOptions = { - contentSettings: { - contentType: mime.lookup(blobPath), - cacheControl: 'max-age=31536000, public' - } - }; - const writeStream = mooncakeBlobService.createWriteStreamToBlockBlob(quality, blobName, blobOptions, undefined); - log(` Uploading to Mooncake...`); - await new Promise((c, e) => readStream.pipe(writeStream).on('finish', c).on('error', e)); - log(` Updating build in DB...`); - const mooncakeUrl = `${process.env['MOONCAKE_CDN_URL']}${blobPath}`; - await retry_1.retry(() => container.scripts.storedProcedure('setAssetMooncakeUrl') - .execute('', [commit, asset.platform, asset.type, mooncakeUrl])); - log(` Done โœ”๏ธ`); - } - catch (err) { - error(err); - } - } - log(`All done โœ”๏ธ`); -} -function main() { - const commit = process.env['BUILD_SOURCEVERSION']; - if (!commit) { - error('Skipping publish due to missing BUILD_SOURCEVERSION'); - return; - } - const quality = process.argv[2]; - sync(commit, quality).catch(err => { - error(err); - process.exit(1); - }); -} -main(); diff --git a/lib/vscode/build/azure-pipelines/common/sync-mooncake.ts b/lib/vscode/build/azure-pipelines/common/sync-mooncake.ts deleted file mode 100644 index 4ffe7a8f15bb..000000000000 --- a/lib/vscode/build/azure-pipelines/common/sync-mooncake.ts +++ /dev/null @@ -1,131 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * 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 url from 'url'; -import * as azure from 'azure-storage'; -import * as mime from 'mime'; -import { CosmosClient } from '@azure/cosmos'; -import { retry } from './retry'; - -function log(...args: any[]) { - console.log(...[`[${new Date().toISOString()}]`, ...args]); -} - -function error(...args: any[]) { - console.error(...[`[${new Date().toISOString()}]`, ...args]); -} - -if (process.argv.length < 3) { - error('Usage: node sync-mooncake.js '); - process.exit(-1); -} - -interface Build { - assets: Asset[]; -} - -interface Asset { - platform: string; - type: string; - url: string; - mooncakeUrl: string; - hash: string; - sha256hash: string; - size: number; - supportsFastUpdate?: boolean; -} - -async function sync(commit: string, quality: string): Promise { - log(`Synchronizing Mooncake assets for ${quality}, ${commit}...`); - - const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] }); - const container = client.database('builds').container(quality); - - const query = `SELECT TOP 1 * FROM c WHERE c.id = "${commit}"`; - const res = await container.items.query(query, {}).fetchAll(); - - if (res.resources.length !== 1) { - throw new Error(`No builds found for ${commit}`); - } - - const build = res.resources[0]; - - log(`Found build for ${commit}, with ${build.assets.length} assets`); - - const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']!; - - const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!) - .withFilter(new azure.ExponentialRetryPolicyFilter(20)); - - const mooncakeBlobService = azure.createBlobService(storageAccount, process.env['MOONCAKE_STORAGE_ACCESS_KEY']!, `${storageAccount}.blob.core.chinacloudapi.cn`) - .withFilter(new azure.ExponentialRetryPolicyFilter(20)); - - // mooncake is fussy and far away, this is needed! - blobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000; - mooncakeBlobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000; - - for (const asset of build.assets) { - try { - const blobPath = url.parse(asset.url).path; - - if (!blobPath) { - throw new Error(`Failed to parse URL: ${asset.url}`); - } - - const blobName = blobPath.replace(/^\/\w+\//, ''); - - log(`Found ${blobName}`); - - if (asset.mooncakeUrl) { - log(` Already in Mooncake โœ”๏ธ`); - continue; - } - - const readStream = blobService.createReadStream(quality, blobName, undefined!); - const blobOptions: azure.BlobService.CreateBlockBlobRequestOptions = { - contentSettings: { - contentType: mime.lookup(blobPath), - cacheControl: 'max-age=31536000, public' - } - }; - - const writeStream = mooncakeBlobService.createWriteStreamToBlockBlob(quality, blobName, blobOptions, undefined); - - log(` Uploading to Mooncake...`); - await new Promise((c, e) => readStream.pipe(writeStream).on('finish', c).on('error', e)); - - log(` Updating build in DB...`); - const mooncakeUrl = `${process.env['MOONCAKE_CDN_URL']}${blobPath}`; - await retry(() => container.scripts.storedProcedure('setAssetMooncakeUrl') - .execute('', [commit, asset.platform, asset.type, mooncakeUrl])); - - log(` Done โœ”๏ธ`); - } catch (err) { - error(err); - } - } - - log(`All done โœ”๏ธ`); -} - -function main(): void { - const commit = process.env['BUILD_SOURCEVERSION']; - - if (!commit) { - error('Skipping publish due to missing BUILD_SOURCEVERSION'); - return; - } - - const quality = process.argv[2]; - - sync(commit, quality).catch(err => { - error(err); - process.exit(1); - }); -} - -main(); diff --git a/lib/vscode/build/azure-pipelines/darwin/publish-server.sh b/lib/vscode/build/azure-pipelines/darwin/publish-server.sh deleted file mode 100755 index 72a85942d5a5..000000000000 --- a/lib/vscode/build/azure-pipelines/darwin/publish-server.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -set -e - -if [ "$VSCODE_ARCH" == "x64" ]; then - # package Remote Extension Host - pushd .. && mv vscode-reh-darwin vscode-server-darwin && zip -Xry vscode-server-darwin.zip vscode-server-darwin && popd - - # publish Remote Extension Host - node build/azure-pipelines/common/createAsset.js \ - server-darwin \ - archive-unsigned \ - "vscode-server-darwin.zip" \ - ../vscode-server-darwin.zip -fi diff --git a/lib/vscode/build/azure-pipelines/linux/alpine/publish.sh b/lib/vscode/build/azure-pipelines/linux/alpine/publish.sh deleted file mode 100755 index 2f5647d1ea36..000000000000 --- a/lib/vscode/build/azure-pipelines/linux/alpine/publish.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -set -e -REPO="$(pwd)" -ROOT="$REPO/.." - -PLATFORM_LINUX="linux-alpine" - -# Publish Remote Extension Host -LEGACY_SERVER_BUILD_NAME="vscode-reh-$PLATFORM_LINUX" -SERVER_BUILD_NAME="vscode-server-$PLATFORM_LINUX" -SERVER_TARBALL_FILENAME="vscode-server-$PLATFORM_LINUX.tar.gz" -SERVER_TARBALL_PATH="$ROOT/$SERVER_TARBALL_FILENAME" - -rm -rf $ROOT/vscode-server-*.tar.* -(cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME) - -node build/azure-pipelines/common/createAsset.js "server-$PLATFORM_LINUX" archive-unsigned "$SERVER_TARBALL_FILENAME" "$SERVER_TARBALL_PATH" - -# Publish Remote Extension Host (Web) -LEGACY_SERVER_BUILD_NAME="vscode-reh-web-$PLATFORM_LINUX" -SERVER_BUILD_NAME="vscode-server-$PLATFORM_LINUX-web" -SERVER_TARBALL_FILENAME="vscode-server-$PLATFORM_LINUX-web.tar.gz" -SERVER_TARBALL_PATH="$ROOT/$SERVER_TARBALL_FILENAME" - -rm -rf $ROOT/vscode-server-*-web.tar.* -(cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME) - -node build/azure-pipelines/common/createAsset.js "server-$PLATFORM_LINUX-web" archive-unsigned "$SERVER_TARBALL_FILENAME" "$SERVER_TARBALL_PATH" diff --git a/lib/vscode/build/azure-pipelines/linux/publish.sh b/lib/vscode/build/azure-pipelines/linux/publish.sh deleted file mode 100755 index 6d748c6e340d..000000000000 --- a/lib/vscode/build/azure-pipelines/linux/publish.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env bash -set -e -REPO="$(pwd)" -ROOT="$REPO/.." - -# Publish tarball -PLATFORM_LINUX="linux-$VSCODE_ARCH" -BUILDNAME="VSCode-$PLATFORM_LINUX" -BUILD_VERSION="$(date +%s)" -[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$VSCODE_ARCH-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$VSCODE_ARCH-$BUILD_VERSION.tar.gz" -TARBALL_PATH="$ROOT/$TARBALL_FILENAME" - -rm -rf $ROOT/code-*.tar.* -(cd $ROOT && tar -czf $TARBALL_PATH $BUILDNAME) - -node build/azure-pipelines/common/createAsset.js "$PLATFORM_LINUX" archive-unsigned "$TARBALL_FILENAME" "$TARBALL_PATH" - -# Publish Remote Extension Host -LEGACY_SERVER_BUILD_NAME="vscode-reh-$PLATFORM_LINUX" -SERVER_BUILD_NAME="vscode-server-$PLATFORM_LINUX" -SERVER_TARBALL_FILENAME="vscode-server-$PLATFORM_LINUX.tar.gz" -SERVER_TARBALL_PATH="$ROOT/$SERVER_TARBALL_FILENAME" - -rm -rf $ROOT/vscode-server-*.tar.* -(cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME) - -node build/azure-pipelines/common/createAsset.js "server-$PLATFORM_LINUX" archive-unsigned "$SERVER_TARBALL_FILENAME" "$SERVER_TARBALL_PATH" - -# Publish Remote Extension Host (Web) -LEGACY_SERVER_BUILD_NAME="vscode-reh-web-$PLATFORM_LINUX" -SERVER_BUILD_NAME="vscode-server-$PLATFORM_LINUX-web" -SERVER_TARBALL_FILENAME="vscode-server-$PLATFORM_LINUX-web.tar.gz" -SERVER_TARBALL_PATH="$ROOT/$SERVER_TARBALL_FILENAME" - -rm -rf $ROOT/vscode-server-*-web.tar.* -(cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME) - -node build/azure-pipelines/common/createAsset.js "server-$PLATFORM_LINUX-web" archive-unsigned "$SERVER_TARBALL_FILENAME" "$SERVER_TARBALL_PATH" - -# Publish DEB -case $VSCODE_ARCH in - x64) DEB_ARCH="amd64" ;; - *) DEB_ARCH="$VSCODE_ARCH" ;; -esac - -PLATFORM_DEB="linux-deb-$VSCODE_ARCH" -DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)" -DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME" - -node build/azure-pipelines/common/createAsset.js "$PLATFORM_DEB" package "$DEB_FILENAME" "$DEB_PATH" - -# Publish RPM -case $VSCODE_ARCH in - x64) RPM_ARCH="x86_64" ;; - armhf) RPM_ARCH="armv7hl" ;; - arm64) RPM_ARCH="aarch64" ;; - *) RPM_ARCH="$VSCODE_ARCH" ;; -esac - -PLATFORM_RPM="linux-rpm-$VSCODE_ARCH" -RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)" -RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME" - -node build/azure-pipelines/common/createAsset.js "$PLATFORM_RPM" package "$RPM_FILENAME" "$RPM_PATH" - -# Publish Snap -# Pack snap tarball artifact, in order to preserve file perms -mkdir -p $REPO/.build/linux/snap-tarball -SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-$VSCODE_ARCH.tar.gz" -rm -rf $SNAP_TARBALL_PATH -(cd .build/linux && tar -czf $SNAP_TARBALL_PATH snap) - -# Export DEB_PATH, RPM_PATH -echo "##vso[task.setvariable variable=DEB_PATH]$DEB_PATH" -echo "##vso[task.setvariable variable=RPM_PATH]$RPM_PATH" diff --git a/lib/vscode/build/azure-pipelines/sync-mooncake.yml b/lib/vscode/build/azure-pipelines/sync-mooncake.yml deleted file mode 100644 index 6e379754f2f8..000000000000 --- a/lib/vscode/build/azure-pipelines/sync-mooncake.yml +++ /dev/null @@ -1,24 +0,0 @@ -steps: - - task: NodeTool@0 - inputs: - versionSpec: "14.x" - - - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - inputs: - versionSpec: "1.x" - - - task: AzureKeyVault@1 - displayName: "Azure Key Vault: Get Secrets" - inputs: - azureSubscription: "vscode-builds-subscription" - KeyVaultName: vscode - - - script: | - set -e - - (cd build ; yarn) - - AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \ - AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \ - MOONCAKE_STORAGE_ACCESS_KEY="$(vscode-mooncake-storage-key)" \ - node build/azure-pipelines/common/sync-mooncake.js "$VSCODE_QUALITY" diff --git a/lib/vscode/build/azure-pipelines/web/publish.sh b/lib/vscode/build/azure-pipelines/web/publish.sh deleted file mode 100755 index 827edc2661bf..000000000000 --- a/lib/vscode/build/azure-pipelines/web/publish.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -set -e -REPO="$(pwd)" -ROOT="$REPO/.." - -# Publish Web Client -WEB_BUILD_NAME="vscode-web" -WEB_TARBALL_FILENAME="vscode-web.tar.gz" -WEB_TARBALL_PATH="$ROOT/$WEB_TARBALL_FILENAME" - -rm -rf $ROOT/vscode-web.tar.* - -(cd $ROOT && tar --owner=0 --group=0 -czf $WEB_TARBALL_PATH $WEB_BUILD_NAME) - -node build/azure-pipelines/common/createAsset.js web-standalone archive-unsigned "$WEB_TARBALL_FILENAME" "$WEB_TARBALL_PATH" diff --git a/lib/vscode/build/azure-pipelines/win32/publish.ps1 b/lib/vscode/build/azure-pipelines/win32/publish.ps1 deleted file mode 100644 index a225f9d5fdf9..000000000000 --- a/lib/vscode/build/azure-pipelines/win32/publish.ps1 +++ /dev/null @@ -1,36 +0,0 @@ -. build/azure-pipelines/win32/exec.ps1 -$ErrorActionPreference = "Stop" - -$Arch = "$env:VSCODE_ARCH" - -exec { yarn gulp "vscode-win32-$Arch-archive" "vscode-win32-$Arch-system-setup" "vscode-win32-$Arch-user-setup" --sign } - -$Repo = "$(pwd)" -$Root = "$Repo\.." -$SystemExe = "$Repo\.build\win32-$Arch\system-setup\VSCodeSetup.exe" -$UserExe = "$Repo\.build\win32-$Arch\user-setup\VSCodeSetup.exe" -$Zip = "$Repo\.build\win32-$Arch\archive\VSCode-win32-$Arch.zip" -$LegacyServer = "$Root\vscode-reh-win32-$Arch" -$Server = "$Root\vscode-server-win32-$Arch" -$ServerZip = "$Repo\.build\vscode-server-win32-$Arch.zip" -$Build = "$Root\VSCode-win32-$Arch" - -# Create server archive -if ("$Arch" -ne "arm64") { - exec { xcopy $LegacyServer $Server /H /E /I } - exec { .\node_modules\7zip\7zip-lite\7z.exe a -tzip $ServerZip $Server -r } -} - -# get version -$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json -$Version = $PackageJson.version - -$AssetPlatform = if ("$Arch" -eq "ia32") { "win32" } else { "win32-$Arch" } - -exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform-archive" archive "VSCode-win32-$Arch-$Version.zip" $Zip } -exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform" setup "VSCodeSetup-$Arch-$Version.exe" $SystemExe } -exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform-user" setup "VSCodeUserSetup-$Arch-$Version.exe" $UserExe } - -if ("$Arch" -ne "arm64") { - exec { node build/azure-pipelines/common/createAsset.js "server-$AssetPlatform" archive "vscode-server-win32-$Arch.zip" $ServerZip } -} diff --git a/lib/vscode/build/gulpfile.extensions.js b/lib/vscode/build/gulpfile.extensions.js deleted file mode 100644 index 9312f6c930a2..000000000000 --- a/lib/vscode/build/gulpfile.extensions.js +++ /dev/null @@ -1,391 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -// Increase max listeners for event emitters -require('events').EventEmitter.defaultMaxListeners = 100; - -const gulp = require('gulp'); -const path = require('path'); -const child_process = require('child_process'); -const nodeUtil = require('util'); -const es = require('event-stream'); -const filter = require('gulp-filter'); -const util = require('./lib/util'); -const task = require('./lib/task'); -const watcher = require('./lib/watch'); -const createReporter = require('./lib/reporter').createReporter; -const glob = require('glob'); -const root = path.dirname(__dirname); -const commit = util.getVersion(root); -const plumber = require('gulp-plumber'); -const fancyLog = require('fancy-log'); -const ansiColors = require('ansi-colors'); -const ext = require('./lib/extensions'); - -const extensionsPath = path.join(path.dirname(__dirname), 'extensions'); - -// To save 250ms for each gulp startup, we are caching the result here -// const compilations = glob.sync('**/tsconfig.json', { -// cwd: extensionsPath, -// ignore: ['**/out/**', '**/node_modules/**'] -// }); -const compilations = [ - 'configuration-editing/build/tsconfig.json', - 'configuration-editing/tsconfig.json', - 'css-language-features/client/tsconfig.json', - 'css-language-features/server/tsconfig.json', - 'debug-auto-launch/tsconfig.json', - 'debug-server-ready/tsconfig.json', - 'emmet/tsconfig.json', - 'extension-editing/tsconfig.json', - 'git/tsconfig.json', - 'github-authentication/tsconfig.json', - 'github/tsconfig.json', - 'grunt/tsconfig.json', - 'gulp/tsconfig.json', - 'html-language-features/client/tsconfig.json', - 'html-language-features/server/tsconfig.json', - 'image-preview/tsconfig.json', - 'jake/tsconfig.json', - 'json-language-features/client/tsconfig.json', - 'json-language-features/server/tsconfig.json', - 'markdown-language-features/preview-src/tsconfig.json', - 'markdown-language-features/tsconfig.json', - 'merge-conflict/tsconfig.json', - 'microsoft-authentication/tsconfig.json', - 'npm/tsconfig.json', - 'php-language-features/tsconfig.json', - 'search-result/tsconfig.json', - 'simple-browser/tsconfig.json', - 'testing-editor-contributions/tsconfig.json', - 'typescript-language-features/test-workspace/tsconfig.json', - 'typescript-language-features/tsconfig.json', - 'vscode-api-tests/tsconfig.json', - 'vscode-colorize-tests/tsconfig.json', - 'vscode-custom-editor-tests/tsconfig.json', - 'vscode-notebook-tests/tsconfig.json', - 'vscode-test-resolver/tsconfig.json' -]; - -const getBaseUrl = out => `https://ticino.blob.core.windows.net/sourcemaps/${commit}/${out}`; - -const tasks = compilations.map(function (tsconfigFile) { - const absolutePath = path.join(extensionsPath, tsconfigFile); - const relativeDirname = path.dirname(tsconfigFile); - - const overrideOptions = {}; - overrideOptions.sourceMap = true; - - const name = relativeDirname.replace(/\//g, '-'); - - const root = path.join('extensions', relativeDirname); - const srcBase = path.join(root, 'src'); - const src = path.join(srcBase, '**'); - const srcOpts = { cwd: path.dirname(__dirname), base: srcBase }; - - const out = path.join(root, 'out'); - const baseUrl = getBaseUrl(out); - - let headerId, headerOut; - let index = relativeDirname.indexOf('/'); - if (index < 0) { - headerId = 'vscode.' + relativeDirname; - headerOut = 'out'; - } else { - headerId = 'vscode.' + relativeDirname.substr(0, index); - headerOut = relativeDirname.substr(index + 1) + '/out'; - } - - function createPipeline(build, emitError) { - const nlsDev = require('vscode-nls-dev'); - const tsb = require('gulp-tsb'); - const sourcemaps = require('gulp-sourcemaps'); - - const reporter = createReporter('extensions'); - - overrideOptions.inlineSources = Boolean(build); - overrideOptions.base = path.dirname(absolutePath); - - const compilation = tsb.create(absolutePath, overrideOptions, false, err => reporter(err.toString())); - - const pipeline = function () { - const input = es.through(); - const tsFilter = filter(['**/*.ts', '!**/lib/lib*.d.ts', '!**/node_modules/**'], { restore: true }); - const output = input - .pipe(plumber({ - errorHandler: function (err) { - if (err && !err.__reporter__) { - reporter(err); - } - } - })) - .pipe(tsFilter) - .pipe(util.loadSourcemaps()) - .pipe(compilation()) - .pipe(build ? nlsDev.rewriteLocalizeCalls() : es.through()) - .pipe(build ? util.stripSourceMappingURL() : es.through()) - .pipe(sourcemaps.write('.', { - sourceMappingURL: !build ? null : f => `${baseUrl}/${f.relative}.map`, - addComment: !!build, - includeContent: !!build, - sourceRoot: '../src' - })) - .pipe(tsFilter.restore) - .pipe(build ? nlsDev.bundleMetaDataFiles(headerId, headerOut) : es.through()) - // Filter out *.nls.json file. We needed them only to bundle meta data file. - .pipe(filter(['**', '!**/*.nls.json'])) - .pipe(reporter.end(emitError)); - - return es.duplex(input, output); - }; - - // add src-stream for project files - pipeline.tsProjectSrc = () => { - return compilation.src(srcOpts); - }; - return pipeline; - } - - const cleanTask = task.define(`clean-extension-${name}`, util.rimraf(out)); - - const compileTask = task.define(`compile-extension:${name}`, task.series(cleanTask, () => { - const pipeline = createPipeline(false, true); - const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts'])); - const input = es.merge(nonts, pipeline.tsProjectSrc()); - - return input - .pipe(pipeline()) - .pipe(gulp.dest(out)); - })); - - const watchTask = task.define(`watch-extension:${name}`, task.series(cleanTask, () => { - const pipeline = createPipeline(false); - const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts'])); - const input = es.merge(nonts, pipeline.tsProjectSrc()); - const watchInput = watcher(src, { ...srcOpts, ...{ readDelay: 200 } }); - - return watchInput - .pipe(util.incremental(pipeline, input)) - .pipe(gulp.dest(out)); - })); - - const compileBuildTask = task.define(`compile-build-extension-${name}`, task.series(cleanTask, () => { - const pipeline = createPipeline(true, true); - const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts'])); - const input = es.merge(nonts, pipeline.tsProjectSrc()); - - return input - .pipe(pipeline()) - .pipe(gulp.dest(out)); - })); - - // Tasks - gulp.task(compileTask); - gulp.task(watchTask); - - return { compileTask, watchTask, compileBuildTask }; -}); - -const compileExtensionsTask = task.define('compile-extensions', task.parallel(...tasks.map(t => t.compileTask))); -gulp.task(compileExtensionsTask); -exports.compileExtensionsTask = compileExtensionsTask; - -const watchExtensionsTask = task.define('watch-extensions', task.parallel(...tasks.map(t => t.watchTask))); -gulp.task(watchExtensionsTask); -exports.watchExtensionsTask = watchExtensionsTask; - -const compileExtensionsBuildLegacyTask = task.define('compile-extensions-build-legacy', task.parallel(...tasks.map(t => t.compileBuildTask))); -gulp.task(compileExtensionsBuildLegacyTask); - -//#region Extension media - -// Additional projects to webpack. These typically build code for webviews -const webpackMediaConfigFiles = [ - 'markdown-language-features/webpack.config.js', - 'simple-browser/webpack.config.js', -]; - -// Additional projects to run esbuild on. These typically build code for webviews -const esbuildMediaScripts = [ - 'markdown-language-features/esbuild.js', - 'notebook-markdown-extensions/esbuild.js', -]; - -const compileExtensionMediaTask = task.define('compile-extension-media', () => buildExtensionMedia(false)); -gulp.task(compileExtensionMediaTask); -exports.compileExtensionMediaTask = compileExtensionMediaTask; - -const watchExtensionMedia = task.define('watch-extension-media', () => buildExtensionMedia(true)); -gulp.task(watchExtensionMedia); -exports.watchExtensionMedia = watchExtensionMedia; - -const compileExtensionMediaBuildTask = task.define('compile-extension-media-build', () => buildExtensionMedia(false, '.build/extensions')); -gulp.task(compileExtensionMediaBuildTask); - -async function buildExtensionMedia(isWatch, outputRoot) { - const webpackConfigLocations = webpackMediaConfigFiles.map(p => { - return { - configPath: path.join(extensionsPath, p), - outputRoot: outputRoot ? path.join(root, outputRoot, path.dirname(p)) : undefined - }; - }); - return Promise.all([ - webpackExtensions('webpacking extension media', isWatch, webpackConfigLocations), - esbuildExtensions('esbuilding extension media', isWatch, esbuildMediaScripts.map(p => ({ - script: path.join(extensionsPath, p), - outputRoot: outputRoot ? path.join(root, outputRoot, path.dirname(p)) : undefined - }))), - ]); -} - -//#endregion - -//#region Azure Pipelines - -const cleanExtensionsBuildTask = task.define('clean-extensions-build', util.rimraf('.build/extensions')); -const compileExtensionsBuildTask = task.define('compile-extensions-build', task.series( - cleanExtensionsBuildTask, - task.define('bundle-extensions-build', () => ext.packageLocalExtensionsStream(false).pipe(gulp.dest('.build'))), - task.define('bundle-marketplace-extensions-build', () => ext.packageMarketplaceExtensionsStream(false).pipe(gulp.dest('.build'))), -)); - -gulp.task(compileExtensionsBuildTask); -gulp.task(task.define('extensions-ci', task.series(compileExtensionsBuildTask, compileExtensionMediaBuildTask))); - -exports.compileExtensionsBuildTask = compileExtensionsBuildTask; - -//#endregion - -const compileWebExtensionsTask = task.define('compile-web', () => buildWebExtensions(false)); -gulp.task(compileWebExtensionsTask); -exports.compileWebExtensionsTask = compileWebExtensionsTask; - -const watchWebExtensionsTask = task.define('watch-web', () => buildWebExtensions(true)); -gulp.task(watchWebExtensionsTask); -exports.watchWebExtensionsTask = watchWebExtensionsTask; - -async function buildWebExtensions(isWatch) { - const webpackConfigLocations = await nodeUtil.promisify(glob)( - path.join(extensionsPath, '**', 'extension-browser.webpack.config.js'), - { ignore: ['**/node_modules'] } - ); - return webpackExtensions('packaging web extension', isWatch, webpackConfigLocations.map(configPath => ({ configPath }))); -} - -/** - * @param {string} taskName - * @param {boolean} isWatch - * @param {{ configPath: string, outputRoot?: boolean}} webpackConfigLocations - */ -async function webpackExtensions(taskName, isWatch, webpackConfigLocations) { - const webpack = require('webpack'); - - const webpackConfigs = []; - - for (const { configPath, outputRoot } of webpackConfigLocations) { - const configOrFnOrArray = require(configPath); - function addConfig(configOrFn) { - let config; - if (typeof configOrFn === 'function') { - config = configOrFn({}, {}); - webpackConfigs.push(config); - } else { - config = configOrFn; - } - - if (outputRoot) { - config.output.path = path.join(outputRoot, path.relative(path.dirname(configPath), config.output.path)); - } - - webpackConfigs.push(configOrFn); - } - addConfig(configOrFnOrArray); - } - function reporter(fullStats) { - if (Array.isArray(fullStats.children)) { - for (const stats of fullStats.children) { - const outputPath = stats.outputPath; - if (outputPath) { - const relativePath = path.relative(extensionsPath, outputPath).replace(/\\/g, '/'); - const match = relativePath.match(/[^\/]+(\/server|\/client)?/); - fancyLog(`Finished ${ansiColors.green(taskName)} ${ansiColors.cyan(match[0])} with ${stats.errors.length} errors.`); - } - if (Array.isArray(stats.errors)) { - stats.errors.forEach(error => { - fancyLog.error(error); - }); - } - if (Array.isArray(stats.warnings)) { - stats.warnings.forEach(warning => { - fancyLog.warn(warning); - }); - } - } - } - } - return new Promise((resolve, reject) => { - if (isWatch) { - webpack(webpackConfigs).watch({}, (err, stats) => { - if (err) { - reject(); - } else { - reporter(stats.toJson()); - } - }); - } else { - webpack(webpackConfigs).run((err, stats) => { - if (err) { - fancyLog.error(err); - reject(); - } else { - reporter(stats.toJson()); - resolve(); - } - }); - } - }); -} - -/** - * @param {string} taskName - * @param {boolean} isWatch - * @param {{ script: string, outputRoot?: string }}} scripts - */ -async function esbuildExtensions(taskName, isWatch, scripts) { - function reporter(/** @type {string} */ stdError, /** @type {string} */script) { - const matches = (stdError || '').match(/\> (.+): error: (.+)?/g); - fancyLog(`Finished ${ansiColors.green(taskName)} ${script} with ${matches ? matches.length : 0} errors.`); - for (const match of matches || []) { - fancyLog.error(match); - } - } - - const tasks = scripts.map(({ script, outputRoot }) => { - return new Promise((resolve, reject) => { - const args = [script]; - if (isWatch) { - args.push('--watch'); - } - if (outputRoot) { - args.push('--outputRoot', outputRoot); - } - const proc = child_process.execFile(process.argv[0], args, {}, (error, _stdout, stderr) => { - if (error) { - return reject(error); - } - reporter(stderr, script); - if (stderr) { - return reject(); - } - return resolve(); - }); - - proc.stdout.on('data', (data) => { - fancyLog(`${ansiColors.green(taskName)}: ${data.toString('utf8')}`); - }); - }); - }); - return Promise.all(tasks); -} diff --git a/lib/vscode/build/lib/extensions.js b/lib/vscode/build/lib/extensions.js deleted file mode 100644 index b25c3713ea83..000000000000 --- a/lib/vscode/build/lib/extensions.js +++ /dev/null @@ -1,330 +0,0 @@ -"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.translatePackageJSON = exports.scanBuiltinExtensions = exports.packageMarketplaceExtensionsStream = exports.packageLocalExtensionsStream = exports.fromMarketplace = void 0; -const es = require("event-stream"); -const fs = require("fs"); -const glob = require("glob"); -const gulp = require("gulp"); -const path = require("path"); -const File = require("vinyl"); -const stats_1 = require("./stats"); -const util2 = require("./util"); -const vzip = require('gulp-vinyl-zip'); -const filter = require("gulp-filter"); -const rename = require("gulp-rename"); -const fancyLog = require("fancy-log"); -const ansiColors = require("ansi-colors"); -const buffer = require('gulp-buffer'); -const jsoncParser = require("jsonc-parser"); -const util = require('./util'); -const root = path.dirname(path.dirname(__dirname)); -const commit = util.getVersion(root); -const sourceMappingURLBase = `https://ticino.blob.core.windows.net/sourcemaps/${commit}`; -function minifyExtensionResources(input) { - const jsonFilter = filter(['**/*.json', '**/*.code-snippets'], { restore: true }); - return input - .pipe(jsonFilter) - .pipe(buffer()) - .pipe(es.mapSync((f) => { - const errors = []; - const value = jsoncParser.parse(f.contents.toString('utf8'), errors); - if (errors.length === 0) { - // file parsed OK => just stringify to drop whitespace and comments - f.contents = Buffer.from(JSON.stringify(value)); - } - return f; - })) - .pipe(jsonFilter.restore); -} -function updateExtensionPackageJSON(input, update) { - const packageJsonFilter = filter('extensions/*/package.json', { restore: true }); - return input - .pipe(packageJsonFilter) - .pipe(buffer()) - .pipe(es.mapSync((f) => { - const data = JSON.parse(f.contents.toString('utf8')); - f.contents = Buffer.from(JSON.stringify(update(data))); - return f; - })) - .pipe(packageJsonFilter.restore); -} -function fromLocal(extensionPath, forWeb) { - const webpackConfigFileName = forWeb ? 'extension-browser.webpack.config.js' : 'extension.webpack.config.js'; - const isWebPacked = fs.existsSync(path.join(extensionPath, webpackConfigFileName)); - let input = isWebPacked - ? fromLocalWebpack(extensionPath, webpackConfigFileName) - : fromLocalNormal(extensionPath); - if (isWebPacked) { - input = updateExtensionPackageJSON(input, (data) => { - delete data.scripts; - delete data.dependencies; - delete data.devDependencies; - if (data.main) { - data.main = data.main.replace('/out/', /dist/); - } - return data; - }); - } - return input; -} -function fromLocalWebpack(extensionPath, webpackConfigFileName) { - const result = es.through(); - const packagedDependencies = []; - const packageJsonConfig = require(path.join(extensionPath, 'package.json')); - if (packageJsonConfig.dependencies) { - const webpackRootConfig = require(path.join(extensionPath, webpackConfigFileName)); - for (const key in webpackRootConfig.externals) { - if (key in packageJsonConfig.dependencies) { - packagedDependencies.push(key); - } - } - } - const vsce = require('vsce'); - const webpack = require('webpack'); - const webpackGulp = require('webpack-stream'); - vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Yarn, packagedDependencies }).then(fileNames => { - const files = fileNames - .map(fileName => path.join(extensionPath, fileName)) - .map(filePath => new File({ - path: filePath, - stat: fs.statSync(filePath), - base: extensionPath, - contents: fs.createReadStream(filePath) - })); - // check for a webpack configuration files, then invoke webpack - // and merge its output with the files stream. - const webpackConfigLocations = glob.sync(path.join(extensionPath, '**', webpackConfigFileName), { ignore: ['**/node_modules'] }); - const webpackStreams = webpackConfigLocations.map(webpackConfigPath => { - const webpackDone = (err, stats) => { - fancyLog(`Bundled extension: ${ansiColors.yellow(path.join(path.basename(extensionPath), path.relative(extensionPath, webpackConfigPath)))}...`); - if (err) { - result.emit('error', err); - } - const { compilation } = stats; - if (compilation.errors.length > 0) { - result.emit('error', compilation.errors.join('\n')); - } - if (compilation.warnings.length > 0) { - result.emit('error', compilation.warnings.join('\n')); - } - }; - const webpackConfig = Object.assign(Object.assign({}, require(webpackConfigPath)), { mode: 'production' }); - const relativeOutputPath = path.relative(extensionPath, webpackConfig.output.path); - return webpackGulp(webpackConfig, webpack, webpackDone) - .pipe(es.through(function (data) { - data.stat = data.stat || {}; - data.base = extensionPath; - this.emit('data', data); - })) - .pipe(es.through(function (data) { - // source map handling: - // * rewrite sourceMappingURL - // * save to disk so that upload-task picks this up - const contents = data.contents.toString('utf8'); - data.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, function (_m, g1) { - return `\n//# sourceMappingURL=${sourceMappingURLBase}/extensions/${path.basename(extensionPath)}/${relativeOutputPath}/${g1}`; - }), 'utf8'); - this.emit('data', data); - })); - }); - es.merge(...webpackStreams, es.readArray(files)) - // .pipe(es.through(function (data) { - // // debug - // console.log('out', data.path, data.contents.length); - // this.emit('data', data); - // })) - .pipe(result); - }).catch(err => { - console.error(extensionPath); - console.error(packagedDependencies); - result.emit('error', err); - }); - return result.pipe(stats_1.createStatsStream(path.basename(extensionPath))); -} -function fromLocalNormal(extensionPath) { - const result = es.through(); - const vsce = require('vsce'); - vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Yarn }) - .then(fileNames => { - const files = fileNames - .map(fileName => path.join(extensionPath, fileName)) - .map(filePath => new File({ - path: filePath, - stat: fs.statSync(filePath), - base: extensionPath, - contents: fs.createReadStream(filePath) - })); - es.readArray(files).pipe(result); - }) - .catch(err => result.emit('error', err)); - return result.pipe(stats_1.createStatsStream(path.basename(extensionPath))); -} -const baseHeaders = { - 'X-Market-Client-Id': 'VSCode Build', - 'User-Agent': 'VSCode Build', - 'X-Market-User-Id': '291C1CD0-051A-4123-9B4B-30D60EF52EE2', -}; -function fromMarketplace(extensionName, version, metadata) { - const remote = require('gulp-remote-retry-src'); - const json = require('gulp-json-editor'); - const [publisher, name] = extensionName.split('.'); - const url = `https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${publisher}/vsextensions/${name}/${version}/vspackage`; - fancyLog('Downloading extension:', ansiColors.yellow(`${extensionName}@${version}`), '...'); - const options = { - base: url, - requestOptions: { - gzip: true, - headers: baseHeaders - } - }; - const packageJsonFilter = filter('package.json', { restore: true }); - return remote('', options) - .pipe(vzip.src()) - .pipe(filter('extension/**')) - .pipe(rename(p => p.dirname = p.dirname.replace(/^extension\/?/, ''))) - .pipe(packageJsonFilter) - .pipe(buffer()) - .pipe(json({ __metadata: metadata })) - .pipe(packageJsonFilter.restore); -} -exports.fromMarketplace = fromMarketplace; -const excludedExtensions = [ - 'vscode-api-tests', - 'vscode-colorize-tests', - 'vscode-test-resolver', - 'ms-vscode.node-debug', - 'ms-vscode.node-debug2', - 'vscode-notebook-tests', - 'vscode-custom-editor-tests', -]; -const marketplaceWebExtensionsExclude = new Set([ - 'ms-vscode.node-debug', - 'ms-vscode.node-debug2', - 'ms-vscode.js-debug-companion', - 'ms-vscode.js-debug', - 'ms-vscode.vscode-js-profile-table' -]); -const productJson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')); -const builtInExtensions = productJson.builtInExtensions || []; -const webBuiltInExtensions = productJson.webBuiltInExtensions || []; -/** - * Loosely based on `getExtensionKind` from `src/vs/workbench/services/extensions/common/extensionsUtil.ts` - */ -function isWebExtension(manifest) { - if (typeof manifest.extensionKind !== 'undefined') { - const extensionKind = Array.isArray(manifest.extensionKind) ? manifest.extensionKind : [manifest.extensionKind]; - return (extensionKind.indexOf('web') >= 0); - } - return (!Boolean(manifest.main) || Boolean(manifest.browser)); -} -function packageLocalExtensionsStream(forWeb) { - const localExtensionsDescriptions = (glob.sync('extensions/*/package.json') - .map(manifestPath => { - const absoluteManifestPath = path.join(root, manifestPath); - const extensionPath = path.dirname(path.join(root, manifestPath)); - const extensionName = path.basename(extensionPath); - return { name: extensionName, path: extensionPath, manifestPath: absoluteManifestPath }; - }) - .filter(({ name }) => excludedExtensions.indexOf(name) === -1) - .filter(({ name }) => builtInExtensions.every(b => b.name !== name)) - .filter(({ manifestPath }) => (forWeb ? isWebExtension(require(manifestPath)) : true))); - const localExtensionsStream = minifyExtensionResources(es.merge(...localExtensionsDescriptions.map(extension => { - return fromLocal(extension.path, forWeb) - .pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`)); - }))); - let result; - if (forWeb) { - result = localExtensionsStream; - } - else { - // also include shared node modules - result = es.merge(localExtensionsStream, gulp.src('extensions/node_modules/**', { base: '.' })); - } - return (result - .pipe(util2.setExecutableBit(['**/*.sh']))); -} -exports.packageLocalExtensionsStream = packageLocalExtensionsStream; -function packageMarketplaceExtensionsStream(forWeb) { - const marketplaceExtensionsDescriptions = [ - ...builtInExtensions.filter(({ name }) => (forWeb ? !marketplaceWebExtensionsExclude.has(name) : true)), - ...(forWeb ? webBuiltInExtensions : []) - ]; - const marketplaceExtensionsStream = minifyExtensionResources(es.merge(...marketplaceExtensionsDescriptions - .map(extension => { - const input = fromMarketplace(extension.name, extension.version, extension.metadata) - .pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`)); - return updateExtensionPackageJSON(input, (data) => { - delete data.scripts; - delete data.dependencies; - delete data.devDependencies; - return data; - }); - }))); - return (marketplaceExtensionsStream - .pipe(util2.setExecutableBit(['**/*.sh']))); -} -exports.packageMarketplaceExtensionsStream = packageMarketplaceExtensionsStream; -function scanBuiltinExtensions(extensionsRoot, exclude = []) { - const scannedExtensions = []; - try { - const extensionsFolders = fs.readdirSync(extensionsRoot); - for (const extensionFolder of extensionsFolders) { - if (exclude.indexOf(extensionFolder) >= 0) { - continue; - } - const packageJSONPath = path.join(extensionsRoot, extensionFolder, 'package.json'); - if (!fs.existsSync(packageJSONPath)) { - continue; - } - let packageJSON = JSON.parse(fs.readFileSync(packageJSONPath).toString('utf8')); - if (!isWebExtension(packageJSON)) { - continue; - } - const children = fs.readdirSync(path.join(extensionsRoot, extensionFolder)); - const packageNLSPath = children.filter(child => child === 'package.nls.json')[0]; - const packageNLS = packageNLSPath ? JSON.parse(fs.readFileSync(path.join(extensionsRoot, extensionFolder, packageNLSPath)).toString()) : undefined; - const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0]; - const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0]; - scannedExtensions.push({ - extensionPath: extensionFolder, - packageJSON, - packageNLS, - readmePath: readme ? path.join(extensionFolder, readme) : undefined, - changelogPath: changelog ? path.join(extensionFolder, changelog) : undefined, - }); - } - return scannedExtensions; - } - catch (ex) { - return scannedExtensions; - } -} -exports.scanBuiltinExtensions = scanBuiltinExtensions; -function translatePackageJSON(packageJSON, packageNLSPath) { - const CharCode_PC = '%'.charCodeAt(0); - const packageNls = JSON.parse(fs.readFileSync(packageNLSPath).toString()); - const translate = (obj) => { - for (let key in obj) { - const val = obj[key]; - if (Array.isArray(val)) { - val.forEach(translate); - } - else if (val && typeof val === 'object') { - translate(val); - } - else if (typeof val === 'string' && val.charCodeAt(0) === CharCode_PC && val.charCodeAt(val.length - 1) === CharCode_PC) { - const translated = packageNls[val.substr(1, val.length - 2)]; - if (translated) { - obj[key] = translated; - } - } - } - }; - translate(packageJSON); - return packageJSON; -} -exports.translatePackageJSON = translatePackageJSON; diff --git a/lib/vscode/build/lib/extensions.ts b/lib/vscode/build/lib/extensions.ts deleted file mode 100644 index ec5c7d03b101..000000000000 --- a/lib/vscode/build/lib/extensions.ts +++ /dev/null @@ -1,405 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as es from 'event-stream'; -import * as fs from 'fs'; -import * as glob from 'glob'; -import * as gulp from 'gulp'; -import * as path from 'path'; -import { Stream } from 'stream'; -import * as File from 'vinyl'; -import { createStatsStream } from './stats'; -import * as util2 from './util'; -const vzip = require('gulp-vinyl-zip'); -import filter = require('gulp-filter'); -import rename = require('gulp-rename'); -import * as fancyLog from 'fancy-log'; -import * as ansiColors from 'ansi-colors'; -const buffer = require('gulp-buffer'); -import * as jsoncParser from 'jsonc-parser'; -const util = require('./util'); -const root = path.dirname(path.dirname(__dirname)); -const commit = util.getVersion(root); -const sourceMappingURLBase = `https://ticino.blob.core.windows.net/sourcemaps/${commit}`; - -function minifyExtensionResources(input: Stream): Stream { - const jsonFilter = filter(['**/*.json', '**/*.code-snippets'], { restore: true }); - return input - .pipe(jsonFilter) - .pipe(buffer()) - .pipe(es.mapSync((f: File) => { - const errors: jsoncParser.ParseError[] = []; - const value = jsoncParser.parse(f.contents.toString('utf8'), errors); - if (errors.length === 0) { - // file parsed OK => just stringify to drop whitespace and comments - f.contents = Buffer.from(JSON.stringify(value)); - } - return f; - })) - .pipe(jsonFilter.restore); -} - -function updateExtensionPackageJSON(input: Stream, update: (data: any) => any): Stream { - const packageJsonFilter = filter('extensions/*/package.json', { restore: true }); - return input - .pipe(packageJsonFilter) - .pipe(buffer()) - .pipe(es.mapSync((f: File) => { - const data = JSON.parse(f.contents.toString('utf8')); - f.contents = Buffer.from(JSON.stringify(update(data))); - return f; - })) - .pipe(packageJsonFilter.restore); -} - -function fromLocal(extensionPath: string, forWeb: boolean): Stream { - const webpackConfigFileName = forWeb ? 'extension-browser.webpack.config.js' : 'extension.webpack.config.js'; - - const isWebPacked = fs.existsSync(path.join(extensionPath, webpackConfigFileName)); - let input = isWebPacked - ? fromLocalWebpack(extensionPath, webpackConfigFileName) - : fromLocalNormal(extensionPath); - - if (isWebPacked) { - input = updateExtensionPackageJSON(input, (data: any) => { - delete data.scripts; - // https://github.com/cdr/code-server/pull/2041#issuecomment-685910322 - delete data.devDependencies; - if (data.main) { - data.main = data.main.replace('/out/', /dist/); - } - return data; - }); - } - - return input; -} - - -function fromLocalWebpack(extensionPath: string, webpackConfigFileName: string): Stream { - const result = es.through(); - - const packagedDependencies: string[] = []; - const packageJsonConfig = require(path.join(extensionPath, 'package.json')); - if (packageJsonConfig.dependencies) { - const webpackRootConfig = require(path.join(extensionPath, webpackConfigFileName)); - for (const key in webpackRootConfig.externals) { - if (key in packageJsonConfig.dependencies) { - packagedDependencies.push(key); - } - } - } - - const vsce = require('vsce') as typeof import('vsce'); - const webpack = require('webpack'); - const webpackGulp = require('webpack-stream'); - - vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Yarn, packagedDependencies }).then(fileNames => { - const files = fileNames - .map(fileName => path.join(extensionPath, fileName)) - .map(filePath => new File({ - path: filePath, - stat: fs.statSync(filePath), - base: extensionPath, - contents: fs.createReadStream(filePath) as any - })); - - // check for a webpack configuration files, then invoke webpack - // and merge its output with the files stream. - const webpackConfigLocations = (glob.sync( - path.join(extensionPath, '**', webpackConfigFileName), - { ignore: ['**/node_modules'] } - )); - - const webpackStreams = webpackConfigLocations.map(webpackConfigPath => { - - const webpackDone = (err: any, stats: any) => { - fancyLog(`Bundled extension: ${ansiColors.yellow(path.join(path.basename(extensionPath), path.relative(extensionPath, webpackConfigPath)))}...`); - if (err) { - result.emit('error', err); - } - const { compilation } = stats; - if (compilation.errors.length > 0) { - result.emit('error', compilation.errors.join('\n')); - } - if (compilation.warnings.length > 0) { - result.emit('error', compilation.warnings.join('\n')); - } - }; - - const webpackConfig = { - ...require(webpackConfigPath), - ...{ mode: 'production' } - }; - const relativeOutputPath = path.relative(extensionPath, webpackConfig.output.path); - - return webpackGulp(webpackConfig, webpack, webpackDone) - .pipe(es.through(function (data) { - data.stat = data.stat || {}; - data.base = extensionPath; - this.emit('data', data); - })) - .pipe(es.through(function (data: File) { - // source map handling: - // * rewrite sourceMappingURL - // * save to disk so that upload-task picks this up - const contents = (data.contents).toString('utf8'); - data.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, function (_m, g1) { - return `\n//# sourceMappingURL=${sourceMappingURLBase}/extensions/${path.basename(extensionPath)}/${relativeOutputPath}/${g1}`; - }), 'utf8'); - - this.emit('data', data); - })); - }); - - es.merge(...webpackStreams, es.readArray(files)) - // .pipe(es.through(function (data) { - // // debug - // console.log('out', data.path, data.contents.length); - // this.emit('data', data); - // })) - .pipe(result); - - }).catch(err => { - console.error(extensionPath); - console.error(packagedDependencies); - result.emit('error', err); - }); - - return result.pipe(createStatsStream(path.basename(extensionPath))); -} - -function fromLocalNormal(extensionPath: string): Stream { - const result = es.through(); - - const vsce = require('vsce') as typeof import('vsce'); - - vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Yarn }) - .then(fileNames => { - const files = fileNames - .map(fileName => path.join(extensionPath, fileName)) - .map(filePath => new File({ - path: filePath, - stat: fs.statSync(filePath), - base: extensionPath, - contents: fs.createReadStream(filePath) as any - })); - - es.readArray(files).pipe(result); - }) - .catch(err => result.emit('error', err)); - - return result.pipe(createStatsStream(path.basename(extensionPath))); -} - -const baseHeaders = { - 'X-Market-Client-Id': 'VSCode Build', - 'User-Agent': 'VSCode Build', - 'X-Market-User-Id': '291C1CD0-051A-4123-9B4B-30D60EF52EE2', -}; - -export function fromMarketplace(extensionName: string, version: string, metadata: any): Stream { - const remote = require('gulp-remote-retry-src'); - const json = require('gulp-json-editor') as typeof import('gulp-json-editor'); - - const [publisher, name] = extensionName.split('.'); - const url = `https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${publisher}/vsextensions/${name}/${version}/vspackage`; - - fancyLog('Downloading extension:', ansiColors.yellow(`${extensionName}@${version}`), '...'); - - const options = { - base: url, - requestOptions: { - gzip: true, - headers: baseHeaders - } - }; - - const packageJsonFilter = filter('package.json', { restore: true }); - - return remote('', options) - .pipe(vzip.src()) - .pipe(filter('extension/**')) - .pipe(rename(p => p.dirname = p.dirname!.replace(/^extension\/?/, ''))) - .pipe(packageJsonFilter) - .pipe(buffer()) - .pipe(json({ __metadata: metadata })) - .pipe(packageJsonFilter.restore); -} -const excludedExtensions = [ - 'vscode-api-tests', - 'vscode-colorize-tests', - 'vscode-test-resolver', - 'ms-vscode.node-debug', - 'ms-vscode.node-debug2', - 'vscode-notebook-tests', - 'vscode-custom-editor-tests', -]; - -const marketplaceWebExtensionsExclude = new Set([ - 'ms-vscode.node-debug', - 'ms-vscode.node-debug2', - 'ms-vscode.js-debug-companion', - 'ms-vscode.js-debug', - 'ms-vscode.vscode-js-profile-table' -]); - -interface IBuiltInExtension { - name: string; - version: string; - repo: string; - metadata: any; -} - -const productJson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')); -const builtInExtensions: IBuiltInExtension[] = productJson.builtInExtensions || []; -const webBuiltInExtensions: IBuiltInExtension[] = productJson.webBuiltInExtensions || []; - -type ExtensionKind = 'ui' | 'workspace' | 'web'; -interface IExtensionManifest { - main: string; - browser: string; - extensionKind?: ExtensionKind | ExtensionKind[]; -} -/** - * Loosely based on `getExtensionKind` from `src/vs/workbench/services/extensions/common/extensionsUtil.ts` - */ -function isWebExtension(manifest: IExtensionManifest): boolean { - if (typeof manifest.extensionKind !== 'undefined') { - const extensionKind = Array.isArray(manifest.extensionKind) ? manifest.extensionKind : [manifest.extensionKind]; - return (extensionKind.indexOf('web') >= 0); - } - return (!Boolean(manifest.main) || Boolean(manifest.browser)); -} - -export function packageLocalExtensionsStream(forWeb: boolean): Stream { - const localExtensionsDescriptions = ( - (glob.sync('extensions/*/package.json')) - .map(manifestPath => { - const absoluteManifestPath = path.join(root, manifestPath); - const extensionPath = path.dirname(path.join(root, manifestPath)); - const extensionName = path.basename(extensionPath); - return { name: extensionName, path: extensionPath, manifestPath: absoluteManifestPath }; - }) - .filter(({ name }) => excludedExtensions.indexOf(name) === -1) - .filter(({ name }) => builtInExtensions.every(b => b.name !== name)) - .filter(({ manifestPath }) => (forWeb ? isWebExtension(require(manifestPath)) : true)) - ); - const localExtensionsStream = minifyExtensionResources( - es.merge( - ...localExtensionsDescriptions.map(extension => { - return fromLocal(extension.path, forWeb) - .pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`)); - }) - ) - ); - - let result: Stream; - if (forWeb) { - result = localExtensionsStream; - } else { - // also include shared node modules - result = es.merge(localExtensionsStream, gulp.src('extensions/node_modules/**', { base: '.' })); - } - - return ( - result - .pipe(util2.setExecutableBit(['**/*.sh'])) - ); -} - -export function packageMarketplaceExtensionsStream(forWeb: boolean): Stream { - const marketplaceExtensionsDescriptions = [ - ...builtInExtensions.filter(({ name }) => (forWeb ? !marketplaceWebExtensionsExclude.has(name) : true)), - ...(forWeb ? webBuiltInExtensions : []) - ]; - const marketplaceExtensionsStream = minifyExtensionResources( - es.merge( - ...marketplaceExtensionsDescriptions - .map(extension => { - const input = fromMarketplace(extension.name, extension.version, extension.metadata) - .pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`)); - return updateExtensionPackageJSON(input, (data: any) => { - delete data.scripts; - delete data.dependencies; - delete data.devDependencies; - return data; - }); - }) - ) - ); - - return ( - marketplaceExtensionsStream - .pipe(util2.setExecutableBit(['**/*.sh'])) - ); -} - -export interface IScannedBuiltinExtension { - extensionPath: string; - packageJSON: any; - packageNLS?: any; - readmePath?: string; - changelogPath?: string; -} - -export function scanBuiltinExtensions(extensionsRoot: string, exclude: string[] = []): IScannedBuiltinExtension[] { - const scannedExtensions: IScannedBuiltinExtension[] = []; - - try { - const extensionsFolders = fs.readdirSync(extensionsRoot); - for (const extensionFolder of extensionsFolders) { - if (exclude.indexOf(extensionFolder) >= 0) { - continue; - } - const packageJSONPath = path.join(extensionsRoot, extensionFolder, 'package.json'); - if (!fs.existsSync(packageJSONPath)) { - continue; - } - let packageJSON = JSON.parse(fs.readFileSync(packageJSONPath).toString('utf8')); - if (!isWebExtension(packageJSON)) { - continue; - } - const children = fs.readdirSync(path.join(extensionsRoot, extensionFolder)); - const packageNLSPath = children.filter(child => child === 'package.nls.json')[0]; - const packageNLS = packageNLSPath ? JSON.parse(fs.readFileSync(path.join(extensionsRoot, extensionFolder, packageNLSPath)).toString()) : undefined; - const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0]; - const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0]; - - scannedExtensions.push({ - extensionPath: extensionFolder, - packageJSON, - packageNLS, - readmePath: readme ? path.join(extensionFolder, readme) : undefined, - changelogPath: changelog ? path.join(extensionFolder, changelog) : undefined, - }); - } - return scannedExtensions; - } catch (ex) { - return scannedExtensions; - } -} - -export function translatePackageJSON(packageJSON: string, packageNLSPath: string) { - const CharCode_PC = '%'.charCodeAt(0); - const packageNls = JSON.parse(fs.readFileSync(packageNLSPath).toString()); - const translate = (obj: any) => { - for (let key in obj) { - const val = obj[key]; - if (Array.isArray(val)) { - val.forEach(translate); - } else if (val && typeof val === 'object') { - translate(val); - } else if (typeof val === 'string' && val.charCodeAt(0) === CharCode_PC && val.charCodeAt(val.length - 1) === CharCode_PC) { - const translated = packageNls[val.substr(1, val.length - 2)]; - if (translated) { - obj[key] = translated; - } - } - } - }; - translate(packageJSON); - return packageJSON; -} diff --git a/lib/vscode/build/lib/i18n.js b/lib/vscode/build/lib/i18n.js deleted file mode 100644 index 50ec3f3f45a0..000000000000 --- a/lib/vscode/build/lib/i18n.js +++ /dev/null @@ -1,1204 +0,0 @@ -"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.prepareIslFiles = exports.prepareI18nPackFiles = exports.pullI18nPackFiles = exports.prepareI18nFiles = exports.pullSetupXlfFiles = exports.pullCoreAndExtensionsXlfFiles = exports.findObsoleteResources = exports.pushXlfFiles = exports.createXlfFilesForIsl = exports.createXlfFilesForExtensions = exports.createXlfFilesForCoreBundle = exports.getResource = exports.processNlsFiles = exports.Limiter = exports.XLF = exports.Line = exports.externalExtensionsWithTranslations = exports.extraLanguages = exports.defaultLanguages = void 0; -const path = require("path"); -const fs = require("fs"); -const event_stream_1 = require("event-stream"); -const File = require("vinyl"); -const Is = require("is"); -const xml2js = require("xml2js"); -const glob = require("glob"); -const https = require("https"); -const gulp = require("gulp"); -const fancyLog = require("fancy-log"); -const ansiColors = require("ansi-colors"); -const iconv = require("iconv-lite-umd"); -const NUMBER_OF_CONCURRENT_DOWNLOADS = 4; -function log(message, ...rest) { - fancyLog(ansiColors.green('[i18n]'), message, ...rest); -} -exports.defaultLanguages = [ - { id: 'zh-tw', folderName: 'cht', translationId: 'zh-hant' }, - { id: 'zh-cn', folderName: 'chs', translationId: 'zh-hans' }, - { id: 'ja', folderName: 'jpn' }, - { id: 'ko', folderName: 'kor' }, - { id: 'de', folderName: 'deu' }, - { id: 'fr', folderName: 'fra' }, - { id: 'es', folderName: 'esn' }, - { id: 'ru', folderName: 'rus' }, - { id: 'it', folderName: 'ita' } -]; -// languages requested by the community to non-stable builds -exports.extraLanguages = [ - { id: 'pt-br', folderName: 'ptb' }, - { id: 'hu', folderName: 'hun' }, - { id: 'tr', folderName: 'trk' } -]; -// non built-in extensions also that are transifex and need to be part of the language packs -exports.externalExtensionsWithTranslations = { - 'vscode-chrome-debug': 'msjsdiag.debugger-for-chrome', - 'vscode-node-debug': 'ms-vscode.node-debug', - 'vscode-node-debug2': 'ms-vscode.node-debug2' -}; -var LocalizeInfo; -(function (LocalizeInfo) { - function is(value) { - let candidate = value; - return Is.defined(candidate) && Is.string(candidate.key) && (Is.undef(candidate.comment) || (Is.array(candidate.comment) && candidate.comment.every(element => Is.string(element)))); - } - LocalizeInfo.is = is; -})(LocalizeInfo || (LocalizeInfo = {})); -var BundledFormat; -(function (BundledFormat) { - function is(value) { - if (Is.undef(value)) { - return false; - } - let candidate = value; - let length = Object.keys(value).length; - return length === 3 && Is.defined(candidate.keys) && Is.defined(candidate.messages) && Is.defined(candidate.bundles); - } - BundledFormat.is = is; -})(BundledFormat || (BundledFormat = {})); -var PackageJsonFormat; -(function (PackageJsonFormat) { - function is(value) { - if (Is.undef(value) || !Is.object(value)) { - return false; - } - return Object.keys(value).every(key => { - let element = value[key]; - return Is.string(element) || (Is.object(element) && Is.defined(element.message) && Is.defined(element.comment)); - }); - } - PackageJsonFormat.is = is; -})(PackageJsonFormat || (PackageJsonFormat = {})); -class Line { - constructor(indent = 0) { - this.buffer = []; - if (indent > 0) { - this.buffer.push(new Array(indent + 1).join(' ')); - } - } - append(value) { - this.buffer.push(value); - return this; - } - toString() { - return this.buffer.join(''); - } -} -exports.Line = Line; -class TextModel { - constructor(contents) { - this._lines = contents.split(/\r\n|\r|\n/); - } - get lines() { - return this._lines; - } -} -class XLF { - constructor(project) { - this.project = project; - this.buffer = []; - this.files = Object.create(null); - this.numberOfMessages = 0; - } - toString() { - this.appendHeader(); - for (let file in this.files) { - this.appendNewLine(``, 2); - for (let item of this.files[file]) { - this.addStringItem(file, item); - } - this.appendNewLine('', 2); - } - this.appendFooter(); - return this.buffer.join('\r\n'); - } - addFile(original, keys, messages) { - if (keys.length === 0) { - console.log('No keys in ' + original); - return; - } - if (keys.length !== messages.length) { - throw new Error(`Unmatching keys(${keys.length}) and messages(${messages.length}).`); - } - this.numberOfMessages += keys.length; - this.files[original] = []; - let existingKeys = new Set(); - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - let realKey; - let comment; - if (Is.string(key)) { - realKey = key; - comment = undefined; - } - else if (LocalizeInfo.is(key)) { - realKey = key.key; - if (key.comment && key.comment.length > 0) { - comment = key.comment.map(comment => encodeEntities(comment)).join('\r\n'); - } - } - if (!realKey || existingKeys.has(realKey)) { - continue; - } - existingKeys.add(realKey); - let message = encodeEntities(messages[i]); - this.files[original].push({ id: realKey, message: message, comment: comment }); - } - } - addStringItem(file, item) { - if (!item.id || item.message === undefined || item.message === null) { - throw new Error(`No item ID or value specified: ${JSON.stringify(item)}. File: ${file}`); - } - if (item.message.length === 0) { - log(`Item with id ${item.id} in file ${file} has an empty message.`); - } - this.appendNewLine(``, 4); - this.appendNewLine(`${item.message}`, 6); - if (item.comment) { - this.appendNewLine(`${item.comment}`, 6); - } - this.appendNewLine('', 4); - } - appendHeader() { - this.appendNewLine('', 0); - this.appendNewLine('', 0); - } - appendFooter() { - this.appendNewLine('', 0); - } - appendNewLine(content, indent) { - let line = new Line(indent); - line.append(content); - this.buffer.push(line.toString()); - } -} -exports.XLF = XLF; -XLF.parsePseudo = function (xlfString) { - return new Promise((resolve) => { - let parser = new xml2js.Parser(); - let files = []; - parser.parseString(xlfString, function (_err, result) { - const fileNodes = result['xliff']['file']; - fileNodes.forEach(file => { - const originalFilePath = file.$.original; - const messages = {}; - const transUnits = file.body[0]['trans-unit']; - if (transUnits) { - transUnits.forEach((unit) => { - const key = unit.$.id; - const val = pseudify(unit.source[0]['_'].toString()); - if (key && val) { - messages[key] = decodeEntities(val); - } - }); - files.push({ messages: messages, originalFilePath: originalFilePath, language: 'ps' }); - } - }); - resolve(files); - }); - }); -}; -XLF.parse = function (xlfString) { - return new Promise((resolve, reject) => { - let parser = new xml2js.Parser(); - let files = []; - parser.parseString(xlfString, function (err, result) { - if (err) { - reject(new Error(`XLF parsing error: Failed to parse XLIFF string. ${err}`)); - } - const fileNodes = result['xliff']['file']; - if (!fileNodes) { - reject(new Error(`XLF parsing error: XLIFF file does not contain "xliff" or "file" node(s) required for parsing.`)); - } - fileNodes.forEach((file) => { - const originalFilePath = file.$.original; - if (!originalFilePath) { - reject(new Error(`XLF parsing error: XLIFF file node does not contain original attribute to determine the original location of the resource file.`)); - } - let language = file.$['target-language']; - if (!language) { - reject(new Error(`XLF parsing error: XLIFF file node does not contain target-language attribute to determine translated language.`)); - } - const messages = {}; - const transUnits = file.body[0]['trans-unit']; - if (transUnits) { - transUnits.forEach((unit) => { - const key = unit.$.id; - if (!unit.target) { - return; // No translation available - } - let val = unit.target[0]; - if (typeof val !== 'string') { - // We allow empty source values so support them for translations as well. - val = val._ ? val._ : ''; - } - if (!key) { - reject(new Error(`XLF parsing error: trans-unit ${JSON.stringify(unit, undefined, 0)} defined in file ${originalFilePath} is missing the ID attribute.`)); - return; - } - messages[key] = decodeEntities(val); - }); - files.push({ messages: messages, originalFilePath: originalFilePath, language: language.toLowerCase() }); - } - }); - resolve(files); - }); - }); -}; -class Limiter { - constructor(maxDegreeOfParalellism) { - this.maxDegreeOfParalellism = maxDegreeOfParalellism; - this.outstandingPromises = []; - this.runningPromises = 0; - } - queue(factory) { - return new Promise((c, e) => { - this.outstandingPromises.push({ factory, c, e }); - this.consume(); - }); - } - consume() { - while (this.outstandingPromises.length && this.runningPromises < this.maxDegreeOfParalellism) { - const iLimitedTask = this.outstandingPromises.shift(); - this.runningPromises++; - const promise = iLimitedTask.factory(); - promise.then(iLimitedTask.c).catch(iLimitedTask.e); - promise.then(() => this.consumed()).catch(() => this.consumed()); - } - } - consumed() { - this.runningPromises--; - this.consume(); - } -} -exports.Limiter = Limiter; -function sortLanguages(languages) { - return languages.sort((a, b) => { - return a.id < b.id ? -1 : (a.id > b.id ? 1 : 0); - }); -} -function stripComments(content) { - /** - * First capturing group matches double quoted string - * Second matches single quotes string - * Third matches block comments - * Fourth matches line comments - */ - const regexp = /("(?:[^\\\"]*(?:\\.)?)*")|('(?:[^\\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g; - let result = content.replace(regexp, (match, _m1, _m2, m3, m4) => { - // Only one of m1, m2, m3, m4 matches - if (m3) { - // A block comment. Replace with nothing - return ''; - } - else if (m4) { - // A line comment. If it ends in \r?\n then keep it. - let length = m4.length; - if (length > 2 && m4[length - 1] === '\n') { - return m4[length - 2] === '\r' ? '\r\n' : '\n'; - } - else { - return ''; - } - } - else { - // We match a string - return match; - } - }); - return result; -} -function escapeCharacters(value) { - const result = []; - for (let i = 0; i < value.length; i++) { - const ch = value.charAt(i); - switch (ch) { - case '\'': - result.push('\\\''); - break; - case '"': - result.push('\\"'); - break; - case '\\': - result.push('\\\\'); - break; - case '\n': - result.push('\\n'); - break; - case '\r': - result.push('\\r'); - break; - case '\t': - result.push('\\t'); - break; - case '\b': - result.push('\\b'); - break; - case '\f': - result.push('\\f'); - break; - default: - result.push(ch); - } - } - return result.join(''); -} -function processCoreBundleFormat(fileHeader, languages, json, emitter) { - let keysSection = json.keys; - let messageSection = json.messages; - let bundleSection = json.bundles; - let statistics = Object.create(null); - let defaultMessages = Object.create(null); - let modules = Object.keys(keysSection); - modules.forEach((module) => { - let keys = keysSection[module]; - let messages = messageSection[module]; - if (!messages || keys.length !== messages.length) { - emitter.emit('error', `Message for module ${module} corrupted. Mismatch in number of keys and messages.`); - return; - } - let messageMap = Object.create(null); - defaultMessages[module] = messageMap; - keys.map((key, i) => { - if (typeof key === 'string') { - messageMap[key] = messages[i]; - } - else { - messageMap[key.key] = messages[i]; - } - }); - }); - let languageDirectory = path.join(__dirname, '..', '..', '..', 'vscode-loc', 'i18n'); - if (!fs.existsSync(languageDirectory)) { - log(`No VS Code localization repository found. Looking at ${languageDirectory}`); - log(`To bundle translations please check out the vscode-loc repository as a sibling of the vscode repository.`); - } - let sortedLanguages = sortLanguages(languages); - sortedLanguages.forEach((language) => { - if (process.env['VSCODE_BUILD_VERBOSE']) { - log(`Generating nls bundles for: ${language.id}`); - } - statistics[language.id] = 0; - let localizedModules = Object.create(null); - let languageFolderName = language.translationId || language.id; - let i18nFile = path.join(languageDirectory, `vscode-language-pack-${languageFolderName}`, 'translations', 'main.i18n.json'); - let allMessages; - if (fs.existsSync(i18nFile)) { - let content = stripComments(fs.readFileSync(i18nFile, 'utf8')); - allMessages = JSON.parse(content); - } - modules.forEach((module) => { - let order = keysSection[module]; - let moduleMessage; - if (allMessages) { - moduleMessage = allMessages.contents[module]; - } - if (!moduleMessage) { - if (process.env['VSCODE_BUILD_VERBOSE']) { - log(`No localized messages found for module ${module}. Using default messages.`); - } - moduleMessage = defaultMessages[module]; - statistics[language.id] = statistics[language.id] + Object.keys(moduleMessage).length; - } - let localizedMessages = []; - order.forEach((keyInfo) => { - let key = null; - if (typeof keyInfo === 'string') { - key = keyInfo; - } - else { - key = keyInfo.key; - } - let message = moduleMessage[key]; - if (!message) { - if (process.env['VSCODE_BUILD_VERBOSE']) { - log(`No localized message found for key ${key} in module ${module}. Using default message.`); - } - message = defaultMessages[module][key]; - statistics[language.id] = statistics[language.id] + 1; - } - localizedMessages.push(message); - }); - localizedModules[module] = localizedMessages; - }); - Object.keys(bundleSection).forEach((bundle) => { - let modules = bundleSection[bundle]; - let contents = [ - fileHeader, - `define("${bundle}.nls.${language.id}", {` - ]; - modules.forEach((module, index) => { - contents.push(`\t"${module}": [`); - let messages = localizedModules[module]; - if (!messages) { - emitter.emit('error', `Didn't find messages for module ${module}.`); - return; - } - messages.forEach((message, index) => { - contents.push(`\t\t"${escapeCharacters(message)}${index < messages.length ? '",' : '"'}`); - }); - contents.push(index < modules.length - 1 ? '\t],' : '\t]'); - }); - contents.push('});'); - emitter.queue(new File({ path: bundle + '.nls.' + language.id + '.js', contents: Buffer.from(contents.join('\n'), 'utf-8') })); - }); - }); - Object.keys(statistics).forEach(key => { - let value = statistics[key]; - log(`${key} has ${value} untranslated strings.`); - }); - sortedLanguages.forEach(language => { - let stats = statistics[language.id]; - if (Is.undef(stats)) { - log(`\tNo translations found for language ${language.id}. Using default language instead.`); - } - }); -} -function processNlsFiles(opts) { - return event_stream_1.through(function (file) { - let fileName = path.basename(file.path); - if (fileName === 'nls.metadata.json') { - let json = null; - if (file.isBuffer()) { - json = JSON.parse(file.contents.toString('utf8')); - } - else { - this.emit('error', `Failed to read component file: ${file.relative}`); - return; - } - if (BundledFormat.is(json)) { - processCoreBundleFormat(opts.fileHeader, opts.languages, json, this); - } - } - this.queue(file); - }); -} -exports.processNlsFiles = processNlsFiles; -const editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench', extensionsProject = 'vscode-extensions', setupProject = 'vscode-setup'; -function getResource(sourceFile) { - let resource; - if (/^vs\/platform/.test(sourceFile)) { - return { name: 'vs/platform', project: editorProject }; - } - else if (/^vs\/editor\/contrib/.test(sourceFile)) { - return { name: 'vs/editor/contrib', project: editorProject }; - } - else if (/^vs\/editor/.test(sourceFile)) { - return { name: 'vs/editor', project: editorProject }; - } - else if (/^vs\/base/.test(sourceFile)) { - return { name: 'vs/base', project: editorProject }; - } - else if (/^vs\/code/.test(sourceFile)) { - return { name: 'vs/code', project: workbenchProject }; - } - else if (/^vs\/workbench\/contrib/.test(sourceFile)) { - resource = sourceFile.split('/', 4).join('/'); - return { name: resource, project: workbenchProject }; - } - else if (/^vs\/workbench\/services/.test(sourceFile)) { - resource = sourceFile.split('/', 4).join('/'); - return { name: resource, project: workbenchProject }; - } - else if (/^vs\/workbench/.test(sourceFile)) { - return { name: 'vs/workbench', project: workbenchProject }; - } - throw new Error(`Could not identify the XLF bundle for ${sourceFile}`); -} -exports.getResource = getResource; -function createXlfFilesForCoreBundle() { - return event_stream_1.through(function (file) { - const basename = path.basename(file.path); - if (basename === 'nls.metadata.json') { - if (file.isBuffer()) { - const xlfs = Object.create(null); - const json = JSON.parse(file.contents.toString('utf8')); - for (let coreModule in json.keys) { - const projectResource = getResource(coreModule); - const resource = projectResource.name; - const project = projectResource.project; - const keys = json.keys[coreModule]; - const messages = json.messages[coreModule]; - if (keys.length !== messages.length) { - this.emit('error', `There is a mismatch between keys and messages in ${file.relative} for module ${coreModule}`); - return; - } - else { - let xlf = xlfs[resource]; - if (!xlf) { - xlf = new XLF(project); - xlfs[resource] = xlf; - } - xlf.addFile(`src/${coreModule}`, keys, messages); - } - } - for (let resource in xlfs) { - const xlf = xlfs[resource]; - const filePath = `${xlf.project}/${resource.replace(/\//g, '_')}.xlf`; - const xlfFile = new File({ - path: filePath, - contents: Buffer.from(xlf.toString(), 'utf8') - }); - this.queue(xlfFile); - } - } - else { - this.emit('error', new Error(`File ${file.relative} is not using a buffer content`)); - return; - } - } - else { - this.emit('error', new Error(`File ${file.relative} is not a core meta data file.`)); - return; - } - }); -} -exports.createXlfFilesForCoreBundle = createXlfFilesForCoreBundle; -function createXlfFilesForExtensions() { - let counter = 0; - let folderStreamEnded = false; - let folderStreamEndEmitted = false; - return event_stream_1.through(function (extensionFolder) { - const folderStream = this; - const stat = fs.statSync(extensionFolder.path); - if (!stat.isDirectory()) { - return; - } - let extensionName = path.basename(extensionFolder.path); - if (extensionName === 'node_modules') { - return; - } - counter++; - let _xlf; - function getXlf() { - if (!_xlf) { - _xlf = new XLF(extensionsProject); - } - return _xlf; - } - gulp.src([`.build/extensions/${extensionName}/package.nls.json`, `.build/extensions/${extensionName}/**/nls.metadata.json`], { allowEmpty: true }).pipe(event_stream_1.through(function (file) { - if (file.isBuffer()) { - const buffer = file.contents; - const basename = path.basename(file.path); - if (basename === 'package.nls.json') { - const json = JSON.parse(buffer.toString('utf8')); - const keys = Object.keys(json); - const messages = keys.map((key) => { - const value = json[key]; - if (Is.string(value)) { - return value; - } - else if (value) { - return value.message; - } - else { - return `Unknown message for key: ${key}`; - } - }); - getXlf().addFile(`extensions/${extensionName}/package`, keys, messages); - } - else if (basename === 'nls.metadata.json') { - const json = JSON.parse(buffer.toString('utf8')); - const relPath = path.relative(`.build/extensions/${extensionName}`, path.dirname(file.path)); - for (let file in json) { - const fileContent = json[file]; - getXlf().addFile(`extensions/${extensionName}/${relPath}/${file}`, fileContent.keys, fileContent.messages); - } - } - else { - this.emit('error', new Error(`${file.path} is not a valid extension nls file`)); - return; - } - } - }, function () { - if (_xlf) { - let xlfFile = new File({ - path: path.join(extensionsProject, extensionName + '.xlf'), - contents: Buffer.from(_xlf.toString(), 'utf8') - }); - folderStream.queue(xlfFile); - } - this.queue(null); - counter--; - if (counter === 0 && folderStreamEnded && !folderStreamEndEmitted) { - folderStreamEndEmitted = true; - folderStream.queue(null); - } - })); - }, function () { - folderStreamEnded = true; - if (counter === 0) { - folderStreamEndEmitted = true; - this.queue(null); - } - }); -} -exports.createXlfFilesForExtensions = createXlfFilesForExtensions; -function createXlfFilesForIsl() { - return event_stream_1.through(function (file) { - let projectName, resourceFile; - if (path.basename(file.path) === 'Default.isl') { - projectName = setupProject; - resourceFile = 'setup_default.xlf'; - } - else { - projectName = workbenchProject; - resourceFile = 'setup_messages.xlf'; - } - let xlf = new XLF(projectName), keys = [], messages = []; - let model = new TextModel(file.contents.toString()); - let inMessageSection = false; - model.lines.forEach(line => { - if (line.length === 0) { - return; - } - let firstChar = line.charAt(0); - switch (firstChar) { - case ';': - // Comment line; - return; - case '[': - inMessageSection = '[Messages]' === line || '[CustomMessages]' === line; - return; - } - if (!inMessageSection) { - return; - } - let sections = line.split('='); - if (sections.length !== 2) { - throw new Error(`Badly formatted message found: ${line}`); - } - else { - let key = sections[0]; - let value = sections[1]; - if (key.length > 0 && value.length > 0) { - keys.push(key); - messages.push(value); - } - } - }); - const originalPath = file.path.substring(file.cwd.length + 1, file.path.split('.')[0].length).replace(/\\/g, '/'); - xlf.addFile(originalPath, keys, messages); - // Emit only upon all ISL files combined into single XLF instance - const newFilePath = path.join(projectName, resourceFile); - const xlfFile = new File({ path: newFilePath, contents: Buffer.from(xlf.toString(), 'utf-8') }); - this.queue(xlfFile); - }); -} -exports.createXlfFilesForIsl = createXlfFilesForIsl; -function pushXlfFiles(apiHostname, username, password) { - let tryGetPromises = []; - let updateCreatePromises = []; - return event_stream_1.through(function (file) { - const project = path.dirname(file.relative); - const fileName = path.basename(file.path); - const slug = fileName.substr(0, fileName.length - '.xlf'.length); - const credentials = `${username}:${password}`; - // Check if resource already exists, if not, then create it. - let promise = tryGetResource(project, slug, apiHostname, credentials); - tryGetPromises.push(promise); - promise.then(exists => { - if (exists) { - promise = updateResource(project, slug, file, apiHostname, credentials); - } - else { - promise = createResource(project, slug, file, apiHostname, credentials); - } - updateCreatePromises.push(promise); - }); - }, function () { - // End the pipe only after all the communication with Transifex API happened - Promise.all(tryGetPromises).then(() => { - Promise.all(updateCreatePromises).then(() => { - this.queue(null); - }).catch((reason) => { throw new Error(reason); }); - }).catch((reason) => { throw new Error(reason); }); - }); -} -exports.pushXlfFiles = pushXlfFiles; -function getAllResources(project, apiHostname, username, password) { - return new Promise((resolve, reject) => { - const credentials = `${username}:${password}`; - const options = { - hostname: apiHostname, - path: `/api/2/project/${project}/resources`, - auth: credentials, - method: 'GET' - }; - const request = https.request(options, (res) => { - let buffer = []; - res.on('data', (chunk) => buffer.push(chunk)); - res.on('end', () => { - if (res.statusCode === 200) { - let json = JSON.parse(Buffer.concat(buffer).toString()); - if (Array.isArray(json)) { - resolve(json.map(o => o.slug)); - return; - } - reject(`Unexpected data format. Response code: ${res.statusCode}.`); - } - else { - reject(`No resources in ${project} returned no data. Response code: ${res.statusCode}.`); - } - }); - }); - request.on('error', (err) => { - reject(`Failed to query resources in ${project} with the following error: ${err}. ${options.path}`); - }); - request.end(); - }); -} -function findObsoleteResources(apiHostname, username, password) { - let resourcesByProject = Object.create(null); - resourcesByProject[extensionsProject] = [].concat(exports.externalExtensionsWithTranslations); // clone - return event_stream_1.through(function (file) { - const project = path.dirname(file.relative); - const fileName = path.basename(file.path); - const slug = fileName.substr(0, fileName.length - '.xlf'.length); - let slugs = resourcesByProject[project]; - if (!slugs) { - resourcesByProject[project] = slugs = []; - } - slugs.push(slug); - this.push(file); - }, function () { - const json = JSON.parse(fs.readFileSync('./build/lib/i18n.resources.json', 'utf8')); - let i18Resources = [...json.editor, ...json.workbench].map((r) => r.project + '/' + r.name.replace(/\//g, '_')); - let extractedResources = []; - for (let project of [workbenchProject, editorProject]) { - for (let resource of resourcesByProject[project]) { - if (resource !== 'setup_messages') { - extractedResources.push(project + '/' + resource); - } - } - } - if (i18Resources.length !== extractedResources.length) { - console.log(`[i18n] Obsolete resources in file 'build/lib/i18n.resources.json': JSON.stringify(${i18Resources.filter(p => extractedResources.indexOf(p) === -1)})`); - console.log(`[i18n] Missing resources in file 'build/lib/i18n.resources.json': JSON.stringify(${extractedResources.filter(p => i18Resources.indexOf(p) === -1)})`); - } - let promises = []; - for (let project in resourcesByProject) { - promises.push(getAllResources(project, apiHostname, username, password).then(resources => { - let expectedResources = resourcesByProject[project]; - let unusedResources = resources.filter(resource => resource && expectedResources.indexOf(resource) === -1); - if (unusedResources.length) { - console.log(`[transifex] Obsolete resources in project '${project}': ${unusedResources.join(', ')}`); - } - })); - } - return Promise.all(promises).then(_ => { - this.push(null); - }).catch((reason) => { throw new Error(reason); }); - }); -} -exports.findObsoleteResources = findObsoleteResources; -function tryGetResource(project, slug, apiHostname, credentials) { - return new Promise((resolve, reject) => { - const options = { - hostname: apiHostname, - path: `/api/2/project/${project}/resource/${slug}/?details`, - auth: credentials, - method: 'GET' - }; - const request = https.request(options, (response) => { - if (response.statusCode === 404) { - resolve(false); - } - else if (response.statusCode === 200) { - resolve(true); - } - else { - reject(`Failed to query resource ${project}/${slug}. Response: ${response.statusCode} ${response.statusMessage}`); - } - }); - request.on('error', (err) => { - reject(`Failed to get ${project}/${slug} on Transifex: ${err}`); - }); - request.end(); - }); -} -function createResource(project, slug, xlfFile, apiHostname, credentials) { - return new Promise((_resolve, reject) => { - const data = JSON.stringify({ - 'content': xlfFile.contents.toString(), - 'name': slug, - 'slug': slug, - 'i18n_type': 'XLIFF' - }); - const options = { - hostname: apiHostname, - path: `/api/2/project/${project}/resources`, - headers: { - 'Content-Type': 'application/json', - 'Content-Length': Buffer.byteLength(data) - }, - auth: credentials, - method: 'POST' - }; - let request = https.request(options, (res) => { - if (res.statusCode === 201) { - log(`Resource ${project}/${slug} successfully created on Transifex.`); - } - else { - reject(`Something went wrong in the request creating ${slug} in ${project}. ${res.statusCode}`); - } - }); - request.on('error', (err) => { - reject(`Failed to create ${project}/${slug} on Transifex: ${err}`); - }); - request.write(data); - request.end(); - }); -} -/** - * The following link provides information about how Transifex handles updates of a resource file: - * https://dev.befoolish.co/tx-docs/public/projects/updating-content#what-happens-when-you-update-files - */ -function updateResource(project, slug, xlfFile, apiHostname, credentials) { - return new Promise((resolve, reject) => { - const data = JSON.stringify({ content: xlfFile.contents.toString() }); - const options = { - hostname: apiHostname, - path: `/api/2/project/${project}/resource/${slug}/content`, - headers: { - 'Content-Type': 'application/json', - 'Content-Length': Buffer.byteLength(data) - }, - auth: credentials, - method: 'PUT' - }; - let request = https.request(options, (res) => { - if (res.statusCode === 200) { - res.setEncoding('utf8'); - let responseBuffer = ''; - res.on('data', function (chunk) { - responseBuffer += chunk; - }); - res.on('end', () => { - const response = JSON.parse(responseBuffer); - log(`Resource ${project}/${slug} successfully updated on Transifex. Strings added: ${response.strings_added}, updated: ${response.strings_added}, deleted: ${response.strings_added}`); - resolve(); - }); - } - else { - reject(`Something went wrong in the request updating ${slug} in ${project}. ${res.statusCode}`); - } - }); - request.on('error', (err) => { - reject(`Failed to update ${project}/${slug} on Transifex: ${err}`); - }); - request.write(data); - request.end(); - }); -} -// cache resources -let _coreAndExtensionResources; -function pullCoreAndExtensionsXlfFiles(apiHostname, username, password, language, externalExtensions) { - if (!_coreAndExtensionResources) { - _coreAndExtensionResources = []; - // editor and workbench - const json = JSON.parse(fs.readFileSync('./build/lib/i18n.resources.json', 'utf8')); - _coreAndExtensionResources.push(...json.editor); - _coreAndExtensionResources.push(...json.workbench); - // extensions - let extensionsToLocalize = Object.create(null); - glob.sync('.build/extensions/**/*.nls.json').forEach(extension => extensionsToLocalize[extension.split('/')[2]] = true); - glob.sync('.build/extensions/*/node_modules/vscode-nls').forEach(extension => extensionsToLocalize[extension.split('/')[2]] = true); - Object.keys(extensionsToLocalize).forEach(extension => { - _coreAndExtensionResources.push({ name: extension, project: extensionsProject }); - }); - if (externalExtensions) { - for (let resourceName in externalExtensions) { - _coreAndExtensionResources.push({ name: resourceName, project: extensionsProject }); - } - } - } - return pullXlfFiles(apiHostname, username, password, language, _coreAndExtensionResources); -} -exports.pullCoreAndExtensionsXlfFiles = pullCoreAndExtensionsXlfFiles; -function pullSetupXlfFiles(apiHostname, username, password, language, includeDefault) { - let setupResources = [{ name: 'setup_messages', project: workbenchProject }]; - if (includeDefault) { - setupResources.push({ name: 'setup_default', project: setupProject }); - } - return pullXlfFiles(apiHostname, username, password, language, setupResources); -} -exports.pullSetupXlfFiles = pullSetupXlfFiles; -function pullXlfFiles(apiHostname, username, password, language, resources) { - const credentials = `${username}:${password}`; - let expectedTranslationsCount = resources.length; - let translationsRetrieved = 0, called = false; - return event_stream_1.readable(function (_count, callback) { - // Mark end of stream when all resources were retrieved - if (translationsRetrieved === expectedTranslationsCount) { - return this.emit('end'); - } - if (!called) { - called = true; - const stream = this; - resources.map(function (resource) { - retrieveResource(language, resource, apiHostname, credentials).then((file) => { - if (file) { - stream.emit('data', file); - } - translationsRetrieved++; - }).catch(error => { throw new Error(error); }); - }); - } - callback(); - }); -} -const limiter = new Limiter(NUMBER_OF_CONCURRENT_DOWNLOADS); -function retrieveResource(language, resource, apiHostname, credentials) { - return limiter.queue(() => new Promise((resolve, reject) => { - const slug = resource.name.replace(/\//g, '_'); - const project = resource.project; - let transifexLanguageId = language.id === 'ps' ? 'en' : language.translationId || language.id; - const options = { - hostname: apiHostname, - path: `/api/2/project/${project}/resource/${slug}/translation/${transifexLanguageId}?file&mode=onlyreviewed`, - auth: credentials, - port: 443, - method: 'GET' - }; - console.log('[transifex] Fetching ' + options.path); - let request = https.request(options, (res) => { - let xlfBuffer = []; - res.on('data', (chunk) => xlfBuffer.push(chunk)); - res.on('end', () => { - if (res.statusCode === 200) { - resolve(new File({ contents: Buffer.concat(xlfBuffer), path: `${project}/${slug}.xlf` })); - } - else if (res.statusCode === 404) { - console.log(`[transifex] ${slug} in ${project} returned no data.`); - resolve(null); - } - else { - reject(`${slug} in ${project} returned no data. Response code: ${res.statusCode}.`); - } - }); - }); - request.on('error', (err) => { - reject(`Failed to query resource ${slug} with the following error: ${err}. ${options.path}`); - }); - request.end(); - })); -} -function prepareI18nFiles() { - let parsePromises = []; - return event_stream_1.through(function (xlf) { - let stream = this; - let parsePromise = XLF.parse(xlf.contents.toString()); - parsePromises.push(parsePromise); - parsePromise.then(resolvedFiles => { - resolvedFiles.forEach(file => { - let translatedFile = createI18nFile(file.originalFilePath, file.messages); - stream.queue(translatedFile); - }); - }); - }, function () { - Promise.all(parsePromises) - .then(() => { this.queue(null); }) - .catch(reason => { throw new Error(reason); }); - }); -} -exports.prepareI18nFiles = prepareI18nFiles; -function createI18nFile(originalFilePath, messages) { - let result = Object.create(null); - result[''] = [ - '--------------------------------------------------------------------------------------------', - 'Copyright (c) Microsoft Corporation. All rights reserved.', - 'Licensed under the MIT License. See License.txt in the project root for license information.', - '--------------------------------------------------------------------------------------------', - 'Do not edit this file. It is machine generated.' - ]; - for (let key of Object.keys(messages)) { - result[key] = messages[key]; - } - let content = JSON.stringify(result, null, '\t'); - if (process.platform === 'win32') { - content = content.replace(/\n/g, '\r\n'); - } - return new File({ - path: path.join(originalFilePath + '.i18n.json'), - contents: Buffer.from(content, 'utf8') - }); -} -const i18nPackVersion = '1.0.0'; -function pullI18nPackFiles(apiHostname, username, password, language, resultingTranslationPaths) { - return pullCoreAndExtensionsXlfFiles(apiHostname, username, password, language, exports.externalExtensionsWithTranslations) - .pipe(prepareI18nPackFiles(exports.externalExtensionsWithTranslations, resultingTranslationPaths, language.id === 'ps')); -} -exports.pullI18nPackFiles = pullI18nPackFiles; -function prepareI18nPackFiles(externalExtensions, resultingTranslationPaths, pseudo = false) { - let parsePromises = []; - let mainPack = { version: i18nPackVersion, contents: {} }; - let extensionsPacks = {}; - let errors = []; - return event_stream_1.through(function (xlf) { - let project = path.basename(path.dirname(xlf.relative)); - let resource = path.basename(xlf.relative, '.xlf'); - let contents = xlf.contents.toString(); - let parsePromise = pseudo ? XLF.parsePseudo(contents) : XLF.parse(contents); - parsePromises.push(parsePromise); - parsePromise.then(resolvedFiles => { - resolvedFiles.forEach(file => { - const path = file.originalFilePath; - const firstSlash = path.indexOf('/'); - if (project === extensionsProject) { - let extPack = extensionsPacks[resource]; - if (!extPack) { - extPack = extensionsPacks[resource] = { version: i18nPackVersion, contents: {} }; - } - const externalId = externalExtensions[resource]; - if (!externalId) { // internal extension: remove 'extensions/extensionId/' segnent - const secondSlash = path.indexOf('/', firstSlash + 1); - extPack.contents[path.substr(secondSlash + 1)] = file.messages; - } - else { - extPack.contents[path] = file.messages; - } - } - else { - mainPack.contents[path.substr(firstSlash + 1)] = file.messages; - } - }); - }).catch(reason => { - errors.push(reason); - }); - }, function () { - Promise.all(parsePromises) - .then(() => { - if (errors.length > 0) { - throw errors; - } - const translatedMainFile = createI18nFile('./main', mainPack); - resultingTranslationPaths.push({ id: 'vscode', resourceName: 'main.i18n.json' }); - this.queue(translatedMainFile); - for (let extension in extensionsPacks) { - const translatedExtFile = createI18nFile(`extensions/${extension}`, extensionsPacks[extension]); - this.queue(translatedExtFile); - const externalExtensionId = externalExtensions[extension]; - if (externalExtensionId) { - resultingTranslationPaths.push({ id: externalExtensionId, resourceName: `extensions/${extension}.i18n.json` }); - } - else { - resultingTranslationPaths.push({ id: `vscode.${extension}`, resourceName: `extensions/${extension}.i18n.json` }); - } - } - this.queue(null); - }) - .catch((reason) => { - this.emit('error', reason); - }); - }); -} -exports.prepareI18nPackFiles = prepareI18nPackFiles; -function prepareIslFiles(language, innoSetupConfig) { - let parsePromises = []; - return event_stream_1.through(function (xlf) { - let stream = this; - let parsePromise = XLF.parse(xlf.contents.toString()); - parsePromises.push(parsePromise); - parsePromise.then(resolvedFiles => { - resolvedFiles.forEach(file => { - if (path.basename(file.originalFilePath) === 'Default' && !innoSetupConfig.defaultInfo) { - return; - } - let translatedFile = createIslFile(file.originalFilePath, file.messages, language, innoSetupConfig); - stream.queue(translatedFile); - }); - }).catch(reason => { - this.emit('error', reason); - }); - }, function () { - Promise.all(parsePromises) - .then(() => { this.queue(null); }) - .catch(reason => { - this.emit('error', reason); - }); - }); -} -exports.prepareIslFiles = prepareIslFiles; -function createIslFile(originalFilePath, messages, language, innoSetup) { - let content = []; - let originalContent; - if (path.basename(originalFilePath) === 'Default') { - originalContent = new TextModel(fs.readFileSync(originalFilePath + '.isl', 'utf8')); - } - else { - originalContent = new TextModel(fs.readFileSync(originalFilePath + '.en.isl', 'utf8')); - } - originalContent.lines.forEach(line => { - if (line.length > 0) { - let firstChar = line.charAt(0); - if (firstChar === '[' || firstChar === ';') { - content.push(line); - } - else { - let sections = line.split('='); - let key = sections[0]; - let translated = line; - if (key) { - if (key === 'LanguageName') { - translated = `${key}=${innoSetup.defaultInfo.name}`; - } - else if (key === 'LanguageID') { - translated = `${key}=${innoSetup.defaultInfo.id}`; - } - else if (key === 'LanguageCodePage') { - translated = `${key}=${innoSetup.codePage.substr(2)}`; - } - else { - let translatedMessage = messages[key]; - if (translatedMessage) { - translated = `${key}=${translatedMessage}`; - } - } - } - content.push(translated); - } - } - }); - const basename = path.basename(originalFilePath); - const filePath = `${basename}.${language.id}.isl`; - const encoded = iconv.encode(Buffer.from(content.join('\r\n'), 'utf8').toString(), innoSetup.codePage); - return new File({ - path: filePath, - contents: Buffer.from(encoded), - }); -} -function encodeEntities(value) { - let result = []; - for (let i = 0; i < value.length; i++) { - let ch = value[i]; - switch (ch) { - case '<': - result.push('<'); - break; - case '>': - result.push('>'); - break; - case '&': - result.push('&'); - break; - default: - result.push(ch); - } - } - return result.join(''); -} -function decodeEntities(value) { - return value.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'); -} -function pseudify(message) { - return '\uFF3B' + message.replace(/[aouei]/g, '$&$&') + '\uFF3D'; -} diff --git a/lib/vscode/build/lib/util.ts b/lib/vscode/build/lib/util.ts deleted file mode 100644 index 48853bc6201a..000000000000 --- a/lib/vscode/build/lib/util.ts +++ /dev/null @@ -1,343 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * 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 es from 'event-stream'; -import debounce = require('debounce'); -import * as _filter from 'gulp-filter'; -import * as rename from 'gulp-rename'; -import * as _ from 'underscore'; -import * as path from 'path'; -import * as fs from 'fs'; -import * as _rimraf from 'rimraf'; -import * as git from './git'; -import * as VinylFile from 'vinyl'; -import { ThroughStream } from 'through'; -import * as sm from 'source-map'; - -const root = path.dirname(path.dirname(__dirname)); - -export interface ICancellationToken { - isCancellationRequested(): boolean; -} - -const NoCancellationToken: ICancellationToken = { isCancellationRequested: () => false }; - -export interface IStreamProvider { - (cancellationToken?: ICancellationToken): NodeJS.ReadWriteStream; -} - -export function incremental(streamProvider: IStreamProvider, initial: NodeJS.ReadWriteStream, supportsCancellation?: boolean): NodeJS.ReadWriteStream { - const input = es.through(); - const output = es.through(); - let state = 'idle'; - let buffer = Object.create(null); - - const token: ICancellationToken | undefined = !supportsCancellation ? undefined : { isCancellationRequested: () => Object.keys(buffer).length > 0 }; - - const run = (input: NodeJS.ReadWriteStream, isCancellable: boolean) => { - state = 'running'; - - const stream = !supportsCancellation ? streamProvider() : streamProvider(isCancellable ? token : NoCancellationToken); - - input - .pipe(stream) - .pipe(es.through(undefined, () => { - state = 'idle'; - eventuallyRun(); - })) - .pipe(output); - }; - - if (initial) { - run(initial, false); - } - - const eventuallyRun = debounce(() => { - const paths = Object.keys(buffer); - - if (paths.length === 0) { - return; - } - - const data = paths.map(path => buffer[path]); - buffer = Object.create(null); - run(es.readArray(data), true); - }, 500); - - input.on('data', (f: any) => { - buffer[f.path] = f; - - if (state === 'idle') { - eventuallyRun(); - } - }); - - return es.duplex(input, output); -} - -export function fixWin32DirectoryPermissions(): NodeJS.ReadWriteStream { - if (!/win32/.test(process.platform)) { - return es.through(); - } - - return es.mapSync(f => { - if (f.stat && f.stat.isDirectory && f.stat.isDirectory()) { - f.stat.mode = 16877; - } - - return f; - }); -} - -export function setExecutableBit(pattern?: string | string[]): NodeJS.ReadWriteStream { - const setBit = es.mapSync(f => { - if (!f.stat) { - f.stat = { isFile() { return true; } } as any; - } - f.stat.mode = /* 100755 */ 33261; - return f; - }); - - if (!pattern) { - return setBit; - } - - const input = es.through(); - const filter = _filter(pattern, { restore: true }); - const output = input - .pipe(filter) - .pipe(setBit) - .pipe(filter.restore); - - return es.duplex(input, output); -} - -export function toFileUri(filePath: string): string { - const match = filePath.match(/^([a-z])\:(.*)$/i); - - if (match) { - filePath = '/' + match[1].toUpperCase() + ':' + match[2]; - } - - return 'file://' + filePath.replace(/\\/g, '/'); -} - -export function skipDirectories(): NodeJS.ReadWriteStream { - return es.mapSync(f => { - if (!f.isDirectory()) { - return f; - } - }); -} - -export function cleanNodeModules(rulePath: string): NodeJS.ReadWriteStream { - const rules = fs.readFileSync(rulePath, 'utf8') - .split(/\r?\n/g) - .map(line => line.trim()) - .filter(line => line && !/^#/.test(line)); - - const excludes = rules.filter(line => !/^!/.test(line)).map(line => `!**/node_modules/${line}`); - const includes = rules.filter(line => /^!/.test(line)).map(line => `**/node_modules/${line.substr(1)}`); - - const input = es.through(); - const output = es.merge( - input.pipe(_filter(['**', ...excludes])), - input.pipe(_filter(includes)) - ); - - return es.duplex(input, output); -} - -declare class FileSourceMap extends VinylFile { - public sourceMap: sm.RawSourceMap; -} - -export function loadSourcemaps(): NodeJS.ReadWriteStream { - const input = es.through(); - - const output = input - .pipe(es.map((f, cb): FileSourceMap | undefined => { - if (f.sourceMap) { - cb(undefined, f); - return; - } - - if (!f.contents) { - cb(undefined, f); - return; - } - - const contents = (f.contents).toString('utf8'); - - const reg = /\/\/# sourceMappingURL=(.*)$/g; - let lastMatch: RegExpMatchArray | null = null; - let match: RegExpMatchArray | null = null; - - while (match = reg.exec(contents)) { - lastMatch = match; - } - - if (!lastMatch) { - f.sourceMap = { - version: '3', - names: [], - mappings: '', - sources: [f.relative], - sourcesContent: [contents] - }; - - cb(undefined, f); - return; - } - - f.contents = Buffer.from(contents.replace(/\/\/# sourceMappingURL=(.*)$/g, ''), 'utf8'); - - fs.readFile(path.join(path.dirname(f.path), lastMatch[1]), 'utf8', (err, contents) => { - if (err) { return cb(err); } - - f.sourceMap = JSON.parse(contents); - cb(undefined, f); - }); - })); - - return es.duplex(input, output); -} - -export function stripSourceMappingURL(): NodeJS.ReadWriteStream { - const input = es.through(); - - const output = input - .pipe(es.mapSync(f => { - const contents = (f.contents).toString('utf8'); - f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, ''), 'utf8'); - return f; - })); - - return es.duplex(input, output); -} - -export function rewriteSourceMappingURL(sourceMappingURLBase: string): NodeJS.ReadWriteStream { - const input = es.through(); - - const output = input - .pipe(es.mapSync(f => { - const contents = (f.contents).toString('utf8'); - const str = `//# sourceMappingURL=${sourceMappingURLBase}/${path.dirname(f.relative).replace(/\\/g, '/')}/$1`; - f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, str)); - return f; - })); - - return es.duplex(input, output); -} - -export function rimraf(dir: string): () => Promise { - const result = () => new Promise((c, e) => { - let retries = 0; - - const retry = () => { - _rimraf(dir, { maxBusyTries: 1 }, (err: any) => { - if (!err) { - return c(); - } - - if (err.code === 'ENOTEMPTY' && ++retries < 5) { - return setTimeout(() => retry(), 10); - } - - return e(err); - }); - }; - - retry(); - }); - - result.taskName = `clean-${path.basename(dir).toLowerCase()}`; - return result; -} - -function _rreaddir(dirPath: string, prepend: string, result: string[]): void { - const entries = fs.readdirSync(dirPath, { withFileTypes: true }); - for (const entry of entries) { - if (entry.isDirectory()) { - _rreaddir(path.join(dirPath, entry.name), `${prepend}/${entry.name}`, result); - } else { - result.push(`${prepend}/${entry.name}`); - } - } -} - -export function rreddir(dirPath: string): string[] { - let result: string[] = []; - _rreaddir(dirPath, '', result); - return result; -} - -export function ensureDir(dirPath: string): void { - if (fs.existsSync(dirPath)) { - return; - } - ensureDir(path.dirname(dirPath)); - fs.mkdirSync(dirPath); -} - -export function getVersion(root: string): string | undefined { - let version = process.env['BUILD_SOURCEVERSION']; - - if (!version || !/^[0-9a-f]{40}$/i.test(version)) { - version = git.getVersion(root); - } - - return version; -} - -export function rebase(count: number): NodeJS.ReadWriteStream { - return rename(f => { - const parts = f.dirname ? f.dirname.split(/[\/\\]/) : []; - f.dirname = parts.slice(count).join(path.sep); - }); -} - -export interface FilterStream extends NodeJS.ReadWriteStream { - restore: ThroughStream; -} - -export function filter(fn: (data: any) => boolean): FilterStream { - const result = es.through(function (data) { - if (fn(data)) { - this.emit('data', data); - } else { - result.restore.push(data); - } - }); - - result.restore = es.through(); - return result; -} - -export function versionStringToNumber(versionStr: string) { - const semverRegex = /(\d+)\.(\d+)\.(\d+)/; - const match = versionStr.match(semverRegex); - if (!match) { - throw new Error('Version string is not properly formatted: ' + versionStr); - } - - return parseInt(match[1], 10) * 1e4 + parseInt(match[2], 10) * 1e2 + parseInt(match[3], 10); -} - -export function streamToPromise(stream: NodeJS.ReadWriteStream): Promise { - return new Promise((c, e) => { - stream.on('error', err => e(err)); - stream.on('end', () => c()); - }); -} - -export function getElectronVersion(): string { - return process.versions.node; - const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8'); - const target = /^target "(.*)"$/m.exec(yarnrc)![1]; - return target; -} diff --git a/lib/vscode/build/npm/update-localization-extension.js b/lib/vscode/build/npm/update-localization-extension.js deleted file mode 100644 index b1656dc88f44..000000000000 --- a/lib/vscode/build/npm/update-localization-extension.js +++ /dev/null @@ -1,132 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -let i18n = require("../lib/i18n"); - -let fs = require("fs"); -let path = require("path"); - -let gulp = require('gulp'); -let vfs = require("vinyl-fs"); -let rimraf = require('rimraf'); -let minimist = require('minimist'); - -function update(options) { - let idOrPath = options._; - if (!idOrPath) { - throw new Error('Argument must be the location of the localization extension.'); - } - let transifex = options.transifex; - let location = options.location; - if (transifex === true && location !== undefined) { - throw new Error('Either --transifex or --location can be specified, but not both.'); - } - if (!transifex && !location) { - transifex = true; - } - if (location !== undefined && !fs.existsSync(location)) { - throw new Error(`${location} doesn't exist.`); - } - let locExtFolder = idOrPath; - if (/^\w{2}(-\w+)?$/.test(idOrPath)) { - locExtFolder = path.join('..', 'vscode-loc', 'i18n', `vscode-language-pack-${idOrPath}`); - } - let locExtStat = fs.statSync(locExtFolder); - if (!locExtStat || !locExtStat.isDirectory) { - throw new Error('No directory found at ' + idOrPath); - } - let packageJSON = JSON.parse(fs.readFileSync(path.join(locExtFolder, 'package.json')).toString()); - let contributes = packageJSON['contributes']; - if (!contributes) { - throw new Error('The extension must define a "localizations" contribution in the "package.json"'); - } - let localizations = contributes['localizations']; - if (!localizations) { - throw new Error('The extension must define a "localizations" contribution of type array in the "package.json"'); - } - - localizations.forEach(function (localization) { - if (!localization.languageId || !localization.languageName || !localization.localizedLanguageName) { - throw new Error('Each localization contribution must define "languageId", "languageName" and "localizedLanguageName" properties.'); - } - let server = localization.server || 'www.transifex.com'; - let userName = localization.userName || 'api'; - let apiToken = process.env.TRANSIFEX_API_TOKEN; - let languageId = localization.transifexId || localization.languageId; - let translationDataFolder = path.join(locExtFolder, 'translations'); - if (languageId === "zh-cn") { - languageId = "zh-hans"; - } - if (languageId === "zh-tw") { - languageId = "zh-hant"; - } - if (fs.existsSync(translationDataFolder) && fs.existsSync(path.join(translationDataFolder, 'main.i18n.json'))) { - console.log('Clearing \'' + translationDataFolder + '\'...'); - rimraf.sync(translationDataFolder); - } - - if (transifex) { - console.log(`Downloading translations for ${languageId} to '${translationDataFolder}' ...`); - let translationPaths = []; - i18n.pullI18nPackFiles(server, userName, apiToken, { id: languageId }, translationPaths) - .on('error', (error) => { - console.log(`Error occurred while importing translations:`); - translationPaths = undefined; - if (Array.isArray(error)) { - error.forEach(console.log); - } else if (error) { - console.log(error); - } else { - console.log('Unknown error'); - } - }) - .pipe(vfs.dest(translationDataFolder)) - .on('end', function () { - if (translationPaths !== undefined) { - localization.translations = []; - for (let tp of translationPaths) { - localization.translations.push({ id: tp.id, path: `./translations/${tp.resourceName}`}); - } - fs.writeFileSync(path.join(locExtFolder, 'package.json'), JSON.stringify(packageJSON, null, '\t')); - } - }); - } else { - console.log(`Importing translations for ${languageId} form '${location}' to '${translationDataFolder}' ...`); - let translationPaths = []; - gulp.src(path.join(location, languageId, '**', '*.xlf')) - .pipe(i18n.prepareI18nPackFiles(i18n.externalExtensionsWithTranslations, translationPaths, languageId === 'ps')) - .on('error', (error) => { - console.log(`Error occurred while importing translations:`); - translationPaths = undefined; - if (Array.isArray(error)) { - error.forEach(console.log); - } else if (error) { - console.log(error); - } else { - console.log('Unknown error'); - } - }) - .pipe(vfs.dest(translationDataFolder)) - .on('end', function () { - if (translationPaths !== undefined) { - localization.translations = []; - for (let tp of translationPaths) { - localization.translations.push({ id: tp.id, path: `./translations/${tp.resourceName}`}); - } - fs.writeFileSync(path.join(locExtFolder, 'package.json'), JSON.stringify(packageJSON, null, '\t')); - } - }); - } - }); -} -if (path.basename(process.argv[1]) === 'update-localization-extension.js') { - var options = minimist(process.argv.slice(2), { - boolean: 'transifex', - string: 'location' - }); - update(options); -} diff --git a/lib/vscode/build/package.json b/lib/vscode/build/package.json deleted file mode 100644 index cd119a5f7a52..000000000000 --- a/lib/vscode/build/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "code-oss-dev-build", - "version": "1.0.0", - "license": "MIT", - "devDependencies": { - "@azure/cosmos": "^3.9.3", - "@azure/storage-blob": "^12.4.0", - "@types/ansi-colors": "^3.2.0", - "@types/azure": "0.9.19", - "@types/byline": "^4.2.32", - "@types/debounce": "^1.0.0", - "@types/eslint": "4.16.1", - "@types/fancy-log": "^1.3.0", - "@types/glob": "^7.1.1", - "@types/gulp": "^4.0.5", - "@types/gulp-concat": "^0.0.32", - "@types/gulp-filter": "^3.0.32", - "@types/gulp-gzip": "^0.0.31", - "@types/gulp-json-editor": "^2.2.31", - "@types/gulp-rename": "^0.0.33", - "@types/gulp-sourcemaps": "^0.0.32", - "@types/mime": "0.0.29", - "@types/minimatch": "^3.0.3", - "@types/minimist": "^1.2.1", - "@types/mkdirp": "^1.0.1", - "@types/mocha": "^8.2.0", - "@types/node": "^14.14.37", - "@types/p-limit": "^2.2.0", - "@types/plist": "^3.0.2", - "@types/pump": "^1.0.1", - "@types/request": "^2.47.0", - "@types/rimraf": "^2.0.4", - "@types/through": "^0.0.29", - "@types/through2": "^2.0.34", - "@types/underscore": "^1.8.9", - "@types/xml2js": "0.0.33", - "@typescript-eslint/experimental-utils": "~2.13.0", - "@typescript-eslint/parser": "^3.3.0", - "applicationinsights": "1.0.8", - "azure-storage": "^2.1.0", - "byline": "^5.0.0", - "colors": "^1.4.0", - "commander": "^7.0.0", - "electron-osx-sign": "^0.4.16", - "esbuild": "^0.8.30", - "fs-extra": "^9.1.0", - "got": "11.8.1", - "iconv-lite-umd": "0.6.8", - "jsonc-parser": "^2.3.0", - "mime": "^1.4.1", - "mkdirp": "^1.0.4", - "p-limit": "^3.1.0", - "plist": "^3.0.1", - "source-map": "0.6.1", - "typescript": "^4.3.0-dev.20210426", - "vsce": "1.48.0", - "vscode-universal": "deepak1556/universal#61454d96223b774c53cda10f72c2098c0ce02d58" - }, - "scripts": { - "compile": "tsc -p tsconfig.build.json", - "watch": "tsc -p tsconfig.build.json --watch", - "npmCheckJs": "tsc --noEmit" - }, - "dependencies": {} -} diff --git a/lib/vscode/build/yarn.lock b/lib/vscode/build/yarn.lock deleted file mode 100644 index 38b1f00fd780..000000000000 --- a/lib/vscode/build/yarn.lock +++ /dev/null @@ -1,2085 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@azure/abort-controller@^1.0.0": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@azure/abort-controller/-/abort-controller-1.0.2.tgz#822405c966b2aec16fb62c1b19d37eaccf231995" - integrity sha512-XUyTo+bcyxHEf+jlN2MXA7YU9nxVehaubngHV1MIZZaqYmZqykkoeAz/JMMEeR7t3TcyDwbFa3Zw8BZywmIx4g== - dependencies: - tslib "^2.0.0" - -"@azure/core-asynciterator-polyfill@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.0.tgz#dcccebb88406e5c76e0e1d52e8cc4c43a68b3ee7" - integrity sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg== - -"@azure/core-auth@^1.1.3": - version "1.1.4" - resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.1.4.tgz#af9a334acf3cb9c49e6013e6caf6dc9d43476030" - integrity sha512-+j1embyH1jqf04AIfJPdLafd5SC1y6z1Jz4i+USR1XkTp6KM8P5u4/AjmWMVoEQdM/M29PJcRDZcCEWjK9S1bw== - dependencies: - "@azure/abort-controller" "^1.0.0" - tslib "^2.0.0" - -"@azure/core-http@^1.2.0": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@azure/core-http/-/core-http-1.2.2.tgz#a6f7717184fd2657d3acabd1d64dfdc0bd531ce3" - integrity sha512-9eu2OcbR7e44gqBy4U1Uv8NTWgLIMwKXMEGgO2MahsJy5rdTiAhs5fJHQffPq8uX2MFh21iBODwO9R/Xlov88A== - dependencies: - "@azure/abort-controller" "^1.0.0" - "@azure/core-auth" "^1.1.3" - "@azure/core-tracing" "1.0.0-preview.9" - "@azure/logger" "^1.0.0" - "@opentelemetry/api" "^0.10.2" - "@types/node-fetch" "^2.5.0" - "@types/tunnel" "^0.0.1" - form-data "^3.0.0" - node-fetch "^2.6.0" - process "^0.11.10" - tough-cookie "^4.0.0" - tslib "^2.0.0" - tunnel "^0.0.6" - uuid "^8.3.0" - xml2js "^0.4.19" - -"@azure/core-lro@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@azure/core-lro/-/core-lro-1.0.3.tgz#1ddfb4ecdb81ce87b5f5d972ffe2acbbc46e524e" - integrity sha512-Py2crJ84qx1rXkzIwfKw5Ni4WJuzVU7KAF6i1yP3ce8fbynUeu8eEWS4JGtSQgU7xv02G55iPDROifmSDbxeHA== - dependencies: - "@azure/abort-controller" "^1.0.0" - "@azure/core-http" "^1.2.0" - events "^3.0.0" - tslib "^2.0.0" - -"@azure/core-paging@^1.1.1": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@azure/core-paging/-/core-paging-1.1.3.tgz#3587c9898a0530cacb64bab216d7318468aa5efc" - integrity sha512-his7Ah40ThEYORSpIAwuh6B8wkGwO/zG7gqVtmSE4WAJ46e36zUDXTKReUCLBDc6HmjjApQQxxcRFy5FruG79A== - dependencies: - "@azure/core-asynciterator-polyfill" "^1.0.0" - -"@azure/core-tracing@1.0.0-preview.9": - version "1.0.0-preview.9" - resolved "https://registry.yarnpkg.com/@azure/core-tracing/-/core-tracing-1.0.0-preview.9.tgz#84f3b85572013f9d9b85e1e5d89787aa180787eb" - integrity sha512-zczolCLJ5QG42AEPQ+Qg9SRYNUyB+yZ5dzof4YEc+dyWczO9G2sBqbAjLB7IqrsdHN2apkiB2oXeDKCsq48jug== - dependencies: - "@opencensus/web-types" "0.0.7" - "@opentelemetry/api" "^0.10.2" - tslib "^2.0.0" - -"@azure/cosmos@^3.9.3": - version "3.9.3" - resolved "https://registry.yarnpkg.com/@azure/cosmos/-/cosmos-3.9.3.tgz#7e95ff92e5c3e9da7e8316bc50c9cc928be6c1d6" - integrity sha512-1mh8a6LAIykz24tJvQpafXiABUfq+HSAZBFJVZXea0Rd0qG8Ia9z8AK9FtPbC1nPvDC2RID2mRIjJvYbxRM/BA== - dependencies: - "@types/debug" "^4.1.4" - debug "^4.1.1" - fast-json-stable-stringify "^2.0.0" - jsbi "^3.1.3" - node-abort-controller "^1.0.4" - node-fetch "^2.6.0" - priorityqueuejs "^1.0.0" - semaphore "^1.0.5" - tslib "^2.0.0" - universal-user-agent "^6.0.0" - uuid "^8.3.0" - -"@azure/logger@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@azure/logger/-/logger-1.0.1.tgz#19b333203d1b2931353d8879e814b64a7274837a" - integrity sha512-QYQeaJ+A5x6aMNu8BG5qdsVBnYBop9UMwgUvGihSjf1PdZZXB+c/oMdM2ajKwzobLBh9e9QuMQkN9iL+IxLBLA== - dependencies: - tslib "^2.0.0" - -"@azure/storage-blob@^12.4.0": - version "12.4.0" - resolved "https://registry.yarnpkg.com/@azure/storage-blob/-/storage-blob-12.4.0.tgz#7127ddd9f413105e2c3688691bc4c6245d0806b3" - integrity sha512-OnhVSoKD1HzBB79/rFzPbC4w9TdzFXeoOwkX+aIu3rb8qvN0VaqvUqZXSrBCyG2LcLyVkY4MPCJQBrmEUm9kvw== - dependencies: - "@azure/abort-controller" "^1.0.0" - "@azure/core-http" "^1.2.0" - "@azure/core-lro" "^1.0.2" - "@azure/core-paging" "^1.1.1" - "@azure/core-tracing" "1.0.0-preview.9" - "@azure/logger" "^1.0.0" - "@opentelemetry/api" "^0.10.2" - events "^3.0.0" - tslib "^2.0.0" - -"@malept/cross-spawn-promise@^1.1.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz#504af200af6b98e198bce768bc1730c6936ae01d" - integrity sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ== - dependencies: - cross-spawn "^7.0.1" - -"@opencensus/web-types@0.0.7": - version "0.0.7" - resolved "https://registry.yarnpkg.com/@opencensus/web-types/-/web-types-0.0.7.tgz#4426de1fe5aa8f624db395d2152b902874f0570a" - integrity sha512-xB+w7ZDAu3YBzqH44rCmG9/RlrOmFuDPt/bpf17eJr8eZSrLt7nc7LnWdxM9Mmoj/YKMHpxRg28txu3TcpiL+g== - -"@opentelemetry/api@^0.10.2": - version "0.10.2" - resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-0.10.2.tgz#9647b881f3e1654089ff7ea59d587b2d35060654" - integrity sha512-GtpMGd6vkzDMYcpu2t9LlhEgMy/SzBwRnz48EejlRArYqZzqSzAsKmegUK7zHgl+EOIaK9mKHhnRaQu3qw20cA== - dependencies: - "@opentelemetry/context-base" "^0.10.2" - -"@opentelemetry/context-base@^0.10.2": - version "0.10.2" - resolved "https://registry.yarnpkg.com/@opentelemetry/context-base/-/context-base-0.10.2.tgz#55bea904b2b91aa8a8675df9eaba5961bddb1def" - integrity sha512-hZNKjKOYsckoOEgBziGMnBcX0M7EtstnCmwz5jZUOUYwlZ+/xxX6z3jPu1XVO2Jivk0eLfuP9GP+vFD49CMetw== - -"@sindresorhus/is@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.0.0.tgz#2ff674e9611b45b528896d820d3d7a812de2f0e4" - integrity sha512-FyD2meJpDPjyNQejSjvnhpgI/azsQkA4lGbuu5BQZfjvJ9cbRZXzeWL2HceCekW4lixO9JPesIIQkSoLjeJHNQ== - -"@szmarczak/http-timer@^4.0.5": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.5.tgz#bfbd50211e9dfa51ba07da58a14cdfd333205152" - integrity sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ== - dependencies: - defer-to-connect "^2.0.0" - -"@types/ansi-colors@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@types/ansi-colors/-/ansi-colors-3.2.0.tgz#3e4fe85d9131ce1c6994f3040bd0b25306c16a6e" - integrity sha512-0caWAhXht9N2lOdMzJLXybsSkYCx1QOdxx6pae48tswI9QV3DFX26AoOpy0JxwhCb+zISTqmd6H8t9Zby9BoZg== - -"@types/azure@0.9.19": - version "0.9.19" - resolved "https://registry.yarnpkg.com/@types/azure/-/azure-0.9.19.tgz#1a6a9bd856b437ddecf3f9fc8407a683c869ba02" - integrity sha1-Gmqb2Fa0N93s8/n8hAemg8hpugI= - dependencies: - "@types/node" "*" - -"@types/byline@^4.2.32": - version "4.2.32" - resolved "https://registry.yarnpkg.com/@types/byline/-/byline-4.2.32.tgz#9d35ec15968056118548412ee24c2c3026c997dc" - integrity sha512-qtlm/J6XOO9p+Ep/ZB5+mCFEDhzWDDHWU4a1eReN7lkPZXW9rkloq2jcAhvKKmlO5tL2GSvKROb+PTsNVhBiyQ== - dependencies: - "@types/node" "*" - -"@types/cacheable-request@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.1.tgz#5d22f3dded1fd3a84c0bbeb5039a7419c2c91976" - integrity sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ== - dependencies: - "@types/http-cache-semantics" "*" - "@types/keyv" "*" - "@types/node" "*" - "@types/responselike" "*" - -"@types/caseless@*": - version "0.12.1" - resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.1.tgz#9794c69c8385d0192acc471a540d1f8e0d16218a" - integrity sha512-FhlMa34NHp9K5MY1Uz8yb+ZvuX0pnvn3jScRSNAb75KHGB8d3rEU6hqMs3Z2vjuytcMfRg6c5CHMc3wtYyD2/A== - -"@types/chokidar@*": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@types/chokidar/-/chokidar-1.7.5.tgz#1fa78c8803e035bed6d98e6949e514b133b0c9b6" - integrity sha512-PDkSRY7KltW3M60hSBlerxI8SFPXsO3AL/aRVsO4Kh9IHRW74Ih75gUuTd/aE4LSSFqypb10UIX3QzOJwBQMGQ== - dependencies: - "@types/events" "*" - "@types/node" "*" - -"@types/debounce@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/debounce/-/debounce-1.0.0.tgz#417560200331e1bb84d72da85391102c2fcd61b7" - integrity sha1-QXVgIAMx4buE1y2oU5EQLC/NYbc= - -"@types/debug@^4.1.4", "@types/debug@^4.1.5": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.5.tgz#b14efa8852b7768d898906613c23f688713e02cd" - integrity sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ== - -"@types/eslint-visitor-keys@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" - integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== - -"@types/eslint@4.16.1": - version "4.16.1" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-4.16.1.tgz#19730c9fcb66b6e44742d12b27a603fabfeb2f49" - integrity sha512-lRUXQAULl5geixTiP2K0iYvMUbCkEnuOwvLGjwff12I4ECxoW5QaWML5UUOZ1CvpQLILkddBdMPMZz4ByQizsg== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*": - version "0.0.41" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.41.tgz#fd90754150b57432b72bf560530500597ff04421" - integrity sha512-rIAmXyJlqw4KEBO7+u9gxZZSQHaCNnIzYrnNmYVpgfJhxTqO0brCX0SYpqUTkVI5mwwUwzmtspLBGBKroMeynA== - -"@types/events@*": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" - integrity sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA== - -"@types/fancy-log@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@types/fancy-log/-/fancy-log-1.3.0.tgz#a61ab476e5e628cd07a846330df53b85e05c8ce0" - integrity sha512-mQjDxyOM1Cpocd+vm1kZBP7smwKZ4TNokFeds9LV7OZibmPJFEzY3+xZMrKfUdNT71lv8GoCPD6upKwHxubClw== - -"@types/form-data@*": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-2.2.1.tgz#ee2b3b8eaa11c0938289953606b745b738c54b1e" - integrity sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ== - dependencies: - "@types/node" "*" - -"@types/fs-extra@^9.0.6": - version "9.0.6" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.6.tgz#488e56b77299899a608b8269719c1d133027a6ab" - integrity sha512-ecNRHw4clCkowNOBJH1e77nvbPxHYnWIXMv1IAoG/9+MYGkgoyr3Ppxr7XYFNL41V422EDhyV4/4SSK8L2mlig== - dependencies: - "@types/node" "*" - -"@types/glob-stream@*": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@types/glob-stream/-/glob-stream-6.1.0.tgz#7ede8a33e59140534f8d8adfb8ac9edfb31897bc" - integrity sha512-RHv6ZQjcTncXo3thYZrsbAVwoy4vSKosSWhuhuQxLOTv74OJuFQxXkmUuZCr3q9uNBEVCvIzmZL/FeRNbHZGUg== - dependencies: - "@types/glob" "*" - "@types/node" "*" - -"@types/glob@*", "@types/glob@^7.1.1": - version "7.1.1" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" - integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== - dependencies: - "@types/events" "*" - "@types/minimatch" "*" - "@types/node" "*" - -"@types/gulp-concat@^0.0.32": - version "0.0.32" - resolved "https://registry.yarnpkg.com/@types/gulp-concat/-/gulp-concat-0.0.32.tgz#72486028b1cf5faa94c8c1cf34c626531cecacd6" - integrity sha512-CUCFADlITzzBfBa2bdGzhKtvBr4eFh+evb+4igVbvPoO5RyPfHifmyQlZl6lM7q19+OKncRlFXDU7B4X9Ayo2g== - dependencies: - "@types/node" "*" - -"@types/gulp-filter@^3.0.32": - version "3.0.32" - resolved "https://registry.yarnpkg.com/@types/gulp-filter/-/gulp-filter-3.0.32.tgz#eeff3e9dbc092268fed01f2421ab00f6c8cb4848" - integrity sha512-JvY4qTxXehoK2yCUxYVxTMvckVbDM5TWHWeUoYJyX31gwFqw4YDD6JNzhuTxI3yHPUTY4BBRTqgm6puQEZVCNg== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - "@types/vinyl" "*" - -"@types/gulp-gzip@^0.0.31": - version "0.0.31" - resolved "https://registry.yarnpkg.com/@types/gulp-gzip/-/gulp-gzip-0.0.31.tgz#9358def25540442138fd61a7227f40d4c1e26760" - integrity sha512-KQjHz1FTqLse8/EiktfhN/vo33vamX4gVAQhMTp55STDBA7UToW5CJqYyP7iRorkHK9/aJ2nL2hLkNZkY4M8+w== - dependencies: - "@types/node" "*" - -"@types/gulp-json-editor@^2.2.31": - version "2.2.31" - resolved "https://registry.yarnpkg.com/@types/gulp-json-editor/-/gulp-json-editor-2.2.31.tgz#3c1a8950556c109a0e2d0ab11d5f2a2443665ed2" - integrity sha512-piis0ImYAy0dt18R4EtTbAY+RV8jwTq5VisnUV6OfP8kD4743aHGkAdAd08No4NY3rFa5mD6ytIu8L0YU7nL9w== - dependencies: - "@types/js-beautify" "*" - "@types/node" "*" - -"@types/gulp-rename@^0.0.33": - version "0.0.33" - resolved "https://registry.yarnpkg.com/@types/gulp-rename/-/gulp-rename-0.0.33.tgz#38d146e97786569f74f5391a1b1f9b5198674b6c" - integrity sha512-FIZQvbZJj6V1gHPTzO+g/BCWpDur7fJrroae4gwV3LaoHBQ+MrR9sB+2HssK8fHv4WdY6hVNxkcft9bYatuPIA== - dependencies: - "@types/node" "*" - -"@types/gulp-sourcemaps@^0.0.32": - version "0.0.32" - resolved "https://registry.yarnpkg.com/@types/gulp-sourcemaps/-/gulp-sourcemaps-0.0.32.tgz#e79ee617e0cb15729874be4533fe59c07793a175" - integrity sha512-+7BAmptW2bxyJnJcCEuie7vLoop3FwWgCdBMzyv7MYXED/HeNMeQuX7uPCkp4vfU1TTu4CYFH0IckNPvo0VePA== - dependencies: - "@types/node" "*" - -"@types/gulp@^4.0.5": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@types/gulp/-/gulp-4.0.5.tgz#f5f498d5bf9538364792de22490a12c0e6bc5eb4" - integrity sha512-nx1QjPTiRpvLfYsZ7MBu7bT6Cm7tAXyLbY0xbdx2IEMxCK2v2urIhJMQZHW0iV1TskM71Xl6p2uRRuWDbk+/7g== - dependencies: - "@types/chokidar" "*" - "@types/undertaker" "*" - "@types/vinyl-fs" "*" - -"@types/http-cache-semantics@*": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz#9140779736aa2655635ee756e2467d787cfe8a2a" - integrity sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A== - -"@types/js-beautify@*": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@types/js-beautify/-/js-beautify-1.8.0.tgz#0369d3d0e1f35a6aec07cb4da2ee2bcda111367c" - integrity sha512-/siF86XrwDKLuHe8l7h6NhrAWgLdgqbxmjZv9NvGWmgYRZoTipkjKiWb0SQHy/jcR+ee0GvbG6uGd+LEBMGNvA== - -"@types/json-schema@*", "@types/json-schema@^7.0.3": - version "7.0.4" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" - integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== - -"@types/keyv@*": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7" - integrity sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw== - dependencies: - "@types/node" "*" - -"@types/mime@0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-0.0.29.tgz#fbcfd330573b912ef59eeee14602bface630754b" - integrity sha1-+8/TMFc7kS71nu7hRgK/rOYwdUs= - -"@types/minimatch@*", "@types/minimatch@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== - -"@types/minimist@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256" - integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== - -"@types/mkdirp@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-1.0.1.tgz#0930b948914a78587de35458b86c907b6e98bbf6" - integrity sha512-HkGSK7CGAXncr8Qn/0VqNtExEE+PHMWb+qlR1faHMao7ng6P3tAaoWWBMdva0gL5h4zprjIO89GJOLXsMcDm1Q== - dependencies: - "@types/node" "*" - -"@types/mocha@^8.2.0": - version "8.2.0" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44" - integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ== - -"@types/node-fetch@^2.5.0": - version "2.5.8" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.8.tgz#e199c835d234c7eb0846f6618012e558544ee2fb" - integrity sha512-fbjI6ja0N5ZA8TV53RUqzsKNkl9fv8Oj3T7zxW7FGv1GSH7gwJaNF8dzCjrqKaxKeUpTz4yT1DaJFq/omNpGfw== - dependencies: - "@types/node" "*" - form-data "^3.0.0" - -"@types/node@*": - version "8.0.51" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.51.tgz#b31d716fb8d58eeb95c068a039b9b6292817d5fb" - integrity sha512-El3+WJk2D/ppWNd2X05aiP5l2k4EwF7KwheknQZls+I26eSICoWRhRIJ56jGgw2dqNGQ5LtNajmBU2ajS28EvQ== - -"@types/node@^14.14.21": - version "14.14.22" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18" - integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw== - -"@types/node@^14.14.37": - version "14.14.37" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.37.tgz#a3dd8da4eb84a996c36e331df98d82abd76b516e" - integrity sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw== - -"@types/p-limit@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@types/p-limit/-/p-limit-2.2.0.tgz#94a608e9b258a6c6156a13d1a14fd720dba70b97" - integrity sha512-fGFbybl1r0oE9mqgfc2EHHUin9ZL5rbQIexWI6jYRU1ADVn4I3LHzT+g/kpPpZsfp8PB94CQ655pfAjNF8LP6A== - dependencies: - p-limit "*" - -"@types/plist@^3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/plist/-/plist-3.0.2.tgz#61b3727bba0f5c462fe333542534a0c3e19ccb01" - integrity sha512-ULqvZNGMv0zRFvqn8/4LSPtnmN4MfhlPNtJCTpKuIIxGVGZ2rYWzFXrvEBoh9CVyqSE7D6YFRJ1hydLHI6kbWw== - dependencies: - "@types/node" "*" - xmlbuilder ">=11.0.1" - -"@types/pump@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/pump/-/pump-1.0.1.tgz#ae8157cefef04d1a4d24c1cc91d403c2f5da5cd0" - integrity sha1-roFXzv7wTRpNJMHMkdQDwvXaXNA= - dependencies: - "@types/node" "*" - -"@types/request@^2.47.0": - version "2.47.0" - resolved "https://registry.yarnpkg.com/@types/request/-/request-2.47.0.tgz#76a666cee4cb85dcffea6cd4645227926d9e114e" - integrity sha512-/KXM5oev+nNCLIgBjkwbk8VqxmzI56woD4VUxn95O+YeQ8hJzcSmIZ1IN3WexiqBb6srzDo2bdMbsXxgXNkz5Q== - dependencies: - "@types/caseless" "*" - "@types/form-data" "*" - "@types/node" "*" - "@types/tough-cookie" "*" - -"@types/responselike@*", "@types/responselike@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" - integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== - dependencies: - "@types/node" "*" - -"@types/rimraf@^2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.4.tgz#403887b0b53c6100a6c35d2ab24f6ccc042fec46" - integrity sha512-8gBudvllD2A/c0CcEX/BivIDorHFt5UI5m46TsNj8DjWCCTTZT74kEe4g+QsY7P/B9WdO98d82zZgXO/RQzu2Q== - dependencies: - "@types/glob" "*" - "@types/node" "*" - -"@types/through2@^2.0.34": - version "2.0.34" - resolved "https://registry.yarnpkg.com/@types/through2/-/through2-2.0.34.tgz#9c2a259a238dace2a05a2f8e94b786961bc27ac4" - integrity sha512-nhRG8+RuG/L+0fAZBQYaRflXKjTrHOKH8MFTChnf+dNVMxA3wHYYrfj0tztK0W51ABXjGfRCDc0vRkecCOrsow== - dependencies: - "@types/node" "*" - -"@types/through@^0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/through/-/through-0.0.29.tgz#72943aac922e179339c651fa34a4428a4d722f93" - integrity sha512-9a7C5VHh+1BKblaYiq+7Tfc+EOmjMdZaD1MYtkQjSoxgB69tBjW98ry6SKsi4zEIWztLOMRuL87A3bdT/Fc/4w== - dependencies: - "@types/node" "*" - -"@types/tough-cookie@*": - version "2.3.2" - resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.2.tgz#e0d481d8bb282ad8a8c9e100ceb72c995fb5e709" - integrity sha512-vOVmaruQG5EatOU/jM6yU2uCp3Lz6mK1P5Ztu4iJjfM4SVHU9XYktPUQtKlIXuahqXHdEyUarMrBEwg5Cwu+bA== - -"@types/tunnel@^0.0.1": - version "0.0.1" - resolved "https://registry.yarnpkg.com/@types/tunnel/-/tunnel-0.0.1.tgz#0d72774768b73df26f25df9184273a42da72b19c" - integrity sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A== - dependencies: - "@types/node" "*" - -"@types/underscore@^1.8.9": - version "1.8.9" - resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.8.9.tgz#fef41f800cd23db1b4f262ddefe49cd952d82323" - integrity sha512-vfzZGgZKRFy7KEWcBGfIFk+h6B+thDCLfkD1exMBMRlUsx2icA+J6y4kAbZs/TjSTeY1duw89QUU133TSzr60Q== - -"@types/undertaker-registry@*": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/undertaker-registry/-/undertaker-registry-1.0.1.tgz#4306d4a03d7acedb974b66530832b90729e1d1da" - integrity sha512-Z4TYuEKn9+RbNVk1Ll2SS4x1JeLHecolIbM/a8gveaHsW0Hr+RQMraZACwTO2VD7JvepgA6UO1A1VrbktQrIbQ== - -"@types/undertaker@*": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@types/undertaker/-/undertaker-1.2.0.tgz#d39a81074b4f274eb656870fc904a70737e00f8e" - integrity sha512-bx/5nZCGkasXs6qaA3B6SVDjBZqdyk04UO12e0uEPSzjt5H8jEJw0DKe7O7IM0hM2bVHRh70pmOH7PEHqXwzOw== - dependencies: - "@types/events" "*" - "@types/undertaker-registry" "*" - -"@types/vinyl-fs@*": - version "2.4.9" - resolved "https://registry.yarnpkg.com/@types/vinyl-fs/-/vinyl-fs-2.4.9.tgz#d312c24b5ba8d2db456d23ee4a66f9d016af82ea" - integrity sha512-Q0EXd6c1fORjiOuK4ZaKdfFcMyFzJlTi56dqktwaWVLIDAzE49wUs3bKnYbZwzyMWoH+NcMWnRuR73S9A0jnRA== - dependencies: - "@types/events" "*" - "@types/glob-stream" "*" - "@types/node" "*" - "@types/vinyl" "*" - -"@types/vinyl@*": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-2.0.2.tgz#4f3b8dae8f5828d3800ef709b0cff488ee852de3" - integrity sha512-2iYpNuOl98SrLPBZfEN9Mh2JCJ2EI9HU35SfgBEb51DcmaHkhp8cKMblYeBqMQiwXMgAD3W60DbQ4i/UdLiXhw== - dependencies: - "@types/node" "*" - -"@types/xml2js@0.0.33": - version "0.0.33" - resolved "https://registry.yarnpkg.com/@types/xml2js/-/xml2js-0.0.33.tgz#20c5dd6460245284d64a55690015b95e409fb7de" - integrity sha1-IMXdZGAkUoTWSlVpABW5XkCft94= - -"@typescript-eslint/experimental-utils@3.10.1": - version "3.10.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz#e179ffc81a80ebcae2ea04e0332f8b251345a686" - integrity sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/types" "3.10.1" - "@typescript-eslint/typescript-estree" "3.10.1" - eslint-scope "^5.0.0" - eslint-utils "^2.0.0" - -"@typescript-eslint/experimental-utils@~2.13.0": - version "2.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.13.0.tgz#958614faa6f77599ee2b241740e0ea402482533d" - integrity sha512-+Hss3clwa6aNiC8ZjA45wEm4FutDV5HsVXPl/rDug1THq6gEtOYRGLqS3JlTk7mSnL5TbJz0LpEbzbPnKvY6sw== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "2.13.0" - eslint-scope "^5.0.0" - -"@typescript-eslint/parser@^3.3.0": - version "3.10.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.10.1.tgz#1883858e83e8b442627e1ac6f408925211155467" - integrity sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw== - dependencies: - "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "3.10.1" - "@typescript-eslint/types" "3.10.1" - "@typescript-eslint/typescript-estree" "3.10.1" - eslint-visitor-keys "^1.1.0" - -"@typescript-eslint/types@3.10.1": - version "3.10.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.1.tgz#1d7463fa7c32d8a23ab508a803ca2fe26e758727" - integrity sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ== - -"@typescript-eslint/typescript-estree@2.13.0": - version "2.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.13.0.tgz#a2e746867da772c857c13853219fced10d2566bc" - integrity sha512-t21Mg5cc8T3ADEUGwDisHLIubgXKjuNRbkpzDMLb7/JMmgCe/gHM9FaaujokLey+gwTuLF5ndSQ7/EfQqrQx4g== - dependencies: - debug "^4.1.1" - eslint-visitor-keys "^1.1.0" - glob "^7.1.6" - is-glob "^4.0.1" - lodash.unescape "4.0.1" - semver "^6.3.0" - tsutils "^3.17.1" - -"@typescript-eslint/typescript-estree@3.10.1": - version "3.10.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz#fd0061cc38add4fad45136d654408569f365b853" - integrity sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w== - dependencies: - "@typescript-eslint/types" "3.10.1" - "@typescript-eslint/visitor-keys" "3.10.1" - debug "^4.1.1" - glob "^7.1.6" - is-glob "^4.0.1" - lodash "^4.17.15" - semver "^7.3.2" - tsutils "^3.17.1" - -"@typescript-eslint/visitor-keys@3.10.1": - version "3.10.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz#cd4274773e3eb63b2e870ac602274487ecd1e931" - integrity sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ== - dependencies: - eslint-visitor-keys "^1.1.0" - -ajv@^6.12.3: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -applicationinsights@1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.0.8.tgz#db6e3d983cf9f9405fe1ee5ba30ac6e1914537b5" - integrity sha512-KzOOGdphOS/lXWMFZe5440LUdFbrLpMvh2SaRxn7BmiI550KAoSb2gIhiq6kJZ9Ir3AxRRztjhzif+e5P5IXIg== - dependencies: - diagnostic-channel "0.2.0" - diagnostic-channel-publishers "0.2.1" - zone.js "0.7.6" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -asar@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/asar/-/asar-3.0.3.tgz#1fef03c2d6d2de0cbad138788e4f7ae03b129c7b" - integrity sha512-k7zd+KoR+n8pl71PvgElcoKHrVNiSXtw7odKbyNpmgKe7EGRF9Pnu3uLOukD37EvavKwVFxOUpqXTIZC5B5Pmw== - dependencies: - chromium-pickle-js "^0.2.0" - commander "^5.0.0" - glob "^7.1.6" - minimatch "^3.0.4" - optionalDependencies: - "@types/glob" "^7.1.1" - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" - integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== - -azure-storage@^2.1.0: - version "2.10.3" - resolved "https://registry.yarnpkg.com/azure-storage/-/azure-storage-2.10.3.tgz#c5966bf929d87587d78f6847040ea9a4b1d4a50a" - integrity sha512-IGLs5Xj6kO8Ii90KerQrrwuJKexLgSwYC4oLWmc11mzKe7Jt2E5IVg+ZQ8K53YWZACtVTMBNO3iGuA+4ipjJxQ== - dependencies: - browserify-mime "~1.2.9" - extend "^3.0.2" - json-edm-parser "0.1.2" - md5.js "1.3.4" - readable-stream "~2.0.0" - request "^2.86.0" - underscore "~1.8.3" - uuid "^3.0.0" - validator "~9.4.1" - xml2js "0.2.8" - xmlbuilder "^9.0.7" - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -base64-js@^1.2.3: - version "1.3.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" - integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -bluebird@^3.5.0: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -boolbase@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -browserify-mime@~1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/browserify-mime/-/browserify-mime-1.2.9.tgz#aeb1af28de6c0d7a6a2ce40adb68ff18422af31f" - integrity sha1-rrGvKN5sDXpqLOQK22j/GEIq8x8= - -buffer-alloc-unsafe@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" - integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== - -buffer-alloc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" - integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== - dependencies: - buffer-alloc-unsafe "^1.1.0" - buffer-fill "^1.0.0" - -buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= - -buffer-equal@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.0.tgz#59616b498304d556abd466966b22eeda3eca5fbe" - integrity sha1-WWFrSYME1Var1GaWayLu2j7KX74= - -buffer-fill@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= - -byline@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" - integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= - -cacheable-lookup@^5.0.3: - version "5.0.4" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" - integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== - -cacheable-request@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.1.tgz#062031c2856232782ed694a257fa35da93942a58" - integrity sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^4.0.0" - lowercase-keys "^2.0.0" - normalize-url "^4.1.0" - responselike "^2.0.0" - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -cheerio@^1.0.0-rc.1: - version "1.0.0-rc.2" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db" - integrity sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs= - dependencies: - css-select "~1.2.0" - dom-serializer "~0.1.0" - entities "~1.1.1" - htmlparser2 "^3.9.1" - lodash "^4.15.0" - parse5 "^3.0.1" - -chromium-pickle-js@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz#04a106672c18b085ab774d983dfa3ea138f22205" - integrity sha1-BKEGZywYsIWrd02YPfo+oTjyIgU= - -clone-response@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= - dependencies: - mimic-response "^1.0.0" - -colors@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" - integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= - -colors@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" - integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== - -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" - integrity sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q= - dependencies: - graceful-readlink ">= 1.0.0" - -commander@^2.8.1: - version "2.19.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" - integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== - -commander@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" - integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== - -commander@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.0.0.tgz#3e2bbfd8bb6724760980988fb5b22b7ee6b71ab2" - integrity sha512-ovx/7NkTrnPuIV8sqk/GjUIIM1+iUQeqA3ye2VNpq9sVoiZsooObWlQy+OPWGI17GDaEoybuAGJm6U8yC077BA== - -compare-version@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/compare-version/-/compare-version-0.1.2.tgz#0162ec2d9351f5ddd59a9202cba935366a725080" - integrity sha1-AWLsLZNR9d3VmpICy6k1NmpyUIA= - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -cross-spawn@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -css-select@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" - integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= - dependencies: - boolbase "~1.0.0" - css-what "2.1" - domutils "1.5.1" - nth-check "~1.0.1" - -css-what@2.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.2.tgz#c0876d9d0480927d7d4920dcd72af3595649554d" - integrity sha512-wan8dMWQ0GUeF7DGEPVjhHemVW/vy6xUYmFzRY8RYqgA0JtXC9rJmbScBjqSu6dg9q0lwPQy6ZAmJVr3PPTvqQ== - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -debug@^2.6.8: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^4.1.1, debug@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - dependencies: - ms "2.1.2" - -decompress-response@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" - integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== - dependencies: - mimic-response "^3.1.0" - -defer-to-connect@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.0.tgz#83d6b199db041593ac84d781b5222308ccf4c2c1" - integrity sha512-bYL2d05vOSf1JEZNx5vSAtPuBMkX8K9EUutg7zlKvTqKXHt7RhWJFbmd7qakVuf13i+IkGmp6FwSsONOf6VYIg== - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -denodeify@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/denodeify/-/denodeify-1.2.1.tgz#3a36287f5034e699e7577901052c2e6c94251631" - integrity sha1-OjYof1A05pnnV3kBBSwubJQlFjE= - -diagnostic-channel-publishers@0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.2.1.tgz#8e2d607a8b6d79fe880b548bc58cc6beb288c4f3" - integrity sha1-ji1geottef6IC1SLxYzGvrKIxPM= - -diagnostic-channel@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" - integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= - dependencies: - semver "^5.3.0" - -dir-compare@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/dir-compare/-/dir-compare-2.4.0.tgz#785c41dc5f645b34343a4eafc50b79bac7f11631" - integrity sha512-l9hmu8x/rjVC9Z2zmGzkhOEowZvW7pmYws5CWHutg8u1JgvsKWMx7Q/UODeu4djLZ4FgW5besw5yvMQnBHzuCA== - dependencies: - buffer-equal "1.0.0" - colors "1.0.3" - commander "2.9.0" - minimatch "3.0.4" - -dom-serializer@0, dom-serializer@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" - integrity sha1-BzxpdUbOB4DOI75KKOKT5AvDDII= - dependencies: - domelementtype "~1.1.1" - entities "~1.1.1" - -domelementtype@1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.2.1.tgz#578558ef23befac043a1abb0db07635509393479" - integrity sha512-SQVCLFS2E7G5CRCMdn6K9bIhRj1bS6QBWZfF0TUPh4V/BbqrQ619IdSS3/izn0FZ+9l+uODzaZjb08fjOfablA== - -domelementtype@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" - integrity sha1-sXrtguirWeUt2cGbF1bg/BhyBMI= - -domelementtype@~1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" - integrity sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs= - -domhandler@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" - integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== - dependencies: - domelementtype "1" - -domutils@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" - integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= - dependencies: - dom-serializer "0" - domelementtype "1" - -domutils@^1.5.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" - integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== - dependencies: - dom-serializer "0" - domelementtype "1" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -electron-osx-sign@^0.4.16: - version "0.4.16" - resolved "https://registry.yarnpkg.com/electron-osx-sign/-/electron-osx-sign-0.4.16.tgz#0be8e579b2d9fa4c12d2a21f063898294b3434aa" - integrity sha512-ziMWfc3NmQlwnWLW6EaZq8nH2BWVng/atX5GWsGwhexJYpdW6hsg//MkAfRTRx1kR3Veiqkeiog1ibkbA4x0rg== - dependencies: - bluebird "^3.5.0" - compare-version "^0.1.2" - debug "^2.6.8" - isbinaryfile "^3.0.2" - minimist "^1.2.0" - plist "^3.0.1" - -end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -entities@^1.1.1, entities@~1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" - integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== - -esbuild@^0.8.30: - version "0.8.30" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.30.tgz#3d057ff9ffe6d5d30bccb0afe8cc92a2e69622d3" - integrity sha512-gCJQYUMO9QNrfpNOIiCnFoX41nWiPFCvURBQF+qWckyJ7gmw2xCShdKCXvS+RZcQ5krcxEOLIkzujqclePKhfw== - -eslint-scope@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" - integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - -eslint-utils@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-visitor-keys@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" - integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== - -esrecurse@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" - integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== - dependencies: - estraverse "^4.1.0" - -estraverse@^4.1.0, estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -events@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379" - integrity sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg== - -extend@^3.0.2, extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= - dependencies: - pend "~1.2.0" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" - integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -fs-extra@^9.0.1, fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -get-stream@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -glob@^7.0.6: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.6: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -got@11.8.1: - version "11.8.1" - resolved "https://registry.yarnpkg.com/got/-/got-11.8.1.tgz#df04adfaf2e782babb3daabc79139feec2f7e85d" - integrity sha512-9aYdZL+6nHmvJwHALLwKSUZ0hMwGaJGYv3hoPLPgnT8BoBXm1SjnZeky+91tfwJaDzun2s4RsBRy48IEYv2q2Q== - dependencies: - "@sindresorhus/is" "^4.0.0" - "@szmarczak/http-timer" "^4.0.5" - "@types/cacheable-request" "^6.0.1" - "@types/responselike" "^1.0.0" - cacheable-lookup "^5.0.3" - cacheable-request "^7.0.1" - decompress-response "^6.0.0" - http2-wrapper "^1.0.0-beta.5.2" - lowercase-keys "^2.0.0" - p-cancelable "^2.0.0" - responselike "^2.0.0" - -graceful-fs@^4.1.6, graceful-fs@^4.2.0: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - -"graceful-readlink@>= 1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" - integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU= - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -htmlparser2@^3.9.1: - version "3.10.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.0.tgz#5f5e422dcf6119c0d983ed36260ce9ded0bee464" - integrity sha512-J1nEUGv+MkXS0weHNWVKJJ+UrLfePxRWpN3C9bEi9fLxL2+ggW94DQvgYVXsaT30PGwYRIZKNZXuyMhp3Di4bQ== - dependencies: - domelementtype "^1.3.0" - domhandler "^2.3.0" - domutils "^1.5.1" - entities "^1.1.1" - inherits "^2.0.1" - readable-stream "^3.0.6" - -http-cache-semantics@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -http2-wrapper@^1.0.0-beta.5.2: - version "1.0.0-beta.5.2" - resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.0-beta.5.2.tgz#8b923deb90144aea65cf834b016a340fc98556f3" - integrity sha512-xYz9goEyBnC8XwXDTuC/MZ6t+MrKVQZOk4s7+PaDkwIsQd8IwqvM+0M6bA/2lvG8GHXcPdf+MejTUeO2LCPCeQ== - dependencies: - quick-lru "^5.1.1" - resolve-alpn "^1.0.0" - -iconv-lite-umd@0.6.8: - version "0.6.8" - resolved "https://registry.yarnpkg.com/iconv-lite-umd/-/iconv-lite-umd-0.6.8.tgz#5ad310ec126b260621471a2d586f7f37b9958ec0" - integrity sha512-zvXJ5gSwMC9JD3wDzH8CoZGc1pbiJn12Tqjk8BXYCnYz3hYL5GRjHW8LEykjXhV9WgNGI4rgpgHcbIiBfrRq6A== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.1, inherits@^2.0.4, inherits@~2.0.1: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-glob@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isbinaryfile@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.3.tgz#5d6def3edebf6e8ca8cae9c30183a804b5f8be80" - integrity sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw== - dependencies: - buffer-alloc "^1.2.0" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -jsbi@^3.1.3: - version "3.1.4" - resolved "https://registry.yarnpkg.com/jsbi/-/jsbi-3.1.4.tgz#9654dd02207a66a4911b4e4bb74265bc2cbc9dd0" - integrity sha512-52QRRFSsi9impURE8ZUbzAMCLjPm4THO7H2fcuIvaaeFTbSysvkodbQQXIVsNgq/ypDbq6dJiuGKL0vZ/i9hUg== - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-edm-parser@0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/json-edm-parser/-/json-edm-parser-0.1.2.tgz#1e60b0fef1bc0af67bc0d146dfdde5486cd615b4" - integrity sha1-HmCw/vG8CvZ7wNFG393lSGzWFbQ= - dependencies: - jsonparse "~1.2.0" - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -jsonc-parser@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.3.0.tgz#7c7fc988ee1486d35734faaaa866fadb00fa91ee" - integrity sha512-b0EBt8SWFNnixVdvoR2ZtEGa9ZqLhbJnOjezn+WP+8kspFm+PFYDN8Z4Bc7pRlDjvuVcADSUkroIuTWWn/YiIA== - -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -jsonparse@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.2.0.tgz#5c0c5685107160e72fe7489bddea0b44c2bc67bd" - integrity sha1-XAxWhRBxYOcv50ib3eoLRMK8Z70= - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -keyv@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.0.3.tgz#4f3aa98de254803cafcd2896734108daa35e4254" - integrity sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA== - dependencies: - json-buffer "3.0.1" - -linkify-it@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.0.3.tgz#d94a4648f9b1c179d64fa97291268bdb6ce9434f" - integrity sha1-2UpGSPmxwXnWT6lykSaL22zpQ08= - dependencies: - uc.micro "^1.0.1" - -lodash.unescape@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" - integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw= - -lodash@^4.15.0, lodash@^4.17.10: - version "4.17.19" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" - integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== - -lodash@^4.17.15: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== - -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -markdown-it@^8.3.1: - version "8.4.2" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.2.tgz#386f98998dc15a37722aa7722084f4020bdd9b54" - integrity sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ== - dependencies: - argparse "^1.0.7" - entities "~1.1.1" - linkify-it "^2.0.0" - mdurl "^1.0.1" - uc.micro "^1.0.5" - -md5.js@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" - integrity sha1-6b296UogpawYsENA/Fdk1bCdkB0= - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -mdurl@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" - integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= - -mime-db@1.45.0: - version "1.45.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" - integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w== - -mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.28" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd" - integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ== - dependencies: - mime-db "1.45.0" - -mime@^1.3.4: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== - -mime@^1.4.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-response@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -mimic-response@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" - integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== - -minimatch@3.0.4, minimatch@^3.0.3, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.3.tgz#3db5c0765545ab8637be71f333a104a965a9ca3f" - integrity sha512-+bMdgqjMN/Z77a6NlY/I3U5LlRDbnmaAk6lDveAPKwSpcPM4tKAuYsvYF8xjhOPXhOYGe/73vVLVez5PW+jqhw== - -mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -mute-stream@~0.0.4: - version "0.0.7" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= - -node-abort-controller@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-1.1.0.tgz#8a734a631b022af29963be7245c1483cbb9e070d" - integrity sha512-dEYmUqjtbivotqjraOe8UvhT/poFfog1BQRNsZm/MSEDDESk2cQ1tvD8kGyuN07TM/zoW+n42odL8zTeJupYdQ== - -node-fetch@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - -normalize-url@^4.1.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" - integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== - -nth-check@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" - integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== - dependencies: - boolbase "~1.0.0" - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-tmpdir@^1.0.0, os-tmpdir@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -osenv@^0.1.3: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -p-cancelable@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.0.0.tgz#4a3740f5bdaf5ed5d7c3e34882c6fb5d6b266a6e" - integrity sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg== - -p-limit@*, p-limit@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -parse-semver@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/parse-semver/-/parse-semver-1.1.1.tgz#9a4afd6df063dc4826f93fba4a99cf223f666cb8" - integrity sha1-mkr9bfBj3Egm+T+6SpnPIj9mbLg= - dependencies: - semver "^5.1.0" - -parse5@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.3.tgz#042f792ffdd36851551cf4e9e066b3874ab45b5c" - integrity sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA== - dependencies: - "@types/node" "*" - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -plist@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.1.tgz#a9b931d17c304e8912ef0ba3bdd6182baf2e1f8c" - integrity sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ== - dependencies: - base64-js "^1.2.3" - xmlbuilder "^9.0.7" - xmldom "0.1.x" - -priorityqueuejs@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/priorityqueuejs/-/priorityqueuejs-1.0.0.tgz#2ee4f23c2560913e08c07ce5ccdd6de3df2c5af8" - integrity sha1-LuTyPCVgkT4IwHzlzN1t498sWvg= - -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M= - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - -psl@^1.1.28, psl@^1.1.33: - version "1.8.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -q@^1.0.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= - -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -quick-lru@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" - integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== - -read@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" - integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= - dependencies: - mute-stream "~0.0.4" - -readable-stream@^3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.0.6.tgz#351302e4c68b5abd6a2ed55376a7f9a25be3057a" - integrity sha512-9E1oLoOWfhSXHGv6QlwXJim7uNzd9EVlWK+21tCU9Ju/kR0/p2AZYPz4qSchgO8PlLIH4FpZYfzwS+rEksZjIg== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@~2.0.0: - version "2.0.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" - integrity sha1-j5A0HmilPMySh4jaz80Rs265t44= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - -request@^2.86.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -resolve-alpn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.0.0.tgz#745ad60b3d6aff4b4a48e01b8c0bdc70959e0e8c" - integrity sha512-rTuiIEqFmGxne4IovivKSDzld2lWW9QCjqv80SYjPgf+gS35eaCAjaP54CCwGAwBtnCsvNLYtqxe1Nw+i6JEmA== - -responselike@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.0.tgz#26391bcc3174f750f9a79eacc40a12a5c42d7723" - integrity sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw== - dependencies: - lowercase-keys "^2.0.0" - -safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sax@0.5.x: - version "0.5.8" - resolved "https://registry.yarnpkg.com/sax/-/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1" - integrity sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE= - -sax@>=0.6.0: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -semaphore@^1.0.5: - version "1.1.0" - resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" - integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== - -semver@^5.1.0, semver@^5.3.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" - integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== - -semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.3.2: - version "7.3.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" - integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== - dependencies: - lru-cache "^6.0.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -source-map@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -sshpk@^1.7.0: - version "1.16.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" - integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -string_decoder@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= - -tmp@0.0.29: - version "0.0.29" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.29.tgz#f25125ff0dd9da3ccb0c2dd371ee1288bb9128c0" - integrity sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA= - dependencies: - os-tmpdir "~1.0.1" - -tough-cookie@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" - integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.1.2" - -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tslib@^1.8.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" - integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== - -tslib@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" - integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== - -tsutils@^3.17.1: - version "3.17.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" - integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== - dependencies: - tslib "^1.8.1" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tunnel@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.4.tgz#2d3785a158c174c9a16dc2c046ec5fc5f1742213" - integrity sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM= - -tunnel@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" - integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -typed-rest-client@^0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/typed-rest-client/-/typed-rest-client-0.9.0.tgz#f768cc0dc3f4e950f06e04825c36b3e7834aa1f2" - integrity sha1-92jMDcP06VDwbgSCXDaz54NKofI= - dependencies: - tunnel "0.0.4" - underscore "1.8.3" - -typescript@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" - integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== - -typescript@^4.3.0-dev.20210426: - version "4.3.0-dev.20210426" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.0-dev.20210426.tgz#00198cb8828f6a04b4e0ae32554a486bf7137a53" - integrity sha512-8YTqlzf3w8O8XwnnRlwRV2rswu7V7WEPUnAnH1BPPMrr06thNByMjIadA5SDW3tUJc1MG8Uj3NgZYocU5fWTVg== - -uc.micro@^1.0.1, uc.micro@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376" - integrity sha512-JoLI4g5zv5qNyT09f4YAvEZIIV1oOjqnewYg5D38dkQljIzpPT296dbIGvKro3digYI1bkb7W6EP1y4uDlmzLg== - -underscore@1.8.3, underscore@~1.8.3: - version "1.8.3" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" - integrity sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI= - -underscore@^1.8.3: - version "1.9.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" - integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== - -universal-user-agent@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" - integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== - -universalify@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -url-join@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/url-join/-/url-join-1.1.0.tgz#741c6c2f4596c4830d6718460920d0c92202dc78" - integrity sha1-dBxsL0WWxIMNZxhGCSDQySIC3Hg= - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -uuid@^3.0.0, uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -uuid@^8.3.0: - version "8.3.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" - integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== - -validator@~9.4.1: - version "9.4.1" - resolved "https://registry.yarnpkg.com/validator/-/validator-9.4.1.tgz#abf466d398b561cd243050112c6ff1de6cc12663" - integrity sha512-YV5KjzvRmSyJ1ee/Dm5UED0G+1L4GZnLN3w6/T+zZm8scVua4sOhYKWTUrKa0H/tMiJyO9QLHMPN+9mB/aMunA== - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -vsce@1.48.0: - version "1.48.0" - resolved "https://registry.yarnpkg.com/vsce/-/vsce-1.48.0.tgz#31c1a4c6909c3b8bdc48b3d32cc8c8e94c7113a2" - integrity sha512-1qJn6QLRTu26FIvvMbK/gzHLLdxJVTg9CUTSnCjJHObCCF5CQ0F3FUv7t+5cT7i0J5v5YljrsRY09u7dPBcEnA== - dependencies: - cheerio "^1.0.0-rc.1" - commander "^2.8.1" - denodeify "^1.2.1" - glob "^7.0.6" - lodash "^4.17.10" - markdown-it "^8.3.1" - mime "^1.3.4" - minimatch "^3.0.3" - osenv "^0.1.3" - parse-semver "^1.1.1" - read "^1.0.7" - semver "^5.1.0" - tmp "0.0.29" - url-join "^1.1.0" - vso-node-api "6.1.2-preview" - yauzl "^2.3.1" - yazl "^2.2.2" - -vscode-universal@deepak1556/universal#61454d96223b774c53cda10f72c2098c0ce02d58: - version "0.0.2" - resolved "https://codeload.github.com/deepak1556/universal/tar.gz/61454d96223b774c53cda10f72c2098c0ce02d58" - dependencies: - "@malept/cross-spawn-promise" "^1.1.0" - "@types/debug" "^4.1.5" - "@types/fs-extra" "^9.0.6" - "@types/node" "^14.14.21" - asar "^3.0.3" - debug "^4.3.1" - dir-compare "^2.4.0" - fs-extra "^9.0.1" - typescript "^4.1.3" - -vso-node-api@6.1.2-preview: - version "6.1.2-preview" - resolved "https://registry.yarnpkg.com/vso-node-api/-/vso-node-api-6.1.2-preview.tgz#aab3546df2451ecd894e071bb99b5df19c5fa78f" - integrity sha1-qrNUbfJFHs2JTgcbuZtd8Zxfp48= - dependencies: - q "^1.0.1" - tunnel "0.0.4" - typed-rest-client "^0.9.0" - underscore "^1.8.3" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -xml2js@0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.2.8.tgz#9b81690931631ff09d1957549faf54f4f980b3c2" - integrity sha1-m4FpCTFjH/CdGVdUn69U9PmAs8I= - dependencies: - sax "0.5.x" - -xml2js@^0.4.19: - version "0.4.23" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" - integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== - dependencies: - sax ">=0.6.0" - xmlbuilder "~11.0.0" - -xmlbuilder@>=11.0.1: - version "15.1.1" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-15.1.1.tgz#9dcdce49eea66d8d10b42cae94a79c3c8d0c2ec5" - integrity sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg== - -xmlbuilder@^9.0.7: - version "9.0.7" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" - integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= - -xmlbuilder@~11.0.0: - version "11.0.1" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" - integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== - -xmldom@0.1.x: - version "0.1.31" - resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff" - integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yauzl@^2.3.1: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" - -yazl@^2.2.2: - version "2.4.3" - resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.4.3.tgz#ec26e5cc87d5601b9df8432dbdd3cd2e5173a071" - integrity sha1-7CblzIfVYBud+EMtvdPNLlFzoHE= - dependencies: - buffer-crc32 "~0.2.3" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -zone.js@0.7.6: - version "0.7.6" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.7.6.tgz#fbbc39d3e0261d0986f1ba06306eb3aeb0d22009" - integrity sha1-+7w50+AmHQmG8boGMG6zrrDSIAk= diff --git a/lib/vscode/cgmanifest.json b/lib/vscode/cgmanifest.json deleted file mode 100644 index aa54e3243ab4..000000000000 --- a/lib/vscode/cgmanifest.json +++ /dev/null @@ -1,545 +0,0 @@ -{ - "registrations": [ - { - "component": { - "type": "git", - "git": { - "name": "chromium", - "repositoryUrl": "https://chromium.googlesource.com/chromium/src", - "commitHash": "5342041f85833c038dcbc5632d62fc10f7592323" - } - }, - "licenseDetail": [ - "BSD License", - "", - "Copyright 2015 The Chromium Authors. 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.", - "", - " * Neither the name Google Inc. nor the names of its contributors may be used to", - " endorse or promote products derived from this software without specific", - " prior written permission.", - "", - "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." - ], - "isOnlyProductionDependency": true, - "version": "89.0.4389.114" - }, - { - "component": { - "type": "git", - "git": { - "name": "nodejs", - "repositoryUrl": "https://github.com/nodejs/node", - "commitHash": "bd60e93357a118204ea238d94e7a9e4209d93062" - } - }, - "isOnlyProductionDependency": true, - "version": "14.16.0" - }, - { - "component": { - "type": "git", - "git": { - "name": "electron", - "repositoryUrl": "https://github.com/electron/electron", - "commitHash": "9ce7c512475aa6aa91417a3b08e19f85a8587a30" - } - }, - "isOnlyProductionDependency": true, - "license": "MIT", - "version": "12.0.4" - }, - { - "component": { - "type": "git", - "git": { - "name": "inno setup", - "repositoryUrl": "https://github.com/jrsoftware/issrc", - "commitHash": "03fe8f4edb3e96c7835c9483052625bbedb160f2" - } - }, - "isOnlyProductionDependency": true, - "licenseDetail": [ - "Inno Setup License", - "==================", - "", - "Except where otherwise noted, all of the documentation and software included in the Inno Setup", - "package is copyrighted by Jordan Russell.", - "", - "Copyright (C) 1997-2020 Jordan Russell. All rights reserved.", - "Portions Copyright (C) 2000-2020 Martijn Laan. All rights reserved.", - "", - "This software is provided \"as-is,\" without any express or implied warranty. In no event shall the", - "author be held liable for any damages arising from the use of this software.", - "", - "Permission is granted to anyone to use this software for any purpose, including commercial", - "applications, and to alter and redistribute it, provided that the following conditions are met:", - "", - "1. All redistributions of source code files must retain all copyright notices that are currently in", - " place, and this list of conditions without modification.", - "", - "2. All redistributions in binary form must retain all occurrences of the above copyright notice and", - " web site addresses that are currently in place (for example, in the About boxes).", - "", - "3. The origin of this software must not be misrepresented; you must not claim that you wrote the", - " original software. If you use this software to distribute a product, an acknowledgment in the", - " product documentation would be appreciated but is not required.", - "", - "4. Modified versions in source or binary form must be plainly marked as such, and must not be", - " misrepresented as being the original software.", - "", - "", - "Jordan Russell", - "jr-2010 AT jrsoftware.org", - "https://jrsoftware.org/" - ], - "version": "5.5.6" - }, - { - "component": { - "type": "git", - "git": { - "name": "spdlog original", - "repositoryUrl": "https://github.com/gabime/spdlog", - "commitHash": "4fba14c79f356ae48d6141c561bf9fd7ba33fabd" - } - }, - "isOnlyProductionDependency": true, - "license": "MIT", - "version": "0.14.0" - }, - { - "component": { - "type": "git", - "git": { - "name": "vscode-codicons", - "repositoryUrl": "https://github.com/microsoft/vscode-codicons", - "commitHash": "ccdcf91d57d3a5a1d6b620d95d518bab4d75984d" - } - }, - "license": "MIT and Creative Commons Attribution 4.0", - "version": "0.0.14" - }, - { - "component": { - "type": "npm", - "npm": { - "name": "mdn-data", - "version": "1.1.12" - } - }, - "repositoryUrl": "https://github.com/mdn/data", - "licenseDetail": [ - "Mozilla Public License Version 2.0", - "", - "Copyright (c) 2018 Mozilla Corporation", - "", - "==================================", - "", - "1. Definitions", - "--------------", - "", - "1.1. \"Contributor\"", - " means each individual or legal entity that creates, contributes to", - " the creation of, or owns Covered Software.", - "", - "1.2. \"Contributor Version\"", - " means the combination of the Contributions of others (if any) used", - " by a Contributor and that particular Contributor's Contribution.", - "", - "1.3. \"Contribution\"", - " means Covered Software of a particular Contributor.", - "", - "1.4. \"Covered Software\"", - " means Source Code Form to which the initial Contributor has attached", - " the notice in Exhibit A, the Executable Form of such Source Code", - " Form, and Modifications of such Source Code Form, in each case", - " including portions thereof.", - "", - "1.5. \"Incompatible With Secondary Licenses\"", - " means", - "", - " (a) that the initial Contributor has attached the notice described", - " in Exhibit B to the Covered Software; or", - "", - " (b) that the Covered Software was made available under the terms of", - " version 1.1 or earlier of the License, but not also under the", - " terms of a Secondary License.", - "", - "1.6. \"Executable Form\"", - " means any form of the work other than Source Code Form.", - "", - "1.7. \"Larger Work\"", - " means a work that combines Covered Software with other material, in", - " a separate file or files, that is not Covered Software.", - "", - "1.8. \"License\"", - " means this document.", - "", - "1.9. \"Licensable\"", - " means having the right to grant, to the maximum extent possible,", - " whether at the time of the initial grant or subsequently, any and", - " all of the rights conveyed by this License.", - "", - "1.10. \"Modifications\"", - " means any of the following:", - "", - " (a) any file in Source Code Form that results from an addition to,", - " deletion from, or modification of the contents of Covered", - " Software; or", - "", - " (b) any new file in Source Code Form that contains any Covered", - " Software.", - "", - "1.11. \"Patent Claims\" of a Contributor", - " means any patent claim(s), including without limitation, method,", - " process, and apparatus claims, in any patent Licensable by such", - " Contributor that would be infringed, but for the grant of the", - " License, by the making, using, selling, offering for sale, having", - " made, import, or transfer of either its Contributions or its", - " Contributor Version.", - "", - "1.12. \"Secondary License\"", - " means either the GNU General Public License, Version 2.0, the GNU", - " Lesser General Public License, Version 2.1, the GNU Affero General", - " Public License, Version 3.0, or any later versions of those", - " licenses.", - "", - "1.13. \"Source Code Form\"", - " means the form of the work preferred for making modifications.", - "", - "1.14. \"You\" (or \"Your\")", - " means an individual or a legal entity exercising rights under this", - " License. For legal entities, \"You\" includes any entity that", - " controls, is controlled by, or is under common control with You. For", - " purposes of this definition, \"control\" means (a) the power, direct", - " or indirect, to cause the direction or management of such entity,", - " whether by contract or otherwise, or (b) ownership of more than", - " fifty percent (50%) of the outstanding shares or beneficial", - " ownership of such entity.", - "", - "2. License Grants and Conditions", - "--------------------------------", - "", - "2.1. Grants", - "", - "Each Contributor hereby grants You a world-wide, royalty-free,", - "non-exclusive license:", - "", - "(a) under intellectual property rights (other than patent or trademark)", - " Licensable by such Contributor to use, reproduce, make available,", - " modify, display, perform, distribute, and otherwise exploit its", - " Contributions, either on an unmodified basis, with Modifications, or", - " as part of a Larger Work; and", - "", - "(b) under Patent Claims of such Contributor to make, use, sell, offer", - " for sale, have made, import, and otherwise transfer either its", - " Contributions or its Contributor Version.", - "", - "2.2. Effective Date", - "", - "The licenses granted in Section 2.1 with respect to any Contribution", - "become effective for each Contribution on the date the Contributor first", - "distributes such Contribution.", - "", - "2.3. Limitations on Grant Scope", - "", - "The licenses granted in this Section 2 are the only rights granted under", - "this License. No additional rights or licenses will be implied from the", - "distribution or licensing of Covered Software under this License.", - "Notwithstanding Section 2.1(b) above, no patent license is granted by a", - "Contributor:", - "", - "(a) for any code that a Contributor has removed from Covered Software;", - " or", - "", - "(b) for infringements caused by: (i) Your and any other third party's", - " modifications of Covered Software, or (ii) the combination of its", - " Contributions with other software (except as part of its Contributor", - " Version); or", - "", - "(c) under Patent Claims infringed by Covered Software in the absence of", - " its Contributions.", - "", - "This License does not grant any rights in the trademarks, service marks,", - "or logos of any Contributor (except as may be necessary to comply with", - "the notice requirements in Section 3.4).", - "", - "2.4. Subsequent Licenses", - "", - "No Contributor makes additional grants as a result of Your choice to", - "distribute the Covered Software under a subsequent version of this", - "License (see Section 10.2) or under the terms of a Secondary License (if", - "permitted under the terms of Section 3.3).", - "", - "2.5. Representation", - "", - "Each Contributor represents that the Contributor believes its", - "Contributions are its original creation(s) or it has sufficient rights", - "to grant the rights to its Contributions conveyed by this License.", - "", - "2.6. Fair Use", - "", - "This License is not intended to limit any rights You have under", - "applicable copyright doctrines of fair use, fair dealing, or other", - "equivalents.", - "", - "2.7. Conditions", - "", - "Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted", - "in Section 2.1.", - "", - "3. Responsibilities", - "-------------------", - "", - "3.1. Distribution of Source Form", - "", - "All distribution of Covered Software in Source Code Form, including any", - "Modifications that You create or to which You contribute, must be under", - "the terms of this License. You must inform recipients that the Source", - "Code Form of the Covered Software is governed by the terms of this", - "License, and how they can obtain a copy of this License. You may not", - "attempt to alter or restrict the recipients' rights in the Source Code", - "Form.", - "", - "3.2. Distribution of Executable Form", - "", - "If You distribute Covered Software in Executable Form then:", - "", - "(a) such Covered Software must also be made available in Source Code", - " Form, as described in Section 3.1, and You must inform recipients of", - " the Executable Form how they can obtain a copy of such Source Code", - " Form by reasonable means in a timely manner, at a charge no more", - " than the cost of distribution to the recipient; and", - "", - "(b) You may distribute such Executable Form under the terms of this", - " License, or sublicense it under different terms, provided that the", - " license for the Executable Form does not attempt to limit or alter", - " the recipients' rights in the Source Code Form under this License.", - "", - "3.3. Distribution of a Larger Work", - "", - "You may create and distribute a Larger Work under terms of Your choice,", - "provided that You also comply with the requirements of this License for", - "the Covered Software. If the Larger Work is a combination of Covered", - "Software with a work governed by one or more Secondary Licenses, and the", - "Covered Software is not Incompatible With Secondary Licenses, this", - "License permits You to additionally distribute such Covered Software", - "under the terms of such Secondary License(s), so that the recipient of", - "the Larger Work may, at their option, further distribute the Covered", - "Software under the terms of either this License or such Secondary", - "License(s).", - "", - "3.4. Notices", - "", - "You may not remove or alter the substance of any license notices", - "(including copyright notices, patent notices, disclaimers of warranty,", - "or limitations of liability) contained within the Source Code Form of", - "the Covered Software, except that You may alter any license notices to", - "the extent required to remedy known factual inaccuracies.", - "", - "3.5. Application of Additional Terms", - "", - "You may choose to offer, and to charge a fee for, warranty, support,", - "indemnity or liability obligations to one or more recipients of Covered", - "Software. However, You may do so only on Your own behalf, and not on", - "behalf of any Contributor. You must make it absolutely clear that any", - "such warranty, support, indemnity, or liability obligation is offered by", - "You alone, and You hereby agree to indemnify every Contributor for any", - "liability incurred by such Contributor as a result of warranty, support,", - "indemnity or liability terms You offer. You may include additional", - "disclaimers of warranty and limitations of liability specific to any", - "jurisdiction.", - "", - "4. Inability to Comply Due to Statute or Regulation", - "---------------------------------------------------", - "", - "If it is impossible for You to comply with any of the terms of this", - "License with respect to some or all of the Covered Software due to", - "statute, judicial order, or regulation then You must: (a) comply with", - "the terms of this License to the maximum extent possible; and (b)", - "describe the limitations and the code they affect. Such description must", - "be placed in a text file included with all distributions of the Covered", - "Software under this License. Except to the extent prohibited by statute", - "or regulation, such description must be sufficiently detailed for a", - "recipient of ordinary skill to be able to understand it.", - "", - "5. Termination", - "--------------", - "", - "5.1. The rights granted under this License will terminate automatically", - "if You fail to comply with any of its terms. However, if You become", - "compliant, then the rights granted under this License from a particular", - "Contributor are reinstated (a) provisionally, unless and until such", - "Contributor explicitly and finally terminates Your grants, and (b) on an", - "ongoing basis, if such Contributor fails to notify You of the", - "non-compliance by some reasonable means prior to 60 days after You have", - "come back into compliance. Moreover, Your grants from a particular", - "Contributor are reinstated on an ongoing basis if such Contributor", - "notifies You of the non-compliance by some reasonable means, this is the", - "first time You have received notice of non-compliance with this License", - "from such Contributor, and You become compliant prior to 30 days after", - "Your receipt of the notice.", - "", - "5.2. If You initiate litigation against any entity by asserting a patent", - "infringement claim (excluding declaratory judgment actions,", - "counter-claims, and cross-claims) alleging that a Contributor Version", - "directly or indirectly infringes any patent, then the rights granted to", - "You by any and all Contributors for the Covered Software under Section", - "2.1 of this License shall terminate.", - "", - "5.3. In the event of termination under Sections 5.1 or 5.2 above, all", - "end user license agreements (excluding distributors and resellers) which", - "have been validly granted by You or Your distributors under this License", - "prior to termination shall survive termination.", - "", - "************************************************************************", - "* *", - "* 6. Disclaimer of Warranty *", - "* ------------------------- *", - "* *", - "* Covered Software is provided under this License on an \"as is\" *", - "* basis, without warranty of any kind, either expressed, implied, or *", - "* statutory, including, without limitation, warranties that the *", - "* Covered Software is free of defects, merchantable, fit for a *", - "* particular purpose or non-infringing. The entire risk as to the *", - "* quality and performance of the Covered Software is with You. *", - "* Should any Covered Software prove defective in any respect, You *", - "* (not any Contributor) assume the cost of any necessary servicing, *", - "* repair, or correction. This disclaimer of warranty constitutes an *", - "* essential part of this License. No use of any Covered Software is *", - "* authorized under this License except under this disclaimer. *", - "* *", - "************************************************************************", - "", - "************************************************************************", - "* *", - "* 7. Limitation of Liability *", - "* -------------------------- *", - "* *", - "* Under no circumstances and under no legal theory, whether tort *", - "* (including negligence), contract, or otherwise, shall any *", - "* Contributor, or anyone who distributes Covered Software as *", - "* permitted above, be liable to You for any direct, indirect, *", - "* special, incidental, or consequential damages of any character *", - "* including, without limitation, damages for lost profits, loss of *", - "* goodwill, work stoppage, computer failure or malfunction, or any *", - "* and all other commercial damages or losses, even if such party *", - "* shall have been informed of the possibility of such damages. This *", - "* limitation of liability shall not apply to liability for death or *", - "* personal injury resulting from such party's negligence to the *", - "* extent applicable law prohibits such limitation. Some *", - "* jurisdictions do not allow the exclusion or limitation of *", - "* incidental or consequential damages, so this exclusion and *", - "* limitation may not apply to You. *", - "* *", - "************************************************************************", - "", - "8. Litigation", - "-------------", - "", - "Any litigation relating to this License may be brought only in the", - "courts of a jurisdiction where the defendant maintains its principal", - "place of business and such litigation shall be governed by laws of that", - "jurisdiction, without reference to its conflict-of-law provisions.", - "Nothing in this Section shall prevent a party's ability to bring", - "cross-claims or counter-claims.", - "", - "9. Miscellaneous", - "----------------", - "", - "This License represents the complete agreement concerning the subject", - "matter hereof. If any provision of this License is held to be", - "unenforceable, such provision shall be reformed only to the extent", - "necessary to make it enforceable. Any law or regulation which provides", - "that the language of a contract shall be construed against the drafter", - "shall not be used to construe this License against a Contributor.", - "", - "10. Versions of the License", - "---------------------------", - "", - "10.1. New Versions", - "", - "Mozilla Foundation is the license steward. Except as provided in Section", - "10.3, no one other than the license steward has the right to modify or", - "publish new versions of this License. Each version will be given a", - "distinguishing version number.", - "", - "10.2. Effect of New Versions", - "", - "You may distribute the Covered Software under the terms of the version", - "of the License under which You originally received the Covered Software,", - "or under the terms of any subsequent version published by the license", - "steward.", - "", - "10.3. Modified Versions", - "", - "If you create software not governed by this License, and you want to", - "create a new license for such software, you may create and use a", - "modified version of this License if you rename the license and remove", - "any references to the name of the license steward (except to note that", - "such modified license differs from this License).", - "", - "10.4. Distributing Source Code Form that is Incompatible With Secondary", - "Licenses", - "", - "If You choose to distribute Source Code Form that is Incompatible With", - "Secondary Licenses under the terms of this version of the License, the", - "notice described in Exhibit B of this License must be attached.", - "", - "Exhibit A - Source Code Form License Notice", - "-------------------------------------------", - "", - " This Source Code Form is subject to the terms of the Mozilla Public", - " License, v. 2.0. If a copy of the MPL was not distributed with this", - " file, You can obtain one at http://mozilla.org/MPL/2.0/.", - "", - "If it is not possible or desirable to put the notice in a particular", - "file, then You may include the notice in a location (such as a LICENSE", - "file in a relevant directory) where a recipient would be likely to look", - "for such a notice.", - "", - "You may add additional accurate notices of copyright ownership.", - "", - "Exhibit B - \"Incompatible With Secondary Licenses\" Notice", - "---------------------------------------------------------", - "", - " This Source Code Form is \"Incompatible With Secondary Licenses\", as", - " defined by the Mozilla Public License, v. 2.0." - ], - "license": "MPL" - }, - { - "component": { - "type": "git", - "git": { - "name": "ripgrep", - "repositoryUrl": "https://github.com/BurntSushi/ripgrep", - "commitHash": "973de50c9ef451da2cfcdfa86f2b2711d8d6ff48" - } - }, - "isOnlyProductionDependency": true, - "license": "MIT", - "version": "0.10.0" - } - ], - "version": 1 -} diff --git a/lib/vscode/coder.js b/lib/vscode/coder.js deleted file mode 100644 index cbc448059531..000000000000 --- a/lib/vscode/coder.js +++ /dev/null @@ -1,63 +0,0 @@ -// This must be ran from VS Code's root. -const gulp = require("gulp"); -const path = require("path"); -const _ = require("underscore"); -const buildfile = require("./src/buildfile"); -const common = require("./build/lib/optimize"); -const util = require("./build/lib/util"); - -const vscodeEntryPoints = _.flatten([ - buildfile.entrypoint("vs/workbench/workbench.web.api"), - buildfile.entrypoint("vs/server/entry"), - buildfile.base, - buildfile.workbenchWeb, - buildfile.workerExtensionHost, - buildfile.workerNotebook, - buildfile.keyboardMaps, - buildfile.entrypoint("vs/platform/files/node/watcher/unix/watcherApp"), - buildfile.entrypoint("vs/platform/files/node/watcher/nsfw/watcherApp"), - buildfile.entrypoint("vs/workbench/services/extensions/node/extensionHostProcess"), -]); - -const vscodeResources = [ - "out-build/vs/server/fork.js", - "!out-build/vs/server/doc/**", - "out-build/vs/workbench/services/extensions/worker/extensionHostWorkerMain.js", - "out-build/bootstrap.js", - "out-build/bootstrap-fork.js", - "out-build/bootstrap-amd.js", - 'out-build/bootstrap-node.js', - "out-build/paths.js", - 'out-build/vs/**/*.{svg,png,html,ttf,jpg}', - "!out-build/vs/code/browser/workbench/*.html", - '!out-build/vs/code/electron-browser/**', - "out-build/vs/base/common/performance.js", - "out-build/vs/base/node/languagePacks.js", - 'out-build/vs/base/browser/ui/codicons/codicon/**', - "out-build/vs/workbench/browser/media/*-theme.css", - "out-build/vs/workbench/contrib/debug/**/*.json", - "out-build/vs/workbench/contrib/externalTerminal/**/*.scpt", - "out-build/vs/workbench/contrib/webview/browser/pre/*.js", - "out-build/vs/**/markdown.css", - "out-build/vs/workbench/contrib/tasks/**/*.json", - "out-build/vs/platform/files/**/*.md", - "!**/test/**" -]; - -gulp.task("optimize", gulp.series( - util.rimraf("out-vscode"), - common.optimizeTask({ - src: "out-build", - entryPoints: vscodeEntryPoints, - resources: vscodeResources, - loaderConfig: common.loaderConfig(), - out: "out-vscode", - inlineAmdImages: true, - bundleInfo: undefined - }), -)); - -gulp.task("minify", gulp.series( - util.rimraf("out-vscode-min"), - common.minifyTask("out-vscode") -)); diff --git a/lib/vscode/extensions/bat/cgmanifest.json b/lib/vscode/extensions/bat/cgmanifest.json deleted file mode 100644 index 5bc3e285f0c1..000000000000 --- a/lib/vscode/extensions/bat/cgmanifest.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "registrations": [ - { - "component": { - "type": "git", - "git": { - "name": "mmims/language-batchfile", - "repositoryUrl": "https://github.com/mmims/language-batchfile", - "commitHash": "95ea8c699f7a8296b15767069868532d52631c46" - } - }, - "license": "MIT", - "version": "0.7.5" - } - ], - "version": 1 -} \ No newline at end of file diff --git a/lib/vscode/extensions/configuration-editing/package.json b/lib/vscode/extensions/configuration-editing/package.json deleted file mode 100644 index 324e0c80607d..000000000000 --- a/lib/vscode/extensions/configuration-editing/package.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "name": "configuration-editing", - "displayName": "%displayName%", - "description": "%description%", - "version": "1.0.0", - "publisher": "vscode", - "license": "MIT", - "engines": { - "vscode": "^1.0.0" - }, - "icon": "images/icon.png", - "activationEvents": [ - "onLanguage:json", - "onLanguage:jsonc" - ], - "main": "./out/configurationEditingMain", - "browser": "./dist/browser/configurationEditingMain", - "scripts": { - "compile": "gulp compile-extension:configuration-editing", - "watch": "gulp watch-extension:configuration-editing" - }, - "dependencies": { - "jsonc-parser": "^2.2.1", - "vscode-nls": "^4.1.1" - }, - "capabilities": { - "virtualWorkspaces": true, - "untrustedWorkspaces": { - "supported": true - } - }, - "contributes": { - "languages": [ - { - "id": "jsonc", - "extensions": [ - ".code-workspace", - "language-configuration.json", - "icon-theme.json", - "color-theme.json", - ".code-snippets" - ], - "filenames": [ - "settings.json", - "launch.json", - "tasks.json", - "keybindings.json", - "extensions.json", - "argv.json", - "profiles.json", - ".devcontainer.json" - ], - "filenamePatterns": [ - "**/.devcontainer/devcontainer.json" - ] - } - ], - "jsonValidation": [ - { - "fileMatch": "vscode://defaultsettings/keybindings.json", - "url": "vscode://schemas/keybindings" - }, - { - "fileMatch": "%APP_SETTINGS_HOME%/keybindings.json", - "url": "vscode://schemas/keybindings" - }, - { - "fileMatch": "vscode://defaultsettings/*.json", - "url": "vscode://schemas/settings/default" - }, - { - "fileMatch": "%APP_SETTINGS_HOME%/settings.json", - "url": "vscode://schemas/settings/user" - }, - { - "fileMatch": "%MACHINE_SETTINGS_HOME%/settings.json", - "url": "vscode://schemas/settings/machine" - }, - { - "fileMatch": "%APP_WORKSPACES_HOME%/*/workspace.json", - "url": "vscode://schemas/workspaceConfig" - }, - { - "fileMatch": "**/*.code-workspace", - "url": "vscode://schemas/workspaceConfig" - }, - { - "fileMatch": "**/argv.json", - "url": "vscode://schemas/argv" - }, - { - "fileMatch": "/.vscode/settings.json", - "url": "vscode://schemas/settings/folder" - }, - { - "fileMatch": "/.vscode/launch.json", - "url": "vscode://schemas/launch" - }, - { - "fileMatch": "/.vscode/tasks.json", - "url": "vscode://schemas/tasks" - }, - { - "fileMatch": "%APP_SETTINGS_HOME%/tasks.json", - "url": "vscode://schemas/tasks" - }, - { - "fileMatch": "%APP_SETTINGS_HOME%/snippets/*.json", - "url": "vscode://schemas/snippets" - }, - { - "fileMatch": "%APP_SETTINGS_HOME%/sync/snippets/preview/*.json", - "url": "vscode://schemas/snippets" - }, - { - "fileMatch": "**/*.code-snippets", - "url": "vscode://schemas/global-snippets" - }, - { - "fileMatch": "/.vscode/extensions.json", - "url": "vscode://schemas/extensions" - }, - { - "fileMatch": "/.devcontainer/devcontainer.json", - "url": "./schemas/devContainer.schema.generated.json" - }, - { - "fileMatch": "/.devcontainer.json", - "url": "./schemas/devContainer.schema.generated.json" - }, - { - "fileMatch": "%APP_SETTINGS_HOME%/globalStorage/ms-vscode-remote.remote-containers/nameConfigs/*.json", - "url": "./schemas/attachContainer.schema.json" - }, - { - "fileMatch": "%APP_SETTINGS_HOME%/globalStorage/ms-vscode-remote.remote-containers/imageConfigs/*.json", - "url": "./schemas/attachContainer.schema.json" - } - ] - }, - "devDependencies": { - "@types/node": "^12.19.9" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/configuration-editing/schemas/devContainer.schema.generated.json b/lib/vscode/extensions/configuration-editing/schemas/devContainer.schema.generated.json deleted file mode 100644 index 90e70c0125ac..000000000000 --- a/lib/vscode/extensions/configuration-editing/schemas/devContainer.schema.generated.json +++ /dev/null @@ -1,1332 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Defines a dev container", - "allowComments": true, - "allowTrailingCommas": true, - "oneOf": [ - { - "type": "object", - "properties": { - "build": { - "type": "object", - "description": "Docker build-related options.", - "properties": { - "dockerfile": { - "type": "string", - "description": "The location of the Dockerfile that defines the contents of the container. The path is relative to the folder containing the `devcontainer.json` file." - }, - "context": { - "type": "string", - "description": "The location of the context folder for building the Docker image. The path is relative to the folder containing the `devcontainer.json` file." - }, - "target": { - "type": "string", - "description": "Target stage in a multi-stage build." - }, - "args": { - "type": "object", - "additionalProperties": { - "type": [ - "string" - ] - }, - "description": "Build arguments." - } - }, - "required": [ - "dockerfile" - ], - "additionalProperties": false - }, - "appPort": { - "type": [ - "integer", - "string", - "array" - ], - "description": "Application ports that are exposed by the container. This can be a single port or an array of ports. Each port can be a number or a string. A number is mapped to the same port on the host. A string is passed to Docker unchanged and can be used to map ports differently, e.g. \"8000:8010\".", - "items": { - "type": [ - "integer", - "string" - ] - } - }, - "containerEnv": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Container environment variables." - }, - "containerUser": { - "type": "string", - "description": "The user the container will be started with. The default is the user on the Docker image." - }, - "updateRemoteUserUID": { - "type": "boolean", - "description": "Controls whether on Linux the container's user should be updated with the local user's UID and GID. On by default." - }, - "mounts": { - "type": "array", - "description": "Mount points to set up when creating the container. See Docker's documentation for the --mount option for the supported syntax.", - "items": { - "type": "string" - } - }, - "runArgs": { - "type": "array", - "description": "The arguments required when starting in the container.", - "items": { - "type": "string" - } - }, - "shutdownAction": { - "type": "string", - "enum": [ - "none", - "stopContainer" - ], - "description": "Action to take when the VS Code window is closed. The default is to stop the container." - }, - "overrideCommand": { - "type": "boolean", - "description": "Whether to overwrite the command specified in the image. The default is true." - }, - "workspaceFolder": { - "type": "string", - "description": "The path of the workspace folder inside the container." - }, - "workspaceMount": { - "type": "string", - "description": "The --mount parameter for docker run. The default is to mount the project folder at /workspaces/$project." - }, - "name": { - "type": "string", - "description": "A name to show for the workspace folder." - }, - "extensions": { - "type": "array", - "description": "An array of extensions that should be installed into the container.", - "items": { - "type": "string", - "pattern": "^([a-z0-9A-Z][a-z0-9\\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\\-A-Z]*)(@(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)?$", - "errorMessage": "Expected format: '${publisher}.${name}' or '${publisher}.${name}@${version}'. Example: 'ms-dotnettools.csharp'." - } - }, - "settings": { - "$ref": "vscode://schemas/settings/machine", - "description": "Machine specific settings that should be copied into the container. These are only copied when connecting to the container for the first time, rebuilding the container then triggers it again." - }, - "forwardPorts": { - "type": "array", - "description": "Ports that are forwarded from the container to the local machine.", - "items": { - "type": "integer", - "maximum": 65535, - "minimum": 0 - } - }, - "portsAttributes": { - "type": "object", - "patternProperties": { - "(^\\d+(\\-\\d+)?$)|(.+)": { - "type": "object", - "description": "A port, range of ports (ex. \"40000-55000\"), or regular expression (ex. \".+\\\\/server.js\"). For a port number or range, the attributes will apply to that port number or range of port numbers. Attributes which use a regular expression will apply to ports whose associated process command line matches the expression.", - "properties": { - "onAutoForward": { - "type": "string", - "enum": [ - "notify", - "openBrowser", - "openPreview", - "silent", - "ignore" - ], - "enumDescriptions": [ - "Shows a notification when a port is automatically forwarded.", - "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", - "Opens a preview in the same window when the port is automatically forwarded.", - "Shows no notification and takes no action when this port is automatically forwarded.", - "This port will not be automatically forwarded." - ], - "description": "Defines the action that occurs when the port is discovered for automatic forwarding", - "default": "notify" - }, - "elevateIfNeeded": { - "type": "boolean", - "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", - "default": false - }, - "label": { - "type": "string", - "description": "Label that will be shown in the UI for this port.", - "default": "Application" - } - }, - "default": { - "label": "Application", - "onAutoForward": "notify" - }, - "additionalProperties": false - } - }, - "markdownDescription": "Set default properties that are applied when a specific port number is forwarded. For example:\n\n```\n\"3000\": {\n \"label\": \"Application\"\n},\n\"40000-55000\": {\n \"onAutoForward\": \"ignore\"\n},\n\".+\\\\/server.js\": {\n \"onAutoForward\": \"openPreview\"\n}\n```", - "defaultSnippets": [ - { - "body": { - "${1:3000}": { - "label": "${2:Application}", - "onAutoForward": "notify" - } - } - } - ], - "additionalProperties": false - }, - "otherPortsAttributes": { - "type": "object", - "properties": { - "onAutoForward": { - "type": "string", - "enum": [ - "notify", - "openBrowser", - "openPreview", - "silent", - "ignore" - ], - "enumDescriptions": [ - "Shows a notification when a port is automatically forwarded.", - "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", - "Opens a preview in the same window when the port is automatically forwarded.", - "Shows no notification and takes no action when this port is automatically forwarded.", - "This port will not be automatically forwarded." - ], - "description": "Defines the action that occurs when the port is discovered for automatic forwarding", - "default": "notify" - }, - "elevateIfNeeded": { - "type": "boolean", - "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", - "default": false - }, - "label": { - "type": "string", - "description": "Label that will be shown in the UI for this port.", - "default": "Application" - } - }, - "defaultSnippets": [ - { - "body": { - "onAutoForward": "ignore" - } - } - ], - "markdownDescription": "Set default properties that are applied to all ports that don't get properties from the setting `remote.portsAttributes`. For example:\n\n```\n{\n \"onAutoForward\": \"ignore\"\n}\n```", - "additionalProperties": false - }, - "remoteEnv": { - "type": "object", - "additionalProperties": { - "type": [ - "string", - "null" - ] - }, - "description": "Remote environment variables. If these are used in the Integrated Terminal, make sure the 'Terminal > Integrated: Inherit Env' setting is enabled." - }, - "remoteUser": { - "type": "string", - "description": "The user VS Code Server will be started with. The default is the same user as the container." - }, - "initializeCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run locally before anything else. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postCreateCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after creating the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postStartCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after starting the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postAttachCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after attaching to the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "devPort": { - "type": "integer", - "description": "The port VS Code can use to connect to its backend." - }, - "userEnvProbe": { - "type": "string", - "enum": [ - "none", - "loginShell", - "loginInteractiveShell", - "interactiveShell" - ], - "description": "User environment probe to run. The default is none." - }, - "codespaces": { - "type": "object", - "additionalProperties": true, - "description": "Codespaces-specific configuration." - } - }, - "required": [ - "build" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "dockerFile": { - "type": "string", - "description": "The location of the Dockerfile that defines the contents of the container. The path is relative to the folder containing the `devcontainer.json` file." - }, - "context": { - "type": "string", - "description": "The location of the context folder for building the Docker image. The path is relative to the folder containing the `devcontainer.json` file." - }, - "build": { - "description": "Docker build-related options.", - "type": "object", - "properties": { - "target": { - "type": "string", - "description": "Target stage in a multi-stage build." - }, - "args": { - "type": "object", - "additionalProperties": { - "type": [ - "string" - ] - }, - "description": "Build arguments." - } - }, - "additionalProperties": false - }, - "appPort": { - "type": [ - "integer", - "string", - "array" - ], - "description": "Application ports that are exposed by the container. This can be a single port or an array of ports. Each port can be a number or a string. A number is mapped to the same port on the host. A string is passed to Docker unchanged and can be used to map ports differently, e.g. \"8000:8010\".", - "items": { - "type": [ - "integer", - "string" - ] - } - }, - "containerEnv": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Container environment variables." - }, - "containerUser": { - "type": "string", - "description": "The user the container will be started with. The default is the user on the Docker image." - }, - "updateRemoteUserUID": { - "type": "boolean", - "description": "Controls whether on Linux the container's user should be updated with the local user's UID and GID. On by default." - }, - "mounts": { - "type": "array", - "description": "Mount points to set up when creating the container. See Docker's documentation for the --mount option for the supported syntax.", - "items": { - "type": "string" - } - }, - "runArgs": { - "type": "array", - "description": "The arguments required when starting in the container.", - "items": { - "type": "string" - } - }, - "shutdownAction": { - "type": "string", - "enum": [ - "none", - "stopContainer" - ], - "description": "Action to take when the VS Code window is closed. The default is to stop the container." - }, - "overrideCommand": { - "type": "boolean", - "description": "Whether to overwrite the command specified in the image. The default is true." - }, - "workspaceFolder": { - "type": "string", - "description": "The path of the workspace folder inside the container." - }, - "workspaceMount": { - "type": "string", - "description": "The --mount parameter for docker run. The default is to mount the project folder at /workspaces/$project." - }, - "name": { - "type": "string", - "description": "A name to show for the workspace folder." - }, - "extensions": { - "type": "array", - "description": "An array of extensions that should be installed into the container.", - "items": { - "type": "string", - "pattern": "^([a-z0-9A-Z][a-z0-9\\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\\-A-Z]*)(@(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)?$", - "errorMessage": "Expected format: '${publisher}.${name}' or '${publisher}.${name}@${version}'. Example: 'ms-dotnettools.csharp'." - } - }, - "settings": { - "$ref": "vscode://schemas/settings/machine", - "description": "Machine specific settings that should be copied into the container. These are only copied when connecting to the container for the first time, rebuilding the container then triggers it again." - }, - "forwardPorts": { - "type": "array", - "description": "Ports that are forwarded from the container to the local machine.", - "items": { - "type": "integer", - "maximum": 65535, - "minimum": 0 - } - }, - "portsAttributes": { - "type": "object", - "patternProperties": { - "(^\\d+(\\-\\d+)?$)|(.+)": { - "type": "object", - "description": "A port, range of ports (ex. \"40000-55000\"), or regular expression (ex. \".+\\\\/server.js\"). For a port number or range, the attributes will apply to that port number or range of port numbers. Attributes which use a regular expression will apply to ports whose associated process command line matches the expression.", - "properties": { - "onAutoForward": { - "type": "string", - "enum": [ - "notify", - "openBrowser", - "openPreview", - "silent", - "ignore" - ], - "enumDescriptions": [ - "Shows a notification when a port is automatically forwarded.", - "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", - "Opens a preview in the same window when the port is automatically forwarded.", - "Shows no notification and takes no action when this port is automatically forwarded.", - "This port will not be automatically forwarded." - ], - "description": "Defines the action that occurs when the port is discovered for automatic forwarding", - "default": "notify" - }, - "elevateIfNeeded": { - "type": "boolean", - "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", - "default": false - }, - "label": { - "type": "string", - "description": "Label that will be shown in the UI for this port.", - "default": "Application" - } - }, - "default": { - "label": "Application", - "onAutoForward": "notify" - }, - "additionalProperties": false - } - }, - "markdownDescription": "Set default properties that are applied when a specific port number is forwarded. For example:\n\n```\n\"3000\": {\n \"label\": \"Application\"\n},\n\"40000-55000\": {\n \"onAutoForward\": \"ignore\"\n},\n\".+\\\\/server.js\": {\n \"onAutoForward\": \"openPreview\"\n}\n```", - "defaultSnippets": [ - { - "body": { - "${1:3000}": { - "label": "${2:Application}", - "onAutoForward": "notify" - } - } - } - ], - "additionalProperties": false - }, - "otherPortsAttributes": { - "type": "object", - "properties": { - "onAutoForward": { - "type": "string", - "enum": [ - "notify", - "openBrowser", - "openPreview", - "silent", - "ignore" - ], - "enumDescriptions": [ - "Shows a notification when a port is automatically forwarded.", - "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", - "Opens a preview in the same window when the port is automatically forwarded.", - "Shows no notification and takes no action when this port is automatically forwarded.", - "This port will not be automatically forwarded." - ], - "description": "Defines the action that occurs when the port is discovered for automatic forwarding", - "default": "notify" - }, - "elevateIfNeeded": { - "type": "boolean", - "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", - "default": false - }, - "label": { - "type": "string", - "description": "Label that will be shown in the UI for this port.", - "default": "Application" - } - }, - "defaultSnippets": [ - { - "body": { - "onAutoForward": "ignore" - } - } - ], - "markdownDescription": "Set default properties that are applied to all ports that don't get properties from the setting `remote.portsAttributes`. For example:\n\n```\n{\n \"onAutoForward\": \"ignore\"\n}\n```", - "additionalProperties": false - }, - "remoteEnv": { - "type": "object", - "additionalProperties": { - "type": [ - "string", - "null" - ] - }, - "description": "Remote environment variables. If these are used in the Integrated Terminal, make sure the 'Terminal > Integrated: Inherit Env' setting is enabled." - }, - "remoteUser": { - "type": "string", - "description": "The user VS Code Server will be started with. The default is the same user as the container." - }, - "initializeCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run locally before anything else. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postCreateCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after creating the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postStartCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after starting the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postAttachCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after attaching to the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "devPort": { - "type": "integer", - "description": "The port VS Code can use to connect to its backend." - }, - "userEnvProbe": { - "type": "string", - "enum": [ - "none", - "loginShell", - "loginInteractiveShell", - "interactiveShell" - ], - "description": "User environment probe to run. The default is none." - }, - "codespaces": { - "type": "object", - "additionalProperties": true, - "description": "Codespaces-specific configuration." - } - }, - "required": [ - "dockerFile" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "image": { - "type": "string", - "description": "The docker image that will be used to create the container." - }, - "appPort": { - "type": [ - "integer", - "string", - "array" - ], - "description": "Application ports that are exposed by the container. This can be a single port or an array of ports. Each port can be a number or a string. A number is mapped to the same port on the host. A string is passed to Docker unchanged and can be used to map ports differently, e.g. \"8000:8010\".", - "items": { - "type": [ - "integer", - "string" - ] - } - }, - "containerEnv": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Container environment variables." - }, - "containerUser": { - "type": "string", - "description": "The user the container will be started with. The default is the user on the Docker image." - }, - "updateRemoteUserUID": { - "type": "boolean", - "description": "Controls whether on Linux the container's user should be updated with the local user's UID and GID. On by default." - }, - "mounts": { - "type": "array", - "description": "Mount points to set up when creating the container. See Docker's documentation for the --mount option for the supported syntax.", - "items": { - "type": "string" - } - }, - "runArgs": { - "type": "array", - "description": "The arguments required when starting in the container.", - "items": { - "type": "string" - } - }, - "shutdownAction": { - "type": "string", - "enum": [ - "none", - "stopContainer" - ], - "description": "Action to take when the VS Code window is closed. The default is to stop the container." - }, - "overrideCommand": { - "type": "boolean", - "description": "Whether to overwrite the command specified in the image. The default is true." - }, - "workspaceFolder": { - "type": "string", - "description": "The path of the workspace folder inside the container." - }, - "workspaceMount": { - "type": "string", - "description": "The --mount parameter for docker run. The default is to mount the project folder at /workspaces/$project." - }, - "name": { - "type": "string", - "description": "A name to show for the workspace folder." - }, - "extensions": { - "type": "array", - "description": "An array of extensions that should be installed into the container.", - "items": { - "type": "string", - "pattern": "^([a-z0-9A-Z][a-z0-9\\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\\-A-Z]*)(@(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)?$", - "errorMessage": "Expected format: '${publisher}.${name}' or '${publisher}.${name}@${version}'. Example: 'ms-dotnettools.csharp'." - } - }, - "settings": { - "$ref": "vscode://schemas/settings/machine", - "description": "Machine specific settings that should be copied into the container. These are only copied when connecting to the container for the first time, rebuilding the container then triggers it again." - }, - "forwardPorts": { - "type": "array", - "description": "Ports that are forwarded from the container to the local machine.", - "items": { - "type": "integer", - "maximum": 65535, - "minimum": 0 - } - }, - "portsAttributes": { - "type": "object", - "patternProperties": { - "(^\\d+(\\-\\d+)?$)|(.+)": { - "type": "object", - "description": "A port, range of ports (ex. \"40000-55000\"), or regular expression (ex. \".+\\\\/server.js\"). For a port number or range, the attributes will apply to that port number or range of port numbers. Attributes which use a regular expression will apply to ports whose associated process command line matches the expression.", - "properties": { - "onAutoForward": { - "type": "string", - "enum": [ - "notify", - "openBrowser", - "openPreview", - "silent", - "ignore" - ], - "enumDescriptions": [ - "Shows a notification when a port is automatically forwarded.", - "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", - "Opens a preview in the same window when the port is automatically forwarded.", - "Shows no notification and takes no action when this port is automatically forwarded.", - "This port will not be automatically forwarded." - ], - "description": "Defines the action that occurs when the port is discovered for automatic forwarding", - "default": "notify" - }, - "elevateIfNeeded": { - "type": "boolean", - "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", - "default": false - }, - "label": { - "type": "string", - "description": "Label that will be shown in the UI for this port.", - "default": "Application" - } - }, - "default": { - "label": "Application", - "onAutoForward": "notify" - }, - "additionalProperties": false - } - }, - "markdownDescription": "Set default properties that are applied when a specific port number is forwarded. For example:\n\n```\n\"3000\": {\n \"label\": \"Application\"\n},\n\"40000-55000\": {\n \"onAutoForward\": \"ignore\"\n},\n\".+\\\\/server.js\": {\n \"onAutoForward\": \"openPreview\"\n}\n```", - "defaultSnippets": [ - { - "body": { - "${1:3000}": { - "label": "${2:Application}", - "onAutoForward": "notify" - } - } - } - ], - "additionalProperties": false - }, - "otherPortsAttributes": { - "type": "object", - "properties": { - "onAutoForward": { - "type": "string", - "enum": [ - "notify", - "openBrowser", - "openPreview", - "silent", - "ignore" - ], - "enumDescriptions": [ - "Shows a notification when a port is automatically forwarded.", - "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", - "Opens a preview in the same window when the port is automatically forwarded.", - "Shows no notification and takes no action when this port is automatically forwarded.", - "This port will not be automatically forwarded." - ], - "description": "Defines the action that occurs when the port is discovered for automatic forwarding", - "default": "notify" - }, - "elevateIfNeeded": { - "type": "boolean", - "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", - "default": false - }, - "label": { - "type": "string", - "description": "Label that will be shown in the UI for this port.", - "default": "Application" - } - }, - "defaultSnippets": [ - { - "body": { - "onAutoForward": "ignore" - } - } - ], - "markdownDescription": "Set default properties that are applied to all ports that don't get properties from the setting `remote.portsAttributes`. For example:\n\n```\n{\n \"onAutoForward\": \"ignore\"\n}\n```", - "additionalProperties": false - }, - "remoteEnv": { - "type": "object", - "additionalProperties": { - "type": [ - "string", - "null" - ] - }, - "description": "Remote environment variables. If these are used in the Integrated Terminal, make sure the 'Terminal > Integrated: Inherit Env' setting is enabled." - }, - "remoteUser": { - "type": "string", - "description": "The user VS Code Server will be started with. The default is the same user as the container." - }, - "initializeCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run locally before anything else. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postCreateCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after creating the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postStartCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after starting the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postAttachCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after attaching to the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "devPort": { - "type": "integer", - "description": "The port VS Code can use to connect to its backend." - }, - "userEnvProbe": { - "type": "string", - "enum": [ - "none", - "loginShell", - "loginInteractiveShell", - "interactiveShell" - ], - "description": "User environment probe to run. The default is none." - }, - "codespaces": { - "type": "object", - "additionalProperties": true, - "description": "Codespaces-specific configuration." - } - }, - "required": [ - "image" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "dockerComposeFile": { - "type": [ - "string", - "array" - ], - "description": "The name of the docker-compose file(s) used to start the services.", - "items": { - "type": "string" - } - }, - "service": { - "type": "string", - "description": "The service you want to work on." - }, - "runServices": { - "type": "array", - "description": "An array of services that should be started and stopped.", - "items": { - "type": "string" - } - }, - "workspaceFolder": { - "type": "string", - "description": "The path of the workspace folder inside the container. This is typically the target path of a volume mount in the docker-compose.yml." - }, - "shutdownAction": { - "type": "string", - "enum": [ - "none", - "stopCompose" - ], - "description": "Action to take when the VS Code window is closed. The default is to stop the containers." - }, - "name": { - "type": "string", - "description": "A name to show for the workspace folder." - }, - "extensions": { - "type": "array", - "description": "An array of extensions that should be installed into the container.", - "items": { - "type": "string", - "pattern": "^([a-z0-9A-Z][a-z0-9\\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\\-A-Z]*)(@(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)?$", - "errorMessage": "Expected format: '${publisher}.${name}' or '${publisher}.${name}@${version}'. Example: 'ms-dotnettools.csharp'." - } - }, - "settings": { - "$ref": "vscode://schemas/settings/machine", - "description": "Machine specific settings that should be copied into the container. These are only copied when connecting to the container for the first time, rebuilding the container then triggers it again." - }, - "forwardPorts": { - "type": "array", - "description": "Ports that are forwarded from the container to the local machine.", - "items": { - "type": "integer", - "maximum": 65535, - "minimum": 0 - } - }, - "portsAttributes": { - "type": "object", - "patternProperties": { - "(^\\d+(\\-\\d+)?$)|(.+)": { - "type": "object", - "description": "A port, range of ports (ex. \"40000-55000\"), or regular expression (ex. \".+\\\\/server.js\"). For a port number or range, the attributes will apply to that port number or range of port numbers. Attributes which use a regular expression will apply to ports whose associated process command line matches the expression.", - "properties": { - "onAutoForward": { - "type": "string", - "enum": [ - "notify", - "openBrowser", - "openPreview", - "silent", - "ignore" - ], - "enumDescriptions": [ - "Shows a notification when a port is automatically forwarded.", - "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", - "Opens a preview in the same window when the port is automatically forwarded.", - "Shows no notification and takes no action when this port is automatically forwarded.", - "This port will not be automatically forwarded." - ], - "description": "Defines the action that occurs when the port is discovered for automatic forwarding", - "default": "notify" - }, - "elevateIfNeeded": { - "type": "boolean", - "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", - "default": false - }, - "label": { - "type": "string", - "description": "Label that will be shown in the UI for this port.", - "default": "Application" - } - }, - "default": { - "label": "Application", - "onAutoForward": "notify" - }, - "additionalProperties": false - } - }, - "markdownDescription": "Set default properties that are applied when a specific port number is forwarded. For example:\n\n```\n\"3000\": {\n \"label\": \"Application\"\n},\n\"40000-55000\": {\n \"onAutoForward\": \"ignore\"\n},\n\".+\\\\/server.js\": {\n \"onAutoForward\": \"openPreview\"\n}\n```", - "defaultSnippets": [ - { - "body": { - "${1:3000}": { - "label": "${2:Application}", - "onAutoForward": "notify" - } - } - } - ], - "additionalProperties": false - }, - "otherPortsAttributes": { - "type": "object", - "properties": { - "onAutoForward": { - "type": "string", - "enum": [ - "notify", - "openBrowser", - "openPreview", - "silent", - "ignore" - ], - "enumDescriptions": [ - "Shows a notification when a port is automatically forwarded.", - "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", - "Opens a preview in the same window when the port is automatically forwarded.", - "Shows no notification and takes no action when this port is automatically forwarded.", - "This port will not be automatically forwarded." - ], - "description": "Defines the action that occurs when the port is discovered for automatic forwarding", - "default": "notify" - }, - "elevateIfNeeded": { - "type": "boolean", - "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", - "default": false - }, - "label": { - "type": "string", - "description": "Label that will be shown in the UI for this port.", - "default": "Application" - } - }, - "defaultSnippets": [ - { - "body": { - "onAutoForward": "ignore" - } - } - ], - "markdownDescription": "Set default properties that are applied to all ports that don't get properties from the setting `remote.portsAttributes`. For example:\n\n```\n{\n \"onAutoForward\": \"ignore\"\n}\n```", - "additionalProperties": false - }, - "remoteEnv": { - "type": "object", - "additionalProperties": { - "type": [ - "string", - "null" - ] - }, - "description": "Remote environment variables. If these are used in the Integrated Terminal, make sure the 'Terminal > Integrated: Inherit Env' setting is enabled." - }, - "remoteUser": { - "type": "string", - "description": "The user VS Code Server will be started with. The default is the same user as the container." - }, - "initializeCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run locally before anything else. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postCreateCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after creating the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postStartCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after starting the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postAttachCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after attaching to the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "devPort": { - "type": "integer", - "description": "The port VS Code can use to connect to its backend." - }, - "userEnvProbe": { - "type": "string", - "enum": [ - "none", - "loginShell", - "loginInteractiveShell", - "interactiveShell" - ], - "description": "User environment probe to run. The default is none." - }, - "codespaces": { - "type": "object", - "additionalProperties": true, - "description": "Codespaces-specific configuration." - } - }, - "required": [ - "dockerComposeFile", - "service", - "workspaceFolder" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "A name to show for the workspace folder." - }, - "extensions": { - "type": "array", - "description": "An array of extensions that should be installed into the container.", - "items": { - "type": "string", - "pattern": "^([a-z0-9A-Z][a-z0-9\\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\\-A-Z]*)(@(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)?$", - "errorMessage": "Expected format: '${publisher}.${name}' or '${publisher}.${name}@${version}'. Example: 'ms-dotnettools.csharp'." - } - }, - "settings": { - "$ref": "vscode://schemas/settings/machine", - "description": "Machine specific settings that should be copied into the container. These are only copied when connecting to the container for the first time, rebuilding the container then triggers it again." - }, - "forwardPorts": { - "type": "array", - "description": "Ports that are forwarded from the container to the local machine.", - "items": { - "type": "integer", - "maximum": 65535, - "minimum": 0 - } - }, - "portsAttributes": { - "type": "object", - "patternProperties": { - "(^\\d+(\\-\\d+)?$)|(.+)": { - "type": "object", - "description": "A port, range of ports (ex. \"40000-55000\"), or regular expression (ex. \".+\\\\/server.js\"). For a port number or range, the attributes will apply to that port number or range of port numbers. Attributes which use a regular expression will apply to ports whose associated process command line matches the expression.", - "properties": { - "onAutoForward": { - "type": "string", - "enum": [ - "notify", - "openBrowser", - "openPreview", - "silent", - "ignore" - ], - "enumDescriptions": [ - "Shows a notification when a port is automatically forwarded.", - "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", - "Opens a preview in the same window when the port is automatically forwarded.", - "Shows no notification and takes no action when this port is automatically forwarded.", - "This port will not be automatically forwarded." - ], - "description": "Defines the action that occurs when the port is discovered for automatic forwarding", - "default": "notify" - }, - "elevateIfNeeded": { - "type": "boolean", - "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", - "default": false - }, - "label": { - "type": "string", - "description": "Label that will be shown in the UI for this port.", - "default": "Application" - } - }, - "default": { - "label": "Application", - "onAutoForward": "notify" - }, - "additionalProperties": false - } - }, - "markdownDescription": "Set default properties that are applied when a specific port number is forwarded. For example:\n\n```\n\"3000\": {\n \"label\": \"Application\"\n},\n\"40000-55000\": {\n \"onAutoForward\": \"ignore\"\n},\n\".+\\\\/server.js\": {\n \"onAutoForward\": \"openPreview\"\n}\n```", - "defaultSnippets": [ - { - "body": { - "${1:3000}": { - "label": "${2:Application}", - "onAutoForward": "notify" - } - } - } - ], - "additionalProperties": false - }, - "otherPortsAttributes": { - "type": "object", - "properties": { - "onAutoForward": { - "type": "string", - "enum": [ - "notify", - "openBrowser", - "openPreview", - "silent", - "ignore" - ], - "enumDescriptions": [ - "Shows a notification when a port is automatically forwarded.", - "Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.", - "Opens a preview in the same window when the port is automatically forwarded.", - "Shows no notification and takes no action when this port is automatically forwarded.", - "This port will not be automatically forwarded." - ], - "description": "Defines the action that occurs when the port is discovered for automatic forwarding", - "default": "notify" - }, - "elevateIfNeeded": { - "type": "boolean", - "description": "Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.", - "default": false - }, - "label": { - "type": "string", - "description": "Label that will be shown in the UI for this port.", - "default": "Application" - } - }, - "defaultSnippets": [ - { - "body": { - "onAutoForward": "ignore" - } - } - ], - "markdownDescription": "Set default properties that are applied to all ports that don't get properties from the setting `remote.portsAttributes`. For example:\n\n```\n{\n \"onAutoForward\": \"ignore\"\n}\n```", - "additionalProperties": false - }, - "remoteEnv": { - "type": "object", - "additionalProperties": { - "type": [ - "string", - "null" - ] - }, - "description": "Remote environment variables. If these are used in the Integrated Terminal, make sure the 'Terminal > Integrated: Inherit Env' setting is enabled." - }, - "remoteUser": { - "type": "string", - "description": "The user VS Code Server will be started with. The default is the same user as the container." - }, - "initializeCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run locally before anything else. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postCreateCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after creating the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postStartCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after starting the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "postAttachCommand": { - "type": [ - "string", - "array" - ], - "description": "A command to run after attaching to the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.", - "items": { - "type": "string" - } - }, - "devPort": { - "type": "integer", - "description": "The port VS Code can use to connect to its backend." - }, - "userEnvProbe": { - "type": "string", - "enum": [ - "none", - "loginShell", - "loginInteractiveShell", - "interactiveShell" - ], - "description": "User environment probe to run. The default is none." - }, - "codespaces": { - "type": "object", - "additionalProperties": true, - "description": "Codespaces-specific configuration." - } - }, - "additionalProperties": false - } - ] -} \ No newline at end of file diff --git a/lib/vscode/extensions/configuration-editing/yarn.lock b/lib/vscode/extensions/configuration-editing/yarn.lock deleted file mode 100644 index ebfaa046da41..000000000000 --- a/lib/vscode/extensions/configuration-editing/yarn.lock +++ /dev/null @@ -1,18 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -jsonc-parser@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc" - integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w== - -vscode-nls@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.1.tgz#f9916b64e4947b20322defb1e676a495861f133c" - integrity sha512-4R+2UoUUU/LdnMnFjePxfLqNhBS8lrAFyX7pjb2ud/lqDkrUavFUTcG7wR0HBZFakae0Q6KLBFjMS6W93F403A== diff --git a/lib/vscode/extensions/csharp/cgmanifest.json b/lib/vscode/extensions/csharp/cgmanifest.json deleted file mode 100644 index 0b192d30ec47..000000000000 --- a/lib/vscode/extensions/csharp/cgmanifest.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "registrations": [ - { - "component": { - "type": "git", - "git": { - "name": "dotnet/csharp-tmLanguage", - "repositoryUrl": "https://github.com/dotnet/csharp-tmLanguage", - "commitHash": "4d14854c9bfc9d84cce625d2bfebaac9741b9db8" - } - }, - "license": "MIT", - "version": "0.1.0", - "description": "The file syntaxes/csharp.tmLanguage.json was derived from https://github.com/dotnet/csharp-tmLanguage" - } - ], - "version": 1 -} \ No newline at end of file diff --git a/lib/vscode/extensions/css-language-features/package.json b/lib/vscode/extensions/css-language-features/package.json deleted file mode 100644 index 7d80d7512237..000000000000 --- a/lib/vscode/extensions/css-language-features/package.json +++ /dev/null @@ -1,862 +0,0 @@ -{ - "name": "css-language-features", - "displayName": "%displayName%", - "description": "%description%", - "version": "1.0.0", - "publisher": "vscode", - "license": "MIT", - "engines": { - "vscode": "^1.29.0" - }, - "icon": "icons/css.png", - "activationEvents": [ - "onLanguage:css", - "onLanguage:less", - "onLanguage:scss", - "onCommand:_css.applyCodeAction" - ], - "main": "./client/out/node/cssClientMain", - "browser": "./client/dist/browser/cssClientMain", - "enableProposedApi": true, - "capabilities": { - "virtualWorkspaces": true, - "untrustedWorkspaces": { - "supported": true - } - }, - "scripts": { - "compile": "gulp compile-extension:css-language-features-client compile-extension:css-language-features-server", - "watch": "gulp watch-extension:css-language-features-client watch-extension:css-language-features-server", - "test": "node ../../node_modules/mocha/bin/mocha", - "install-client-next": "yarn add vscode-languageclient@next" - }, - "categories": [ - "Programming Languages" - ], - "contributes": { - "configuration": [ - { - "order": 22, - "id": "css", - "title": "%css.title%", - "properties": { - "css.customData": { - "type": "array", - "markdownDescription": "%css.customData.desc%", - "default": [], - "items": { - "type": "string" - }, - "scope": "resource" - }, - "css.completion.triggerPropertyValueCompletion": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%css.completion.triggerPropertyValueCompletion.desc%" - }, - "css.completion.completePropertyWithSemicolon": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%css.completion.completePropertyWithSemicolon.desc%" - }, - "css.validate": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%css.validate.desc%" - }, - "css.hover.documentation": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%css.hover.documentation%" - }, - "css.hover.references": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%css.hover.references%" - }, - "css.lint.compatibleVendorPrefixes": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%css.lint.compatibleVendorPrefixes.desc%" - }, - "css.lint.vendorPrefix": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "description": "%css.lint.vendorPrefix.desc%" - }, - "css.lint.duplicateProperties": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%css.lint.duplicateProperties.desc%" - }, - "css.lint.emptyRules": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "description": "%css.lint.emptyRules.desc%" - }, - "css.lint.importStatement": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%css.lint.importStatement.desc%" - }, - "css.lint.boxModel": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "markdownDescription": "%css.lint.boxModel.desc%" - }, - "css.lint.universalSelector": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "markdownDescription": "%css.lint.universalSelector.desc%" - }, - "css.lint.zeroUnits": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%css.lint.zeroUnits.desc%" - }, - "css.lint.fontFaceProperties": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "markdownDescription": "%css.lint.fontFaceProperties.desc%" - }, - "css.lint.hexColorLength": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "error", - "description": "%css.lint.hexColorLength.desc%" - }, - "css.lint.argumentsInColorFunction": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "error", - "description": "%css.lint.argumentsInColorFunction.desc%" - }, - "css.lint.unknownProperties": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "description": "%css.lint.unknownProperties.desc%" - }, - "css.lint.validProperties": { - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - }, - "scope": "resource", - "default": [], - "description": "%css.lint.validProperties.desc%" - }, - "css.lint.ieHack": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%css.lint.ieHack.desc%" - }, - "css.lint.unknownVendorSpecificProperties": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%css.lint.unknownVendorSpecificProperties.desc%" - }, - "css.lint.propertyIgnoredDueToDisplay": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "markdownDescription": "%css.lint.propertyIgnoredDueToDisplay.desc%" - }, - "css.lint.important": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "markdownDescription": "%css.lint.important.desc%" - }, - "css.lint.float": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "markdownDescription": "%css.lint.float.desc%" - }, - "css.lint.idSelector": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%css.lint.idSelector.desc%" - }, - "css.lint.unknownAtRules": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "description": "%css.lint.unknownAtRules.desc%" - }, - "css.trace.server": { - "type": "string", - "scope": "window", - "enum": [ - "off", - "messages", - "verbose" - ], - "default": "off", - "description": "%css.trace.server.desc%" - } - } - }, - { - "id": "scss", - "order": 24, - "title": "%scss.title%", - "properties": { - "scss.completion.triggerPropertyValueCompletion": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%scss.completion.triggerPropertyValueCompletion.desc%" - }, - "scss.completion.completePropertyWithSemicolon": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%scss.completion.completePropertyWithSemicolon.desc%" - }, - "scss.validate": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%scss.validate.desc%" - }, - "scss.hover.documentation": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%scss.hover.documentation%" - }, - "scss.hover.references": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%scss.hover.references%" - }, - "scss.lint.compatibleVendorPrefixes": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%scss.lint.compatibleVendorPrefixes.desc%" - }, - "scss.lint.vendorPrefix": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "description": "%scss.lint.vendorPrefix.desc%" - }, - "scss.lint.duplicateProperties": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%scss.lint.duplicateProperties.desc%" - }, - "scss.lint.emptyRules": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "description": "%scss.lint.emptyRules.desc%" - }, - "scss.lint.importStatement": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%scss.lint.importStatement.desc%" - }, - "scss.lint.boxModel": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "markdownDescription": "%scss.lint.boxModel.desc%" - }, - "scss.lint.universalSelector": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "markdownDescription": "%scss.lint.universalSelector.desc%" - }, - "scss.lint.zeroUnits": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%scss.lint.zeroUnits.desc%" - }, - "scss.lint.fontFaceProperties": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "markdownDescription": "%scss.lint.fontFaceProperties.desc%" - }, - "scss.lint.hexColorLength": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "error", - "description": "%scss.lint.hexColorLength.desc%" - }, - "scss.lint.argumentsInColorFunction": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "error", - "description": "%scss.lint.argumentsInColorFunction.desc%" - }, - "scss.lint.unknownProperties": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "description": "%scss.lint.unknownProperties.desc%" - }, - "scss.lint.validProperties": { - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - }, - "scope": "resource", - "default": [], - "description": "%scss.lint.validProperties.desc%" - }, - "scss.lint.ieHack": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%scss.lint.ieHack.desc%" - }, - "scss.lint.unknownVendorSpecificProperties": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%scss.lint.unknownVendorSpecificProperties.desc%" - }, - "scss.lint.propertyIgnoredDueToDisplay": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "markdownDescription": "%scss.lint.propertyIgnoredDueToDisplay.desc%" - }, - "scss.lint.important": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "markdownDescription": "%scss.lint.important.desc%" - }, - "scss.lint.float": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "markdownDescription": "%scss.lint.float.desc%" - }, - "scss.lint.idSelector": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%scss.lint.idSelector.desc%" - }, - "scss.lint.unknownAtRules": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "description": "%scss.lint.unknownAtRules.desc%" - } - } - }, - { - "id": "less", - "order": 23, - "type": "object", - "title": "%less.title%", - "properties": { - "less.completion.triggerPropertyValueCompletion": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%less.completion.triggerPropertyValueCompletion.desc%" - }, - "less.completion.completePropertyWithSemicolon": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%less.completion.completePropertyWithSemicolon.desc%" - }, - "less.validate": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%less.validate.desc%" - }, - "less.hover.documentation": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%less.hover.documentation%" - }, - "less.hover.references": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%less.hover.references%" - }, - "less.lint.compatibleVendorPrefixes": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%less.lint.compatibleVendorPrefixes.desc%" - }, - "less.lint.vendorPrefix": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "description": "%less.lint.vendorPrefix.desc%" - }, - "less.lint.duplicateProperties": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%less.lint.duplicateProperties.desc%" - }, - "less.lint.emptyRules": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "description": "%less.lint.emptyRules.desc%" - }, - "less.lint.importStatement": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%less.lint.importStatement.desc%" - }, - "less.lint.boxModel": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "markdownDescription": "%less.lint.boxModel.desc%" - }, - "less.lint.universalSelector": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "markdownDescription": "%less.lint.universalSelector.desc%" - }, - "less.lint.zeroUnits": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%less.lint.zeroUnits.desc%" - }, - "less.lint.fontFaceProperties": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "markdownDescription": "%less.lint.fontFaceProperties.desc%" - }, - "less.lint.hexColorLength": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "error", - "description": "%less.lint.hexColorLength.desc%" - }, - "less.lint.argumentsInColorFunction": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "error", - "description": "%less.lint.argumentsInColorFunction.desc%" - }, - "less.lint.unknownProperties": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "description": "%less.lint.unknownProperties.desc%" - }, - "less.lint.validProperties": { - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - }, - "scope": "resource", - "default": [], - "description": "%less.lint.validProperties.desc%" - }, - "less.lint.ieHack": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%less.lint.ieHack.desc%" - }, - "less.lint.unknownVendorSpecificProperties": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%less.lint.unknownVendorSpecificProperties.desc%" - }, - "less.lint.propertyIgnoredDueToDisplay": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "markdownDescription": "%less.lint.propertyIgnoredDueToDisplay.desc%" - }, - "less.lint.important": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "markdownDescription": "%less.lint.important.desc%" - }, - "less.lint.float": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "markdownDescription": "%less.lint.float.desc%" - }, - "less.lint.idSelector": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "ignore", - "description": "%less.lint.idSelector.desc%" - }, - "less.lint.unknownAtRules": { - "type": "string", - "scope": "resource", - "enum": [ - "ignore", - "warning", - "error" - ], - "default": "warning", - "description": "%less.lint.unknownAtRules.desc%" - } - } - } - ], - "configurationDefaults": { - "[css]": { - "editor.suggest.insertMode": "replace" - }, - "[scss]": { - "editor.suggest.insertMode": "replace" - }, - "[less]": { - "editor.suggest.insertMode": "replace" - } - }, - "jsonValidation": [ - { - "fileMatch": "*.css-data.json", - "url": "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/master/docs/customData.schema.json" - }, - { - "fileMatch": "package.json", - "url": "./schemas/package.schema.json" - } - ] - }, - "dependencies": { - "vscode-languageclient": "^7.0.0", - "vscode-nls": "^5.0.0", - "vscode-uri": "^3.0.2" - }, - "devDependencies": { - "@types/node": "^12.19.9" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/css-language-features/server/package.json b/lib/vscode/extensions/css-language-features/server/package.json deleted file mode 100644 index ce3020c21a4e..000000000000 --- a/lib/vscode/extensions/css-language-features/server/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "vscode-css-languageserver", - "description": "CSS/LESS/SCSS language server", - "version": "1.0.0", - "author": "Microsoft Corporation", - "license": "MIT", - "engines": { - "node": "*" - }, - "main": "./out/node/cssServerMain", - "browser": "./dist/browser/cssServerMain", - "dependencies": { - "vscode-css-languageservice": "^5.1.1", - "vscode-languageserver": "^7.0.0", - "vscode-uri": "^3.0.2" - }, - "devDependencies": { - "@types/mocha": "^8.2.0", - "@types/node": "^12.19.9" - }, - "scripts": { - "compile": "gulp compile-extension:css-language-features-server", - "watch": "gulp watch-extension:css-language-features-server", - "install-service-next": "yarn add vscode-css-languageservice@next", - "install-service-local": "yarn link vscode-css-languageservice", - "install-server-next": "yarn add vscode-languageserver@next", - "install-server-local": "yarn link vscode-languageserver", - "test": "node ./test/index.js" - } -} diff --git a/lib/vscode/extensions/css-language-features/server/yarn.lock b/lib/vscode/extensions/css-language-features/server/yarn.lock deleted file mode 100644 index 3ff39d282f66..000000000000 --- a/lib/vscode/extensions/css-language-features/server/yarn.lock +++ /dev/null @@ -1,63 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/mocha@^8.2.0": - version "8.2.0" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44" - integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ== - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -vscode-css-languageservice@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-5.1.1.tgz#d68a22ea0b34a8356c169cafc7d32564c2ff6e87" - integrity sha512-QW0oe/g2y5E2AbVqY7FJNr2Q8uHiAHNSFpptI6xB8Y0KgzVKppOcIVrgmBNzXhFp9IswAwptkdqr8ExSJbqPkQ== - dependencies: - vscode-languageserver-textdocument "^1.0.1" - vscode-languageserver-types "^3.16.0" - vscode-nls "^5.0.0" - vscode-uri "^3.0.2" - -vscode-jsonrpc@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" - integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== - -vscode-languageserver-protocol@3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" - integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== - dependencies: - vscode-jsonrpc "6.0.0" - vscode-languageserver-types "3.16.0" - -vscode-languageserver-textdocument@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz#178168e87efad6171b372add1dea34f53e5d330f" - integrity sha512-UIcJDjX7IFkck7cSkNNyzIz5FyvpQfY7sdzVy+wkKN/BLaD4DQ0ppXQrKePomCxTS7RrolK1I0pey0bG9eh8dA== - -vscode-languageserver-types@3.16.0, vscode-languageserver-types@^3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" - integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== - -vscode-languageserver@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz#49b068c87cfcca93a356969d20f5d9bdd501c6b0" - integrity sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw== - dependencies: - vscode-languageserver-protocol "3.16.0" - -vscode-nls@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840" - integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA== - -vscode-uri@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.2.tgz#ecfd1d066cb8ef4c3a208decdbab9a8c23d055d0" - integrity sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA== diff --git a/lib/vscode/extensions/css-language-features/yarn.lock b/lib/vscode/extensions/css-language-features/yarn.lock deleted file mode 100644 index eec3195c3f72..000000000000 --- a/lib/vscode/extensions/css-language-features/yarn.lock +++ /dev/null @@ -1,89 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -semver@^7.3.4: - version "7.3.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" - integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== - dependencies: - lru-cache "^6.0.0" - -vscode-jsonrpc@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" - integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== - -vscode-languageclient@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-7.0.0.tgz#b505c22c21ffcf96e167799757fca07a6bad0fb2" - integrity sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg== - dependencies: - minimatch "^3.0.4" - semver "^7.3.4" - vscode-languageserver-protocol "3.16.0" - -vscode-languageserver-protocol@3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" - integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== - dependencies: - vscode-jsonrpc "6.0.0" - vscode-languageserver-types "3.16.0" - -vscode-languageserver-types@3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" - integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== - -vscode-nls@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840" - integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA== - -vscode-uri@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.2.tgz#ecfd1d066cb8ef4c3a208decdbab9a8c23d055d0" - integrity sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== diff --git a/lib/vscode/extensions/debug-auto-launch/package.json b/lib/vscode/extensions/debug-auto-launch/package.json deleted file mode 100644 index 8535f3f8b375..000000000000 --- a/lib/vscode/extensions/debug-auto-launch/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "debug-auto-launch", - "displayName": "%displayName%", - "description": "%description%", - "version": "1.0.0", - "publisher": "vscode", - "license": "MIT", - "engines": { - "vscode": "^1.5.0" - }, - "icon": "media/icon.png", - "capabilities": { - "virtualWorkspaces": false, - "untrustedWorkspaces": { - "supported": true - } - }, - "activationEvents": [ - "*" - ], - "main": "./out/extension", - "scripts": { - "compile": "gulp compile-extension:debug-auto-launch", - "watch": "gulp watch-extension:debug-auto-launch" - }, - "contributes": { - "commands": [ - { - "command": "extension.node-debug.toggleAutoAttach", - "title": "%toggle.auto.attach%", - "category": "Debug" - } - ] - }, - "dependencies": { - "vscode-nls": "^4.0.0" - }, - "devDependencies": { - "@types/node": "^12.19.9" - }, - "prettier": { - "printWidth": 100, - "trailingComma": "all", - "singleQuote": true, - "arrowParens": "avoid" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/debug-auto-launch/src/extension.ts b/lib/vscode/extensions/debug-auto-launch/src/extension.ts deleted file mode 100644 index b47641f2db2f..000000000000 --- a/lib/vscode/extensions/debug-auto-launch/src/extension.ts +++ /dev/null @@ -1,402 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { promises as fs } from 'fs'; -import { createServer, Server } from 'net'; -import * as vscode from 'vscode'; -import * as nls from 'vscode-nls'; - -const localize = nls.loadMessageBundle(); -const TEXT_STATUSBAR_LABEL = { - [State.Disabled]: localize('status.text.auto.attach.disabled', 'Auto Attach: Disabled'), - [State.Always]: localize('status.text.auto.attach.always', 'Auto Attach: Always'), - [State.Smart]: localize('status.text.auto.attach.smart', 'Auto Attach: Smart'), - [State.OnlyWithFlag]: localize('status.text.auto.attach.withFlag', 'Auto Attach: With Flag'), -}; - -const TEXT_STATE_LABEL = { - [State.Disabled]: localize('debug.javascript.autoAttach.disabled.label', 'Disabled'), - [State.Always]: localize('debug.javascript.autoAttach.always.label', 'Always'), - [State.Smart]: localize('debug.javascript.autoAttach.smart.label', 'Smart'), - [State.OnlyWithFlag]: localize( - 'debug.javascript.autoAttach.onlyWithFlag.label', - 'Only With Flag', - ), -}; -const TEXT_STATE_DESCRIPTION = { - [State.Disabled]: localize( - 'debug.javascript.autoAttach.disabled.description', - 'Auto attach is disabled and not shown in status bar', - ), - [State.Always]: localize( - 'debug.javascript.autoAttach.always.description', - 'Auto attach to every Node.js process launched in the terminal', - ), - [State.Smart]: localize( - 'debug.javascript.autoAttach.smart.description', - "Auto attach when running scripts that aren't in a node_modules folder", - ), - [State.OnlyWithFlag]: localize( - 'debug.javascript.autoAttach.onlyWithFlag.description', - 'Only auto attach when the `--inspect` flag is given', - ), -}; -const TEXT_TOGGLE_WORKSPACE = localize('scope.workspace', 'Toggle auto attach in this workspace'); -const TEXT_TOGGLE_GLOBAL = localize('scope.global', 'Toggle auto attach on this machine'); -const TEXT_TEMP_DISABLE = localize('tempDisable.disable', 'Temporarily disable auto attach in this session'); -const TEXT_TEMP_ENABLE = localize('tempDisable.enable', 'Re-enable auto attach'); -const TEXT_TEMP_DISABLE_LABEL = localize('tempDisable.suffix', 'Auto Attach: Disabled'); - -const TOGGLE_COMMAND = 'extension.node-debug.toggleAutoAttach'; -const STORAGE_IPC = 'jsDebugIpcState'; - -const SETTING_SECTION = 'debug.javascript'; -const SETTING_STATE = 'autoAttachFilter'; - -/** - * settings that, when changed, should cause us to refresh the state vars - */ -const SETTINGS_CAUSE_REFRESH = new Set( - ['autoAttachSmartPattern', SETTING_STATE].map(s => `${SETTING_SECTION}.${s}`), -); - -const enum State { - Disabled = 'disabled', - OnlyWithFlag = 'onlyWithFlag', - Smart = 'smart', - Always = 'always', -} - -let currentState: Promise<{ context: vscode.ExtensionContext; state: State | null }>; -let statusItem: vscode.StatusBarItem | undefined; // and there is no status bar item -let server: Promise | undefined; // auto attach server -let isTemporarilyDisabled = false; // whether the auto attach server is disabled temporarily, reset whenever the state changes - -export function activate(context: vscode.ExtensionContext): void { - currentState = Promise.resolve({ context, state: null }); - - context.subscriptions.push( - vscode.commands.registerCommand(TOGGLE_COMMAND, toggleAutoAttachSetting.bind(null, context)), - ); - - context.subscriptions.push( - vscode.workspace.onDidChangeConfiguration(e => { - // Whenever a setting is changed, disable auto attach, and re-enable - // it (if necessary) to refresh variables. - if ( - e.affectsConfiguration(`${SETTING_SECTION}.${SETTING_STATE}`) || - [...SETTINGS_CAUSE_REFRESH].some(setting => e.affectsConfiguration(setting)) - ) { - updateAutoAttach(State.Disabled); - updateAutoAttach(readCurrentState()); - } - }), - ); - - updateAutoAttach(readCurrentState()); -} - -export async function deactivate(): Promise { - await destroyAttachServer(); -} - -function getDefaultScope(info: ReturnType) { - if (!info) { - return vscode.ConfigurationTarget.Global; - } else if (info.workspaceFolderValue) { - return vscode.ConfigurationTarget.WorkspaceFolder; - } else if (info.workspaceValue) { - return vscode.ConfigurationTarget.Workspace; - } else if (info.globalValue) { - return vscode.ConfigurationTarget.Global; - } - - return vscode.ConfigurationTarget.Global; -} - -type PickResult = { state: State } | { setTempDisabled: boolean } | { scope: vscode.ConfigurationTarget } | undefined; -type PickItem = vscode.QuickPickItem & ({ state: State } | { setTempDisabled: boolean }); - -async function toggleAutoAttachSetting(context: vscode.ExtensionContext, scope?: vscode.ConfigurationTarget): Promise { - const section = vscode.workspace.getConfiguration(SETTING_SECTION); - scope = scope || getDefaultScope(section.inspect(SETTING_STATE)); - - const isGlobalScope = scope === vscode.ConfigurationTarget.Global; - const quickPick = vscode.window.createQuickPick(); - const current = readCurrentState(); - - const items: PickItem[] = [State.Always, State.Smart, State.OnlyWithFlag, State.Disabled].map(state => ({ - state, - label: TEXT_STATE_LABEL[state], - description: TEXT_STATE_DESCRIPTION[state], - alwaysShow: true, - })); - - if (current !== State.Disabled) { - items.unshift({ - setTempDisabled: !isTemporarilyDisabled, - label: isTemporarilyDisabled ? TEXT_TEMP_ENABLE : TEXT_TEMP_DISABLE, - alwaysShow: true, - }); - } - - quickPick.items = items; - quickPick.activeItems = isTemporarilyDisabled - ? [items[0]] - : quickPick.items.filter(i => 'state' in i && i.state === current); - quickPick.title = isGlobalScope ? TEXT_TOGGLE_GLOBAL : TEXT_TOGGLE_WORKSPACE; - quickPick.buttons = [ - { - iconPath: new vscode.ThemeIcon(isGlobalScope ? 'folder' : 'globe'), - tooltip: isGlobalScope ? TEXT_TOGGLE_WORKSPACE : TEXT_TOGGLE_GLOBAL, - }, - ]; - - quickPick.show(); - - let result = await new Promise(resolve => { - quickPick.onDidAccept(() => resolve(quickPick.selectedItems[0])); - quickPick.onDidHide(() => resolve(undefined)); - quickPick.onDidTriggerButton(() => { - resolve({ - scope: isGlobalScope - ? vscode.ConfigurationTarget.Workspace - : vscode.ConfigurationTarget.Global, - }); - }); - }); - - quickPick.dispose(); - - if (!result) { - return; - } - - if ('scope' in result) { - return await toggleAutoAttachSetting(context, result.scope); - } - - if ('state' in result) { - if (result.state !== current) { - section.update(SETTING_STATE, result.state, scope); - } else if (isTemporarilyDisabled) { - result = { setTempDisabled: false }; - } - } - - if ('setTempDisabled' in result) { - updateStatusBar(context, current, true); - isTemporarilyDisabled = result.setTempDisabled; - if (result.setTempDisabled) { - await destroyAttachServer(); - } else { - await createAttachServer(context); // unsets temp disabled var internally - } - updateStatusBar(context, current, false); - } -} - -function readCurrentState(): State { - const section = vscode.workspace.getConfiguration(SETTING_SECTION); - return section.get(SETTING_STATE) ?? State.Disabled; -} - -async function clearJsDebugAttachState(context: vscode.ExtensionContext) { - await context.workspaceState.update(STORAGE_IPC, undefined); - await vscode.commands.executeCommand('extension.js-debug.clearAutoAttachVariables'); - await destroyAttachServer(); -} - -/** - * Turns auto attach on, and returns the server auto attach is listening on - * if it's successful. - */ -async function createAttachServer(context: vscode.ExtensionContext) { - const ipcAddress = await getIpcAddress(context); - if (!ipcAddress) { - return undefined; - } - - server = createServerInner(ipcAddress).catch(err => { - console.error(err); - return undefined; - }); - - return await server; -} - -const createServerInner = async (ipcAddress: string) => { - try { - return await createServerInstance(ipcAddress); - } catch (e) { - // On unix/linux, the file can 'leak' if the process exits unexpectedly. - // If we see this, try to delete the file and then listen again. - await fs.unlink(ipcAddress).catch(() => undefined); - return await createServerInstance(ipcAddress); - } -}; - -const createServerInstance = (ipcAddress: string) => - new Promise((resolve, reject) => { - const s = createServer(socket => { - let data: Buffer[] = []; - socket.on('data', async chunk => { - if (chunk[chunk.length - 1] !== 0) { - // terminated with NUL byte - data.push(chunk); - return; - } - - data.push(chunk.slice(0, -1)); - - try { - await vscode.commands.executeCommand( - 'extension.js-debug.autoAttachToProcess', - JSON.parse(Buffer.concat(data).toString()), - ); - socket.write(Buffer.from([0])); - } catch (err) { - socket.write(Buffer.from([1])); - console.error(err); - } - }); - }) - .on('error', reject) - .listen(ipcAddress, () => resolve(s)); - }); - -/** - * Destroys the auto-attach server, if it's running. - */ -async function destroyAttachServer() { - const instance = await server; - if (instance) { - await new Promise(r => instance.close(r)); - } -} - -interface CachedIpcState { - ipcAddress: string; - jsDebugPath: string; - settingsValue: string; -} - -/** - * Map of logic that happens when auto attach states are entered and exited. - * All state transitions are queued and run in order; promises are awaited. - */ -const transitions: { [S in State]: (context: vscode.ExtensionContext) => Promise } = { - async [State.Disabled](context) { - await clearJsDebugAttachState(context); - }, - - async [State.OnlyWithFlag](context) { - await createAttachServer(context); - }, - - async [State.Smart](context) { - await createAttachServer(context); - }, - - async [State.Always](context) { - await createAttachServer(context); - }, -}; - -/** - * Ensures the status bar text reflects the current state. - */ -function updateStatusBar(context: vscode.ExtensionContext, state: State, busy = false) { - if (state === State.Disabled && !busy) { - statusItem?.hide(); - return; - } - - if (!statusItem) { - statusItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left); - statusItem.command = TOGGLE_COMMAND; - statusItem.tooltip = localize( - 'status.tooltip.auto.attach', - 'Automatically attach to node.js processes in debug mode', - ); - context.subscriptions.push(statusItem); - } - - let text = busy ? '$(loading) ' : ''; - text += isTemporarilyDisabled ? TEXT_TEMP_DISABLE_LABEL : TEXT_STATUSBAR_LABEL[state]; - statusItem.text = text; - statusItem.show(); -} - -/** - * Updates the auto attach feature based on the user or workspace setting - */ -function updateAutoAttach(newState: State) { - currentState = currentState.then(async ({ context, state: oldState }) => { - if (newState === oldState) { - return { context, state: oldState }; - } - - if (oldState !== null) { - updateStatusBar(context, oldState, true); - } - - await transitions[newState](context); - isTemporarilyDisabled = false; - updateStatusBar(context, newState, false); - return { context, state: newState }; - }); -} - -/** - * Gets the IPC address for the server to listen on for js-debug sessions. This - * is cached such that we can reuse the address of previous activations. - */ -async function getIpcAddress(context: vscode.ExtensionContext) { - // Iff the `cachedData` is present, the js-debug registered environment - // variables for this workspace--cachedData is set after successfully - // invoking the attachment command. - const cachedIpc = context.workspaceState.get(STORAGE_IPC); - - // We invalidate the IPC data if the js-debug path changes, since that - // indicates the extension was updated or reinstalled and the - // environment variables will have been lost. - // todo: make a way in the API to read environment data directly without activating js-debug? - const jsDebugPath = - vscode.extensions.getExtension('ms-vscode.js-debug-nightly')?.extensionPath || - vscode.extensions.getExtension('ms-vscode.js-debug')?.extensionPath; - - const settingsValue = getJsDebugSettingKey(); - if (cachedIpc?.jsDebugPath === jsDebugPath && cachedIpc?.settingsValue === settingsValue) { - return cachedIpc.ipcAddress; - } - - const result = await vscode.commands.executeCommand<{ ipcAddress: string }>( - 'extension.js-debug.setAutoAttachVariables', - cachedIpc?.ipcAddress, - ); - if (!result) { - return; - } - - const ipcAddress = result.ipcAddress; - await context.workspaceState.update(STORAGE_IPC, { - ipcAddress, - jsDebugPath, - settingsValue, - } as CachedIpcState); - - return ipcAddress; -} - -function getJsDebugSettingKey() { - let o: { [key: string]: unknown } = {}; - const config = vscode.workspace.getConfiguration(SETTING_SECTION); - for (const setting of SETTINGS_CAUSE_REFRESH) { - o[setting] = config.get(setting); - } - - return JSON.stringify(o); -} diff --git a/lib/vscode/extensions/debug-auto-launch/yarn.lock b/lib/vscode/extensions/debug-auto-launch/yarn.lock deleted file mode 100644 index 687f15f481e5..000000000000 --- a/lib/vscode/extensions/debug-auto-launch/yarn.lock +++ /dev/null @@ -1,13 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -vscode-nls@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" - integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== diff --git a/lib/vscode/extensions/debug-server-ready/package.json b/lib/vscode/extensions/debug-server-ready/package.json deleted file mode 100644 index 6b8a0be9ea5a..000000000000 --- a/lib/vscode/extensions/debug-server-ready/package.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "name": "debug-server-ready", - "displayName": "%displayName%", - "description": "%description%", - "version": "1.0.0", - "publisher": "vscode", - "license": "MIT", - "engines": { - "vscode": "^1.32.0" - }, - "icon": "media/icon.png", - "activationEvents": [ - "onDebugResolve" - ], - "capabilities": { - "virtualWorkspaces": false, - "untrustedWorkspaces": { - "supported": true - } - }, - "enableProposedApi": true, - "main": "./out/extension", - "scripts": { - "compile": "gulp compile-extension:debug-server-ready", - "watch": "gulp watch-extension:debug-server-ready" - }, - "contributes": { - "debuggers": [ - { - "type": "*", - "configurationAttributes": { - "launch": { - "properties": { - "serverReadyAction": { - "oneOf": [ - { - "type": "object", - "additionalProperties": false, - "markdownDescription": "%debug.server.ready.serverReadyAction.description%", - "default": { - "action": "openExternally" - }, - "properties": { - "action": { - "type": "string", - "enum": [ - "openExternally" - ], - "enumDescriptions": [ - "%debug.server.ready.action.openExternally.description%" - ], - "markdownDescription": "%debug.server.ready.action.description%", - "default": "openExternally" - }, - "pattern": { - "type": "string", - "markdownDescription": "%debug.server.ready.pattern.description%", - "default": "listening on port ([0-9]+)" - }, - "uriFormat": { - "type": "string", - "markdownDescription": "%debug.server.ready.uriFormat.description%", - "default": "http://localhost:%s" - } - } - }, - { - "type": "object", - "additionalProperties": false, - "markdownDescription": "%debug.server.ready.serverReadyAction.description%", - "default": { - "action": "openExternally" - }, - "properties": { - "action": { - "type": "string", - "enum": [ - "debugWithChrome" - ], - "enumDescriptions": [ - "%debug.server.ready.action.debugWithChrome.description%" - ], - "markdownDescription": "%debug.server.ready.action.description%", - "default": "openExternally" - }, - "pattern": { - "type": "string", - "markdownDescription": "%debug.server.ready.pattern.description%", - "default": "listening on port ([0-9]+)" - }, - "uriFormat": { - "type": "string", - "markdownDescription": "%debug.server.ready.uriFormat.description%", - "default": "http://localhost:%s" - }, - "webRoot": { - "type": "string", - "markdownDescription": "%debug.server.ready.webRoot.description%", - "default": "${workspaceFolder}" - } - } - }, - { - "type": "object", - "additionalProperties": false, - "markdownDescription": "%debug.server.ready.serverReadyAction.description%", - "default": { - "action": "startDebugging", - "name": "" - }, - "required": [ - "name" - ], - "properties": { - "action": { - "type": "string", - "enum": [ - "startDebugging" - ], - "enumDescriptions": [ - "%debug.server.ready.action.startDebugging.description%" - ], - "markdownDescription": "%debug.server.ready.action.description%", - "default": "startDebugging" - }, - "pattern": { - "type": "string", - "markdownDescription": "%debug.server.ready.pattern.description%", - "default": "listening on port ([0-9]+)" - }, - "name": { - "type": "string", - "markdownDescription": "%debug.server.ready.debugConfigName.description%", - "default": "Launch Browser" - } - } - } - ] - } - } - } - } - } - ] - }, - "dependencies": { - "vscode-nls": "^4.0.0" - }, - "devDependencies": { - "@types/node": "^12.19.9" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/debug-server-ready/src/extension.ts b/lib/vscode/extensions/debug-server-ready/src/extension.ts deleted file mode 100644 index 19fc67322eb7..000000000000 --- a/lib/vscode/extensions/debug-server-ready/src/extension.ts +++ /dev/null @@ -1,240 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; -import * as util from 'util'; -import * as nls from 'vscode-nls'; - -const localize = nls.loadMessageBundle(); - -const PATTERN = 'listening on.* (https?://\\S+|[0-9]+)'; // matches "listening on port 3000" or "Now listening on: https://localhost:5001" -const URI_PORT_FORMAT = 'http://localhost:%s'; -const URI_FORMAT = '%s'; -const WEB_ROOT = '${workspaceFolder}'; - -interface ServerReadyAction { - pattern: string; - action?: 'openExternally' | 'debugWithChrome' | 'startDebugging'; - uriFormat?: string; - webRoot?: string; - name?: string; -} - -class ServerReadyDetector extends vscode.Disposable { - - private static detectors = new Map(); - private static terminalDataListener: vscode.Disposable | undefined; - - private hasFired = false; - private shellPid?: number; - private regexp: RegExp; - private disposables: vscode.Disposable[] = []; - - static start(session: vscode.DebugSession): ServerReadyDetector | undefined { - if (session.configuration.serverReadyAction) { - let detector = ServerReadyDetector.detectors.get(session); - if (!detector) { - detector = new ServerReadyDetector(session); - ServerReadyDetector.detectors.set(session, detector); - } - return detector; - } - return undefined; - } - - static stop(session: vscode.DebugSession): void { - let detector = ServerReadyDetector.detectors.get(session); - if (detector) { - ServerReadyDetector.detectors.delete(session); - detector.dispose(); - } - } - - static rememberShellPid(session: vscode.DebugSession, pid: number) { - let detector = ServerReadyDetector.detectors.get(session); - if (detector) { - detector.shellPid = pid; - } - } - - static async startListeningTerminalData() { - if (!this.terminalDataListener) { - this.terminalDataListener = vscode.window.onDidWriteTerminalData(async e => { - - // first find the detector with a matching pid - const pid = await e.terminal.processId; - for (let [, detector] of this.detectors) { - if (detector.shellPid === pid) { - detector.detectPattern(e.data); - return; - } - } - - // if none found, try all detectors until one matches - for (let [, detector] of this.detectors) { - if (detector.detectPattern(e.data)) { - return; - } - } - }); - } - } - - private constructor(private session: vscode.DebugSession) { - super(() => this.internalDispose()); - - this.regexp = new RegExp(session.configuration.serverReadyAction.pattern || PATTERN, 'i'); - } - - private internalDispose() { - this.disposables.forEach(d => d.dispose()); - this.disposables = []; - } - - detectPattern(s: string): boolean { - if (!this.hasFired) { - const matches = this.regexp.exec(s); - if (matches && matches.length >= 1) { - this.openExternalWithString(this.session, matches.length > 1 ? matches[1] : ''); - this.hasFired = true; - this.internalDispose(); - return true; - } - } - return false; - } - - private openExternalWithString(session: vscode.DebugSession, captureString: string) { - - const args: ServerReadyAction = session.configuration.serverReadyAction; - - let uri; - if (captureString === '') { - // nothing captured by reg exp -> use the uriFormat as the target uri without substitution - // verify that format does not contain '%s' - const format = args.uriFormat || ''; - if (format.indexOf('%s') >= 0) { - const errMsg = localize('server.ready.nocapture.error', "Format uri ('{0}') uses a substitution placeholder but pattern did not capture anything.", format); - vscode.window.showErrorMessage(errMsg, { modal: true }).then(_ => undefined); - return; - } - uri = format; - } else { - // if no uriFormat is specified guess the appropriate format based on the captureString - const format = args.uriFormat || (/^[0-9]+$/.test(captureString) ? URI_PORT_FORMAT : URI_FORMAT); - // verify that format only contains a single '%s' - const s = format.split('%s'); - if (s.length !== 2) { - const errMsg = localize('server.ready.placeholder.error', "Format uri ('{0}') must contain exactly one substitution placeholder.", format); - vscode.window.showErrorMessage(errMsg, { modal: true }).then(_ => undefined); - return; - } - uri = util.format(format, captureString); - } - - this.openExternalWithUri(session, uri); - } - - private openExternalWithUri(session: vscode.DebugSession, uri: string) { - - const args: ServerReadyAction = session.configuration.serverReadyAction; - switch (args.action || 'openExternally') { - - case 'openExternally': - vscode.env.openExternal(vscode.Uri.parse(uri)); - break; - - case 'debugWithChrome': - vscode.debug.startDebugging(session.workspaceFolder, { - type: 'pwa-chrome', - name: 'Chrome Debug', - request: 'launch', - url: uri, - webRoot: args.webRoot || WEB_ROOT - }); - break; - - case 'startDebugging': - vscode.debug.startDebugging(session.workspaceFolder, args.name || 'unspecified'); - break; - - default: - // not supported - break; - } - } -} - -export function activate(context: vscode.ExtensionContext) { - - context.subscriptions.push(vscode.debug.onDidChangeActiveDebugSession(session => { - if (session && session.configuration.serverReadyAction) { - const detector = ServerReadyDetector.start(session); - if (detector) { - ServerReadyDetector.startListeningTerminalData(); - } - } - })); - - context.subscriptions.push(vscode.debug.onDidTerminateDebugSession(session => { - ServerReadyDetector.stop(session); - })); - - const trackers = new Set(); - - context.subscriptions.push(vscode.debug.registerDebugConfigurationProvider('*', { - resolveDebugConfigurationWithSubstitutedVariables(_folder: vscode.WorkspaceFolder | undefined, debugConfiguration: vscode.DebugConfiguration) { - if (debugConfiguration.type && debugConfiguration.serverReadyAction) { - if (!trackers.has(debugConfiguration.type)) { - trackers.add(debugConfiguration.type); - startTrackerForType(context, debugConfiguration.type); - } - } - return debugConfiguration; - } - })); -} - -function startTrackerForType(context: vscode.ExtensionContext, type: string) { - - // scan debug console output for a PORT message - context.subscriptions.push(vscode.debug.registerDebugAdapterTrackerFactory(type, { - createDebugAdapterTracker(session: vscode.DebugSession) { - const detector = ServerReadyDetector.start(session); - if (detector) { - let runInTerminalRequestSeq: number | undefined; - return { - onDidSendMessage: m => { - if (m.type === 'event' && m.event === 'output' && m.body) { - switch (m.body.category) { - case 'console': - case 'stderr': - case 'stdout': - if (m.body.output) { - detector.detectPattern(m.body.output); - } - break; - default: - break; - } - } - if (m.type === 'request' && m.command === 'runInTerminal' && m.arguments) { - if (m.arguments.kind === 'integrated') { - runInTerminalRequestSeq = m.seq; // remember this to find matching response - } - } - }, - onWillReceiveMessage: m => { - if (runInTerminalRequestSeq && m.type === 'response' && m.command === 'runInTerminal' && m.body && runInTerminalRequestSeq === m.request_seq) { - runInTerminalRequestSeq = undefined; - ServerReadyDetector.rememberShellPid(session, m.body.shellProcessId); - } - } - }; - } - return undefined; - } - })); -} diff --git a/lib/vscode/extensions/debug-server-ready/yarn.lock b/lib/vscode/extensions/debug-server-ready/yarn.lock deleted file mode 100644 index 687f15f481e5..000000000000 --- a/lib/vscode/extensions/debug-server-ready/yarn.lock +++ /dev/null @@ -1,13 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -vscode-nls@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" - integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== diff --git a/lib/vscode/extensions/emmet/package.json b/lib/vscode/extensions/emmet/package.json deleted file mode 100644 index fe82d0eed415..000000000000 --- a/lib/vscode/extensions/emmet/package.json +++ /dev/null @@ -1,464 +0,0 @@ -{ - "name": "emmet", - "displayName": "Emmet", - "description": "%description%", - "version": "1.0.0", - "publisher": "vscode", - "license": "MIT", - "engines": { - "vscode": "^1.13.0" - }, - "icon": "images/icon.png", - "categories": [ - "Other" - ], - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - }, - "activationEvents": [ - "onStartupFinished", - "onCommand:emmet.expandAbbreviation", - "onLanguage:html", - "onLanguage:css", - "onLanguage:scss", - "onLanguage:less" - ], - "main": "./out/node/emmetNodeMain", - "browser": "./dist/browser/emmetBrowserMain", - "contributes": { - "configuration": { - "type": "object", - "title": "Emmet", - "properties": { - "emmet.showExpandedAbbreviation": { - "type": [ - "string" - ], - "enum": [ - "never", - "always", - "inMarkupAndStylesheetFilesOnly" - ], - "default": "always", - "markdownDescription": "%emmetShowExpandedAbbreviation%" - }, - "emmet.showAbbreviationSuggestions": { - "type": "boolean", - "default": true, - "markdownDescription": "%emmetShowAbbreviationSuggestions%" - }, - "emmet.includeLanguages": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "default": {}, - "markdownDescription": "%emmetIncludeLanguages%" - }, - "emmet.variables": { - "type": "object", - "properties": { - "lang": { - "type": "string", - "default": "en" - }, - "charset": { - "type": "string", - "default": "UTF-8" - } - }, - "default": {}, - "markdownDescription": "%emmetVariables%" - }, - "emmet.syntaxProfiles": { - "type": "object", - "default": {}, - "markdownDescription": "%emmetSyntaxProfiles%" - }, - "emmet.excludeLanguages": { - "type": "array", - "default": [ - "markdown" - ], - "markdownDescription": "%emmetExclude%" - }, - "emmet.extensionsPath": { - "type": "array", - "items": { - "type": "string", - "markdownDescription": "%emmetExtensionsPathItem%" - }, - "default": [], - "markdownDescription": "%emmetExtensionsPath%" - }, - "emmet.triggerExpansionOnTab": { - "type": "boolean", - "default": false, - "markdownDescription": "%emmetTriggerExpansionOnTab%" - }, - "emmet.preferences": { - "type": "object", - "default": {}, - "markdownDescription": "%emmetPreferences%", - "properties": { - "css.intUnit": { - "type": "string", - "default": "px", - "markdownDescription": "%emmetPreferencesIntUnit%" - }, - "css.floatUnit": { - "type": "string", - "default": "em", - "markdownDescription": "%emmetPreferencesFloatUnit%" - }, - "css.propertyEnd": { - "type": "string", - "default": ";", - "markdownDescription": "%emmetPreferencesCssAfter%" - }, - "sass.propertyEnd": { - "type": "string", - "default": "", - "markdownDescription": "%emmetPreferencesSassAfter%" - }, - "stylus.propertyEnd": { - "type": "string", - "default": "", - "markdownDescription": "%emmetPreferencesStylusAfter%" - }, - "css.valueSeparator": { - "type": "string", - "default": ": ", - "markdownDescription": "%emmetPreferencesCssBetween%" - }, - "sass.valueSeparator": { - "type": "string", - "default": ": ", - "markdownDescription": "%emmetPreferencesSassBetween%" - }, - "stylus.valueSeparator": { - "type": "string", - "default": " ", - "markdownDescription": "%emmetPreferencesStylusBetween%" - }, - "bem.elementSeparator": { - "type": "string", - "default": "__", - "markdownDescription": "%emmetPreferencesBemElementSeparator%" - }, - "bem.modifierSeparator": { - "type": "string", - "default": "_", - "markdownDescription": "%emmetPreferencesBemModifierSeparator%" - }, - "filter.commentBefore": { - "type": "string", - "default": "", - "markdownDescription": "%emmetPreferencesFilterCommentBefore%" - }, - "filter.commentAfter": { - "type": "string", - "default": "\n", - "markdownDescription": "%emmetPreferencesFilterCommentAfter%" - }, - "filter.commentTrigger": { - "type": "array", - "default": [ - "id", - "class" - ], - "markdownDescription": "%emmetPreferencesFilterCommentTrigger%" - }, - "format.noIndentTags": { - "type": "array", - "default": [ - "html" - ], - "markdownDescription": "%emmetPreferencesFormatNoIndentTags%" - }, - "format.forceIndentationForTags": { - "type": "array", - "default": [ - "body" - ], - "markdownDescription": "%emmetPreferencesFormatForceIndentTags%" - }, - "profile.allowCompactBoolean": { - "type": "boolean", - "default": false, - "markdownDescription": "%emmetPreferencesAllowCompactBoolean%" - }, - "css.webkitProperties": { - "type": "string", - "default": null, - "markdownDescription": "%emmetPreferencesCssWebkitProperties%" - }, - "css.mozProperties": { - "type": "string", - "default": null, - "markdownDescription": "%emmetPreferencesCssMozProperties%" - }, - "css.oProperties": { - "type": "string", - "default": null, - "markdownDescription": "%emmetPreferencesCssOProperties%" - }, - "css.msProperties": { - "type": "string", - "default": null, - "markdownDescription": "%emmetPreferencesCssMsProperties%" - }, - "css.fuzzySearchMinScore": { - "type": "number", - "default": 0.3, - "markdownDescription": "%emmetPreferencesCssFuzzySearchMinScore%" - }, - "output.inlineBreak": { - "type": "number", - "default": 0, - "markdownDescription": "%emmetPreferencesOutputInlineBreak%" - }, - "output.reverseAttributes": { - "type": "boolean", - "default": false, - "markdownDescription": "%emmetPreferencesOutputReverseAttributes%" - }, - "output.selfClosingStyle": { - "type": "string", - "enum": ["html", "xhtml", "xml"], - "default": "html", - "markdownDescription": "%emmetPreferencesOutputSelfClosingStyle%" - }, - "css.color.short": { - "type": "boolean", - "default": true, - "markdownDescription": "%emmetPreferencesCssColorShort%" - } - } - }, - "emmet.showSuggestionsAsSnippets": { - "type": "boolean", - "default": false, - "markdownDescription": "%emmetShowSuggestionsAsSnippets%" - }, - "emmet.optimizeStylesheetParsing": { - "type": "boolean", - "default": true, - "markdownDescription": "%emmetOptimizeStylesheetParsing%" - } - } - }, - "commands": [ - { - "command": "editor.emmet.action.wrapWithAbbreviation", - "title": "%command.wrapWithAbbreviation%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.removeTag", - "title": "%command.removeTag%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.updateTag", - "title": "%command.updateTag%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.matchTag", - "title": "%command.matchTag%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.balanceIn", - "title": "%command.balanceIn%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.balanceOut", - "title": "%command.balanceOut%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.prevEditPoint", - "title": "%command.prevEditPoint%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.nextEditPoint", - "title": "%command.nextEditPoint%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.mergeLines", - "title": "%command.mergeLines%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.selectPrevItem", - "title": "%command.selectPrevItem%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.selectNextItem", - "title": "%command.selectNextItem%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.splitJoinTag", - "title": "%command.splitJoinTag%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.toggleComment", - "title": "%command.toggleComment%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.evaluateMathExpression", - "title": "%command.evaluateMathExpression%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.updateImageSize", - "title": "%command.updateImageSize%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.incrementNumberByOneTenth", - "title": "%command.incrementNumberByOneTenth%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.incrementNumberByOne", - "title": "%command.incrementNumberByOne%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.incrementNumberByTen", - "title": "%command.incrementNumberByTen%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.decrementNumberByOneTenth", - "title": "%command.decrementNumberByOneTenth%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.decrementNumberByOne", - "title": "%command.decrementNumberByOne%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.decrementNumberByTen", - "title": "%command.decrementNumberByTen%", - "category": "Emmet" - }, - { - "command": "editor.emmet.action.reflectCSSValue", - "title": "%command.reflectCSSValue%", - "category": "Emmet" - }, - { - "command": "workbench.action.showEmmetCommands", - "title": "%command.showEmmetCommands%", - "category": "" - } - ], - "menus": { - "commandPalette": [ - { - "command": "editor.emmet.action.wrapWithAbbreviation" - }, - { - "command": "editor.emmet.action.removeTag" - }, - { - "command": "editor.emmet.action.updateTag" - }, - { - "command": "editor.emmet.action.matchTag" - }, - { - "command": "editor.emmet.action.balanceIn" - }, - { - "command": "editor.emmet.action.balanceOut" - }, - { - "command": "editor.emmet.action.prevEditPoint" - }, - { - "command": "editor.emmet.action.nextEditPoint" - }, - { - "command": "editor.emmet.action.mergeLines" - }, - { - "command": "editor.emmet.action.selectPrevItem" - }, - { - "command": "editor.emmet.action.selectNextItem" - }, - { - "command": "editor.emmet.action.splitJoinTag" - }, - { - "command": "editor.emmet.action.toggleComment" - }, - { - "command": "editor.emmet.action.evaluateMathExpression" - }, - { - "command": "editor.emmet.action.updateImageSize", - "when": "resourceScheme =~ /^file$/" - }, - { - "command": "editor.emmet.action.incrementNumberByOneTenth" - }, - { - "command": "editor.emmet.action.incrementNumberByOne" - }, - { - "command": "editor.emmet.action.incrementNumberByTen" - }, - { - "command": "editor.emmet.action.decrementNumberByOneTenth" - }, - { - "command": "editor.emmet.action.decrementNumberByOne" - }, - { - "command": "editor.emmet.action.decrementNumberByTen" - }, - { - "command": "editor.emmet.action.reflectCSSValue" - } - ] - } - }, - "scripts": { - "watch": "gulp watch-extension:emmet", - "compile": "gulp compile-extension:emmet", - "deps": "yarn add vscode-emmet-helper" - }, - "devDependencies": { - "@types/node": "^12.19.9" - }, - "dependencies": { - "@emmetio/abbreviation": "^2.2.0", - "@emmetio/css-parser": "ramya-rao-a/css-parser#vscode", - "@emmetio/html-matcher": "^0.3.3", - "@emmetio/math-expression": "^1.0.4", - "image-size": "^0.5.2", - "vscode-emmet-helper": "^2.3.0", - "vscode-languageserver-textdocument": "^1.0.1" - }, - "capabilities": { - "virtualWorkspaces": true, - "untrustedWorkspaces": { - "supported": true - } - } -} diff --git a/lib/vscode/extensions/emmet/src/util.ts b/lib/vscode/extensions/emmet/src/util.ts deleted file mode 100644 index cb63f504d5d0..000000000000 --- a/lib/vscode/extensions/emmet/src/util.ts +++ /dev/null @@ -1,705 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; -import parse from '@emmetio/html-matcher'; -import parseStylesheet from '@emmetio/css-parser'; -import { Node as FlatNode, HtmlNode as HtmlFlatNode, Property as FlatProperty, Rule as FlatRule, CssToken as FlatCssToken, Stylesheet as FlatStylesheet } from 'EmmetFlatNode'; -import { DocumentStreamReader } from './bufferStream'; -import * as EmmetHelper from 'vscode-emmet-helper'; -import { TextDocument as LSTextDocument } from 'vscode-languageserver-textdocument'; -import { getRootNode } from './parseDocument'; - -let _emmetHelper: typeof EmmetHelper; -let _currentExtensionsPath: string[] | undefined; - -let _homeDir: vscode.Uri | undefined; - - -export function setHomeDir(homeDir: vscode.Uri) { - _homeDir = homeDir; -} - -export function getEmmetHelper() { - // Lazy load vscode-emmet-helper instead of importing it - // directly to reduce the start-up time of the extension - if (!_emmetHelper) { - _emmetHelper = require('vscode-emmet-helper'); - } - return _emmetHelper; -} - -/** - * Update Emmet Helper to use user snippets from the extensionsPath setting - */ -export function updateEmmetExtensionsPath(forceRefresh: boolean = false) { - const helper = getEmmetHelper(); - let extensionsPath = vscode.workspace.getConfiguration('emmet').get('extensionsPath'); - if (!extensionsPath) { - extensionsPath = []; - } - if (forceRefresh || _currentExtensionsPath !== extensionsPath) { - _currentExtensionsPath = extensionsPath; - const rootPath = vscode.workspace.workspaceFolders?.length ? vscode.workspace.workspaceFolders[0].uri : undefined; - const fileSystem = vscode.workspace.fs; - helper.updateExtensionsPath(extensionsPath, fileSystem, rootPath, _homeDir).catch(err => { - if (Array.isArray(extensionsPath) && extensionsPath.length) { - vscode.window.showErrorMessage(err.message); - } - }); - } -} - -/** - * Migrate old configuration(string) for extensionsPath to new type(string[]) - * https://github.com/microsoft/vscode/issues/117517 - */ -export function migrateEmmetExtensionsPath() { - // Get the detail info of emmet.extensionsPath setting - let config = vscode.workspace.getConfiguration().inspect('emmet.extensionsPath'); - - // Update Global setting if the value type is string or the value is null - if (typeof config?.globalValue === 'string') { - vscode.workspace.getConfiguration().update('emmet.extensionsPath', [config.globalValue], true); - } else if (config?.globalValue === null) { - vscode.workspace.getConfiguration().update('emmet.extensionsPath', [], true); - } - // Update Workspace setting if the value type is string or the value is null - if (typeof config?.workspaceValue === 'string') { - vscode.workspace.getConfiguration().update('emmet.extensionsPath', [config.workspaceValue], false); - } else if (config?.workspaceValue === null) { - vscode.workspace.getConfiguration().update('emmet.extensionsPath', [], false); - } - // Update WorkspaceFolder setting if the value type is string or the value is null - if (typeof config?.workspaceFolderValue === 'string') { - vscode.workspace.getConfiguration().update('emmet.extensionsPath', [config.workspaceFolderValue]); - } else if (config?.workspaceFolderValue === null) { - vscode.workspace.getConfiguration().update('emmet.extensionsPath', []); - } -} - -/** - * Mapping between languages that support Emmet and completion trigger characters - */ -export const LANGUAGE_MODES: { [id: string]: string[] } = { - 'html': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], - 'jade': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], - 'slim': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], - 'haml': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], - 'xml': ['.', '}', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], - 'xsl': ['!', '.', '}', '*', '$', '/', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], - 'css': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], - 'scss': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], - 'sass': [':', '!', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], - 'less': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], - 'stylus': [':', '!', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], - 'javascriptreact': ['!', '.', '}', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], - 'typescriptreact': ['!', '.', '}', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] -}; - -export function isStyleSheet(syntax: string): boolean { - let stylesheetSyntaxes = ['css', 'scss', 'sass', 'less', 'stylus']; - return stylesheetSyntaxes.includes(syntax); -} - -export function validate(allowStylesheet: boolean = true): boolean { - let editor = vscode.window.activeTextEditor; - if (!editor) { - vscode.window.showInformationMessage('No editor is active'); - return false; - } - if (!allowStylesheet && isStyleSheet(editor.document.languageId)) { - return false; - } - return true; -} - -export function getMappingForIncludedLanguages(): any { - // Explicitly map languages that have built-in grammar in VS Code to their parent language - // to get emmet completion support - // For other languages, users will have to use `emmet.includeLanguages` or - // language specific extensions can provide emmet completion support - const MAPPED_MODES: Object = { - 'handlebars': 'html', - 'php': 'html' - }; - - const finalMappedModes = Object.create(null); - let includeLanguagesConfig = vscode.workspace.getConfiguration('emmet')['includeLanguages']; - let includeLanguages = Object.assign({}, MAPPED_MODES, includeLanguagesConfig ? includeLanguagesConfig : {}); - Object.keys(includeLanguages).forEach(syntax => { - if (typeof includeLanguages[syntax] === 'string' && LANGUAGE_MODES[includeLanguages[syntax]]) { - finalMappedModes[syntax] = includeLanguages[syntax]; - } - }); - return finalMappedModes; -} - -/** -* Get the corresponding emmet mode for given vscode language mode -* E.g.: jsx for typescriptreact/javascriptreact or pug for jade -* If the language is not supported by emmet or has been excluded via `excludeLanguages` setting, -* then nothing is returned -* -* @param excludedLanguages Array of language ids that user has chosen to exclude for emmet -*/ -export function getEmmetMode(language: string, excludedLanguages: string[]): string | undefined { - if (!language || excludedLanguages.indexOf(language) > -1) { - return; - } - if (/\b(typescriptreact|javascriptreact|jsx-tags)\b/.test(language)) { // treat tsx like jsx - return 'jsx'; - } - if (language === 'sass-indented') { // map sass-indented to sass - return 'sass'; - } - if (language === 'jade') { - return 'pug'; - } - const syntaxes = getSyntaxes(); - if (syntaxes.markup.includes(language) || syntaxes.stylesheet.includes(language)) { - return language; - } - return; -} - -const closeBrace = 125; -const openBrace = 123; -const slash = 47; -const star = 42; - -/** - * Traverse the given document backward & forward from given position - * to find a complete ruleset, then parse just that to return a Stylesheet - * @param document vscode.TextDocument - * @param position vscode.Position - */ -export function parsePartialStylesheet(document: vscode.TextDocument, position: vscode.Position): FlatStylesheet | undefined { - const isCSS = document.languageId === 'css'; - const positionOffset = document.offsetAt(position); - let startOffset = 0; - let endOffset = document.getText().length; - const limitCharacter = positionOffset - 5000; - const limitOffset = limitCharacter > 0 ? limitCharacter : startOffset; - const stream = new DocumentStreamReader(document, positionOffset); - - function findOpeningCommentBeforePosition(pos: number): number | undefined { - const text = document.getText().substring(0, pos); - let offset = text.lastIndexOf('/*'); - if (offset === -1) { - return; - } - return offset; - } - - function findClosingCommentAfterPosition(pos: number): number | undefined { - const text = document.getText().substring(pos); - let offset = text.indexOf('*/'); - if (offset === -1) { - return; - } - offset += 2 + pos; - return offset; - } - - function consumeLineCommentBackwards() { - const posLineNumber = document.positionAt(stream.pos).line; - if (!isCSS && currentLine !== posLineNumber) { - currentLine = posLineNumber; - const startLineComment = document.lineAt(currentLine).text.indexOf('//'); - if (startLineComment > -1) { - stream.pos = document.offsetAt(new vscode.Position(currentLine, startLineComment)); - } - } - } - - function consumeBlockCommentBackwards() { - if (stream.peek() === slash) { - if (stream.backUp(1) === star) { - stream.pos = findOpeningCommentBeforePosition(stream.pos) ?? startOffset; - } else { - stream.next(); - } - } - } - - function consumeCommentForwards() { - if (stream.eat(slash)) { - if (stream.eat(slash) && !isCSS) { - const posLineNumber = document.positionAt(stream.pos).line; - stream.pos = document.offsetAt(new vscode.Position(posLineNumber + 1, 0)); - } else if (stream.eat(star)) { - stream.pos = findClosingCommentAfterPosition(stream.pos) ?? endOffset; - } - } - } - - // Go forward until we find a closing brace. - while (!stream.eof() && !stream.eat(closeBrace)) { - if (stream.peek() === slash) { - consumeCommentForwards(); - } else { - stream.next(); - } - } - - if (!stream.eof()) { - endOffset = stream.pos; - } - - stream.pos = positionOffset; - let openBracesToFind = 1; - let currentLine = position.line; - let exit = false; - - // Go back until we found an opening brace. If we find a closing one, consume its pair and continue. - while (!exit && openBracesToFind > 0 && !stream.sof()) { - consumeLineCommentBackwards(); - - switch (stream.backUp(1)) { - case openBrace: - openBracesToFind--; - break; - case closeBrace: - if (isCSS) { - stream.next(); - startOffset = stream.pos; - exit = true; - } else { - openBracesToFind++; - } - break; - case slash: - consumeBlockCommentBackwards(); - break; - default: - break; - } - - if (position.line - document.positionAt(stream.pos).line > 100 - || stream.pos <= limitOffset) { - exit = true; - } - } - - // We are at an opening brace. We need to include its selector. - currentLine = document.positionAt(stream.pos).line; - openBracesToFind = 0; - let foundSelector = false; - while (!exit && !stream.sof() && !foundSelector && openBracesToFind >= 0) { - consumeLineCommentBackwards(); - - const ch = stream.backUp(1); - if (/\s/.test(String.fromCharCode(ch))) { - continue; - } - - switch (ch) { - case slash: - consumeBlockCommentBackwards(); - break; - case closeBrace: - openBracesToFind++; - break; - case openBrace: - openBracesToFind--; - break; - default: - if (!openBracesToFind) { - foundSelector = true; - } - break; - } - - if (!stream.sof() && foundSelector) { - startOffset = stream.pos; - } - } - - try { - const buffer = ' '.repeat(startOffset) + document.getText().substring(startOffset, endOffset); - return parseStylesheet(buffer); - } catch (e) { - return; - } -} - -/** - * Returns node corresponding to given position in the given root node - */ -export function getFlatNode(root: FlatNode | undefined, offset: number, includeNodeBoundary: boolean): FlatNode | undefined { - if (!root) { - return; - } - - function getFlatNodeChild(child: FlatNode | undefined): FlatNode | undefined { - if (!child) { - return; - } - const nodeStart = child.start; - const nodeEnd = child.end; - if ((nodeStart < offset && nodeEnd > offset) - || (includeNodeBoundary && nodeStart <= offset && nodeEnd >= offset)) { - return getFlatNodeChildren(child.children) ?? child; - } - else if ('close' in child) { - // We have an HTML node in this case. - // In case this node is an invalid unpaired HTML node, - // we still want to search its children - const htmlChild = child; - if (htmlChild.open && !htmlChild.close) { - return getFlatNodeChildren(htmlChild.children); - } - } - return; - } - - function getFlatNodeChildren(children: FlatNode[]): FlatNode | undefined { - for (let i = 0; i < children.length; i++) { - const foundChild = getFlatNodeChild(children[i]); - if (foundChild) { - return foundChild; - } - } - return; - } - - return getFlatNodeChildren(root.children); -} - -export const allowedMimeTypesInScriptTag = ['text/html', 'text/plain', 'text/x-template', 'text/template', 'text/ng-template']; - -/** - * Finds the HTML node within an HTML document at a given position - * If position is inside a script tag of type template, then it will be parsed to find the inner HTML node as well - */ -export function getHtmlFlatNode(documentText: string, root: FlatNode | undefined, offset: number, includeNodeBoundary: boolean): HtmlFlatNode | undefined { - let currentNode: HtmlFlatNode | undefined = getFlatNode(root, offset, includeNodeBoundary); - if (!currentNode) { return; } - - // If the currentNode is a script one, first set up its subtree and then find HTML node. - if (currentNode.name === 'script' && currentNode.children.length === 0) { - setUpScriptNodeSubtree(documentText, currentNode); - currentNode = getFlatNode(currentNode, offset, includeNodeBoundary) ?? currentNode; - } - return currentNode; -} - -export function setUpScriptNodeSubtree(documentText: string, scriptNode: HtmlFlatNode): void { - const isTemplateScript = scriptNode.name === 'script' && - (scriptNode.attributes && - scriptNode.attributes.some(x => x.name.toString() === 'type' - && allowedMimeTypesInScriptTag.includes(x.value.toString()))); - if (isTemplateScript - && scriptNode.open) { - // blank out the rest of the document and generate the subtree. - const beforePadding = ' '.repeat(scriptNode.open.end); - const endToUse = scriptNode.close ? scriptNode.close.start : scriptNode.end; - const scriptBodyText = beforePadding + documentText.substring(scriptNode.open.end, endToUse); - const innerRoot: HtmlFlatNode = parse(scriptBodyText); - innerRoot.children.forEach(child => { - scriptNode.children.push(child); - child.parent = scriptNode; - }); - } -} - -export function isOffsetInsideOpenOrCloseTag(node: FlatNode, offset: number): boolean { - const htmlNode = node as HtmlFlatNode; - if ((htmlNode.open && offset > htmlNode.open.start && offset < htmlNode.open.end) - || (htmlNode.close && offset > htmlNode.close.start && offset < htmlNode.close.end)) { - return true; - } - - return false; -} - -export function offsetRangeToSelection(document: vscode.TextDocument, start: number, end: number): vscode.Selection { - const startPos = document.positionAt(start); - const endPos = document.positionAt(end); - return new vscode.Selection(startPos, endPos); -} - -export function offsetRangeToVsRange(document: vscode.TextDocument, start: number, end: number): vscode.Range { - const startPos = document.positionAt(start); - const endPos = document.positionAt(end); - return new vscode.Range(startPos, endPos); -} - -/** - * Returns the deepest non comment node under given node - */ -export function getDeepestFlatNode(node: FlatNode | undefined): FlatNode | undefined { - if (!node || !node.children || node.children.length === 0 || !node.children.find(x => x.type !== 'comment')) { - return node; - } - for (let i = node.children.length - 1; i >= 0; i--) { - if (node.children[i].type !== 'comment') { - return getDeepestFlatNode(node.children[i]); - } - } - return undefined; -} - -export function findNextWord(propertyValue: string, pos: number): [number | undefined, number | undefined] { - - let foundSpace = pos === -1; - let foundStart = false; - let foundEnd = false; - - let newSelectionStart; - let newSelectionEnd; - while (pos < propertyValue.length - 1) { - pos++; - if (!foundSpace) { - if (propertyValue[pos] === ' ') { - foundSpace = true; - } - continue; - } - if (foundSpace && !foundStart && propertyValue[pos] === ' ') { - continue; - } - if (!foundStart) { - newSelectionStart = pos; - foundStart = true; - continue; - } - if (propertyValue[pos] === ' ') { - newSelectionEnd = pos; - foundEnd = true; - break; - } - } - - if (foundStart && !foundEnd) { - newSelectionEnd = propertyValue.length; - } - - return [newSelectionStart, newSelectionEnd]; -} - -export function findPrevWord(propertyValue: string, pos: number): [number | undefined, number | undefined] { - - let foundSpace = pos === propertyValue.length; - let foundStart = false; - let foundEnd = false; - - let newSelectionStart; - let newSelectionEnd; - while (pos > -1) { - pos--; - if (!foundSpace) { - if (propertyValue[pos] === ' ') { - foundSpace = true; - } - continue; - } - if (foundSpace && !foundEnd && propertyValue[pos] === ' ') { - continue; - } - if (!foundEnd) { - newSelectionEnd = pos + 1; - foundEnd = true; - continue; - } - if (propertyValue[pos] === ' ') { - newSelectionStart = pos + 1; - foundStart = true; - break; - } - } - - if (foundEnd && !foundStart) { - newSelectionStart = 0; - } - - return [newSelectionStart, newSelectionEnd]; -} - -export function getNodesInBetween(node1: FlatNode, node2: FlatNode): FlatNode[] { - // Same node - if (sameNodes(node1, node2)) { - return [node1]; - } - - // Not siblings - if (!sameNodes(node1.parent, node2.parent)) { - // node2 is ancestor of node1 - if (node2.start < node1.start) { - return [node2]; - } - - // node1 is ancestor of node2 - if (node2.start < node1.end) { - return [node1]; - } - - // Get the highest ancestor of node1 that should be commented - while (node1.parent && node1.parent.end < node2.start) { - node1 = node1.parent; - } - - // Get the highest ancestor of node2 that should be commented - while (node2.parent && node2.parent.start > node1.start) { - node2 = node2.parent; - } - } - - const siblings: FlatNode[] = []; - let currentNode: FlatNode | undefined = node1; - const position = node2.end; - while (currentNode && position > currentNode.start) { - siblings.push(currentNode); - currentNode = currentNode.nextSibling; - } - return siblings; -} - -export function sameNodes(node1: FlatNode | undefined, node2: FlatNode | undefined): boolean { - // return true if they're both undefined - if (!node1 && !node2) { - return true; - } - // return false if only one of them is undefined - if (!node1 || !node2) { - return false; - } - return node1.start === node2.start && node1.end === node2.end; -} - -export function getEmmetConfiguration(syntax: string) { - const emmetConfig = vscode.workspace.getConfiguration('emmet'); - const syntaxProfiles = Object.assign({}, emmetConfig['syntaxProfiles'] || {}); - const preferences = Object.assign({}, emmetConfig['preferences'] || {}); - // jsx, xml and xsl syntaxes need to have self closing tags unless otherwise configured by user - if (syntax === 'jsx' || syntax === 'xml' || syntax === 'xsl') { - syntaxProfiles[syntax] = syntaxProfiles[syntax] || {}; - if (typeof syntaxProfiles[syntax] === 'object' - && !syntaxProfiles[syntax].hasOwnProperty('self_closing_tag') // Old Emmet format - && !syntaxProfiles[syntax].hasOwnProperty('selfClosingStyle') // Emmet 2.0 format - ) { - syntaxProfiles[syntax] = { - ...syntaxProfiles[syntax], - selfClosingStyle: syntax === 'jsx' ? 'xhtml' : 'xml' - }; - } - } - - return { - preferences, - showExpandedAbbreviation: emmetConfig['showExpandedAbbreviation'], - showAbbreviationSuggestions: emmetConfig['showAbbreviationSuggestions'], - syntaxProfiles, - variables: emmetConfig['variables'], - excludeLanguages: emmetConfig['excludeLanguages'], - showSuggestionsAsSnippets: emmetConfig['showSuggestionsAsSnippets'] - }; -} - -/** - * Itereates by each child, as well as nested child's children, in their order - * and invokes `fn` for each. If `fn` function returns `false`, iteration stops - */ -export function iterateCSSToken(token: FlatCssToken, fn: (x: any) => any): boolean { - for (let i = 0, il = token.size; i < il; i++) { - if (fn(token.item(i)) === false || iterateCSSToken(token.item(i), fn) === false) { - return false; - } - } - return true; -} - -/** - * Returns `name` CSS property from given `rule` - */ -export function getCssPropertyFromRule(rule: FlatRule, name: string): FlatProperty | undefined { - return rule.children.find(node => node.type === 'property' && node.name === name) as FlatProperty; -} - -/** - * Returns css property under caret in given editor or `null` if such node cannot - * be found - */ -export function getCssPropertyFromDocument(editor: vscode.TextEditor, position: vscode.Position): FlatProperty | null { - const document = editor.document; - const rootNode = getRootNode(document, true); - const offset = document.offsetAt(position); - const node = getFlatNode(rootNode, offset, true); - - if (isStyleSheet(editor.document.languageId)) { - return node && node.type === 'property' ? node : null; - } - - const htmlNode = node; - if (htmlNode - && htmlNode.name === 'style' - && htmlNode.open && htmlNode.close - && htmlNode.open.end < offset - && htmlNode.close.start > offset) { - const buffer = ' '.repeat(htmlNode.start) + - document.getText().substring(htmlNode.start, htmlNode.end); - const innerRootNode = parseStylesheet(buffer); - const innerNode = getFlatNode(innerRootNode, offset, true); - return (innerNode && innerNode.type === 'property') ? innerNode : null; - } - - return null; -} - - -export function getEmbeddedCssNodeIfAny(document: vscode.TextDocument, currentNode: FlatNode | undefined, position: vscode.Position): FlatNode | undefined { - if (!currentNode) { - return; - } - const currentHtmlNode = currentNode; - if (currentHtmlNode && currentHtmlNode.open && currentHtmlNode.close) { - const offset = document.offsetAt(position); - if (currentHtmlNode.open.end < offset && offset <= currentHtmlNode.close.start) { - if (currentHtmlNode.name === 'style') { - const buffer = ' '.repeat(currentHtmlNode.open.end) + document.getText().substring(currentHtmlNode.open.end, currentHtmlNode.close.start); - return parseStylesheet(buffer); - } - } - } - return; -} - -export function isStyleAttribute(currentNode: FlatNode | undefined, offset: number): boolean { - if (!currentNode) { - return false; - } - const currentHtmlNode = currentNode; - const index = (currentHtmlNode.attributes || []).findIndex(x => x.name.toString() === 'style'); - if (index === -1) { - return false; - } - const styleAttribute = currentHtmlNode.attributes[index]; - return offset >= styleAttribute.value.start && offset <= styleAttribute.value.end; -} - -export function isNumber(obj: any): obj is number { - return typeof obj === 'number'; -} - -export function toLSTextDocument(doc: vscode.TextDocument): LSTextDocument { - return LSTextDocument.create(doc.uri.toString(), doc.languageId, doc.version, doc.getText()); -} - -export function getPathBaseName(path: string): string { - const pathAfterSlashSplit = path.split('/').pop(); - const pathAfterBackslashSplit = pathAfterSlashSplit ? pathAfterSlashSplit.split('\\').pop() : ''; - return pathAfterBackslashSplit ?? ''; -} - -export function getSyntaxes() { - /** - * List of all known syntaxes, from emmetio/emmet - */ - return { - markup: ['html', 'xml', 'xsl', 'jsx', 'js', 'pug', 'slim', 'haml'], - stylesheet: ['css', 'sass', 'scss', 'less', 'sss', 'stylus'] - }; -} diff --git a/lib/vscode/extensions/emmet/yarn.lock b/lib/vscode/extensions/emmet/yarn.lock deleted file mode 100644 index 3578363bdc5b..000000000000 --- a/lib/vscode/extensions/emmet/yarn.lock +++ /dev/null @@ -1,109 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@emmetio/abbreviation@^2.2.0", "@emmetio/abbreviation@^2.2.2": - version "2.2.2" - resolved "https://registry.yarnpkg.com/@emmetio/abbreviation/-/abbreviation-2.2.2.tgz#746762fd9e7a8c2ea604f580c62e3cfe250e6989" - integrity sha512-TtE/dBnkTCct8+LntkqVrwqQao6EnPAs1YN3cUgxOxTaBlesBCY37ROUAVZrRlG64GNnVShdl/b70RfAI3w5lw== - dependencies: - "@emmetio/scanner" "^1.0.0" - -"@emmetio/css-abbreviation@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@emmetio/css-abbreviation/-/css-abbreviation-2.1.4.tgz#90362e8a1122ce3b76f6c3157907d30182f53f54" - integrity sha512-qk9L60Y+uRtM5CPbB0y+QNl/1XKE09mSO+AhhSauIfr2YOx/ta3NJw2d8RtCFxgzHeRqFRr8jgyzThbu+MZ4Uw== - dependencies: - "@emmetio/scanner" "^1.0.0" - -"@emmetio/css-parser@ramya-rao-a/css-parser#vscode": - version "0.4.0" - resolved "https://codeload.github.com/ramya-rao-a/css-parser/tar.gz/370c480ac103bd17c7bcfb34bf5d577dc40d3660" - dependencies: - "@emmetio/stream-reader" "^2.2.0" - "@emmetio/stream-reader-utils" "^0.1.0" - -"@emmetio/html-matcher@^0.3.3": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@emmetio/html-matcher/-/html-matcher-0.3.3.tgz#0bbdadc0882e185950f03737dc6dbf8f7bd90728" - integrity sha1-C72twIguGFlQ8Dc33G2/j3vZByg= - dependencies: - "@emmetio/stream-reader" "^2.0.0" - "@emmetio/stream-reader-utils" "^0.1.0" - -"@emmetio/math-expression@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@emmetio/math-expression/-/math-expression-1.0.4.tgz#cb657ed944f82b3728f863bf5ece1b1ff3ae7497" - integrity sha512-1m7y8/VeXCAfgFoPGTerbqCIadApcIINujd3TaM/LRLPPKiod8aT1PPmh542spnsUSsSnZJjbuF7xiO4WFA42g== - dependencies: - "@emmetio/scanner" "^1.0.0" - -"@emmetio/scanner@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@emmetio/scanner/-/scanner-1.0.0.tgz#065b2af6233fe7474d44823e3deb89724af42b5f" - integrity sha512-8HqW8EVqjnCmWXVpqAOZf+EGESdkR27odcMMMGefgKXtar00SoYNSryGv//TELI4T3QFsECo78p+0lmalk/CFA== - -"@emmetio/stream-reader-utils@^0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@emmetio/stream-reader-utils/-/stream-reader-utils-0.1.0.tgz#244cb02c77ec2e74f78a9bd318218abc9c500a61" - integrity sha1-JEywLHfsLnT3ipvTGCGKvJxQCmE= - -"@emmetio/stream-reader@^2.0.0", "@emmetio/stream-reader@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@emmetio/stream-reader/-/stream-reader-2.2.0.tgz#46cffea119a0a003312a21c2d9b5628cb5fcd442" - integrity sha1-Rs/+oRmgoAMxKiHC2bVijLX81EI= - -"@types/node@^12.19.9": - version "12.20.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.7.tgz#1cb61fd0c85cb87e728c43107b5fd82b69bc9ef8" - integrity sha512-gWL8VUkg8VRaCAUgG9WmhefMqHmMblxe2rVpMF86nZY/+ZysU+BkAp+3cz03AixWDSSz0ks5WX59yAhv/cDwFA== - -emmet@^2.3.0: - version "2.3.4" - resolved "https://registry.yarnpkg.com/emmet/-/emmet-2.3.4.tgz#5ba0d7a5569a68c7697dfa890c772e4f3179d123" - integrity sha512-3IqSwmO+N2ZGeuhDyhV/TIOJFUbkChi53bcasSNRE7Yd+4eorbbYz4e53TpMECt38NtYkZNupQCZRlwdAYA42A== - dependencies: - "@emmetio/abbreviation" "^2.2.2" - "@emmetio/css-abbreviation" "^2.1.4" - -image-size@^0.5.2: - version "0.5.5" - resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" - integrity sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w= - -jsonc-parser@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.3.1.tgz#59549150b133f2efacca48fe9ce1ec0659af2342" - integrity sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg== - -vscode-emmet-helper@^2.3.0: - version "2.6.2" - resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-2.6.2.tgz#777b471a7851ba0ca8e4151533be7f92511f39b0" - integrity sha512-SkL1WjZZsA+bfTo52QH4PgqXCQAJSqzOmJtAY3rOl17MKbY6iJhVv2T26PshjmUnHoXnXMNa7PcLMCS75RsQDQ== - dependencies: - emmet "^2.3.0" - jsonc-parser "^2.3.0" - vscode-languageserver-textdocument "^1.0.1" - vscode-languageserver-types "^3.15.1" - vscode-nls "^5.0.0" - vscode-uri "^2.1.2" - -vscode-languageserver-textdocument@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz#178168e87efad6171b372add1dea34f53e5d330f" - integrity sha512-UIcJDjX7IFkck7cSkNNyzIz5FyvpQfY7sdzVy+wkKN/BLaD4DQ0ppXQrKePomCxTS7RrolK1I0pey0bG9eh8dA== - -vscode-languageserver-types@^3.15.1: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" - integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== - -vscode-nls@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840" - integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA== - -vscode-uri@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.1.2.tgz#c8d40de93eb57af31f3c715dd650e2ca2c096f1c" - integrity sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A== diff --git a/lib/vscode/extensions/extension-editing/package.json b/lib/vscode/extensions/extension-editing/package.json deleted file mode 100644 index d60c8420514f..000000000000 --- a/lib/vscode/extensions/extension-editing/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "extension-editing", - "displayName": "%displayName%", - "description": "%description%", - "version": "1.0.0", - "publisher": "vscode", - "license": "MIT", - "engines": { - "vscode": "^1.4.0" - }, - "icon": "images/icon.png", - "activationEvents": [ - "onLanguage:json", - "onLanguage:markdown", - "onLanguage:typescript" - ], - "main": "./out/extensionEditingMain", - "browser": "./dist/browser/extensionEditingBrowserMain", - "capabilities": { - "virtualWorkspaces": true, - "untrustedWorkspaces": { - "supported": true - } - }, - "scripts": { - "compile": "gulp compile-extension:extension-editing", - "watch": "gulp watch-extension:extension-editing" - }, - "dependencies": { - "jsonc-parser": "^2.2.1", - "markdown-it": "^12.0.4", - "parse5": "^3.0.2", - "vscode-nls": "^4.1.1" - }, - "contributes": { - "jsonValidation": [ - { - "fileMatch": "package.json", - "url": "vscode://schemas/vscode-extensions" - }, - { - "fileMatch": "*language-configuration.json", - "url": "vscode://schemas/language-configuration" - }, - { - "fileMatch": [ - "*icon-theme.json", - "!*product-icon-theme.json" - ], - "url": "vscode://schemas/icon-theme" - }, - { - "fileMatch": "*product-icon-theme.json", - "url": "vscode://schemas/product-icon-theme" - }, - { - "fileMatch": "*color-theme.json", - "url": "vscode://schemas/color-theme" - } - ], - "languages": [ - { - "id": "ignore", - "filenames": [ - ".vscodeignore" - ] - } - ] - }, - "devDependencies": { - "@types/markdown-it": "0.0.2", - "@types/node": "^12.19.9" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/extension-editing/yarn.lock b/lib/vscode/extensions/extension-editing/yarn.lock deleted file mode 100644 index 3275b1f2ad6b..000000000000 --- a/lib/vscode/extensions/extension-editing/yarn.lock +++ /dev/null @@ -1,78 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/markdown-it@0.0.2": - version "0.0.2" - resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.2.tgz#5d9ad19e6e6508cdd2f2596df86fd0aade598660" - integrity sha1-XZrRnm5lCM3S8llt+G/Qqt5ZhmA= - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -"@types/node@^6.0.46": - version "6.0.78" - resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.78.tgz#5d4a3f579c1524e01ee21bf474e6fba09198f470" - integrity sha512-+vD6E8ixntRzzZukoF3uP1iV+ZjVN3koTcaeK+BEoc/kSfGbLDIGC7RmCaUgVpUfN6cWvfczFRERCyKM9mkvXg== - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -entities@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" - integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== - -jsonc-parser@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc" - integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w== - -linkify-it@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.2.tgz#f55eeb8bc1d3ae754049e124ab3bb56d97797fb8" - integrity sha512-gDBO4aHNZS6coiZCKVhSNh43F9ioIL4JwRjLZPkoLIY4yZFwg264Y5lu2x6rb1Js42Gh6Yqm2f6L2AJcnkzinQ== - dependencies: - uc.micro "^1.0.1" - -markdown-it@^12.0.4: - version "12.0.4" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.4.tgz#eec8247d296327eac3ba9746bdeec9cfcc751e33" - integrity sha512-34RwOXZT8kyuOJy25oJNJoulO8L0bTHYWXcdZBYZqFnjIy3NgjeoM3FmPXIOFQ26/lSHYMr8oc62B6adxXcb3Q== - dependencies: - argparse "^2.0.1" - entities "~2.1.0" - linkify-it "^3.0.1" - mdurl "^1.0.1" - uc.micro "^1.0.5" - -mdurl@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" - integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= - -parse5@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.2.tgz#05eff57f0ef4577fb144a79f8b9a967a6cc44510" - integrity sha1-Be/1fw70V3+xRKefi5qWemzERRA= - dependencies: - "@types/node" "^6.0.46" - -uc.micro@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192" - integrity sha1-ftUNXg+an7ClczeSWfKndFjVAZI= - -uc.micro@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" - integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== - -vscode-nls@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.1.tgz#f9916b64e4947b20322defb1e676a495861f133c" - integrity sha512-4R+2UoUUU/LdnMnFjePxfLqNhBS8lrAFyX7pjb2ud/lqDkrUavFUTcG7wR0HBZFakae0Q6KLBFjMS6W93F403A== diff --git a/lib/vscode/extensions/git/package.json b/lib/vscode/extensions/git/package.json deleted file mode 100644 index 7d5e81b25510..000000000000 --- a/lib/vscode/extensions/git/package.json +++ /dev/null @@ -1,2395 +0,0 @@ -{ - "name": "git", - "displayName": "%displayName%", - "description": "%description%", - "publisher": "vscode", - "license": "MIT", - "version": "1.0.0", - "engines": { - "vscode": "^1.5.0" - }, - "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", - "enableProposedApi": true, - "categories": [ - "Other" - ], - "activationEvents": [ - "*", - "onFileSystem:git" - ], - "main": "./out/main", - "icon": "resources/icons/git.png", - "scripts": { - "compile": "gulp compile-extension:git", - "watch": "gulp watch-extension:git", - "update-emoji": "node ./build/update-emoji.js", - "update-grammar": "node ./build/update-grammars.js", - "test": "node ../../node_modules/mocha/bin/mocha" - }, - "capabilities": { - "virtualWorkspaces": true, - "untrustedWorkspaces": { - "supported": true - } - }, - "contributes": { - "commands": [ - { - "command": "git.setLogLevel", - "title": "%command.setLogLevel%", - "category": "Git" - }, - { - "command": "git.clone", - "title": "%command.clone%", - "category": "Git" - }, - { - "command": "git.cloneRecursive", - "title": "%command.cloneRecursive%", - "category": "Git" - }, - { - "command": "git.init", - "title": "%command.init%", - "category": "Git", - "icon": "$(add)" - }, - { - "command": "git.openRepository", - "title": "%command.openRepository%", - "category": "Git" - }, - { - "command": "git.close", - "title": "%command.close%", - "category": "Git" - }, - { - "command": "git.refresh", - "title": "%command.refresh%", - "category": "Git", - "icon": "$(refresh)" - }, - { - "command": "git.openChange", - "title": "%command.openChange%", - "category": "Git", - "icon": "$(compare-changes)" - }, - { - "command": "git.openAllChanges", - "title": "%command.openAllChanges%", - "category": "Git" - }, - { - "command": "git.openFile", - "title": "%command.openFile%", - "category": "Git", - "icon": "$(go-to-file)" - }, - { - "command": "git.openFile2", - "title": "%command.openFile%", - "category": "Git", - "icon": "$(go-to-file)" - }, - { - "command": "git.openHEADFile", - "title": "%command.openHEADFile%", - "category": "Git" - }, - { - "command": "git.stage", - "title": "%command.stage%", - "category": "Git", - "icon": "$(add)" - }, - { - "command": "git.stageAll", - "title": "%command.stageAll%", - "category": "Git", - "icon": "$(add)" - }, - { - "command": "git.stageAllTracked", - "title": "%command.stageAllTracked%", - "category": "Git", - "icon": "$(add)" - }, - { - "command": "git.stageAllUntracked", - "title": "%command.stageAllUntracked%", - "category": "Git", - "icon": "$(add)" - }, - { - "command": "git.stageAllMerge", - "title": "%command.stageAllMerge%", - "category": "Git", - "icon": "$(add)" - }, - { - "command": "git.stageSelectedRanges", - "title": "%command.stageSelectedRanges%", - "category": "Git" - }, - { - "command": "git.revertSelectedRanges", - "title": "%command.revertSelectedRanges%", - "category": "Git" - }, - { - "command": "git.stageChange", - "title": "%command.stageChange%", - "category": "Git", - "icon": "$(add)" - }, - { - "command": "git.revertChange", - "title": "%command.revertChange%", - "category": "Git", - "icon": "$(discard)" - }, - { - "command": "git.unstage", - "title": "%command.unstage%", - "category": "Git", - "icon": "$(remove)" - }, - { - "command": "git.unstageAll", - "title": "%command.unstageAll%", - "category": "Git", - "icon": "$(remove)" - }, - { - "command": "git.unstageSelectedRanges", - "title": "%command.unstageSelectedRanges%", - "category": "Git" - }, - { - "command": "git.clean", - "title": "%command.clean%", - "category": "Git", - "icon": "$(discard)" - }, - { - "command": "git.cleanAll", - "title": "%command.cleanAll%", - "category": "Git", - "icon": "$(discard)" - }, - { - "command": "git.cleanAllTracked", - "title": "%command.cleanAllTracked%", - "category": "Git", - "icon": "$(discard)" - }, - { - "command": "git.cleanAllUntracked", - "title": "%command.cleanAllUntracked%", - "category": "Git", - "icon": "$(discard)" - }, - { - "command": "git.rename", - "title": "%command.rename%", - "category": "Git", - "icon": "$(discard)" - }, - { - "command": "git.commit", - "title": "%command.commit%", - "category": "Git", - "icon": "$(check)" - }, - { - "command": "git.commitStaged", - "title": "%command.commitStaged%", - "category": "Git" - }, - { - "command": "git.commitEmpty", - "title": "%command.commitEmpty%", - "category": "Git" - }, - { - "command": "git.commitStagedSigned", - "title": "%command.commitStagedSigned%", - "category": "Git" - }, - { - "command": "git.commitStagedAmend", - "title": "%command.commitStagedAmend%", - "category": "Git" - }, - { - "command": "git.commitAll", - "title": "%command.commitAll%", - "category": "Git" - }, - { - "command": "git.commitAllSigned", - "title": "%command.commitAllSigned%", - "category": "Git" - }, - { - "command": "git.commitAllAmend", - "title": "%command.commitAllAmend%", - "category": "Git" - }, - { - "command": "git.commitNoVerify", - "title": "%command.commitNoVerify%", - "category": "Git", - "icon": "$(check)" - }, - { - "command": "git.commitStagedNoVerify", - "title": "%command.commitStagedNoVerify%", - "category": "Git" - }, - { - "command": "git.commitEmptyNoVerify", - "title": "%command.commitEmptyNoVerify%", - "category": "Git" - }, - { - "command": "git.commitStagedSignedNoVerify", - "title": "%command.commitStagedSignedNoVerify%", - "category": "Git" - }, - { - "command": "git.commitStagedAmendNoVerify", - "title": "%command.commitStagedAmendNoVerify%", - "category": "Git" - }, - { - "command": "git.commitAllNoVerify", - "title": "%command.commitAllNoVerify%", - "category": "Git" - }, - { - "command": "git.commitAllSignedNoVerify", - "title": "%command.commitAllSignedNoVerify%", - "category": "Git" - }, - { - "command": "git.commitAllAmendNoVerify", - "title": "%command.commitAllAmendNoVerify%", - "category": "Git" - }, - { - "command": "git.restoreCommitTemplate", - "title": "%command.restoreCommitTemplate%", - "category": "Git" - }, - { - "command": "git.undoCommit", - "title": "%command.undoCommit%", - "category": "Git" - }, - { - "command": "git.checkout", - "title": "%command.checkout%", - "category": "Git" - }, - { - "command": "git.checkoutDetached", - "title": "%command.checkoutDetached%", - "category": "Git" - }, - { - "command": "git.branch", - "title": "%command.branch%", - "category": "Git" - }, - { - "command": "git.branchFrom", - "title": "%command.branchFrom%", - "category": "Git" - }, - { - "command": "git.deleteBranch", - "title": "%command.deleteBranch%", - "category": "Git" - }, - { - "command": "git.renameBranch", - "title": "%command.renameBranch%", - "category": "Git" - }, - { - "command": "git.merge", - "title": "%command.merge%", - "category": "Git" - }, - { - "command": "git.rebase", - "title": "%command.rebase%", - "category": "Git" - }, - { - "command": "git.createTag", - "title": "%command.createTag%", - "category": "Git" - }, - { - "command": "git.deleteTag", - "title": "%command.deleteTag%", - "category": "Git" - }, - { - "command": "git.fetch", - "title": "%command.fetch%", - "category": "Git" - }, - { - "command": "git.fetchPrune", - "title": "%command.fetchPrune%", - "category": "Git" - }, - { - "command": "git.fetchAll", - "title": "%command.fetchAll%", - "category": "Git" - }, - { - "command": "git.pull", - "title": "%command.pull%", - "category": "Git" - }, - { - "command": "git.pullRebase", - "title": "%command.pullRebase%", - "category": "Git" - }, - { - "command": "git.pullFrom", - "title": "%command.pullFrom%", - "category": "Git" - }, - { - "command": "git.push", - "title": "%command.push%", - "category": "Git" - }, - { - "command": "git.pushForce", - "title": "%command.pushForce%", - "category": "Git" - }, - { - "command": "git.pushTo", - "title": "%command.pushTo%", - "category": "Git" - }, - { - "command": "git.pushToForce", - "title": "%command.pushToForce%", - "category": "Git" - }, - { - "command": "git.pushTags", - "title": "%command.pushTags%", - "category": "Git" - }, - { - "command": "git.pushWithTags", - "title": "%command.pushFollowTags%", - "category": "Git" - }, - { - "command": "git.pushWithTagsForce", - "title": "%command.pushFollowTagsForce%", - "category": "Git" - }, - { - "command": "git.cherryPick", - "title": "%command.cherryPick%", - "category": "Git" - }, - { - "command": "git.addRemote", - "title": "%command.addRemote%", - "category": "Git" - }, - { - "command": "git.removeRemote", - "title": "%command.removeRemote%", - "category": "Git" - }, - { - "command": "git.sync", - "title": "%command.sync%", - "category": "Git" - }, - { - "command": "git.syncRebase", - "title": "%command.syncRebase%", - "category": "Git" - }, - { - "command": "git.publish", - "title": "%command.publish%", - "category": "Git" - }, - { - "command": "git.showOutput", - "title": "%command.showOutput%", - "category": "Git" - }, - { - "command": "git.ignore", - "title": "%command.ignore%", - "category": "Git" - }, - { - "command": "git.revealInExplorer", - "title": "%command.revealInExplorer%", - "category": "Git" - }, - { - "command": "git.stashIncludeUntracked", - "title": "%command.stashIncludeUntracked%", - "category": "Git" - }, - { - "command": "git.stash", - "title": "%command.stash%", - "category": "Git" - }, - { - "command": "git.stashPop", - "title": "%command.stashPop%", - "category": "Git" - }, - { - "command": "git.stashPopLatest", - "title": "%command.stashPopLatest%", - "category": "Git" - }, - { - "command": "git.stashApply", - "title": "%command.stashApply%", - "category": "Git" - }, - { - "command": "git.stashApplyLatest", - "title": "%command.stashApplyLatest%", - "category": "Git" - }, - { - "command": "git.stashDrop", - "title": "%command.stashDrop%", - "category": "Git" - }, - { - "command": "git.timeline.openDiff", - "title": "%command.timelineOpenDiff%", - "icon": "$(compare-changes)", - "category": "Git" - }, - { - "command": "git.timeline.copyCommitId", - "title": "%command.timelineCopyCommitId%", - "category": "Git" - }, - { - "command": "git.timeline.copyCommitMessage", - "title": "%command.timelineCopyCommitMessage%", - "category": "Git" - }, - { - "command": "git.timeline.selectForCompare", - "title": "%command.timelineSelectForCompare%", - "category": "Git" - }, - { - "command": "git.timeline.compareWithSelected", - "title": "%command.timelineCompareWithSelected%", - "category": "Git" - }, - { - "command": "git.rebaseAbort", - "title": "%command.rebaseAbort%", - "category": "Git" - } - ], - "keybindings": [ - { - "command": "git.stageSelectedRanges", - "key": "ctrl+k ctrl+alt+s", - "mac": "cmd+k cmd+alt+s", - "when": "isInDiffEditor" - }, - { - "command": "git.unstageSelectedRanges", - "key": "ctrl+k ctrl+n", - "mac": "cmd+k cmd+n", - "when": "isInDiffEditor" - }, - { - "command": "git.revertSelectedRanges", - "key": "ctrl+k ctrl+r", - "mac": "cmd+k cmd+r", - "when": "isInDiffEditor" - } - ], - "menus": { - "commandPalette": [ - { - "command": "git.setLogLevel", - "when": "config.git.enabled && !git.missing" - }, - { - "command": "git.clone", - "when": "config.git.enabled && !git.missing" - }, - { - "command": "git.cloneRecursive", - "when": "config.git.enabled && !git.missing" - }, - { - "command": "git.init", - "when": "config.git.enabled && !git.missing" - }, - { - "command": "git.openRepository", - "when": "config.git.enabled && !git.missing" - }, - { - "command": "git.close", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.refresh", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.openFile", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.openHEADFile", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.openChange", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.stage", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.stageAll", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.stageAllTracked", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.stageAllUntracked", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.stageAllMerge", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.stageSelectedRanges", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.stageChange", - "when": "false" - }, - { - "command": "git.revertSelectedRanges", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.revertChange", - "when": "false" - }, - { - "command": "git.openFile2", - "when": "false" - }, - { - "command": "git.unstage", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.unstageAll", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.unstageSelectedRanges", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.clean", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.cleanAll", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.cleanAllTracked", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.cleanAllUntracked", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.rename", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && resourceScheme == file" - }, - { - "command": "git.commit", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.commitStaged", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.commitEmpty", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.commitStagedSigned", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.commitStagedAmend", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.commitAll", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.commitAllSigned", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.commitAllAmend", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.rebaseAbort", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && gitRebaseInProgress" - }, - { - "command": "git.commitNoVerify", - "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" - }, - { - "command": "git.commitStagedNoVerify", - "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" - }, - { - "command": "git.commitEmptyNoVerify", - "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" - }, - { - "command": "git.commitStagedSignedNoVerify", - "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" - }, - { - "command": "git.commitStagedAmendNoVerify", - "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" - }, - { - "command": "git.commitAllNoVerify", - "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" - }, - { - "command": "git.commitAllSignedNoVerify", - "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" - }, - { - "command": "git.commitAllAmendNoVerify", - "when": "config.git.enabled && !git.missing && config.git.allowNoVerifyCommit && gitOpenRepositoryCount != 0" - }, - { - "command": "git.restoreCommitTemplate", - "when": "false" - }, - { - "command": "git.revealInExplorer", - "when": "false" - }, - { - "command": "git.undoCommit", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.checkout", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.branch", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.branchFrom", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.deleteBranch", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.renameBranch", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.cherryPick", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.pull", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.pullFrom", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.pullRebase", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.merge", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.rebase", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.createTag", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.deleteTag", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.fetch", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.fetchPrune", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.fetchAll", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.push", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.pushForce", - "when": "config.git.enabled && !git.missing && config.git.allowForcePush && gitOpenRepositoryCount != 0" - }, - { - "command": "git.pushTo", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.pushToForce", - "when": "config.git.enabled && !git.missing && config.git.allowForcePush && gitOpenRepositoryCount != 0" - }, - { - "command": "git.pushWithTags", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.pushWithTagsForce", - "when": "config.git.enabled && !git.missing && config.git.allowForcePush && gitOpenRepositoryCount != 0" - }, - { - "command": "git.pushTags", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.addRemote", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.removeRemote", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.sync", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.syncRebase", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.publish", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.showOutput", - "when": "config.git.enabled" - }, - { - "command": "git.ignore", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.stashIncludeUntracked", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.stash", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.stashPop", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.stashPopLatest", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.stashApply", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.stashApplyLatest", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.stashDrop", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" - }, - { - "command": "git.timeline.openDiff", - "when": "false" - }, - { - "command": "git.timeline.copyCommitId", - "when": "false" - }, - { - "command": "git.timeline.copyCommitMessage", - "when": "false" - }, - { - "command": "git.timeline.selectForCompare", - "when": "false" - }, - { - "command": "git.timeline.compareWithSelected", - "when": "false" - } - ], - "scm/title": [ - { - "command": "git.commit", - "group": "navigation", - "when": "scmProvider == git" - }, - { - "command": "git.refresh", - "group": "navigation", - "when": "scmProvider == git" - }, - { - "command": "git.pull", - "group": "1_header@1", - "when": "scmProvider == git" - }, - { - "command": "git.push", - "group": "1_header@2", - "when": "scmProvider == git" - }, - { - "command": "git.clone", - "group": "1_header@3", - "when": "scmProvider == git" - }, - { - "command": "git.checkout", - "group": "1_header@4", - "when": "scmProvider == git" - }, - { - "submenu": "git.commit", - "group": "2_main@1", - "when": "scmProvider == git" - }, - { - "submenu": "git.changes", - "group": "2_main@2", - "when": "scmProvider == git" - }, - { - "submenu": "git.pullpush", - "group": "2_main@3", - "when": "scmProvider == git" - }, - { - "submenu": "git.branch", - "group": "2_main@4", - "when": "scmProvider == git" - }, - { - "submenu": "git.remotes", - "group": "2_main@5", - "when": "scmProvider == git" - }, - { - "submenu": "git.stash", - "group": "2_main@6", - "when": "scmProvider == git" - }, - { - "submenu": "git.tags", - "group": "2_main@7", - "when": "scmProvider == git" - }, - { - "command": "git.showOutput", - "group": "3_footer", - "when": "scmProvider == git" - } - ], - "scm/sourceControl": [ - { - "command": "git.close", - "group": "navigation", - "when": "scmProvider == git" - } - ], - "scm/resourceGroup/context": [ - { - "command": "git.stageAllMerge", - "when": "scmProvider == git && scmResourceGroup == merge", - "group": "1_modification" - }, - { - "command": "git.stageAllMerge", - "when": "scmProvider == git && scmResourceGroup == merge", - "group": "inline@2" - }, - { - "command": "git.unstageAll", - "when": "scmProvider == git && scmResourceGroup == index", - "group": "1_modification" - }, - { - "command": "git.unstageAll", - "when": "scmProvider == git && scmResourceGroup == index", - "group": "inline@2" - }, - { - "command": "git.cleanAll", - "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed", - "group": "1_modification" - }, - { - "command": "git.stageAll", - "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed", - "group": "1_modification" - }, - { - "command": "git.cleanAll", - "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed", - "group": "inline@2" - }, - { - "command": "git.stageAll", - "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed", - "group": "inline@2" - }, - { - "command": "git.cleanAllTracked", - "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed", - "group": "1_modification" - }, - { - "command": "git.stageAllTracked", - "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed", - "group": "1_modification" - }, - { - "command": "git.cleanAllTracked", - "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed", - "group": "inline@2" - }, - { - "command": "git.stageAllTracked", - "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed", - "group": "inline@2" - }, - { - "command": "git.cleanAllUntracked", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "1_modification" - }, - { - "command": "git.stageAllUntracked", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "1_modification" - }, - { - "command": "git.cleanAllUntracked", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "inline@2" - }, - { - "command": "git.stageAllUntracked", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "inline@2" - } - ], - "scm/resourceFolder/context": [ - { - "command": "git.stage", - "when": "scmProvider == git && scmResourceGroup == merge", - "group": "1_modification" - }, - { - "command": "git.stage", - "when": "scmProvider == git && scmResourceGroup == merge", - "group": "inline@2" - }, - { - "command": "git.unstage", - "when": "scmProvider == git && scmResourceGroup == index", - "group": "1_modification" - }, - { - "command": "git.unstage", - "when": "scmProvider == git && scmResourceGroup == index", - "group": "inline@2" - }, - { - "command": "git.stage", - "when": "scmProvider == git && scmResourceGroup == workingTree", - "group": "1_modification" - }, - { - "command": "git.clean", - "when": "scmProvider == git && scmResourceGroup == workingTree", - "group": "1_modification" - }, - { - "command": "git.clean", - "when": "scmProvider == git && scmResourceGroup == workingTree", - "group": "inline@2" - }, - { - "command": "git.stage", - "when": "scmProvider == git && scmResourceGroup == workingTree", - "group": "inline@2" - }, - { - "command": "git.ignore", - "when": "scmProvider == git && scmResourceGroup == workingTree", - "group": "1_modification@3" - }, - { - "command": "git.stage", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "1_modification" - }, - { - "command": "git.stage", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "inline@2" - }, - { - "command": "git.clean", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "1_modification" - }, - { - "command": "git.clean", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "inline@2" - }, - { - "command": "git.ignore", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "1_modification@3" - } - ], - "scm/resourceState/context": [ - { - "command": "git.stage", - "when": "scmProvider == git && scmResourceGroup == merge", - "group": "1_modification" - }, - { - "command": "git.openFile", - "when": "scmProvider == git && scmResourceGroup == merge", - "group": "navigation" - }, - { - "command": "git.stage", - "when": "scmProvider == git && scmResourceGroup == merge", - "group": "inline@2" - }, - { - "command": "git.revealInExplorer", - "when": "scmProvider == git && scmResourceGroup == merge", - "group": "2_view" - }, - { - "command": "git.openFile2", - "when": "scmProvider == git && scmResourceGroup == merge && config.git.showInlineOpenFileAction && config.git.openDiffOnClick", - "group": "inline@1" - }, - { - "command": "git.openChange", - "when": "scmProvider == git && scmResourceGroup == merge && config.git.showInlineOpenFileAction && !config.git.openDiffOnClick", - "group": "inline@1" - }, - { - "command": "git.openChange", - "when": "scmProvider == git && scmResourceGroup == index", - "group": "navigation" - }, - { - "command": "git.openFile", - "when": "scmProvider == git && scmResourceGroup == index", - "group": "navigation" - }, - { - "command": "git.openHEADFile", - "when": "scmProvider == git && scmResourceGroup == index", - "group": "navigation" - }, - { - "command": "git.unstage", - "when": "scmProvider == git && scmResourceGroup == index", - "group": "1_modification" - }, - { - "command": "git.unstage", - "when": "scmProvider == git && scmResourceGroup == index", - "group": "inline@2" - }, - { - "command": "git.revealInExplorer", - "when": "scmProvider == git && scmResourceGroup == index", - "group": "2_view" - }, - { - "command": "git.openFile2", - "when": "scmProvider == git && scmResourceGroup == index && config.git.showInlineOpenFileAction && config.git.openDiffOnClick", - "group": "inline@1" - }, - { - "command": "git.openChange", - "when": "scmProvider == git && scmResourceGroup == index && config.git.showInlineOpenFileAction && !config.git.openDiffOnClick", - "group": "inline@1" - }, - { - "command": "git.openChange", - "when": "scmProvider == git && scmResourceGroup == workingTree", - "group": "navigation" - }, - { - "command": "git.openHEADFile", - "when": "scmProvider == git && scmResourceGroup == workingTree", - "group": "navigation" - }, - { - "command": "git.openFile", - "when": "scmProvider == git && scmResourceGroup == workingTree", - "group": "navigation" - }, - { - "command": "git.stage", - "when": "scmProvider == git && scmResourceGroup == workingTree", - "group": "1_modification" - }, - { - "command": "git.clean", - "when": "scmProvider == git && scmResourceGroup == workingTree", - "group": "1_modification" - }, - { - "command": "git.clean", - "when": "scmProvider == git && scmResourceGroup == workingTree", - "group": "inline@2" - }, - { - "command": "git.stage", - "when": "scmProvider == git && scmResourceGroup == workingTree", - "group": "inline@2" - }, - { - "command": "git.openFile2", - "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.showInlineOpenFileAction && config.git.openDiffOnClick", - "group": "inline@1" - }, - { - "command": "git.openChange", - "when": "scmProvider == git && scmResourceGroup == workingTree && config.git.showInlineOpenFileAction && !config.git.openDiffOnClick", - "group": "inline@1" - }, - { - "command": "git.ignore", - "when": "scmProvider == git && scmResourceGroup == workingTree", - "group": "1_modification@3" - }, - { - "command": "git.revealInExplorer", - "when": "scmProvider == git && scmResourceGroup == workingTree", - "group": "2_view" - }, - { - "command": "git.openChange", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "navigation" - }, - { - "command": "git.openHEADFile", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "navigation" - }, - { - "command": "git.openFile", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "navigation" - }, - { - "command": "git.stage", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "1_modification" - }, - { - "command": "git.clean", - "when": "scmProvider == git && scmResourceGroup == untracked && !gitFreshRepository", - "group": "1_modification" - }, - { - "command": "git.clean", - "when": "scmProvider == git && scmResourceGroup == untracked && !gitFreshRepository", - "group": "inline@2" - }, - { - "command": "git.stage", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "inline@2" - }, - { - "command": "git.openFile2", - "when": "scmProvider == git && scmResourceGroup == untracked && config.git.showInlineOpenFileAction && config.git.openDiffOnClick", - "group": "inline@1" - }, - { - "command": "git.openChange", - "when": "scmProvider == git && scmResourceGroup == untracked && config.git.showInlineOpenFileAction && !config.git.openDiffOnClick", - "group": "inline@1" - }, - { - "command": "git.ignore", - "when": "scmProvider == git && scmResourceGroup == untracked", - "group": "1_modification@3" - } - ], - "editor/title": [ - { - "command": "git.openFile", - "group": "navigation", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" - }, - { - "command": "git.openFile", - "group": "navigation", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInNotebookTextDiffEditor && resourceScheme =~ /^git$|^file$/" - }, - { - "command": "git.openChange", - "group": "navigation", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && resourceScheme == file" - }, - { - "command": "git.stageSelectedRanges", - "group": "2_git@1", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" - }, - { - "command": "git.unstageSelectedRanges", - "group": "2_git@2", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" - }, - { - "command": "git.revertSelectedRanges", - "group": "2_git@3", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" - } - ], - "editor/context": [ - { - "command": "git.stageSelectedRanges", - "group": "2_git@1", - "when": "isInDiffRightEditor && !isInEmbeddedDiffEditor && config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" - }, - { - "command": "git.unstageSelectedRanges", - "group": "2_git@2", - "when": "isInDiffRightEditor && !isInEmbeddedDiffEditor && config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" - }, - { - "command": "git.revertSelectedRanges", - "group": "2_git@3", - "when": "isInDiffRightEditor && !isInEmbeddedDiffEditor && config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/" - } - ], - "scm/change/title": [ - { - "command": "git.stageChange", - "when": "config.git.enabled && !git.missing && originalResourceScheme == git" - }, - { - "command": "git.revertChange", - "when": "config.git.enabled && !git.missing && originalResourceScheme == git" - } - ], - "timeline/item/context": [ - { - "command": "git.timeline.openDiff", - "group": "1_actions", - "when": "config.git.enabled && !git.missing && timelineItem =~ /git:file\\b/ && !listMultiSelection" - }, - { - "command": "git.timeline.compareWithSelected", - "group": "3_compare@1", - "when": "config.git.enabled && !git.missing && git.timeline.selectedForCompare && timelineItem =~ /git:file\\b/ && !listMultiSelection" - }, - { - "command": "git.timeline.selectForCompare", - "group": "3_compare@2", - "when": "config.git.enabled && !git.missing && timelineItem =~ /git:file\\b/ && !listMultiSelection" - }, - { - "command": "git.timeline.copyCommitId", - "group": "5_copy@1", - "when": "config.git.enabled && !git.missing && timelineItem =~ /git:file:commit\\b/ && !listMultiSelection" - }, - { - "command": "git.timeline.copyCommitMessage", - "group": "5_copy@2", - "when": "config.git.enabled && !git.missing && timelineItem =~ /git:file:commit\\b/ && !listMultiSelection" - } - ], - "git.commit": [ - { - "command": "git.commit", - "group": "1_commit@1" - }, - { - "command": "git.commitStaged", - "group": "1_commit@2" - }, - { - "command": "git.commitAll", - "group": "1_commit@3" - }, - { - "command": "git.undoCommit", - "group": "1_commit@4" - }, - { - "command": "git.rebaseAbort", - "group": "1_commit@5" - }, - { - "command": "git.commitNoVerify", - "group": "1_commit@6", - "when": "config.git.allowNoVerifyCommit" - }, - { - "command": "git.commitStagedNoVerify", - "group": "1_commit@7", - "when": "config.git.allowNoVerifyCommit" - }, - { - "command": "git.commitAllNoVerify", - "group": "1_commit@8", - "when": "config.git.allowNoVerifyCommit" - }, - { - "command": "git.commitStagedAmend", - "group": "2_amend@1" - }, - { - "command": "git.commitAllAmend", - "group": "2_amend@2" - }, - { - "command": "git.commitStagedAmendNoVerify", - "group": "2_amend@3", - "when": "config.git.allowNoVerifyCommit" - }, - { - "command": "git.commitAllAmendNoVerify", - "group": "2_amend@4", - "when": "config.git.allowNoVerifyCommit" - }, - { - "command": "git.commitStagedSigned", - "group": "3_signoff@1" - }, - { - "command": "git.commitAllSigned", - "group": "3_signoff@2" - }, - { - "command": "git.commitStagedSignedNoVerify", - "group": "3_signoff@3", - "when": "config.git.allowNoVerifyCommit" - }, - { - "command": "git.commitAllSignedNoVerify", - "group": "3_signoff@4", - "when": "config.git.allowNoVerifyCommit" - } - ], - "git.changes": [ - { - "command": "git.stageAll", - "group": "changes@1" - }, - { - "command": "git.unstageAll", - "group": "changes@2" - }, - { - "command": "git.cleanAll", - "group": "changes@3" - } - ], - "git.pullpush": [ - { - "command": "git.sync", - "group": "1_sync@1" - }, - { - "command": "git.syncRebase", - "when": "gitState == idle", - "group": "1_sync@2" - }, - { - "command": "git.pull", - "group": "2_pull@1" - }, - { - "command": "git.pullRebase", - "group": "2_pull@2" - }, - { - "command": "git.pullFrom", - "group": "2_pull@3" - }, - { - "command": "git.push", - "group": "3_push@1" - }, - { - "command": "git.pushForce", - "when": "config.git.allowForcePush", - "group": "3_push@2" - }, - { - "command": "git.pushTo", - "group": "3_push@3" - }, - { - "command": "git.pushToForce", - "when": "config.git.allowForcePush", - "group": "3_push@4" - }, - { - "command": "git.fetch", - "group": "4_fetch@1" - }, - { - "command": "git.fetchPrune", - "group": "4_fetch@2" - }, - { - "command": "git.fetchAll", - "group": "4_fetch@3" - } - ], - "git.branch": [ - { - "command": "git.merge", - "group": "branch@1" - }, - { - "command": "git.rebase", - "group": "branch@2" - }, - { - "command": "git.branch", - "group": "branch@3" - }, - { - "command": "git.branchFrom", - "group": "branch@4" - }, - { - "command": "git.renameBranch", - "group": "branch@5" - }, - { - "command": "git.deleteBranch", - "group": "branch@6" - }, - { - "command": "git.publish", - "group": "branch@7" - } - ], - "git.remotes": [ - { - "command": "git.addRemote", - "group": "remote@1" - }, - { - "command": "git.removeRemote", - "group": "remote@2" - } - ], - "git.stash": [ - { - "command": "git.stash", - "group": "stash@1" - }, - { - "command": "git.stashIncludeUntracked", - "group": "stash@2" - }, - { - "command": "git.stashApplyLatest", - "group": "stash@3" - }, - { - "command": "git.stashApply", - "group": "stash@4" - }, - { - "command": "git.stashPopLatest", - "group": "stash@5" - }, - { - "command": "git.stashPop", - "group": "stash@6" - }, - { - "command": "git.stashDrop", - "group": "stash@7" - } - ], - "git.tags": [ - { - "command": "git.createTag", - "group": "tags@1" - }, - { - "command": "git.deleteTag", - "group": "tags@2" - } - ] - }, - "submenus": [ - { - "id": "git.commit", - "label": "%submenu.commit%" - }, - { - "id": "git.changes", - "label": "%submenu.changes%" - }, - { - "id": "git.pullpush", - "label": "%submenu.pullpush%" - }, - { - "id": "git.branch", - "label": "%submenu.branch%" - }, - { - "id": "git.remotes", - "label": "%submenu.remotes%" - }, - { - "id": "git.stash", - "label": "%submenu.stash%" - }, - { - "id": "git.tags", - "label": "%submenu.tags%" - } - ], - "configuration": { - "title": "Git", - "properties": { - "git.enabled": { - "type": "boolean", - "scope": "resource", - "description": "%config.enabled%", - "default": true - }, - "git.path": { - "type": [ - "string", - "null", - "array" - ], - "markdownDescription": "%config.path%", - "default": null, - "scope": "machine" - }, - "git.autoRepositoryDetection": { - "type": [ - "boolean", - "string" - ], - "enum": [ - true, - false, - "subFolders", - "openEditors" - ], - "enumDescriptions": [ - "%config.autoRepositoryDetection.true%", - "%config.autoRepositoryDetection.false%", - "%config.autoRepositoryDetection.subFolders%", - "%config.autoRepositoryDetection.openEditors%" - ], - "description": "%config.autoRepositoryDetection%", - "default": true - }, - "git.autorefresh": { - "type": "boolean", - "description": "%config.autorefresh%", - "default": true - }, - "git.autofetch": { - "type": ["boolean", "string"], - "enum": [true, false, "all"], - "scope": "resource", - "markdownDescription": "%config.autofetch%", - "default": false, - "tags": [ - "usesOnlineServices" - ] - }, - "git.autofetchPeriod": { - "type": "number", - "scope": "resource", - "markdownDescription": "%config.autofetchPeriod%", - "default": 180 - }, - "git.branchValidationRegex": { - "type": "string", - "description": "%config.branchValidationRegex%", - "default": "" - }, - "git.branchWhitespaceChar": { - "type": "string", - "description": "%config.branchWhitespaceChar%", - "default": "-" - }, - "git.confirmSync": { - "type": "boolean", - "description": "%config.confirmSync%", - "default": true - }, - "git.countBadge": { - "type": "string", - "enum": [ - "all", - "tracked", - "off" - ], - "enumDescriptions": [ - "%config.countBadge.all%", - "%config.countBadge.tracked%", - "%config.countBadge.off%" - ], - "description": "%config.countBadge%", - "default": "all", - "scope": "resource" - }, - "git.checkoutType": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "local", - "tags", - "remote" - ], - "enumDescriptions": [ - "%config.checkoutType.local%", - "%config.checkoutType.tags%", - "%config.checkoutType.remote%" - ] - }, - "uniqueItems": true, - "markdownDescription": "%config.checkoutType%", - "default": [ - "local", - "remote", - "tags" - ] - }, - "git.ignoreLegacyWarning": { - "type": "boolean", - "description": "%config.ignoreLegacyWarning%", - "default": false - }, - "git.ignoreMissingGitWarning": { - "type": "boolean", - "description": "%config.ignoreMissingGitWarning%", - "default": false - }, - "git.ignoreWindowsGit27Warning": { - "type": "boolean", - "description": "%config.ignoreWindowsGit27Warning%", - "default": false - }, - "git.ignoreLimitWarning": { - "type": "boolean", - "description": "%config.ignoreLimitWarning%", - "default": false - }, - "git.ignoreRebaseWarning": { - "type": "boolean", - "description": "%config.ignoreRebaseWarning%", - "default": false - }, - "git.defaultCloneDirectory": { - "type": [ - "string", - "null" - ], - "default": null, - "scope": "machine", - "description": "%config.defaultCloneDirectory%" - }, - "git.enableSmartCommit": { - "type": "boolean", - "scope": "resource", - "description": "%config.enableSmartCommit%", - "default": false - }, - "git.smartCommitChanges": { - "type": "string", - "enum": [ - "all", - "tracked" - ], - "enumDescriptions": [ - "%config.smartCommitChanges.all%", - "%config.smartCommitChanges.tracked%" - ], - "scope": "resource", - "description": "%config.smartCommitChanges%", - "default": "all" - }, - "git.suggestSmartCommit": { - "type": "boolean", - "scope": "resource", - "description": "%config.suggestSmartCommit%", - "default": true - }, - "git.enableCommitSigning": { - "type": "boolean", - "scope": "resource", - "description": "%config.enableCommitSigning%", - "default": false - }, - "git.confirmEmptyCommits": { - "type": "boolean", - "scope": "resource", - "description": "%config.confirmEmptyCommits%", - "default": true - }, - "git.decorations.enabled": { - "type": "boolean", - "default": true, - "description": "%config.decorations.enabled%" - }, - "git.enableStatusBarSync": { - "type": "boolean", - "default": true, - "description": "%config.enableStatusBarSync%", - "scope": "resource" - }, - "git.followTagsWhenSync": { - "type": "boolean", - "scope": "resource", - "default": false, - "description": "%config.followTagsWhenSync%" - }, - "git.promptToSaveFilesBeforeStash": { - "type": "string", - "enum": [ - "always", - "staged", - "never" - ], - "enumDescriptions": [ - "%config.promptToSaveFilesBeforeStash.always%", - "%config.promptToSaveFilesBeforeStash.staged%", - "%config.promptToSaveFilesBeforeStash.never%" - ], - "scope": "resource", - "default": "always", - "description": "%config.promptToSaveFilesBeforeStash%" - }, - "git.promptToSaveFilesBeforeCommit": { - "type": "string", - "enum": [ - "always", - "staged", - "never" - ], - "enumDescriptions": [ - "%config.promptToSaveFilesBeforeCommit.always%", - "%config.promptToSaveFilesBeforeCommit.staged%", - "%config.promptToSaveFilesBeforeCommit.never%" - ], - "scope": "resource", - "default": "always", - "description": "%config.promptToSaveFilesBeforeCommit%" - }, - "git.postCommitCommand": { - "type": "string", - "enum": [ - "none", - "push", - "sync" - ], - "enumDescriptions": [ - "%config.postCommitCommand.none%", - "%config.postCommitCommand.push%", - "%config.postCommitCommand.sync%" - ], - "markdownDescription": "%config.postCommitCommand%", - "scope": "resource", - "default": "none" - }, - "git.openAfterClone": { - "type": "string", - "enum": [ - "always", - "alwaysNewWindow", - "whenNoFolderOpen", - "prompt" - ], - "enumDescriptions": [ - "%config.openAfterClone.always%", - "%config.openAfterClone.alwaysNewWindow%", - "%config.openAfterClone.whenNoFolderOpen%", - "%config.openAfterClone.prompt%" - ], - "default": "prompt", - "description": "%config.openAfterClone%" - }, - "git.showInlineOpenFileAction": { - "type": "boolean", - "default": true, - "description": "%config.showInlineOpenFileAction%" - }, - "git.showPushSuccessNotification": { - "type": "boolean", - "description": "%config.showPushSuccessNotification%", - "default": false - }, - "git.inputValidation": { - "type": "string", - "enum": [ - "always", - "warn", - "off" - ], - "default": "warn", - "description": "%config.inputValidation%" - }, - "git.inputValidationLength": { - "type": "number", - "default": 72, - "description": "%config.inputValidationLength%" - }, - "git.inputValidationSubjectLength": { - "type": [ - "number", - "null" - ], - "default": 50, - "description": "%config.inputValidationSubjectLength%" - }, - "git.detectSubmodules": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%config.detectSubmodules%" - }, - "git.detectSubmodulesLimit": { - "type": "number", - "scope": "resource", - "default": 10, - "description": "%config.detectSubmodulesLimit%" - }, - "git.alwaysShowStagedChangesResourceGroup": { - "type": "boolean", - "scope": "resource", - "default": false, - "description": "%config.alwaysShowStagedChangesResourceGroup%" - }, - "git.alwaysSignOff": { - "type": "boolean", - "scope": "resource", - "default": false, - "description": "%config.alwaysSignOff%" - }, - "git.ignoreSubmodules": { - "type": "boolean", - "scope": "resource", - "default": false, - "description": "%config.ignoreSubmodules%" - }, - "git.ignoredRepositories": { - "type": "array", - "items": { - "type": "string" - }, - "default": [], - "scope": "window", - "description": "%config.ignoredRepositories%" - }, - "git.scanRepositories": { - "type": "array", - "items": { - "type": "string" - }, - "default": [], - "scope": "resource", - "description": "%config.scanRepositories%" - }, - "git.showProgress": { - "type": "boolean", - "description": "%config.showProgress%", - "default": true, - "scope": "resource" - }, - "git.rebaseWhenSync": { - "type": "boolean", - "scope": "resource", - "default": false, - "description": "%config.rebaseWhenSync%" - }, - "git.fetchOnPull": { - "type": "boolean", - "scope": "resource", - "default": false, - "description": "%config.fetchOnPull%" - }, - "git.pruneOnFetch": { - "type": "boolean", - "scope": "resource", - "default": false, - "description": "%config.pruneOnFetch%" - }, - "git.pullTags": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%config.pullTags%" - }, - "git.autoStash": { - "type": "boolean", - "scope": "resource", - "default": false, - "description": "%config.autoStash%" - }, - "git.allowForcePush": { - "type": "boolean", - "default": false, - "description": "%config.allowForcePush%" - }, - "git.useForcePushWithLease": { - "type": "boolean", - "default": true, - "description": "%config.useForcePushWithLease%" - }, - "git.confirmForcePush": { - "type": "boolean", - "default": true, - "description": "%config.confirmForcePush%" - }, - "git.allowNoVerifyCommit": { - "type": "boolean", - "default": false, - "description": "%config.allowNoVerifyCommit%" - }, - "git.confirmNoVerifyCommit": { - "type": "boolean", - "default": true, - "description": "%config.confirmNoVerifyCommit%" - }, - "git.openDiffOnClick": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%config.openDiffOnClick%" - }, - "git.supportCancellation": { - "type": "boolean", - "scope": "resource", - "default": false, - "description": "%config.supportCancellation%" - }, - "git.branchSortOrder": { - "type": "string", - "enum": [ - "committerdate", - "alphabetically" - ], - "default": "committerdate", - "description": "%config.branchSortOrder%" - }, - "git.untrackedChanges": { - "type": "string", - "enum": [ - "mixed", - "separate", - "hidden" - ], - "enumDescriptions": [ - "%config.untrackedChanges.mixed%", - "%config.untrackedChanges.separate%", - "%config.untrackedChanges.hidden%" - ], - "default": "mixed", - "description": "%config.untrackedChanges%", - "scope": "resource" - }, - "git.requireGitUserConfig": { - "type": "boolean", - "description": "%config.requireGitUserConfig%", - "default": true - }, - "git.showCommitInput": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%config.showCommitInput%" - }, - "git.terminalAuthentication": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%config.terminalAuthentication%" - }, - "git.useCommitInputAsStashMessage": { - "type": "boolean", - "scope": "resource", - "default": false, - "description": "%config.useCommitInputAsStashMessage%" - }, - "git.githubAuthentication": { - "deprecationMessage": "This setting is now deprecated, please use `github.gitAuthentication` instead." - }, - "git.timeline.date": { - "enum": [ - "committed", - "authored" - ], - "enumDescriptions": [ - "%config.timeline.date.committed%", - "%config.timeline.date.authored%" - ], - "default": "committed", - "description": "%config.timeline.date%", - "scope": "window" - }, - "git.timeline.showAuthor": { - "type": "boolean", - "default": true, - "description": "%config.timeline.showAuthor%", - "scope": "window" - } - } - }, - "colors": [ - { - "id": "gitDecoration.addedResourceForeground", - "description": "%colors.added%", - "defaults": { - "light": "#587c0c", - "dark": "#81b88b", - "highContrast": "#1b5225" - } - }, - { - "id": "gitDecoration.modifiedResourceForeground", - "description": "%colors.modified%", - "defaults": { - "light": "#895503", - "dark": "#E2C08D", - "highContrast": "#E2C08D" - } - }, - { - "id": "gitDecoration.deletedResourceForeground", - "description": "%colors.deleted%", - "defaults": { - "light": "#ad0707", - "dark": "#c74e39", - "highContrast": "#c74e39" - } - }, - { - "id": "gitDecoration.renamedResourceForeground", - "description": "%colors.renamed%", - "defaults": { - "light": "#007100", - "dark": "#73C991", - "highContrast": "#73C991" - } - }, - { - "id": "gitDecoration.untrackedResourceForeground", - "description": "%colors.untracked%", - "defaults": { - "light": "#007100", - "dark": "#73C991", - "highContrast": "#73C991" - } - }, - { - "id": "gitDecoration.ignoredResourceForeground", - "description": "%colors.ignored%", - "defaults": { - "light": "#8E8E90", - "dark": "#8C8C8C", - "highContrast": "#A7A8A9" - } - }, - { - "id": "gitDecoration.stageModifiedResourceForeground", - "description": "%colors.stageModified%", - "defaults": { - "light": "#895503", - "dark": "#E2C08D", - "highContrast": "#E2C08D" - } - }, - { - "id": "gitDecoration.stageDeletedResourceForeground", - "description": "%colors.stageDeleted%", - "defaults": { - "light": "#ad0707", - "dark": "#c74e39", - "highContrast": "#c74e39" - } - }, - { - "id": "gitDecoration.conflictingResourceForeground", - "description": "%colors.conflict%", - "defaults": { - "light": "#ad0707", - "dark": "#e4676b", - "highContrast": "#c74e39" - } - }, - { - "id": "gitDecoration.submoduleResourceForeground", - "description": "%colors.submodule%", - "defaults": { - "light": "#1258a7", - "dark": "#8db9e2", - "highContrast": "#8db9e2" - } - } - ], - "languages": [ - { - "id": "git-commit", - "aliases": [ - "Git Commit Message", - "git-commit" - ], - "filenames": [ - "COMMIT_EDITMSG", - "MERGE_MSG" - ], - "configuration": "./languages/git-commit.language-configuration.json" - }, - { - "id": "git-rebase", - "aliases": [ - "Git Rebase Message", - "git-rebase" - ], - "filenames": [ - "git-rebase-todo" - ], - "configuration": "./languages/git-rebase.language-configuration.json" - }, - { - "id": "diff", - "aliases": [ - "Diff", - "diff" - ], - "extensions": [ - ".diff", - ".patch", - ".rej" - ], - "configuration": "./languages/diff.language-configuration.json" - }, - { - "id": "ignore", - "aliases": [ - "Ignore", - "ignore" - ], - "extensions": [ - ".gitignore_global", - ".gitignore" - ], - "configuration": "./languages/ignore.language-configuration.json" - } - ], - "grammars": [ - { - "language": "git-commit", - "scopeName": "text.git-commit", - "path": "./syntaxes/git-commit.tmLanguage.json" - }, - { - "language": "git-rebase", - "scopeName": "text.git-rebase", - "path": "./syntaxes/git-rebase.tmLanguage.json" - }, - { - "language": "diff", - "scopeName": "source.diff", - "path": "./syntaxes/diff.tmLanguage.json" - }, - { - "language": "ignore", - "scopeName": "source.ignore", - "path": "./syntaxes/ignore.tmLanguage.json" - } - ], - "configurationDefaults": { - "[git-commit]": { - "editor.rulers": [ - 72 - ], - "workbench.editor.restoreViewState": false - }, - "[git-rebase]": { - "workbench.editor.restoreViewState": false - } - }, - "viewsWelcome": [ - { - "view": "scm", - "contents": "%view.workbench.scm.disabled%", - "when": "!config.git.enabled" - }, - { - "view": "scm", - "contents": "%view.workbench.scm.missing%", - "when": "config.git.enabled && git.missing" - }, - { - "view": "scm", - "contents": "%view.workbench.scm.empty%", - "when": "config.git.enabled && workbenchState == empty", - "enablement": "git.state == initialized", - "group": "2_open@1" - }, - { - "view": "scm", - "contents": "%view.workbench.scm.folder%", - "when": "config.git.enabled && workbenchState == folder", - "enablement": "git.state == initialized", - "group": "5_scm@1" - }, - { - "view": "scm", - "contents": "%view.workbench.scm.workspace%", - "when": "config.git.enabled && workbenchState == workspace && workspaceFolderCount != 0", - "enablement": "git.state == initialized", - "group": "5_scm@1" - }, - { - "view": "scm", - "contents": "%view.workbench.scm.emptyWorkspace%", - "when": "config.git.enabled && workbenchState == workspace && workspaceFolderCount == 0", - "enablement": "git.state == initialized", - "group": "2_open@1" - }, - { - "view": "explorer", - "contents": "%view.workbench.cloneRepository%", - "when": "config.git.enabled", - "enablement": "git.state == initialized", - "group": "5_scm@1" - }, - { - "view": "explorer", - "contents": "%view.workbench.learnMore%", - "when": "config.git.enabled", - "enablement": "git.state == initialized", - "group": "5_scm@10" - } - ] - }, - "dependencies": { - "byline": "^5.0.0", - "file-type": "^7.2.0", - "iconv-lite-umd": "0.6.8", - "jschardet": "2.3.0", - "vscode-extension-telemetry": "0.1.7", - "vscode-nls": "^4.0.0", - "vscode-uri": "^2.0.0", - "which": "^1.3.0" - }, - "devDependencies": { - "@types/byline": "4.2.31", - "@types/file-type": "^5.2.1", - "@types/mocha": "^8.2.0", - "@types/node": "^12.19.9", - "@types/which": "^1.0.28" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/git/yarn.lock b/lib/vscode/extensions/git/yarn.lock deleted file mode 100644 index c964f284a3af..000000000000 --- a/lib/vscode/extensions/git/yarn.lock +++ /dev/null @@ -1,167 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/byline@4.2.31": - version "4.2.31" - resolved "https://registry.yarnpkg.com/@types/byline/-/byline-4.2.31.tgz#0e61fcb9c03e047d21c4496554c7116297ab60cd" - integrity sha1-DmH8ucA+BH0hxEllVMcRYperYM0= - dependencies: - "@types/node" "*" - -"@types/file-type@^5.2.1": - version "5.2.1" - resolved "https://registry.yarnpkg.com/@types/file-type/-/file-type-5.2.1.tgz#e7af49e08187b6b7598509c5e416669d25fa3461" - integrity sha512-Im0cJaIPJbbpuW91OrjXnqWPZCJK/tcFy2cFX+1qjG1gubgVZPPO9OVsTVAjotN4I1E6FAV0eIqt+rR8Y1c3iA== - dependencies: - "@types/node" "*" - -"@types/mocha@^8.2.0": - version "8.2.0" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44" - integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ== - -"@types/node@*": - version "8.0.51" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.51.tgz#b31d716fb8d58eeb95c068a039b9b6292817d5fb" - integrity sha512-El3+WJk2D/ppWNd2X05aiP5l2k4EwF7KwheknQZls+I26eSICoWRhRIJ56jGgw2dqNGQ5LtNajmBU2ajS28EvQ== - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -"@types/which@^1.0.28": - version "1.0.28" - resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6" - integrity sha1-AW44dim4gXvtZT/jLqtdESecjfY= - -applicationinsights@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" - integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== - dependencies: - cls-hooked "^4.2.2" - continuation-local-storage "^3.2.1" - diagnostic-channel "0.2.0" - diagnostic-channel-publishers "^0.3.3" - -async-hook-jl@^1.7.6: - version "1.7.6" - resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" - integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== - dependencies: - stack-chain "^1.3.7" - -async-listener@^0.6.0: - version "0.6.10" - resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" - integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== - dependencies: - semver "^5.3.0" - shimmer "^1.1.0" - -byline@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" - integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= - -cls-hooked@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" - integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== - dependencies: - async-hook-jl "^1.7.6" - emitter-listener "^1.0.1" - semver "^5.4.1" - -continuation-local-storage@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" - integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== - dependencies: - async-listener "^0.6.0" - emitter-listener "^1.1.1" - -diagnostic-channel-publishers@^0.3.3: - version "0.3.5" - resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" - integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== - -diagnostic-channel@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" - integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= - dependencies: - semver "^5.3.0" - -emitter-listener@^1.0.1, emitter-listener@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" - integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== - dependencies: - shimmer "^1.2.0" - -file-type@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-7.2.0.tgz#113cfed52e1d6959ab80248906e2f25a8cdccb74" - integrity sha1-ETz+1S4daVmrgCSJBuLyWozcy3Q= - -iconv-lite-umd@0.6.8: - version "0.6.8" - resolved "https://registry.yarnpkg.com/iconv-lite-umd/-/iconv-lite-umd-0.6.8.tgz#5ad310ec126b260621471a2d586f7f37b9958ec0" - integrity sha512-zvXJ5gSwMC9JD3wDzH8CoZGc1pbiJn12Tqjk8BXYCnYz3hYL5GRjHW8LEykjXhV9WgNGI4rgpgHcbIiBfrRq6A== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -jschardet@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-2.3.0.tgz#06e2636e16c8ada36feebbdc08aa34e6a9b3ff75" - integrity sha512-6I6xT7XN/7sBB7q8ObzKbmv5vN+blzLcboDE1BNEsEfmRXJValMxO6OIRT69ylPBRemS3rw6US+CMCar0OBc9g== - -semver@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== - -semver@^5.4.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -shimmer@^1.1.0, shimmer@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" - integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== - -stack-chain@^1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" - integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= - -vscode-extension-telemetry@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" - integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== - dependencies: - applicationinsights "1.7.4" - -vscode-nls@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" - integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== - -vscode-uri@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.0.0.tgz#2df704222f72b8a71ff266ba0830ed6c51ac1542" - integrity sha512-lWXWofDSYD8r/TIyu64MdwB4FaSirQ608PP/TzUyslyOeHGwQ0eTHUZeJrK1ILOmwUHaJtV693m2JoUYroUDpw== - -which@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" - integrity sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg== - dependencies: - isexe "^2.0.0" diff --git a/lib/vscode/extensions/github-authentication/package.json b/lib/vscode/extensions/github-authentication/package.json deleted file mode 100644 index 4a18a5bd0a85..000000000000 --- a/lib/vscode/extensions/github-authentication/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "github-authentication", - "displayName": "%displayName%", - "description": "%description%", - "publisher": "vscode", - "license": "MIT", - "version": "0.0.1", - "engines": { - "vscode": "^1.41.0" - }, - "icon": "images/icon.png", - "enableProposedApi": true, - "categories": [ - "Other" - ], - "extensionKind": [ - "ui", - "workspace", - "web" - ], - "activationEvents": [ - "onAuthenticationRequest:github" - ], - "capabilities": { - "virtualWorkspaces": true, - "untrustedWorkspaces": { - "supported": true - } - }, - "contributes": { - "commands": [ - { - "command": "github.provide-token", - "title": "Manually Provide Token" - } - ], - "menus": { - "commandPalette": [ - { - "command": "github.provide-token", - "when": "false" - } - ] - }, - "authentication": [ - { - "label": "GitHub", - "id": "github" - } - ] - }, - "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", - "main": "./out/extension.js", - "browser": "./dist/browser/extension.js", - "scripts": { - "compile": "gulp compile-extension:github-authentication", - "compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none", - "watch": "gulp watch-extension:github-authentication", - "watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose", - "vscode:prepublish": "npm run compile" - }, - "dependencies": { - "node-fetch": "2.6.1", - "uuid": "8.1.0", - "vscode-extension-telemetry": "0.1.7", - "vscode-nls": "^4.1.2", - "vscode-tas-client": "^0.1.22" - }, - "devDependencies": { - "@types/node": "^12.19.9", - "@types/node-fetch": "^2.5.7", - "@types/uuid": "8.0.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/github-authentication/src/extension.ts b/lib/vscode/extensions/github-authentication/src/extension.ts deleted file mode 100644 index 253f3aec579e..000000000000 --- a/lib/vscode/extensions/github-authentication/src/extension.ts +++ /dev/null @@ -1,91 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; -import { GitHubAuthenticationProvider, onDidChangeSessions } from './github'; -import { uriHandler } from './githubServer'; -import Logger from './common/logger'; -import TelemetryReporter from 'vscode-extension-telemetry'; -import { createExperimentationService, ExperimentationTelemetry } from './experimentationService'; - -export async function activate(context: vscode.ExtensionContext) { - const { name, version, aiKey } = require('../package.json') as { name: string, version: string, aiKey: string }; - const telemetryReporter = new ExperimentationTelemetry(new TelemetryReporter(name, version, aiKey)); - - const experimentationService = await createExperimentationService(context, telemetryReporter); - await experimentationService.initialFetch; - - context.subscriptions.push(vscode.window.registerUriHandler(uriHandler)); - const loginService = new GitHubAuthenticationProvider(context, telemetryReporter); - - await loginService.initialize(context); - - context.subscriptions.push(vscode.commands.registerCommand('github.provide-token', () => { - return loginService.manuallyProvideToken(); - })); - - context.subscriptions.push(vscode.authentication.registerAuthenticationProvider('github', 'GitHub', { - onDidChangeSessions: onDidChangeSessions.event, - getSessions: (scopes?: string[]) => loginService.getSessions(scopes), - createSession: async (scopeList: string[]) => { - try { - /* __GDPR__ - "login" : { } - */ - telemetryReporter.sendTelemetryEvent('login'); - - const session = await loginService.createSession(scopeList.sort().join(' ')); - Logger.info('Login success!'); - onDidChangeSessions.fire({ added: [session], removed: [], changed: [] }); - return session; - } catch (e) { - // If login was cancelled, do not notify user. - if (e.message === 'Cancelled') { - /* __GDPR__ - "loginCancelled" : { } - */ - telemetryReporter.sendTelemetryEvent('loginCancelled'); - throw e; - } - - /* __GDPR__ - "loginFailed" : { } - */ - telemetryReporter.sendTelemetryEvent('loginFailed'); - - vscode.window.showErrorMessage(`Sign in failed: ${e}`); - Logger.error(e); - throw e; - } - }, - removeSession: async (id: string) => { - try { - /* __GDPR__ - "logout" : { } - */ - telemetryReporter.sendTelemetryEvent('logout'); - - const session = await loginService.removeSession(id); - if (session) { - onDidChangeSessions.fire({ added: [], removed: [session], changed: [] }); - } - } catch (e) { - /* __GDPR__ - "logoutFailed" : { } - */ - telemetryReporter.sendTelemetryEvent('logoutFailed'); - - vscode.window.showErrorMessage(`Sign out failed: ${e}`); - Logger.error(e); - throw e; - } - } - }, { supportsMultipleAccounts: false })); - - return; -} - -// this method is called when your extension is deactivated -export function deactivate() { } diff --git a/lib/vscode/extensions/github-authentication/src/github.ts b/lib/vscode/extensions/github-authentication/src/github.ts deleted file mode 100644 index 4d3573a7e643..000000000000 --- a/lib/vscode/extensions/github-authentication/src/github.ts +++ /dev/null @@ -1,213 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; -import { v4 as uuid } from 'uuid'; -import { Keychain } from './common/keychain'; -import { GitHubServer, NETWORK_ERROR } from './githubServer'; -import Logger from './common/logger'; -import { arrayEquals } from './common/utils'; -import { ExperimentationTelemetry } from './experimentationService'; - -export const onDidChangeSessions = new vscode.EventEmitter(); - -interface SessionData { - id: string; - account?: { - label?: string; - displayName?: string; - id: string; - } - scopes: string[]; - accessToken: string; -} - -export class GitHubAuthenticationProvider { - private _sessions: vscode.AuthenticationSession[] = []; - private _githubServer: GitHubServer; - - private _keychain: Keychain; - - constructor(context: vscode.ExtensionContext, telemetryReporter: ExperimentationTelemetry) { - this._keychain = new Keychain(context); - this._githubServer = new GitHubServer(telemetryReporter); - } - - public async initialize(context: vscode.ExtensionContext): Promise { - try { - this._sessions = await this.readSessions(); - await this.verifySessions(); - } catch (e) { - // Ignore, network request failed - } - - context.subscriptions.push(context.secrets.onDidChange(() => this.checkForUpdates())); - } - - async getSessions(scopes?: string[]): Promise { - return scopes - ? this._sessions.filter(session => arrayEquals(session.scopes, scopes)) - : this._sessions; - } - - private async verifySessions(): Promise { - const verifiedSessions: vscode.AuthenticationSession[] = []; - const verificationPromises = this._sessions.map(async session => { - try { - await this._githubServer.getUserInfo(session.accessToken); - this._githubServer.checkIsEdu(session.accessToken); - verifiedSessions.push(session); - } catch (e) { - // Remove sessions that return unauthorized response - if (e.message !== 'Unauthorized') { - verifiedSessions.push(session); - } - } - }); - - Promise.all(verificationPromises).then(_ => { - if (this._sessions.length !== verifiedSessions.length) { - this._sessions = verifiedSessions; - this.storeSessions(); - } - }); - } - - private async checkForUpdates() { - let storedSessions: vscode.AuthenticationSession[]; - try { - storedSessions = await this.readSessions(); - } catch (e) { - // Ignore, network request failed - return; - } - - const added: vscode.AuthenticationSession[] = []; - const removed: vscode.AuthenticationSession[] = []; - - storedSessions.forEach(session => { - const matchesExisting = this._sessions.some(s => s.id === session.id); - // Another window added a session to the keychain, add it to our state as well - if (!matchesExisting) { - Logger.info('Adding session found in keychain'); - this._sessions.push(session); - added.push(session); - } - }); - - this._sessions.map(session => { - const matchesExisting = storedSessions.some(s => s.id === session.id); - // Another window has logged out, remove from our state - if (!matchesExisting) { - Logger.info('Removing session no longer found in keychain'); - const sessionIndex = this._sessions.findIndex(s => s.id === session.id); - if (sessionIndex > -1) { - this._sessions.splice(sessionIndex, 1); - } - - removed.push(session); - } - }); - - if (added.length || removed.length) { - onDidChangeSessions.fire({ added, removed, changed: [] }); - } - } - - private async readSessions(): Promise { - const storedSessions = await this._keychain.getToken() || await this._keychain.tryMigrate(); - if (storedSessions) { - try { - const sessionData: SessionData[] = JSON.parse(storedSessions); - const sessionPromises = sessionData.map(async (session: SessionData): Promise => { - const needsUserInfo = !session.account; - let userInfo: { id: string, accountName: string }; - if (needsUserInfo) { - userInfo = await this._githubServer.getUserInfo(session.accessToken); - } - - return { - id: session.id, - account: { - label: session.account - ? session.account.label || session.account.displayName! - : userInfo!.accountName, - id: session.account?.id ?? userInfo!.id - }, - scopes: session.scopes, - accessToken: session.accessToken - }; - }); - - return Promise.all(sessionPromises); - } catch (e) { - if (e === NETWORK_ERROR) { - return []; - } - - Logger.error(`Error reading sessions: ${e}`); - await this._keychain.deleteToken(); - } - } - - return []; - } - - private async storeSessions(): Promise { - await this._keychain.setToken(JSON.stringify(this._sessions)); - } - - get sessions(): vscode.AuthenticationSession[] { - return this._sessions; - } - - public async createSession(scopes: string): Promise { - const token = await this._githubServer.login(scopes); - const session = await this.tokenToSession(token, scopes.split(' ')); - this._githubServer.checkIsEdu(token); - await this.setToken(session); - return session; - } - - public async manuallyProvideToken(): Promise { - this._githubServer.manuallyProvideToken(); - } - - private async tokenToSession(token: string, scopes: string[]): Promise { - const userInfo = await this._githubServer.getUserInfo(token); - return { - id: uuid(), - accessToken: token, - account: { label: userInfo.accountName, id: userInfo.id }, - scopes - }; - } - - private async setToken(session: vscode.AuthenticationSession): Promise { - const sessionIndex = this._sessions.findIndex(s => s.id === session.id); - if (sessionIndex > -1) { - this._sessions.splice(sessionIndex, 1, session); - } else { - this._sessions.push(session); - } - - await this.storeSessions(); - } - - public async removeSession(id: string): Promise { - Logger.info(`Logging out of ${id}`); - const sessionIndex = this._sessions.findIndex(session => session.id === id); - let session: vscode.AuthenticationSession | undefined; - if (sessionIndex > -1) { - session = this._sessions[sessionIndex]; - this._sessions.splice(sessionIndex, 1); - } else { - Logger.error('Session not found'); - } - - await this.storeSessions(); - return session; - } -} diff --git a/lib/vscode/extensions/github-authentication/src/githubServer.ts b/lib/vscode/extensions/github-authentication/src/githubServer.ts deleted file mode 100644 index 4fdafe0ccb12..000000000000 --- a/lib/vscode/extensions/github-authentication/src/githubServer.ts +++ /dev/null @@ -1,285 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as nls from 'vscode-nls'; -import * as vscode from 'vscode'; -import fetch, { Response } from 'node-fetch'; -import { v4 as uuid } from 'uuid'; -import { PromiseAdapter, promiseFromEvent } from './common/utils'; -import Logger from './common/logger'; -import { ExperimentationTelemetry } from './experimentationService'; - -const localize = nls.loadMessageBundle(); - -export const NETWORK_ERROR = 'network error'; -// NOTE@coder: use our own auth relay (the commented one is microsoft's, not ours) -const AUTH_RELAY_SERVER = 'auth.code-server.dev'; -// const AUTH_RELAY_STAGING_SERVER = 'client-auth-staging-14a768b.herokuapp.com'; - -class UriEventHandler extends vscode.EventEmitter implements vscode.UriHandler { - public handleUri(uri: vscode.Uri) { - this.fire(uri); - } -} - -export const uriHandler = new UriEventHandler; - -const onDidManuallyProvideToken = new vscode.EventEmitter(); - - - -function parseQuery(uri: vscode.Uri) { - return uri.query.split('&').reduce((prev: any, current) => { - const queryString = current.split('='); - prev[queryString[0]] = queryString[1]; - return prev; - }, {}); -} - -export class GitHubServer { - private _statusBarItem: vscode.StatusBarItem | undefined; - - private _pendingStates = new Map(); - private _codeExchangePromises = new Map, cancel: vscode.EventEmitter }>(); - - constructor(private readonly telemetryReporter: ExperimentationTelemetry) { } - - private isTestEnvironment(url: vscode.Uri): boolean { - return /\.azurewebsites\.net$/.test(url.authority) || url.authority.startsWith('localhost:'); - } - - // TODO@joaomoreno TODO@RMacfarlane - private async isNoCorsEnvironment(): Promise { - const uri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate`)); - return uri.scheme === 'https' && /^vscode\./.test(uri.authority); - } - - public async login(scopes: string): Promise { - Logger.info('Logging in...'); - this.updateStatusBarItem(true); - - const state = uuid(); - - // TODO@joaomoreno TODO@RMacfarlane - const nocors = await this.isNoCorsEnvironment(); - const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate${nocors ? '?nocors=true' : ''}`)); - - if (this.isTestEnvironment(callbackUri)) { - const token = await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true }); - if (!token) { throw new Error('Sign in failed: No token provided'); } - - const tokenScopes = await this.getScopes(token); // Example: ['repo', 'user'] - const scopesList = scopes.split(' '); // Example: 'read:user repo user:email' - if (!scopesList.every(scope => { - const included = tokenScopes.includes(scope); - if (included || !scope.includes(':')) { - return included; - } - - return scope.split(':').some(splitScopes => { - return tokenScopes.includes(splitScopes); - }); - })) { - throw new Error(`The provided token is does not match the requested scopes: ${scopes}`); - } - - this.updateStatusBarItem(false); - return token; - } else { - const existingStates = this._pendingStates.get(scopes) || []; - this._pendingStates.set(scopes, [...existingStates, state]); - - const uri = vscode.Uri.parse(`https://${AUTH_RELAY_SERVER}/authorize/?callbackUri=${encodeURIComponent(callbackUri.toString())}&scope=${scopes}&state=${state}&responseType=code&authServer=https://github.com${nocors ? '&nocors=true' : ''}`); - await vscode.env.openExternal(uri); - } - - // Register a single listener for the URI callback, in case the user starts the login process multiple times - // before completing it. - let codeExchangePromise = this._codeExchangePromises.get(scopes); - if (!codeExchangePromise) { - codeExchangePromise = promiseFromEvent(uriHandler.event, this.exchangeCodeForToken(scopes)); - this._codeExchangePromises.set(scopes, codeExchangePromise); - } - - return Promise.race([ - codeExchangePromise.promise, - promiseFromEvent(onDidManuallyProvideToken.event, (token: string | undefined, resolve, reject): void => { - if (!token) { - reject('Cancelled'); - } else { - resolve(token); - } - }).promise - ]).finally(() => { - this._pendingStates.delete(scopes); - codeExchangePromise?.cancel.fire(); - this._codeExchangePromises.delete(scopes); - this.updateStatusBarItem(false); - }); - } - - private exchangeCodeForToken: (scopes: string) => PromiseAdapter = - (scopes) => async (uri, resolve, reject) => { - Logger.info('Exchanging code for token...'); - const query = parseQuery(uri); - const code = query.code; - - const acceptedStates = this._pendingStates.get(scopes) || []; - if (!acceptedStates.includes(query.state)) { - reject('Received mismatched state'); - return; - } - - const url = `https://${AUTH_RELAY_SERVER}/token?code=${code}&state=${query.state}`; - - // TODO@joao: remove - if (query.nocors) { - try { - const json: any = await vscode.commands.executeCommand('_workbench.fetchJSON', url, 'POST'); - Logger.info('Token exchange success!'); - resolve(json.access_token); - } catch (err) { - reject(err); - } - } else { - try { - const result = await fetch(url, { - method: 'POST', - headers: { - Accept: 'application/json' - } - }); - - if (result.ok) { - const json = await result.json(); - Logger.info('Token exchange success!'); - resolve(json.access_token); - } else { - reject(result.statusText); - } - } catch (ex) { - reject(ex); - } - } - }; - - private updateStatusBarItem(isStart?: boolean) { - if (isStart && !this._statusBarItem) { - this._statusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left); - this._statusBarItem.text = localize('signingIn', "$(mark-github) Signing in to github.com..."); - this._statusBarItem.command = 'github.provide-token'; - this._statusBarItem.show(); - } - - if (!isStart && this._statusBarItem) { - this._statusBarItem.dispose(); - this._statusBarItem = undefined; - } - } - - public async manuallyProvideToken() { - const uriOrToken = await vscode.window.showInputBox({ prompt: 'Token', ignoreFocusOut: true }); - if (!uriOrToken) { - onDidManuallyProvideToken.fire(undefined); - return; - } - - try { - const uri = vscode.Uri.parse(uriOrToken.trim()); - if (!uri.scheme || uri.scheme === 'file') { throw new Error; } - uriHandler.handleUri(uri); - } catch (e) { - // If it doesn't look like a URI, treat it as a token. - Logger.info('Treating input as token'); - onDidManuallyProvideToken.fire(uriOrToken); - } - } - - private async getScopes(token: string): Promise { - try { - Logger.info('Getting token scopes...'); - const result = await fetch('https://api.github.com', { - headers: { - Authorization: `token ${token}`, - 'User-Agent': 'Visual-Studio-Code' - } - }); - - if (result.ok) { - const scopes = result.headers.get('X-OAuth-Scopes'); - return scopes ? scopes.split(',').map(scope => scope.trim()) : []; - } else { - Logger.error(`Getting scopes failed: ${result.statusText}`); - throw new Error(result.statusText); - } - } catch (ex) { - Logger.error(ex.message); - throw new Error(NETWORK_ERROR); - } - } - - public async getUserInfo(token: string): Promise<{ id: string, accountName: string }> { - let result: Response; - try { - Logger.info('Getting user info...'); - result = await fetch('https://api.github.com/user', { - headers: { - Authorization: `token ${token}`, - 'User-Agent': 'Visual-Studio-Code' - } - }); - } catch (ex) { - Logger.error(ex.message); - throw new Error(NETWORK_ERROR); - } - - if (result.ok) { - const json = await result.json(); - Logger.info('Got account info!'); - return { id: json.id, accountName: json.login }; - } else { - Logger.error(`Getting account info failed: ${result.statusText}`); - throw new Error(result.statusText); - } - } - - public async checkIsEdu(token: string): Promise { - const nocors = await this.isNoCorsEnvironment(); - - if (nocors) { - return; - } - - try { - const result = await fetch('https://education.github.com/api/user', { - headers: { - Authorization: `token ${token}`, - 'faculty-check-preview': 'true', - 'User-Agent': 'Visual-Studio-Code' - } - }); - - if (result.ok) { - const json: { student: boolean, faculty: boolean } = await result.json(); - - /* __GDPR__ - "session" : { - "isEdu": { "classification": "NonIdentifiableDemographicInfo", "purpose": "FeatureInsight" } - } - */ - this.telemetryReporter.sendTelemetryEvent('session', { - isEdu: json.student - ? 'student' - : json.faculty - ? 'faculty' - : 'none' - }); - } - } catch (e) { - // No-op - } - - } -} diff --git a/lib/vscode/extensions/github-authentication/yarn.lock b/lib/vscode/extensions/github-authentication/yarn.lock deleted file mode 100644 index 8095e5745237..000000000000 --- a/lib/vscode/extensions/github-authentication/yarn.lock +++ /dev/null @@ -1,188 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node-fetch@^2.5.7": - version "2.5.7" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.7.tgz#20a2afffa882ab04d44ca786449a276f9f6bbf3c" - integrity sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw== - dependencies: - "@types/node" "*" - form-data "^3.0.0" - -"@types/node@*": - version "14.0.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.5.tgz#3d03acd3b3414cf67faf999aed11682ed121f22b" - integrity sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA== - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -"@types/uuid@8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.0.0.tgz#165aae4819ad2174a17476dbe66feebd549556c0" - integrity sha512-xSQfNcvOiE5f9dyd4Kzxbof1aTrLobL278pGLKOZI6esGfZ7ts9Ka16CzIN6Y8hFHE1C7jIBZokULhK1bOgjRw== - -applicationinsights@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" - integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== - dependencies: - cls-hooked "^4.2.2" - continuation-local-storage "^3.2.1" - diagnostic-channel "0.2.0" - diagnostic-channel-publishers "^0.3.3" - -async-hook-jl@^1.7.6: - version "1.7.6" - resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" - integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== - dependencies: - stack-chain "^1.3.7" - -async-listener@^0.6.0: - version "0.6.10" - resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" - integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== - dependencies: - semver "^5.3.0" - shimmer "^1.1.0" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -axios@^0.21.1: - version "0.21.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" - integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== - dependencies: - follow-redirects "^1.10.0" - -cls-hooked@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" - integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== - dependencies: - async-hook-jl "^1.7.6" - emitter-listener "^1.0.1" - semver "^5.4.1" - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -continuation-local-storage@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" - integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== - dependencies: - async-listener "^0.6.0" - emitter-listener "^1.1.1" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -diagnostic-channel-publishers@^0.3.3: - version "0.3.5" - resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" - integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== - -diagnostic-channel@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" - integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= - dependencies: - semver "^5.3.0" - -emitter-listener@^1.0.1, emitter-listener@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" - integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== - dependencies: - shimmer "^1.2.0" - -follow-redirects@^1.10.0: - version "1.13.3" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.3.tgz#e5598ad50174c1bc4e872301e82ac2cd97f90267" - integrity sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA== - -form-data@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" - integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -mime-db@1.44.0: - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== - -mime-types@^2.1.12: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== - dependencies: - mime-db "1.44.0" - -node-fetch@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - -semver@^5.3.0, semver@^5.4.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -shimmer@^1.1.0, shimmer@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" - integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== - -stack-chain@^1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" - integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= - -tas-client@0.1.21: - version "0.1.21" - resolved "https://registry.yarnpkg.com/tas-client/-/tas-client-0.1.21.tgz#62275d5f75266eaae408f7463364748cb92f220d" - integrity sha512-7UuIwOXarCYoCTrQHY5n7M+63XuwMC0sVUdbPQzxqDB9wMjIW0JF39dnp3yoJnxr4jJUVhPtvkkXZbAD0BxCcA== - dependencies: - axios "^0.21.1" - -uuid@8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.1.0.tgz#6f1536eb43249f473abc6bd58ff983da1ca30d8d" - integrity sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg== - -vscode-extension-telemetry@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" - integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== - dependencies: - applicationinsights "1.7.4" - -vscode-nls@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" - integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== - -vscode-tas-client@^0.1.22: - version "0.1.22" - resolved "https://registry.yarnpkg.com/vscode-tas-client/-/vscode-tas-client-0.1.22.tgz#2dd674b21a94ff4e97db2b6545d9efda8b5f07c3" - integrity sha512-1sYH73nhiSRVQgfZkLQNJW7VzhKM9qNbCe8QyXgiKkLhH4GflDXRPAK4yy4P41jUgula+Fc9G7i5imj1dlKfaw== - dependencies: - tas-client "0.1.21" diff --git a/lib/vscode/extensions/github/package.json b/lib/vscode/extensions/github/package.json deleted file mode 100644 index 8f67314b459d..000000000000 --- a/lib/vscode/extensions/github/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "github", - "displayName": "%displayName%", - "description": "%description%", - "publisher": "vscode", - "license": "MIT", - "version": "0.0.1", - "engines": { - "vscode": "^1.41.0" - }, - "icon": "images/icon.png", - "enableProposedApi": true, - "categories": [ - "Other" - ], - "activationEvents": [ - "*" - ], - "extensionDependencies": [ - "vscode.git" - ], - "main": "./out/extension.js", - "capabilities": { - "virtualWorkspaces": false, - "untrustedWorkspaces": { - "supported": true - } - }, - "contributes": { - "commands": [ - { - "command": "github.publish", - "title": "Publish to GitHub" - } - ], - "configuration": [ - { - "title": "GitHub", - "properties": { - "github.gitAuthentication": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%config.gitAuthentication%" - } - } - } - ], - "viewsWelcome": [ - { - "view": "scm", - "contents": "%welcome.publishFolder%", - "when": "config.git.enabled && git.state == initialized && workbenchState == folder" - }, - { - "view": "scm", - "contents": "%welcome.publishWorkspaceFolder%", - "when": "config.git.enabled && git.state == initialized && workbenchState == workspace && workspaceFolderCount != 0" - } - ] - }, - "scripts": { - "vscode:prepublish": "npm run compile", - "compile": "gulp compile-extension:github", - "watch": "gulp watch-extension:github" - }, - "dependencies": { - "@octokit/rest": "^18.0.1", - "tunnel": "^0.0.6", - "vscode-nls": "^4.1.2" - }, - "devDependencies": { - "@types/node": "^12.19.9" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/github/yarn.lock b/lib/vscode/extensions/github/yarn.lock deleted file mode 100644 index 05a0b4cf6f9f..000000000000 --- a/lib/vscode/extensions/github/yarn.lock +++ /dev/null @@ -1,157 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@octokit/auth-token@^2.4.0": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.2.tgz#10d0ae979b100fa6b72fa0e8e63e27e6d0dbff8a" - integrity sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ== - dependencies: - "@octokit/types" "^5.0.0" - -"@octokit/core@^3.0.0": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.1.1.tgz#1856745aa8fb154cf1544a2a1b82586c809c5e66" - integrity sha512-cQ2HGrtyNJ1IBxpTP1U5m/FkMAJvgw7d2j1q3c9P0XUuYilEgF6e4naTpsgm4iVcQeOnccZlw7XHRIUBy0ymcg== - dependencies: - "@octokit/auth-token" "^2.4.0" - "@octokit/graphql" "^4.3.1" - "@octokit/request" "^5.4.0" - "@octokit/types" "^5.0.0" - before-after-hook "^2.1.0" - universal-user-agent "^6.0.0" - -"@octokit/endpoint@^6.0.1": - version "6.0.4" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.4.tgz#da3eafdee1fabd6e5b6ca311efcba26f0dd99848" - integrity sha512-ZJHIsvsClEE+6LaZXskDvWIqD3Ao7+2gc66pRG5Ov4MQtMvCU9wGu1TItw9aGNmRuU9x3Fei1yb+uqGaQnm0nw== - dependencies: - "@octokit/types" "^5.0.0" - is-plain-object "^3.0.0" - universal-user-agent "^6.0.0" - -"@octokit/graphql@^4.3.1": - version "4.5.2" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.2.tgz#33021ebf94939cf47562823851ab11fe64392274" - integrity sha512-SpB/JGdB7bxRj8qowwfAXjMpICUYSJqRDj26MKJAryRQBqp/ZzARsaO2LEFWzDaps0FLQoPYVGppS0HQXkBhdg== - dependencies: - "@octokit/request" "^5.3.0" - "@octokit/types" "^5.0.0" - universal-user-agent "^6.0.0" - -"@octokit/plugin-paginate-rest@^2.2.0": - version "2.2.3" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.2.3.tgz#a6ad4377e7e7832fb4bdd9d421e600cb7640ac27" - integrity sha512-eKTs91wXnJH8Yicwa30jz6DF50kAh7vkcqCQ9D7/tvBAP5KKkg6I2nNof8Mp/65G0Arjsb4QcOJcIEQY+rK1Rg== - dependencies: - "@octokit/types" "^5.0.0" - -"@octokit/plugin-request-log@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" - integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== - -"@octokit/plugin-rest-endpoint-methods@4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.1.0.tgz#338c568177c4d4d753f9525af88b29cd0f091734" - integrity sha512-zbRTjm+xplSNlixotTVMvLJe8aRogUXS+r37wZK5EjLsNYH4j02K5XLMOWyYaSS4AJEZtPmzCcOcui4VzVGq+A== - dependencies: - "@octokit/types" "^5.1.0" - deprecation "^2.3.1" - -"@octokit/request-error@^2.0.0": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.2.tgz#0e76b83f5d8fdda1db99027ea5f617c2e6ba9ed0" - integrity sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw== - dependencies: - "@octokit/types" "^5.0.1" - deprecation "^2.0.0" - once "^1.4.0" - -"@octokit/request@^5.3.0", "@octokit/request@^5.4.0": - version "5.4.6" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.6.tgz#e8cc8d4cfc654d30428ea92aaa62168fd5ead7eb" - integrity sha512-9r8Sn4CvqFI9LDLHl9P17EZHwj3ehwQnTpTE+LEneb0VBBqSiI/VS4rWIBfBhDrDs/aIGEGZRSB0QWAck8u+2g== - dependencies: - "@octokit/endpoint" "^6.0.1" - "@octokit/request-error" "^2.0.0" - "@octokit/types" "^5.0.0" - deprecation "^2.0.0" - is-plain-object "^3.0.0" - node-fetch "^2.3.0" - once "^1.4.0" - universal-user-agent "^6.0.0" - -"@octokit/rest@^18.0.1": - version "18.0.1" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.0.1.tgz#46ee234770c5ff4c646f7e18708c56b6d7fa3c66" - integrity sha512-KLlJpgsJx88OZ0VLBH3gvUK4sfcXjr/nE0Qzyoe76dNqMzDzkSmmvILF3f2XviGgrzuP6Ie0ay/QX478Vrpn9A== - dependencies: - "@octokit/core" "^3.0.0" - "@octokit/plugin-paginate-rest" "^2.2.0" - "@octokit/plugin-request-log" "^1.0.0" - "@octokit/plugin-rest-endpoint-methods" "4.1.0" - -"@octokit/types@^5.0.0", "@octokit/types@^5.0.1", "@octokit/types@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.1.0.tgz#4377a3f39edad3e60753fb5c3c310756f1ded57f" - integrity sha512-OFxUBgrEllAbdEmWp/wNmKIu5EuumKHG4sgy56vjZ8lXPgMhF05c76hmulfOdFHHYRpPj49ygOZJ8wgVsPecuA== - dependencies: - "@types/node" ">= 8" - -"@types/node@>= 8": - version "14.0.23" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.23.tgz#676fa0883450ed9da0bb24156213636290892806" - integrity sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw== - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -before-after-hook@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" - integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== - -deprecation@^2.0.0, deprecation@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" - integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== - -is-plain-object@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.1.tgz#662d92d24c0aa4302407b0d45d21f2251c85f85b" - integrity sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g== - -node-fetch@^2.3.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - -once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -tunnel@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" - integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== - -universal-user-agent@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" - integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== - -vscode-nls@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" - integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= diff --git a/lib/vscode/extensions/grunt/package.json b/lib/vscode/extensions/grunt/package.json deleted file mode 100644 index d7fbd50e57ac..000000000000 --- a/lib/vscode/extensions/grunt/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "grunt", - "publisher": "vscode", - "description": "Extension to add Grunt capabilities to VS Code.", - "displayName": "Grunt support for VS Code", - "version": "1.0.0", - "icon": "images/grunt.png", - "license": "MIT", - "engines": { - "vscode": "*" - }, - "categories": [ - "Other" - ], - "scripts": { - "compile": "gulp compile-extension:grunt", - "watch": "gulp watch-extension:grunt" - }, - "dependencies": { - "vscode-nls": "^4.0.0" - }, - "devDependencies": { - "@types/node": "^12.19.9" - }, - "main": "./out/main", - "activationEvents": [ - "onCommand:workbench.action.tasks.runTask" - ], - "capabilities": { - "virtualWorkspaces": false, - "untrustedWorkspaces": { - "supported": true - } - }, - "contributes": { - "configuration": { - "id": "grunt", - "type": "object", - "title": "Grunt", - "properties": { - "grunt.autoDetect": { - "scope": "resource", - "type": "string", - "enum": [ - "off", - "on" - ], - "default": "on", - "description": "%config.grunt.autoDetect%" - } - } - }, - "taskDefinitions": [ - { - "type": "grunt", - "required": [ - "task" - ], - "properties": { - "task": { - "type": "string", - "description": "%grunt.taskDefinition.type.description%" - }, - "args": { - "type": "array", - "description": "%grunt.taskDefinition.args.description%" - }, - "file": { - "type": "string", - "description": "%grunt.taskDefinition.file.description%" - } - }, - "when": "shellExecutionSupported" - } - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/grunt/package.nls.json b/lib/vscode/extensions/grunt/package.nls.json deleted file mode 100644 index 873de038882f..000000000000 --- a/lib/vscode/extensions/grunt/package.nls.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "description": "Extension to add Grunt capabilities to VS Code.", - "displayName": "Grunt support for VS Code", - "config.grunt.autoDetect": "Controls whether auto detection of Grunt tasks is on or off. Default is on.", - "grunt.taskDefinition.type.description": "The Grunt task to customize.", - "grunt.taskDefinition.args.description": "Command line arguments to pass to the grunt task", - "grunt.taskDefinition.file.description": "The Grunt file that provides the task. Can be omitted." -} diff --git a/lib/vscode/extensions/grunt/yarn.lock b/lib/vscode/extensions/grunt/yarn.lock deleted file mode 100644 index 687f15f481e5..000000000000 --- a/lib/vscode/extensions/grunt/yarn.lock +++ /dev/null @@ -1,13 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -vscode-nls@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" - integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== diff --git a/lib/vscode/extensions/gulp/package.json b/lib/vscode/extensions/gulp/package.json deleted file mode 100644 index 2fb8d5831234..000000000000 --- a/lib/vscode/extensions/gulp/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "gulp", - "publisher": "vscode", - "description": "%description%", - "displayName": "%displayName%", - "version": "1.0.0", - "icon": "images/gulp.png", - "license": "MIT", - "engines": { - "vscode": "*" - }, - "categories": [ - "Other" - ], - "scripts": { - "compile": "gulp compile-extension:gulp", - "watch": "gulp watch-extension:gulp" - }, - "dependencies": { - "vscode-nls": "^4.0.0" - }, - "devDependencies": { - "@types/node": "^12.19.9" - }, - "main": "./out/main", - "activationEvents": [ - "onCommand:workbench.action.tasks.runTask" - ], - "capabilities": { - "virtualWorkspaces": false, - "untrustedWorkspaces": { - "supported": true - } - }, - "contributes": { - "configuration": { - "id": "gulp", - "type": "object", - "title": "Gulp", - "properties": { - "gulp.autoDetect": { - "scope": "resource", - "type": "string", - "enum": [ - "off", - "on" - ], - "default": "on", - "description": "%config.gulp.autoDetect%" - } - } - }, - "taskDefinitions": [ - { - "type": "gulp", - "required": [ - "task" - ], - "properties": { - "task": { - "type": "string", - "description": "%gulp.taskDefinition.type.description%" - }, - "file": { - "type": "string", - "description": "%gulp.taskDefinition.file.description%" - } - }, - "when": "shellExecutionSupported" - } - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/gulp/package.nls.json b/lib/vscode/extensions/gulp/package.nls.json deleted file mode 100644 index a87dbe1dc85b..000000000000 --- a/lib/vscode/extensions/gulp/package.nls.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "description": "Extension to add Gulp capabilities to VSCode.", - "displayName": "Gulp support for VSCode", - "config.gulp.autoDetect": "Controls whether auto detection of Gulp tasks is on or off. Default is on.", - "gulp.taskDefinition.type.description": "The Gulp task to customize.", - "gulp.taskDefinition.file.description": "The Gulp file that provides the task. Can be omitted." -} diff --git a/lib/vscode/extensions/gulp/yarn.lock b/lib/vscode/extensions/gulp/yarn.lock deleted file mode 100644 index 687f15f481e5..000000000000 --- a/lib/vscode/extensions/gulp/yarn.lock +++ /dev/null @@ -1,13 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -vscode-nls@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" - integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== diff --git a/lib/vscode/extensions/html-language-features/package.json b/lib/vscode/extensions/html-language-features/package.json deleted file mode 100644 index 9fa6bc314e52..000000000000 --- a/lib/vscode/extensions/html-language-features/package.json +++ /dev/null @@ -1,254 +0,0 @@ -{ - "enableProposedApi": true, - "name": "html-language-features", - "displayName": "%displayName%", - "description": "%description%", - "version": "1.0.0", - "publisher": "vscode", - "license": "MIT", - "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", - "engines": { - "vscode": "0.10.x" - }, - "icon": "icons/html.png", - "activationEvents": [ - "onLanguage:html", - "onLanguage:handlebars" - ], - "main": "./client/out/node/htmlClientMain", - "browser": "./client/dist/browser/htmlClientMain", - "capabilities": { - "virtualWorkspaces": true, - "untrustedWorkspaces": { - "supported": true - } - }, - "scripts": { - "compile": "npx gulp compile-extension:html-language-features-client compile-extension:html-language-features-server", - "watch": "npx gulp watch-extension:html-language-features-client watch-extension:html-language-features-server", - "install-client-next": "yarn add vscode-languageclient@next" - }, - "categories": [ - "Programming Languages" - ], - "contributes": { - "configuration": { - "id": "html", - "order": 20, - "type": "object", - "title": "HTML", - "properties": { - "html.customData": { - "type": "array", - "markdownDescription": "%html.customData.desc%", - "default": [], - "items": { - "type": "string" - }, - "scope": "resource" - }, - "html.format.enable": { - "type": "boolean", - "scope": "window", - "default": true, - "description": "%html.format.enable.desc%" - }, - "html.format.wrapLineLength": { - "type": "integer", - "scope": "resource", - "default": 120, - "description": "%html.format.wrapLineLength.desc%" - }, - "html.format.unformatted": { - "type": [ - "string", - "null" - ], - "scope": "resource", - "default": "wbr", - "markdownDescription": "%html.format.unformatted.desc%" - }, - "html.format.contentUnformatted": { - "type": [ - "string", - "null" - ], - "scope": "resource", - "default": "pre,code,textarea", - "markdownDescription": "%html.format.contentUnformatted.desc%" - }, - "html.format.indentInnerHtml": { - "type": "boolean", - "scope": "resource", - "default": false, - "markdownDescription": "%html.format.indentInnerHtml.desc%" - }, - "html.format.preserveNewLines": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%html.format.preserveNewLines.desc%" - }, - "html.format.maxPreserveNewLines": { - "type": [ - "number", - "null" - ], - "scope": "resource", - "default": null, - "markdownDescription": "%html.format.maxPreserveNewLines.desc%" - }, - "html.format.indentHandlebars": { - "type": "boolean", - "scope": "resource", - "default": false, - "markdownDescription": "%html.format.indentHandlebars.desc%" - }, - "html.format.endWithNewline": { - "type": "boolean", - "scope": "resource", - "default": false, - "description": "%html.format.endWithNewline.desc%" - }, - "html.format.extraLiners": { - "type": [ - "string", - "null" - ], - "scope": "resource", - "default": "head, body, /html", - "markdownDescription": "%html.format.extraLiners.desc%" - }, - "html.format.wrapAttributes": { - "type": "string", - "scope": "resource", - "default": "auto", - "enum": [ - "auto", - "force", - "force-aligned", - "force-expand-multiline", - "aligned-multiple", - "preserve", - "preserve-aligned" - ], - "enumDescriptions": [ - "%html.format.wrapAttributes.auto%", - "%html.format.wrapAttributes.force%", - "%html.format.wrapAttributes.forcealign%", - "%html.format.wrapAttributes.forcemultiline%", - "%html.format.wrapAttributes.alignedmultiple%", - "%html.format.wrapAttributes.preserve%", - "%html.format.wrapAttributes.preservealigned%" - ], - "description": "%html.format.wrapAttributes.desc%" - }, - "html.format.wrapAttributesIndentSize": { - "type": [ - "number", - "null" - ], - "scope": "resource", - "default": null, - "description": "%html.format.wrapAttributesIndentSize.desc%" - }, - "html.format.templating": { - "type": "boolean", - "scope": "resource", - "default": false, - "description": "%html.format.templating.desc%" - }, - "html.format.unformattedContentDelimiter": { - "type": "string", - "scope": "resource", - "default": "", - "markdownDescription": "%html.format.unformattedContentDelimiter.desc%" - }, - "html.suggest.html5": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%html.suggest.html5.desc%" - }, - "html.validate.scripts": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%html.validate.scripts%" - }, - "html.validate.styles": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%html.validate.styles%" - }, - "html.autoClosingTags": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%html.autoClosingTags%" - }, - "html.hover.documentation": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%html.hover.documentation%" - }, - "html.hover.references": { - "type": "boolean", - "scope": "resource", - "default": true, - "description": "%html.hover.references%" - }, - "html.mirrorCursorOnMatchingTag": { - "type": "boolean", - "scope": "resource", - "default": false, - "description": "%html.mirrorCursorOnMatchingTag%", - "deprecationMessage": "%html.mirrorCursorOnMatchingTagDeprecationMessage%" - }, - "html.trace.server": { - "type": "string", - "scope": "window", - "enum": [ - "off", - "messages", - "verbose" - ], - "default": "off", - "description": "%html.trace.server.desc%" - } - } - }, - "configurationDefaults": { - "[html]": { - "editor.suggest.insertMode": "replace" - }, - "[handlebars]": { - "editor.suggest.insertMode": "replace" - } - }, - "jsonValidation": [ - { - "fileMatch": "*.html-data.json", - "url": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/master/docs/customData.schema.json" - }, - { - "fileMatch": "package.json", - "url": "./schemas/package.schema.json" - } - ] - }, - "dependencies": { - "vscode-extension-telemetry": "0.1.7", - "vscode-languageclient": "^7.0.0", - "vscode-nls": "^5.0.0" - }, - "devDependencies": { - "@types/node": "^12.19.9" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/html-language-features/server/package.json b/lib/vscode/extensions/html-language-features/server/package.json deleted file mode 100644 index fdb292853138..000000000000 --- a/lib/vscode/extensions/html-language-features/server/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "vscode-html-languageserver", - "description": "HTML language server", - "version": "1.0.0", - "author": "Microsoft Corporation", - "license": "MIT", - "engines": { - "node": "*" - }, - "main": "./out/node/htmlServerMain", - "dependencies": { - "vscode-css-languageservice": "^5.1.1", - "vscode-html-languageservice": "^4.0.3", - "vscode-languageserver": "^7.0.0", - "vscode-languageserver-textdocument": "^1.0.1", - "vscode-nls": "^5.0.0", - "vscode-uri": "^3.0.2" - }, - "devDependencies": { - "@types/mocha": "^8.2.0", - "@types/node": "^12.19.9" - }, - "scripts": { - "compile": "npx gulp compile-extension:html-language-features-server", - "watch": "npx gulp watch-extension:html-language-features-server", - "install-service-next": "yarn add vscode-css-languageservice@next && yarn add vscode-html-languageservice@next", - "install-service-local": "yarn link vscode-css-languageservice && yarn link vscode-html-languageservice", - "install-server-next": "yarn add vscode-languageserver@next", - "install-server-local": "yarn link vscode-languageserver", - "test": "npm run compile && node ./test/index.js" - } -} diff --git a/lib/vscode/extensions/html-language-features/server/src/test/documentContext.test.ts b/lib/vscode/extensions/html-language-features/server/src/test/documentContext.test.ts deleted file mode 100644 index 612c0063c058..000000000000 --- a/lib/vscode/extensions/html-language-features/server/src/test/documentContext.test.ts +++ /dev/null @@ -1,20 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -import * as assert from 'assert'; -import { getDocumentContext } from '../utils/documentContext'; - -suite('HTML Document Context', () => { - - test('Context', function (): any { - const docURI = 'file:///users/test/folder/test.html'; - const rootFolders = [{ name: '', uri: 'file:///users/test/' }]; - - let context = getDocumentContext(docURI, rootFolders); - assert.equal(context.resolveReference('/', docURI), 'file:///users/test/'); - assert.equal(context.resolveReference('/message.html', docURI), 'file:///users/test/message.html'); - assert.equal(context.resolveReference('message.html', docURI), 'file:///users/test/folder/message.html'); - assert.equal(context.resolveReference('message.html', 'file:///users/test/'), 'file:///users/test/message.html'); - }); -}); \ No newline at end of file diff --git a/lib/vscode/extensions/html-language-features/server/yarn.lock b/lib/vscode/extensions/html-language-features/server/yarn.lock deleted file mode 100644 index ca035d1c79b3..000000000000 --- a/lib/vscode/extensions/html-language-features/server/yarn.lock +++ /dev/null @@ -1,73 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/mocha@^8.2.0": - version "8.2.0" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44" - integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ== - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -vscode-css-languageservice@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-5.1.1.tgz#d68a22ea0b34a8356c169cafc7d32564c2ff6e87" - integrity sha512-QW0oe/g2y5E2AbVqY7FJNr2Q8uHiAHNSFpptI6xB8Y0KgzVKppOcIVrgmBNzXhFp9IswAwptkdqr8ExSJbqPkQ== - dependencies: - vscode-languageserver-textdocument "^1.0.1" - vscode-languageserver-types "^3.16.0" - vscode-nls "^5.0.0" - vscode-uri "^3.0.2" - -vscode-html-languageservice@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-4.0.3.tgz#3b7e7d3cfee75d47da0181dd638b5f459456a913" - integrity sha512-34KPIgRHVInT+TiFNmfiPFDrUAOOLuySNP2h0pMxBu1ObAbSixSqB3BMQFxIHz9hrGd3X0DEvi5YkobDxs4rWw== - dependencies: - vscode-languageserver-textdocument "^1.0.1" - vscode-languageserver-types "^3.16.0" - vscode-nls "^5.0.0" - vscode-uri "^3.0.2" - -vscode-jsonrpc@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" - integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== - -vscode-languageserver-protocol@3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" - integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== - dependencies: - vscode-jsonrpc "6.0.0" - vscode-languageserver-types "3.16.0" - -vscode-languageserver-textdocument@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz#178168e87efad6171b372add1dea34f53e5d330f" - integrity sha512-UIcJDjX7IFkck7cSkNNyzIz5FyvpQfY7sdzVy+wkKN/BLaD4DQ0ppXQrKePomCxTS7RrolK1I0pey0bG9eh8dA== - -vscode-languageserver-types@3.16.0, vscode-languageserver-types@^3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" - integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== - -vscode-languageserver@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz#49b068c87cfcca93a356969d20f5d9bdd501c6b0" - integrity sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw== - dependencies: - vscode-languageserver-protocol "3.16.0" - -vscode-nls@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840" - integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA== - -vscode-uri@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.2.tgz#ecfd1d066cb8ef4c3a208decdbab9a8c23d055d0" - integrity sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA== diff --git a/lib/vscode/extensions/html-language-features/yarn.lock b/lib/vscode/extensions/html-language-features/yarn.lock deleted file mode 100644 index f538d16e7d46..000000000000 --- a/lib/vscode/extensions/html-language-features/yarn.lock +++ /dev/null @@ -1,172 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -applicationinsights@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" - integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== - dependencies: - cls-hooked "^4.2.2" - continuation-local-storage "^3.2.1" - diagnostic-channel "0.2.0" - diagnostic-channel-publishers "^0.3.3" - -async-hook-jl@^1.7.6: - version "1.7.6" - resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" - integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== - dependencies: - stack-chain "^1.3.7" - -async-listener@^0.6.0: - version "0.6.10" - resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" - integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== - dependencies: - semver "^5.3.0" - shimmer "^1.1.0" - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -cls-hooked@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" - integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== - dependencies: - async-hook-jl "^1.7.6" - emitter-listener "^1.0.1" - semver "^5.4.1" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -continuation-local-storage@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" - integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== - dependencies: - async-listener "^0.6.0" - emitter-listener "^1.1.1" - -diagnostic-channel-publishers@^0.3.3: - version "0.3.5" - resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" - integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== - -diagnostic-channel@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" - integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= - dependencies: - semver "^5.3.0" - -emitter-listener@^1.0.1, emitter-listener@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" - integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== - dependencies: - shimmer "^1.2.0" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -semver@^5.3.0: - version "5.5.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" - integrity sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw== - -semver@^5.4.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^7.3.4: - version "7.3.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" - integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== - dependencies: - lru-cache "^6.0.0" - -shimmer@^1.1.0, shimmer@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" - integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== - -stack-chain@^1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" - integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= - -vscode-extension-telemetry@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" - integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== - dependencies: - applicationinsights "1.7.4" - -vscode-jsonrpc@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" - integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== - -vscode-languageclient@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-7.0.0.tgz#b505c22c21ffcf96e167799757fca07a6bad0fb2" - integrity sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg== - dependencies: - minimatch "^3.0.4" - semver "^7.3.4" - vscode-languageserver-protocol "3.16.0" - -vscode-languageserver-protocol@3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" - integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== - dependencies: - vscode-jsonrpc "6.0.0" - vscode-languageserver-types "3.16.0" - -vscode-languageserver-types@3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" - integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== - -vscode-nls@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840" - integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== diff --git a/lib/vscode/extensions/jake/package.json b/lib/vscode/extensions/jake/package.json deleted file mode 100644 index ce19974e1057..000000000000 --- a/lib/vscode/extensions/jake/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "jake", - "publisher": "vscode", - "description": "%description%", - "displayName": "%displayName%", - "icon": "images/cowboy_hat.png", - "version": "1.0.0", - "license": "MIT", - "engines": { - "vscode": "*" - }, - "categories": [ - "Other" - ], - "scripts": { - "compile": "gulp compile-extension:jake", - "watch": "gulp watch-extension:jake" - }, - "dependencies": { - "vscode-nls": "^4.0.0" - }, - "devDependencies": { - "@types/node": "^12.19.9" - }, - "main": "./out/main", - "activationEvents": [ - "onCommand:workbench.action.tasks.runTask" - ], - "capabilities": { - "virtualWorkspaces": false, - "untrustedWorkspaces": { - "supported": true - } - }, - "contributes": { - "configuration": { - "id": "jake", - "type": "object", - "title": "Jake", - "properties": { - "jake.autoDetect": { - "scope": "resource", - "type": "string", - "enum": [ - "off", - "on" - ], - "default": "on", - "description": "%config.jake.autoDetect%" - } - } - }, - "taskDefinitions": [ - { - "type": "jake", - "required": [ - "task" - ], - "properties": { - "task": { - "type": "string", - "description": "%jake.taskDefinition.type.description%" - }, - "file": { - "type": "string", - "description": "%jake.taskDefinition.file.description%" - } - }, - "when": "shellExecutionSupported" - } - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/jake/package.nls.json b/lib/vscode/extensions/jake/package.nls.json deleted file mode 100644 index c2dfb3c3818b..000000000000 --- a/lib/vscode/extensions/jake/package.nls.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "description": "Extension to add Jake capabilities to VS Code.", - "displayName": "Jake support for VS Code", - "jake.taskDefinition.type.description": "The Jake task to customize.", - "jake.taskDefinition.file.description": "The Jake file that provides the task. Can be omitted.", - "config.jake.autoDetect": "Controls whether auto detection of Jake tasks is on or off. Default is on." -} diff --git a/lib/vscode/extensions/jake/yarn.lock b/lib/vscode/extensions/jake/yarn.lock deleted file mode 100644 index 687f15f481e5..000000000000 --- a/lib/vscode/extensions/jake/yarn.lock +++ /dev/null @@ -1,13 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -vscode-nls@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" - integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== diff --git a/lib/vscode/extensions/json-language-features/package.json b/lib/vscode/extensions/json-language-features/package.json deleted file mode 100644 index e854c07569a7..000000000000 --- a/lib/vscode/extensions/json-language-features/package.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "name": "json-language-features", - "displayName": "%displayName%", - "description": "%description%", - "version": "1.0.0", - "publisher": "vscode", - "license": "MIT", - "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", - "engines": { - "vscode": "0.10.x" - }, - "icon": "icons/json.png", - "activationEvents": [ - "onLanguage:json", - "onLanguage:jsonc" - ], - "main": "./client/out/node/jsonClientMain", - "browser": "./client/dist/browser/jsonClientMain", - "enableProposedApi": true, - "capabilities": { - "virtualWorkspaces": true, - "untrustedWorkspaces": { - "supported": true - } - }, - "scripts": { - "compile": "gulp compile-extension:json-language-features-client compile-extension:json-language-features-server", - "watch": "gulp watch-extension:json-language-features-client watch-extension:json-language-features-server", - "install-client-next": "yarn add vscode-languageclient@next" - }, - "categories": [ - "Programming Languages" - ], - "contributes": { - "configuration": { - "id": "json", - "order": 20, - "type": "object", - "title": "JSON", - "properties": { - "json.schemas": { - "type": "array", - "scope": "resource", - "description": "%json.schemas.desc%", - "items": { - "type": "object", - "default": { - "fileMatch": [ - "/myfile" - ], - "url": "schemaURL" - }, - "properties": { - "url": { - "type": "string", - "default": "/user.schema.json", - "description": "%json.schemas.url.desc%" - }, - "fileMatch": { - "type": "array", - "items": { - "type": "string", - "default": "MyFile.json", - "description": "%json.schemas.fileMatch.item.desc%" - }, - "minItems": 1, - "description": "%json.schemas.fileMatch.desc%" - }, - "schema": { - "$ref": "http://json-schema.org/draft-07/schema#", - "description": "%json.schemas.schema.desc%" - } - } - } - }, - "json.format.enable": { - "type": "boolean", - "scope": "window", - "default": true, - "description": "%json.format.enable.desc%" - }, - "json.trace.server": { - "type": "string", - "scope": "window", - "enum": [ - "off", - "messages", - "verbose" - ], - "default": "off", - "description": "%json.tracing.desc%" - }, - "json.colorDecorators.enable": { - "type": "boolean", - "scope": "window", - "default": true, - "description": "%json.colorDecorators.enable.desc%", - "deprecationMessage": "%json.colorDecorators.enable.deprecationMessage%" - }, - "json.maxItemsComputed": { - "type": "number", - "default": 5000, - "description": "%json.maxItemsComputed.desc%" - }, - "json.schemaDownload.enable": { - "type": "boolean", - "default": true, - "description": "%json.enableSchemaDownload.desc%", - "tags": [ - "usesOnlineServices" - ] - } - } - }, - "configurationDefaults": { - "[json]": { - "editor.quickSuggestions": { - "strings": true - }, - "editor.suggest.insertMode": "replace" - }, - "[jsonc]": { - "editor.quickSuggestions": { - "strings": true - }, - "editor.suggest.insertMode": "replace" - } - }, - "jsonValidation": [ - { - "fileMatch": "*.schema.json", - "url": "http://json-schema.org/draft-07/schema#" - } - ] - }, - "dependencies": { - "request-light": "^0.4.0", - "vscode-extension-telemetry": "0.1.7", - "vscode-languageclient": "^7.0.0", - "vscode-nls": "^5.0.0" - }, - "devDependencies": { - "@types/node": "^12.19.9" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/json-language-features/server/package.json b/lib/vscode/extensions/json-language-features/server/package.json deleted file mode 100644 index 2d841f89a75e..000000000000 --- a/lib/vscode/extensions/json-language-features/server/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "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": { - "jsonc-parser": "^3.0.0", - "request-light": "^0.4.0", - "vscode-json-languageservice": "^4.1.3", - "vscode-languageserver": "^7.0.0", - "vscode-uri": "^3.0.2" - }, - "devDependencies": { - "@types/mocha": "^8.2.0", - "@types/node": "^12.19.9" - }, - "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" - } -} diff --git a/lib/vscode/extensions/json-language-features/server/yarn.lock b/lib/vscode/extensions/json-language-features/server/yarn.lock deleted file mode 100644 index b754118b91d2..000000000000 --- a/lib/vscode/extensions/json-language-features/server/yarn.lock +++ /dev/null @@ -1,163 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/mocha@^8.2.0": - version "8.2.0" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44" - integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ== - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -agent-base@4: - version "4.1.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.1.2.tgz#80fa6cde440f4dcf9af2617cf246099b5d99f0c8" - integrity sha512-VE6QoEdaugY86BohRtfGmTDabxdU5sCKOkbcPA6PXKJsRzEi/7A3RCTxJal1ft/4qSfPht5/iQLhMh/wzSkkNw== - dependencies: - es6-promisify "^5.0.0" - -agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== - dependencies: - es6-promisify "^5.0.0" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -debug@3.1.0, debug@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -es6-promise@^4.0.3: - version "4.1.1" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a" - integrity sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - -http-proxy-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" - integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== - dependencies: - agent-base "4" - debug "3.1.0" - -https-proxy-agent@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" - integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - -jsonc-parser@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" - integrity sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA== - -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -request-light@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/request-light/-/request-light-0.4.0.tgz#c6b91ef00b18cb0de75d2127e55b3a2c9f7f90f9" - integrity sha512-fimzjIVw506FBZLspTAXHdpvgvQebyjpNyLRd0e6drPPRq7gcrROeGWRyF81wLqFg5ijPgnOQbmfck5wdTqpSA== - dependencies: - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.4" - vscode-nls "^4.1.2" - -vscode-json-languageservice@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-4.1.3.tgz#851564e529e649c13b844f10a80ea1d9095591a9" - integrity sha512-m/wUEt4zgCNUcvGmPr1ELo+ROQNKBgASpdOOAEpcSMwYE/6GzULZ1KfBhbX9or7qnC4E0oX+wwW+lrN3EUWCgw== - dependencies: - jsonc-parser "^3.0.0" - minimatch "^3.0.4" - vscode-languageserver-textdocument "^1.0.1" - vscode-languageserver-types "^3.16.0" - vscode-nls "^5.0.0" - vscode-uri "^3.0.2" - -vscode-jsonrpc@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" - integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== - -vscode-languageserver-protocol@3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" - integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== - dependencies: - vscode-jsonrpc "6.0.0" - vscode-languageserver-types "3.16.0" - -vscode-languageserver-textdocument@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz#178168e87efad6171b372add1dea34f53e5d330f" - integrity sha512-UIcJDjX7IFkck7cSkNNyzIz5FyvpQfY7sdzVy+wkKN/BLaD4DQ0ppXQrKePomCxTS7RrolK1I0pey0bG9eh8dA== - -vscode-languageserver-types@3.16.0, vscode-languageserver-types@^3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" - integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== - -vscode-languageserver@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz#49b068c87cfcca93a356969d20f5d9bdd501c6b0" - integrity sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw== - dependencies: - vscode-languageserver-protocol "3.16.0" - -vscode-nls@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" - integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== - -vscode-nls@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840" - integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA== - -vscode-uri@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.2.tgz#ecfd1d066cb8ef4c3a208decdbab9a8c23d055d0" - integrity sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA== diff --git a/lib/vscode/extensions/json-language-features/yarn.lock b/lib/vscode/extensions/json-language-features/yarn.lock deleted file mode 100644 index a4533a6e53cf..000000000000 --- a/lib/vscode/extensions/json-language-features/yarn.lock +++ /dev/null @@ -1,252 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -agent-base@4: - version "4.2.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" - integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== - dependencies: - es6-promisify "^5.0.0" - -agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== - dependencies: - es6-promisify "^5.0.0" - -applicationinsights@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" - integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== - dependencies: - cls-hooked "^4.2.2" - continuation-local-storage "^3.2.1" - diagnostic-channel "0.2.0" - diagnostic-channel-publishers "^0.3.3" - -async-hook-jl@^1.7.6: - version "1.7.6" - resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" - integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== - dependencies: - stack-chain "^1.3.7" - -async-listener@^0.6.0: - version "0.6.10" - resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" - integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== - dependencies: - semver "^5.3.0" - shimmer "^1.1.0" - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -cls-hooked@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" - integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== - dependencies: - async-hook-jl "^1.7.6" - emitter-listener "^1.0.1" - semver "^5.4.1" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -continuation-local-storage@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" - integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== - dependencies: - async-listener "^0.6.0" - emitter-listener "^1.1.1" - -debug@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -diagnostic-channel-publishers@^0.3.3: - version "0.3.5" - resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" - integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== - -diagnostic-channel@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" - integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= - dependencies: - semver "^5.3.0" - -emitter-listener@^1.0.1, emitter-listener@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" - integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== - dependencies: - shimmer "^1.2.0" - -es6-promise@^4.0.3: - version "4.2.6" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.6.tgz#b685edd8258886365ea62b57d30de28fadcd974f" - integrity sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - -http-proxy-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" - integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== - dependencies: - agent-base "4" - debug "3.1.0" - -https-proxy-agent@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" - integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -request-light@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/request-light/-/request-light-0.4.0.tgz#c6b91ef00b18cb0de75d2127e55b3a2c9f7f90f9" - integrity sha512-fimzjIVw506FBZLspTAXHdpvgvQebyjpNyLRd0e6drPPRq7gcrROeGWRyF81wLqFg5ijPgnOQbmfck5wdTqpSA== - dependencies: - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.4" - vscode-nls "^4.1.2" - -semver@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== - -semver@^5.4.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^7.3.4: - version "7.3.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" - integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== - dependencies: - lru-cache "^6.0.0" - -shimmer@^1.1.0, shimmer@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" - integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== - -stack-chain@^1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" - integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= - -vscode-extension-telemetry@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" - integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== - dependencies: - applicationinsights "1.7.4" - -vscode-jsonrpc@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" - integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== - -vscode-languageclient@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-7.0.0.tgz#b505c22c21ffcf96e167799757fca07a6bad0fb2" - integrity sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg== - dependencies: - minimatch "^3.0.4" - semver "^7.3.4" - vscode-languageserver-protocol "3.16.0" - -vscode-languageserver-protocol@3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" - integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== - dependencies: - vscode-jsonrpc "6.0.0" - vscode-languageserver-types "3.16.0" - -vscode-languageserver-types@3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" - integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== - -vscode-nls@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" - integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== - -vscode-nls@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840" - integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== diff --git a/lib/vscode/extensions/json/package.json b/lib/vscode/extensions/json/package.json deleted file mode 100644 index a4ccc12cf2da..000000000000 --- a/lib/vscode/extensions/json/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "json", - "displayName": "%displayName%", - "description": "%description%", - "version": "1.0.0", - "publisher": "vscode", - "license": "MIT", - "engines": { - "vscode": "0.10.x" - }, - "scripts": { - "update-grammar": "node ./build/update-grammars.js" - }, - "contributes": { - "languages": [ - { - "id": "json", - "aliases": [ - "JSON", - "json" - ], - "extensions": [ - ".json", - ".bowerrc", - ".jscsrc", - ".webmanifest", - ".js.map", - ".css.map", - ".ts.map", - ".har", - ".jslintrc", - ".jsonld" - ], - "filenames": [ - "composer.lock", - ".watchmanconfig" - ], - "mimetypes": [ - "application/json", - "application/manifest+json" - ], - "configuration": "./language-configuration.json" - }, - { - "id": "jsonc", - "aliases": [ - "JSON with Comments" - ], - "extensions": [ - ".jsonc", - ".eslintrc", - ".eslintrc.json", - ".jsfmtrc", - ".jshintrc", - ".swcrc", - ".hintrc", - ".babelrc" - ], - "filenames": [ - ".ember-cli" - ], - "configuration": "./language-configuration.json" - } - ], - "grammars": [ - { - "language": "json", - "scopeName": "source.json", - "path": "./syntaxes/JSON.tmLanguage.json" - }, - { - "language": "jsonc", - "scopeName": "source.json.comments", - "path": "./syntaxes/JSONC.tmLanguage.json" - } - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/julia/cgmanifest.json b/lib/vscode/extensions/julia/cgmanifest.json deleted file mode 100644 index 3b2f492cc6c3..000000000000 --- a/lib/vscode/extensions/julia/cgmanifest.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "registrations": [ - { - "component": { - "type": "git", - "git": { - "name": " JuliaEditorSupport/atom-language-julia", - "repositoryUrl": "https://github.com/JuliaEditorSupport/atom-language-julia", - "commitHash": "008e02c5ec9440fa9f0ea8a891712c7238f24706" - } - }, - "license": "MIT", - "version": "0.21.0" - } - ], - "version": 1 -} \ No newline at end of file diff --git a/lib/vscode/extensions/make/package.json b/lib/vscode/extensions/make/package.json deleted file mode 100644 index ef8209df01c8..000000000000 --- a/lib/vscode/extensions/make/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "make", - "displayName": "%displayName%", - "description": "%description%", - "version": "1.0.0", - "publisher": "vscode", - "license": "MIT", - "engines": { - "vscode": "*" - }, - "scripts": { - "update-grammar": "node ../node_modules/vscode-grammar-updater/bin fadeevab/make.tmbundle Syntaxes/Makefile.plist ./syntaxes/make.tmLanguage.json" - }, - "contributes": { - "languages": [ - { - "id": "makefile", - "aliases": [ - "Makefile", - "makefile" - ], - "extensions": [ - ".mk" - ], - "filenames": [ - "Makefile", - "makefile", - "GNUmakefile", - "OCamlMakefile" - ], - "firstLine": "^#!\\s*/usr/bin/make", - "configuration": "./language-configuration.json" - } - ], - "grammars": [ - { - "language": "makefile", - "scopeName": "source.makefile", - "path": "./syntaxes/make.tmLanguage.json", - "tokenTypes": { - "string.interpolated": "other" - } - } - ], - "configurationDefaults": { - "[makefile]": { - "editor.insertSpaces": false - } - } - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/markdown-basics/cgmanifest.json b/lib/vscode/extensions/markdown-basics/cgmanifest.json deleted file mode 100644 index 92288d403b93..000000000000 --- a/lib/vscode/extensions/markdown-basics/cgmanifest.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "registrations": [ - { - "component": { - "type": "git", - "git": { - "name": "textmate/markdown.tmbundle", - "repositoryUrl": "https://github.com/textmate/markdown.tmbundle", - "commitHash": "11cf764606cb2cde54badb5d0e5a0758a8871c4b" - } - }, - "licenseDetail": [ - "Copyright (c) markdown.tmbundle authors", - "", - "If not otherwise specified (see below), files in this repository fall under the following license:", - "", - "Permission to copy, use, modify, sell and distribute this", - "software is granted. This software is provided \"as is\" without", - "express or implied warranty, and with no claim as to its", - "suitability for any purpose.", - "", - "An exception is made for files in readable text which contain their own license information,", - "or files where an accompanying file exists (in the same directory) with a \"-license\" suffix added", - "to the base-name name of the original file, and an extension of txt, html, or similar. For example", - "\"tidy\" is accompanied by \"tidy-license.txt\"." - ], - "license": "TextMate Bundle License", - "version": "0.0.0" - }, - { - "component": { - "type": "git", - "git": { - "name": "microsoft/vscode-markdown-tm-grammar", - "repositoryUrl": "https://github.com/microsoft/vscode-markdown-tm-grammar", - "commitHash": "7019b191c3ee38b6c345f3a2a843f223eb92ca1e" - } - }, - "license": "MIT", - "version": "1.0.0" - } - ], - "version": 1 -} \ No newline at end of file diff --git a/lib/vscode/extensions/markdown-language-features/notebook/index.ts b/lib/vscode/extensions/markdown-language-features/notebook/index.ts deleted file mode 100644 index 1d7c65233447..000000000000 --- a/lib/vscode/extensions/markdown-language-features/notebook/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const MarkdownIt = require('markdown-it'); - -export async function activate(ctx: { - dependencies: ReadonlyArray<{ entrypoint: string }> -}) { - let markdownIt = new MarkdownIt({ - html: true - }); - - // Should we load the deps before this point? - // Also could we await inside `renderMarkup`? - await Promise.all(ctx.dependencies.map(async (dep) => { - try { - const api = await import(dep.entrypoint); - if (api?.extendMarkdownIt) { - markdownIt = api.extendMarkdownIt(markdownIt); - } - } catch (e) { - console.error('Could not load markdown entryPoint', e); - } - })); - - return { - renderMarkup: (context: { element: HTMLElement, content: string }) => { - const rendered = markdownIt.render(context.content); - context.element.innerHTML = rendered; - - // Insert styles into markdown preview shadow dom so that they are applied - for (const markdownStyleNode of document.getElementsByClassName('markdown-style')) { - context.element.appendChild(markdownStyleNode.cloneNode(true)); - } - } - }; -} diff --git a/lib/vscode/extensions/markdown-language-features/package.json b/lib/vscode/extensions/markdown-language-features/package.json deleted file mode 100644 index 19d1354c2068..000000000000 --- a/lib/vscode/extensions/markdown-language-features/package.json +++ /dev/null @@ -1,371 +0,0 @@ -{ - "name": "markdown-language-features", - "displayName": "%displayName%", - "description": "%description%", - "version": "1.0.0", - "icon": "icon.png", - "publisher": "vscode", - "enableProposedApi": true, - "license": "MIT", - "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", - "engines": { - "vscode": "^1.20.0" - }, - "main": "./out/extension", - "browser": "./dist/browser/extension", - "categories": [ - "Programming Languages" - ], - "activationEvents": [ - "onLanguage:markdown", - "onCommand:markdown.preview.toggleLock", - "onCommand:markdown.preview.refresh", - "onCommand:markdown.showPreview", - "onCommand:markdown.showPreviewToSide", - "onCommand:markdown.showLockedPreviewToSide", - "onCommand:markdown.showSource", - "onCommand:markdown.showPreviewSecuritySelector", - "onCommand:markdown.api.render", - "onWebviewPanel:markdown.preview", - "onCustomEditor:vscode.markdown.preview.editor" - ], - "capabilities": { - "virtualWorkspaces": true, - "untrustedWorkspaces": { - "supported": "limited", - "description": "%workspaceTrust%", - "restrictedConfigurations": [ - "markdown.styles" - ] - } - }, - "contributes": { - "notebookMarkupRenderers": [ - { - "id": "markdownItRenderer", - "displayName": "Markdown it renderer", - "entrypoint": "./notebook-out/index.js", - "mimeTypes": [ - "text/markdown" - ] - } - ], - "commands": [ - { - "command": "markdown.showPreview", - "title": "%markdown.preview.title%", - "category": "Markdown", - "icon": { - "light": "./media/preview-light.svg", - "dark": "./media/preview-dark.svg" - } - }, - { - "command": "markdown.showPreviewToSide", - "title": "%markdown.previewSide.title%", - "category": "Markdown", - "icon": "$(open-preview)" - }, - { - "command": "markdown.showLockedPreviewToSide", - "title": "%markdown.showLockedPreviewToSide.title%", - "category": "Markdown", - "icon": "$(open-preview)" - }, - { - "command": "markdown.showSource", - "title": "%markdown.showSource.title%", - "category": "Markdown", - "icon": "$(go-to-file)" - }, - { - "command": "markdown.showPreviewSecuritySelector", - "title": "%markdown.showPreviewSecuritySelector.title%", - "category": "Markdown" - }, - { - "command": "markdown.preview.refresh", - "title": "%markdown.preview.refresh.title%", - "category": "Markdown" - }, - { - "command": "markdown.preview.toggleLock", - "title": "%markdown.preview.toggleLock.title%", - "category": "Markdown" - } - ], - "menus": { - "editor/title": [ - { - "command": "markdown.showPreviewToSide", - "when": "editorLangId == markdown && !notebookEditorFocused", - "alt": "markdown.showPreview", - "group": "navigation" - }, - { - "command": "markdown.showSource", - "when": "markdownPreviewFocus", - "group": "navigation" - }, - { - "command": "markdown.preview.refresh", - "when": "markdownPreviewFocus", - "group": "1_markdown" - }, - { - "command": "markdown.preview.toggleLock", - "when": "markdownPreviewFocus", - "group": "1_markdown" - }, - { - "command": "markdown.showPreviewSecuritySelector", - "when": "markdownPreviewFocus", - "group": "1_markdown" - } - ], - "explorer/context": [ - { - "command": "markdown.showPreview", - "when": "resourceLangId == markdown", - "group": "navigation" - } - ], - "editor/title/context": [ - { - "command": "markdown.showPreview", - "when": "resourceLangId == markdown", - "group": "1_open" - } - ], - "commandPalette": [ - { - "command": "markdown.showPreview", - "when": "editorLangId == markdown && !notebookEditorFocused", - "group": "navigation" - }, - { - "command": "markdown.showPreviewToSide", - "when": "editorLangId == markdown && !notebookEditorFocused", - "group": "navigation" - }, - { - "command": "markdown.showLockedPreviewToSide", - "when": "editorLangId == markdown && !notebookEditorFocused", - "group": "navigation" - }, - { - "command": "markdown.showSource", - "when": "markdownPreviewFocus", - "group": "navigation" - }, - { - "command": "markdown.showPreviewSecuritySelector", - "when": "editorLangId == markdown && !notebookEditorFocused" - }, - { - "command": "markdown.showPreviewSecuritySelector", - "when": "markdownPreviewFocus" - }, - { - "command": "markdown.preview.toggleLock", - "when": "markdownPreviewFocus" - }, - { - "command": "markdown.preview.refresh", - "when": "editorLangId == markdown && !notebookEditorFocused" - }, - { - "command": "markdown.preview.refresh", - "when": "markdownPreviewFocus" - } - ] - }, - "keybindings": [ - { - "command": "markdown.showPreview", - "key": "shift+ctrl+v", - "mac": "shift+cmd+v", - "when": "editorLangId == markdown && !notebookEditorFocused" - }, - { - "command": "markdown.showPreviewToSide", - "key": "ctrl+k v", - "mac": "cmd+k v", - "when": "editorLangId == markdown && !notebookEditorFocused" - } - ], - "configuration": { - "type": "object", - "title": "Markdown", - "order": 20, - "properties": { - "markdown.styles": { - "type": "array", - "items": { - "type": "string" - }, - "default": [], - "description": "%markdown.styles.dec%", - "scope": "resource" - }, - "markdown.preview.breaks": { - "type": "boolean", - "default": false, - "description": "%markdown.preview.breaks.desc%", - "scope": "resource" - }, - "markdown.preview.linkify": { - "type": "boolean", - "default": true, - "description": "%markdown.preview.linkify%", - "scope": "resource" - }, - "markdown.preview.typographer": { - "type": "boolean", - "default": false, - "description": "%markdown.preview.typographer%", - "scope": "resource" - }, - "markdown.preview.fontFamily": { - "type": "string", - "default": "-apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif", - "description": "%markdown.preview.fontFamily.desc%", - "scope": "resource" - }, - "markdown.preview.fontSize": { - "type": "number", - "default": 14, - "description": "%markdown.preview.fontSize.desc%", - "scope": "resource" - }, - "markdown.preview.lineHeight": { - "type": "number", - "default": 1.6, - "description": "%markdown.preview.lineHeight.desc%", - "scope": "resource" - }, - "markdown.preview.scrollPreviewWithEditor": { - "type": "boolean", - "default": true, - "description": "%markdown.preview.scrollPreviewWithEditor.desc%", - "scope": "resource" - }, - "markdown.preview.markEditorSelection": { - "type": "boolean", - "default": true, - "description": "%markdown.preview.markEditorSelection.desc%", - "scope": "resource" - }, - "markdown.preview.scrollEditorWithPreview": { - "type": "boolean", - "default": true, - "description": "%markdown.preview.scrollEditorWithPreview.desc%", - "scope": "resource" - }, - "markdown.preview.doubleClickToSwitchToEditor": { - "type": "boolean", - "default": true, - "description": "%markdown.preview.doubleClickToSwitchToEditor.desc%", - "scope": "resource" - }, - "markdown.preview.openMarkdownLinks": { - "type": "string", - "default": "inPreview", - "description": "%configuration.markdown.preview.openMarkdownLinks.description%", - "scope": "resource", - "enum": [ - "inPreview", - "inEditor" - ], - "enumDescriptions": [ - "%configuration.markdown.preview.openMarkdownLinks.inPreview%", - "%configuration.markdown.preview.openMarkdownLinks.inEditor%" - ] - }, - "markdown.links.openLocation": { - "type": "string", - "default": "currentGroup", - "description": "%configuration.markdown.links.openLocation.description%", - "scope": "resource", - "enum": [ - "currentGroup", - "beside" - ], - "enumDescriptions": [ - "%configuration.markdown.links.openLocation.currentGroup%", - "%configuration.markdown.links.openLocation.beside%" - ] - }, - "markdown.trace": { - "type": "string", - "enum": [ - "off", - "verbose" - ], - "default": "off", - "description": "%markdown.trace.desc%", - "scope": "window" - } - } - }, - "configurationDefaults": { - "[markdown]": { - "editor.wordWrap": "on", - "editor.quickSuggestions": false - } - }, - "jsonValidation": [ - { - "fileMatch": "package.json", - "url": "./schemas/package.schema.json" - } - ], - "markdown.previewStyles": [ - "./media/markdown.css", - "./media/highlight.css" - ], - "markdown.previewScripts": [ - "./media/index.js" - ], - "customEditors": [ - { - "viewType": "vscode.markdown.preview.editor", - "displayName": "Markdown Preview (Experimental)", - "priority": "option", - "selector": [ - { - "filenamePattern": "*.md" - } - ] - } - ] - }, - "scripts": { - "compile": "gulp compile-extension:markdown-language-features && npm run build-preview && npm run build-notebook", - "watch": "npm run build-preview && gulp watch-extension:markdown-language-features", - "vscode:prepublish": "npm run build-ext && npm run build-preview", - "build-ext": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:markdown-language-features ./tsconfig.json", - "build-preview": "npx webpack-cli --mode production", - "build-notebook": "node ./esbuild", - "compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none", - "watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose" - }, - "dependencies": { - "highlight.js": "^10.4.1", - "markdown-it": "^12.0.3", - "markdown-it-front-matter": "^0.2.1", - "vscode-extension-telemetry": "0.1.7", - "vscode-nls": "^4.0.0" - }, - "devDependencies": { - "@types/highlight.js": "10.1.0", - "@types/lodash.throttle": "^4.1.3", - "@types/markdown-it": "0.0.2", - "@types/node": "^12.19.9", - "lodash.throttle": "^4.1.1" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/markdown-language-features/preview-src/index.ts b/lib/vscode/extensions/markdown-language-features/preview-src/index.ts deleted file mode 100644 index 4d57d5f3a372..000000000000 --- a/lib/vscode/extensions/markdown-language-features/preview-src/index.ts +++ /dev/null @@ -1,226 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { ActiveLineMarker } from './activeLineMarker'; -import { onceDocumentLoaded } from './events'; -import { createPosterForVsCode } from './messaging'; -import { getEditorLineNumberForPageOffset, scrollToRevealSourceLine, getLineElementForFragment } from './scroll-sync'; -import { getSettings, getData } from './settings'; -import throttle = require('lodash.throttle'); - -declare let acquireVsCodeApi: any; - -let scrollDisabledCount = 0; -const marker = new ActiveLineMarker(); -const settings = getSettings(); - -const vscode = acquireVsCodeApi(); - -const originalState = vscode.getState(); - -const state = { - ...(typeof originalState === 'object' ? originalState : {}), - ...getData('data-state') -}; - -// Make sure to sync VS Code state here -vscode.setState(state); - -const messaging = createPosterForVsCode(vscode); - -window.cspAlerter.setPoster(messaging); -window.styleLoadingMonitor.setPoster(messaging); - -window.onload = () => { - updateImageSizes(); -}; - - -function doAfterImagesLoaded(cb: () => void) { - const imgElements = document.getElementsByTagName('img'); - if (imgElements.length > 0) { - const ps = Array.from(imgElements, e => { - if (e.complete) { - return Promise.resolve(); - } else { - return new Promise((resolve) => { - e.addEventListener('load', () => resolve()); - e.addEventListener('error', () => resolve()); - }); - } - }); - Promise.all(ps).then(() => setImmediate(cb)); - } else { - setImmediate(cb); - } -} - -onceDocumentLoaded(() => { - const scrollProgress = state.scrollProgress; - - if (typeof scrollProgress === 'number' && !settings.fragment) { - doAfterImagesLoaded(() => { - scrollDisabledCount += 1; - window.scrollTo(0, scrollProgress * document.body.clientHeight); - }); - return; - } - - if (settings.scrollPreviewWithEditor) { - doAfterImagesLoaded(() => { - // Try to scroll to fragment if available - if (settings.fragment) { - state.fragment = undefined; - vscode.setState(state); - - const element = getLineElementForFragment(settings.fragment); - if (element) { - scrollDisabledCount += 1; - scrollToRevealSourceLine(element.line); - } - } else { - if (!isNaN(settings.line!)) { - scrollDisabledCount += 1; - scrollToRevealSourceLine(settings.line!); - } - } - }); - } -}); - -const onUpdateView = (() => { - const doScroll = throttle((line: number) => { - scrollDisabledCount += 1; - doAfterImagesLoaded(() => scrollToRevealSourceLine(line)); - }, 50); - - return (line: number) => { - if (!isNaN(line)) { - state.line = line; - - doScroll(line); - } - }; -})(); - -let updateImageSizes = throttle(() => { - const imageInfo: { id: string, height: number, width: number; }[] = []; - let images = document.getElementsByTagName('img'); - if (images) { - let i; - for (i = 0; i < images.length; i++) { - const img = images[i]; - - if (img.classList.contains('loading')) { - img.classList.remove('loading'); - } - - imageInfo.push({ - id: img.id, - height: img.height, - width: img.width - }); - } - - messaging.postMessage('cacheImageSizes', imageInfo); - } -}, 50); - -window.addEventListener('resize', () => { - scrollDisabledCount += 1; - updateScrollProgress(); - updateImageSizes(); -}, true); - -window.addEventListener('message', event => { - if (event.data.source !== settings.source) { - return; - } - - switch (event.data.type) { - case 'onDidChangeTextEditorSelection': - marker.onDidChangeTextEditorSelection(event.data.line); - break; - - case 'updateView': - onUpdateView(event.data.line); - break; - } -}, false); - -document.addEventListener('dblclick', event => { - if (!settings.doubleClickToSwitchToEditor) { - return; - } - - // Ignore clicks on links - for (let node = event.target as HTMLElement; node; node = node.parentNode as HTMLElement) { - if (node.tagName === 'A') { - return; - } - } - - const offset = event.pageY; - const line = getEditorLineNumberForPageOffset(offset); - if (typeof line === 'number' && !isNaN(line)) { - messaging.postMessage('didClick', { line: Math.floor(line) }); - } -}); - -const passThroughLinkSchemes = ['http:', 'https:', 'mailto:', 'vscode:', 'vscode-insiders:']; - -document.addEventListener('click', event => { - if (!event) { - return; - } - - let node: any = event.target; - while (node) { - if (node.tagName && node.tagName === 'A' && node.href) { - if (node.getAttribute('href').startsWith('#')) { - return; - } - - let hrefText = node.getAttribute('data-href'); - if (!hrefText) { - // Pass through known schemes - if (passThroughLinkSchemes.some(scheme => node.href.startsWith(scheme))) { - return; - } - hrefText = node.getAttribute('href'); - } - - // If original link doesn't look like a url, delegate back to VS Code to resolve - if (!/^[a-z\-]+:/i.test(hrefText)) { - messaging.postMessage('openLink', { href: hrefText }); - event.preventDefault(); - event.stopPropagation(); - return; - } - - return; - } - node = node.parentNode; - } -}, true); - -window.addEventListener('scroll', throttle(() => { - updateScrollProgress(); - - if (scrollDisabledCount > 0) { - scrollDisabledCount -= 1; - } else { - const line = getEditorLineNumberForPageOffset(window.scrollY); - if (typeof line === 'number' && !isNaN(line)) { - messaging.postMessage('revealLine', { line }); - } - } -}, 50)); - -function updateScrollProgress() { - state.scrollProgress = window.scrollY / document.body.clientHeight; - vscode.setState(state); -} - diff --git a/lib/vscode/extensions/markdown-language-features/src/markdownEngine.ts b/lib/vscode/extensions/markdown-language-features/src/markdownEngine.ts deleted file mode 100644 index 3d84a24ad305..000000000000 --- a/lib/vscode/extensions/markdown-language-features/src/markdownEngine.ts +++ /dev/null @@ -1,386 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { MarkdownIt, Token } from 'markdown-it'; -import * as path from 'path'; -import * as vscode from 'vscode'; -import { MarkdownContributionProvider as MarkdownContributionProvider } from './markdownExtensions'; -import { Slugifier } from './slugify'; -import { SkinnyTextDocument } from './tableOfContentsProvider'; -import { hash } from './util/hash'; -import { isOfScheme, MarkdownFileExtensions, Schemes } from './util/links'; - -const UNICODE_NEWLINE_REGEX = /\u2028|\u2029/g; - -interface MarkdownItConfig { - readonly breaks: boolean; - readonly linkify: boolean; - readonly typographer: boolean; -} - -class TokenCache { - private cachedDocument?: { - readonly uri: vscode.Uri; - readonly version: number; - readonly config: MarkdownItConfig; - }; - private tokens?: Token[]; - - public tryGetCached(document: SkinnyTextDocument, config: MarkdownItConfig): Token[] | undefined { - if (this.cachedDocument - && this.cachedDocument.uri.toString() === document.uri.toString() - && this.cachedDocument.version === document.version - && this.cachedDocument.config.breaks === config.breaks - && this.cachedDocument.config.linkify === config.linkify - ) { - return this.tokens; - } - return undefined; - } - - public update(document: SkinnyTextDocument, config: MarkdownItConfig, tokens: Token[]) { - this.cachedDocument = { - uri: document.uri, - version: document.version, - config, - }; - this.tokens = tokens; - } - - public clean(): void { - this.cachedDocument = undefined; - this.tokens = undefined; - } -} - -export interface RenderOutput { - html: string; - containingImages: { src: string }[]; -} - -interface RenderEnv { - containingImages: { src: string }[]; -} - -export class MarkdownEngine { - private md?: Promise; - - private currentDocument?: vscode.Uri; - private _slugCount = new Map(); - private _tokenCache = new TokenCache(); - - public constructor( - private readonly contributionProvider: MarkdownContributionProvider, - private readonly slugifier: Slugifier, - ) { - contributionProvider.onContributionsChanged(() => { - // Markdown plugin contributions may have changed - this.md = undefined; - }); - } - - private async getEngine(config: MarkdownItConfig): Promise { - if (!this.md) { - this.md = import('markdown-it').then(async markdownIt => { - let md: MarkdownIt = markdownIt(await getMarkdownOptions(() => md)); - - for (const plugin of this.contributionProvider.contributions.markdownItPlugins.values()) { - try { - md = (await plugin)(md); - } catch { - // noop - } - } - - const frontMatterPlugin = require('markdown-it-front-matter'); - // Extract rules from front matter plugin and apply at a lower precedence - let fontMatterRule: any; - frontMatterPlugin({ - block: { - ruler: { - before: (_id: any, _id2: any, rule: any) => { fontMatterRule = rule; } - } - } - }, () => { /* noop */ }); - - md.block.ruler.before('fence', 'front_matter', fontMatterRule, { - alt: ['paragraph', 'reference', 'blockquote', 'list'] - }); - - for (const renderName of ['paragraph_open', 'heading_open', 'image', 'code_block', 'fence', 'blockquote_open', 'list_item_open']) { - this.addLineNumberRenderer(md, renderName); - } - - this.addImageStabilizer(md); - this.addFencedRenderer(md); - this.addLinkNormalizer(md); - this.addLinkValidator(md); - this.addNamedHeaders(md); - this.addLinkRenderer(md); - return md; - }); - } - - const md = await this.md!; - md.set(config); - return md; - } - - private tokenizeDocument( - document: SkinnyTextDocument, - config: MarkdownItConfig, - engine: MarkdownIt - ): Token[] { - const cached = this._tokenCache.tryGetCached(document, config); - if (cached) { - return cached; - } - - this.currentDocument = document.uri; - - const tokens = this.tokenizeString(document.getText(), engine); - this._tokenCache.update(document, config, tokens); - return tokens; - } - - private tokenizeString(text: string, engine: MarkdownIt) { - this._slugCount = new Map(); - - return engine.parse(text.replace(UNICODE_NEWLINE_REGEX, ''), {}); - } - - public async render(input: SkinnyTextDocument | string): Promise { - const config = this.getConfig(typeof input === 'string' ? undefined : input.uri); - const engine = await this.getEngine(config); - - const tokens = typeof input === 'string' - ? this.tokenizeString(input, engine) - : this.tokenizeDocument(input, config, engine); - - const env: RenderEnv = { - containingImages: [] - }; - - const html = engine.renderer.render(tokens, { - ...(engine as any).options, - ...config - }, env); - - return { - html, - containingImages: env.containingImages - }; - } - - public async parse(document: SkinnyTextDocument): Promise { - const config = this.getConfig(document.uri); - const engine = await this.getEngine(config); - return this.tokenizeDocument(document, config, engine); - } - - public cleanCache(): void { - this._tokenCache.clean(); - } - - private getConfig(resource?: vscode.Uri): MarkdownItConfig { - const config = vscode.workspace.getConfiguration('markdown', resource); - return { - breaks: config.get('preview.breaks', false), - linkify: config.get('preview.linkify', true), - typographer: config.get('preview.typographer', false) - }; - } - - private addLineNumberRenderer(md: any, ruleName: string): void { - const original = md.renderer.rules[ruleName]; - md.renderer.rules[ruleName] = (tokens: any, idx: number, options: any, env: any, self: any) => { - const token = tokens[idx]; - if (token.map && token.map.length) { - token.attrSet('data-line', token.map[0]); - token.attrJoin('class', 'code-line'); - } - - if (original) { - return original(tokens, idx, options, env, self); - } else { - return self.renderToken(tokens, idx, options, env, self); - } - }; - } - - private addImageStabilizer(md: any): void { - const original = md.renderer.rules.image; - md.renderer.rules.image = (tokens: any, idx: number, options: any, env: RenderEnv, self: any) => { - const token = tokens[idx]; - token.attrJoin('class', 'loading'); - - const src = token.attrGet('src'); - if (src) { - env.containingImages?.push({ src }); - const imgHash = hash(src); - token.attrSet('id', `image-hash-${imgHash}`); - } - - if (original) { - return original(tokens, idx, options, env, self); - } else { - return self.renderToken(tokens, idx, options, env, self); - } - }; - } - - private addFencedRenderer(md: any): void { - const original = md.renderer.rules['fenced']; - md.renderer.rules['fenced'] = (tokens: any, idx: number, options: any, env: any, self: any) => { - const token = tokens[idx]; - if (token.map && token.map.length) { - token.attrJoin('class', 'hljs'); - } - - return original(tokens, idx, options, env, self); - }; - } - - private addLinkNormalizer(md: any): void { - const normalizeLink = md.normalizeLink; - md.normalizeLink = (link: string) => { - try { - // Normalize VS Code schemes to target the current version - if (isOfScheme(Schemes.vscode, link) || isOfScheme(Schemes['vscode-insiders'], link)) { - return normalizeLink(vscode.Uri.parse(link).with({ scheme: vscode.env.uriScheme }).toString()); - } - - // Support file:// links - if (isOfScheme(Schemes.file, link)) { - // Ensure link is relative by prepending `/` so that it uses the element URI - // when resolving the absolute URL - return normalizeLink('/' + link.replace(/^file:/, 'file')); - } - - // If original link doesn't look like a url with a scheme, assume it must be a link to a file in workspace - if (!/^[a-z\-]+:/i.test(link)) { - // Use a fake scheme for parsing - let uri = vscode.Uri.parse('markdown-link:' + link); - - // Relative paths should be resolved correctly inside the preview but we need to - // handle absolute paths specially (for images) to resolve them relative to the workspace root - if (uri.path[0] === '/') { - const root = vscode.workspace.getWorkspaceFolder(this.currentDocument!); - if (root) { - const fileUri = vscode.Uri.joinPath(root.uri, uri.fsPath).with({ - fragment: uri.fragment, - query: uri.query, - }); - - // Ensure fileUri is relative by prepending `/` so that it uses the element URI - // when resolving the absolute URL - uri = vscode.Uri.parse('markdown-link:' + '/' + fileUri.toString(true).replace(/^\S+?:/, fileUri.scheme)); - } - } - - const extname = path.extname(uri.fsPath); - - if (uri.fragment && (extname === '' || MarkdownFileExtensions.includes(extname))) { - uri = uri.with({ - fragment: this.slugifier.fromHeading(uri.fragment).value - }); - } - return normalizeLink(uri.toString(true).replace(/^markdown-link:/, '')); - } - } catch (e) { - // noop - } - return normalizeLink(link); - }; - } - - private addLinkValidator(md: any): void { - const validateLink = md.validateLink; - md.validateLink = (link: string) => { - return validateLink(link) - || isOfScheme(Schemes.vscode, link) - || isOfScheme(Schemes['vscode-insiders'], link) - || /^data:image\/.*?;/.test(link); - }; - } - - private addNamedHeaders(md: any): void { - const original = md.renderer.rules.heading_open; - md.renderer.rules.heading_open = (tokens: any, idx: number, options: any, env: any, self: any) => { - const title = tokens[idx + 1].children.reduce((acc: string, t: any) => acc + t.content, ''); - let slug = this.slugifier.fromHeading(title); - - if (this._slugCount.has(slug.value)) { - const count = this._slugCount.get(slug.value)!; - this._slugCount.set(slug.value, count + 1); - slug = this.slugifier.fromHeading(slug.value + '-' + (count + 1)); - } else { - this._slugCount.set(slug.value, 0); - } - - tokens[idx].attrs = tokens[idx].attrs || []; - tokens[idx].attrs.push(['id', slug.value]); - - if (original) { - return original(tokens, idx, options, env, self); - } else { - return self.renderToken(tokens, idx, options, env, self); - } - }; - } - - private addLinkRenderer(md: any): void { - const old_render = md.renderer.rules.link_open || ((tokens: any, idx: number, options: any, _env: any, self: any) => { - return self.renderToken(tokens, idx, options); - }); - - md.renderer.rules.link_open = (tokens: any, idx: number, options: any, env: any, self: any) => { - const token = tokens[idx]; - const hrefIndex = token.attrIndex('href'); - if (hrefIndex >= 0) { - const href = token.attrs[hrefIndex][1]; - token.attrPush(['data-href', href]); - } - return old_render(tokens, idx, options, env, self); - }; - } -} - -async function getMarkdownOptions(md: () => MarkdownIt) { - const hljs = await import('highlight.js'); - return { - html: true, - highlight: (str: string, lang?: string) => { - lang = normalizeHighlightLang(lang); - if (lang && hljs.getLanguage(lang)) { - try { - return `
    ${hljs.highlight(lang, str, true).value}
    `; - } - catch (error) { } - } - return `
    ${md().utils.escapeHtml(str)}
    `; - } - }; -} - -function normalizeHighlightLang(lang: string | undefined) { - switch (lang && lang.toLowerCase()) { - case 'tsx': - case 'typescriptreact': - // Workaround for highlight not supporting tsx: https://github.com/isagalaev/highlight.js/issues/1155 - return 'jsx'; - - case 'json5': - case 'jsonc': - return 'json'; - - case 'c#': - case 'csharp': - return 'cs'; - - default: - return lang; - } -} diff --git a/lib/vscode/extensions/markdown-language-features/src/util/links.ts b/lib/vscode/extensions/markdown-language-features/src/util/links.ts deleted file mode 100644 index 3545d03a54d4..000000000000 --- a/lib/vscode/extensions/markdown-language-features/src/util/links.ts +++ /dev/null @@ -1,47 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; - -export const Schemes = { - http: 'http:', - https: 'https:', - file: 'file:', - untitled: 'untitled', - mailto: 'mailto:', - data: 'data:', - vscode: 'vscode:', - 'vscode-insiders': 'vscode-insiders:', - 'vscode-resource': 'vscode-resource:', -}; - -const knownSchemes = [ - ...Object.values(Schemes), - `${vscode.env.uriScheme}:` -]; - -export function getUriForLinkWithKnownExternalScheme(link: string): vscode.Uri | undefined { - if (knownSchemes.some(knownScheme => isOfScheme(knownScheme, link))) { - return vscode.Uri.parse(link); - } - - return undefined; -} - -export function isOfScheme(scheme: string, link: string): boolean { - return link.toLowerCase().startsWith(scheme); -} - -export const MarkdownFileExtensions: readonly string[] = [ - '.md', - '.mkd', - '.mdwn', - '.mdown', - '.markdown', - '.markdn', - '.mdtxt', - '.mdtext', - '.workbook', -]; diff --git a/lib/vscode/extensions/markdown-language-features/src/util/resources.ts b/lib/vscode/extensions/markdown-language-features/src/util/resources.ts deleted file mode 100644 index 063c410b39ee..000000000000 --- a/lib/vscode/extensions/markdown-language-features/src/util/resources.ts +++ /dev/null @@ -1,33 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; - -export interface WebviewResourceProvider { - asWebviewUri(resource: vscode.Uri): vscode.Uri; - - readonly cspSource: string; -} - -export function normalizeResource( - base: vscode.Uri, - resource: vscode.Uri -): vscode.Uri { - // If we have a windows path and are loading a workspace with an authority, - // make sure we use a unc path with an explicit localhost authority. - // - // Otherwise, the `` rule will insert the authority into the resolved resource - // URI incorrectly. - if (base.authority && !resource.authority) { - const driveMatch = resource.path.match(/^\/(\w):\//); - if (driveMatch) { - return vscode.Uri.file(`\\\\localhost\\${driveMatch[1]}$\\${resource.fsPath.replace(/^\w:\\/, '')}`).with({ - fragment: resource.fragment, - query: resource.query - }); - } - } - return resource; -} diff --git a/lib/vscode/extensions/markdown-language-features/src/util/topmostLineMonitor.ts b/lib/vscode/extensions/markdown-language-features/src/util/topmostLineMonitor.ts deleted file mode 100644 index 57395fbc691c..000000000000 --- a/lib/vscode/extensions/markdown-language-features/src/util/topmostLineMonitor.ts +++ /dev/null @@ -1,70 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; -import { Disposable } from '../util/dispose'; -import { isMarkdownFile } from './file'; - -export class TopmostLineMonitor extends Disposable { - - private readonly pendingUpdates = new Map(); - private readonly throttle = 50; - - constructor() { - super(); - this._register(vscode.window.onDidChangeTextEditorVisibleRanges(event => { - if (isMarkdownFile(event.textEditor.document)) { - const line = getVisibleLine(event.textEditor); - if (typeof line === 'number') { - this.updateLine(event.textEditor.document.uri, line); - } - } - })); - } - - private readonly _onChanged = this._register(new vscode.EventEmitter<{ readonly resource: vscode.Uri, readonly line: number }>()); - public readonly onDidChanged = this._onChanged.event; - - private updateLine( - resource: vscode.Uri, - line: number - ) { - const key = resource.toString(); - if (!this.pendingUpdates.has(key)) { - // schedule update - setTimeout(() => { - if (this.pendingUpdates.has(key)) { - this._onChanged.fire({ - resource, - line: this.pendingUpdates.get(key) as number - }); - this.pendingUpdates.delete(key); - } - }, this.throttle); - } - - this.pendingUpdates.set(key, line); - } -} - -/** - * Get the top-most visible range of `editor`. - * - * Returns a fractional line number based the visible character within the line. - * Floor to get real line number - */ -export function getVisibleLine( - editor: vscode.TextEditor -): number | undefined { - if (!editor.visibleRanges.length) { - return undefined; - } - - const firstVisiblePosition = editor.visibleRanges[0].start; - const lineNumber = firstVisiblePosition.line; - const line = editor.document.lineAt(lineNumber); - const progress = firstVisiblePosition.character / (line.text.length + 2); - return lineNumber + progress; -} diff --git a/lib/vscode/extensions/markdown-language-features/yarn.lock b/lib/vscode/extensions/markdown-language-features/yarn.lock deleted file mode 100644 index 216abe3066b9..000000000000 --- a/lib/vscode/extensions/markdown-language-features/yarn.lock +++ /dev/null @@ -1,183 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/highlight.js@10.1.0": - version "10.1.0" - resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-10.1.0.tgz#89bb0c202997d7a90a07bd2ec1f7d00c56bb90b4" - integrity sha512-77hF2dGBsOgnvZll1vymYiNUtqJ8cJfXPD6GG/2M0aLRc29PkvB7Au6sIDjIEFcSICBhCh2+Pyq6WSRS7LUm6A== - dependencies: - highlight.js "*" - -"@types/lodash.throttle@^4.1.3": - version "4.1.3" - resolved "https://registry.yarnpkg.com/@types/lodash.throttle/-/lodash.throttle-4.1.3.tgz#8bfa4fec519d09ebce56c815bcbff3e55c604db9" - integrity sha512-FUm7uMuYRX7dzqmgX02bxdBwC75owUxGA4dDKtFePDLJ6N1ofXxkRX3NhJV8wOrNs/wCjaY6sDVJrD1lbyERoQ== - dependencies: - "@types/lodash" "*" - -"@types/lodash@*": - version "4.14.104" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" - integrity sha512-ufQcVg4daO8xQ5kopxRHanqFdL4AI7ondQkV+2f+7mz3gvp0LkBx2zBRC6hfs3T87mzQFmf5Fck7Fi145Ul6NQ== - -"@types/markdown-it@0.0.2": - version "0.0.2" - resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.2.tgz#5d9ad19e6e6508cdd2f2596df86fd0aade598660" - integrity sha1-XZrRnm5lCM3S8llt+G/Qqt5ZhmA= - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -applicationinsights@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" - integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== - dependencies: - cls-hooked "^4.2.2" - continuation-local-storage "^3.2.1" - diagnostic-channel "0.2.0" - diagnostic-channel-publishers "^0.3.3" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -async-hook-jl@^1.7.6: - version "1.7.6" - resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" - integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== - dependencies: - stack-chain "^1.3.7" - -async-listener@^0.6.0: - version "0.6.10" - resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" - integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== - dependencies: - semver "^5.3.0" - shimmer "^1.1.0" - -cls-hooked@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" - integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== - dependencies: - async-hook-jl "^1.7.6" - emitter-listener "^1.0.1" - semver "^5.4.1" - -continuation-local-storage@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" - integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== - dependencies: - async-listener "^0.6.0" - emitter-listener "^1.1.1" - -diagnostic-channel-publishers@^0.3.3: - version "0.3.5" - resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" - integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== - -diagnostic-channel@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" - integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= - dependencies: - semver "^5.3.0" - -emitter-listener@^1.0.1, emitter-listener@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" - integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== - dependencies: - shimmer "^1.2.0" - -entities@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" - integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== - -highlight.js@*, highlight.js@^10.4.1: - version "10.4.1" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.4.1.tgz#d48fbcf4a9971c4361b3f95f302747afe19dbad0" - integrity sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg== - -linkify-it@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.2.tgz#f55eeb8bc1d3ae754049e124ab3bb56d97797fb8" - integrity sha512-gDBO4aHNZS6coiZCKVhSNh43F9ioIL4JwRjLZPkoLIY4yZFwg264Y5lu2x6rb1Js42Gh6Yqm2f6L2AJcnkzinQ== - dependencies: - uc.micro "^1.0.1" - -lodash.throttle@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" - integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ= - -markdown-it-front-matter@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/markdown-it-front-matter/-/markdown-it-front-matter-0.2.1.tgz#dca49a827bb3cebb0528452c1d87dff276eb28dc" - integrity sha512-ydUIqlKfDscRpRUTRcA3maeeUKn3Cl5EaKZSA+I/f0KOGCBurW7e+bbz59sxqkC3FA9Q2S2+t4mpkH9T0BCM6A== - -markdown-it@^12.0.3: - version "12.0.3" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.3.tgz#8d1e47daf1d716d63610495eb93f6665573e4abe" - integrity sha512-M57RsMv+QQmJHz1yCu0gTJRMx/LlxRPtrrw+2kb/CpDVK/graCmWO0qfNnz/SE1FCNdyq3pkMMZ+itTnyT/YGA== - dependencies: - argparse "^2.0.1" - entities "~2.1.0" - linkify-it "^3.0.1" - mdurl "^1.0.1" - uc.micro "^1.0.5" - -mdurl@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" - integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= - -semver@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== - -semver@^5.4.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -shimmer@^1.1.0, shimmer@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" - integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== - -stack-chain@^1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" - integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= - -uc.micro@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192" - integrity sha1-ftUNXg+an7ClczeSWfKndFjVAZI= - -uc.micro@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376" - integrity sha512-JoLI4g5zv5qNyT09f4YAvEZIIV1oOjqnewYg5D38dkQljIzpPT296dbIGvKro3digYI1bkb7W6EP1y4uDlmzLg== - -vscode-extension-telemetry@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" - integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== - dependencies: - applicationinsights "1.7.4" - -vscode-nls@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" - integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== diff --git a/lib/vscode/extensions/merge-conflict/package.json b/lib/vscode/extensions/merge-conflict/package.json deleted file mode 100644 index 74f7b848fa82..000000000000 --- a/lib/vscode/extensions/merge-conflict/package.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "name": "merge-conflict", - "publisher": "vscode", - "displayName": "%displayName%", - "description": "%description%", - "icon": "media/icon.png", - "version": "1.0.0", - "license": "MIT", - "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", - "engines": { - "vscode": "^1.5.0" - }, - "categories": [ - "Other" - ], - "capabilities": { - "virtualWorkspaces": false, - "untrustedWorkspaces": { - "supported": true - } - }, - "activationEvents": [ - "onStartupFinished" - ], - "main": "./out/mergeConflictMain", - "browser": "./dist/browser/mergeConflictMain", - "scripts": { - "compile": "gulp compile-extension:merge-conflict", - "watch": "gulp watch-extension:merge-conflict" - }, - "contributes": { - "commands": [ - { - "category": "%command.category%", - "title": "%command.accept.all-current%", - "original": "Accept All Current", - "command": "merge-conflict.accept.all-current" - }, - { - "category": "%command.category%", - "title": "%command.accept.all-incoming%", - "original": "Accept All Incoming", - "command": "merge-conflict.accept.all-incoming" - }, - { - "category": "%command.category%", - "title": "%command.accept.all-both%", - "original": "Accept All Both", - "command": "merge-conflict.accept.all-both" - }, - { - "category": "%command.category%", - "title": "%command.accept.current%", - "original": "Accept Current", - "command": "merge-conflict.accept.current" - }, - { - "category": "%command.category%", - "title": "%command.accept.incoming%", - "original": "Accept Incoming", - "command": "merge-conflict.accept.incoming" - }, - { - "category": "%command.category%", - "title": "%command.accept.selection%", - "original": "Accept Selection", - "command": "merge-conflict.accept.selection" - }, - { - "category": "%command.category%", - "title": "%command.accept.both%", - "original": "Accept Both", - "command": "merge-conflict.accept.both" - }, - { - "category": "%command.category%", - "title": "%command.next%", - "original": "Next Conflict", - "command": "merge-conflict.next", - "icon": "$(arrow-down)" - }, - { - "category": "%command.category%", - "title": "%command.previous%", - "original": "Previous Conflict", - "command": "merge-conflict.previous", - "icon": "$(arrow-up)" - }, - { - "category": "%command.category%", - "title": "%command.compare%", - "original": "Compare Current Conflict", - "command": "merge-conflict.compare" - } - ], - "menus": { - "scm/resourceState/context": [ - { - "command": "merge-conflict.accept.all-current", - "when": "scmProvider == git && scmResourceGroup == merge", - "group": "1_modification" - }, - { - "command": "merge-conflict.accept.all-incoming", - "when": "scmProvider == git && scmResourceGroup == merge", - "group": "1_modification" - } - ], - "editor/title": [ - { - "command": "merge-conflict.previous", - "group": "navigation@1", - "when": "mergeConflictsCount && mergeConflictsCount != 0" - }, - { - "command": "merge-conflict.next", - "group": "navigation@2", - "when": "mergeConflictsCount && mergeConflictsCount != 0" - } - ] - }, - "configuration": { - "title": "%config.title%", - "properties": { - "merge-conflict.codeLens.enabled": { - "type": "boolean", - "description": "%config.codeLensEnabled%", - "default": true - }, - "merge-conflict.decorators.enabled": { - "type": "boolean", - "description": "%config.decoratorsEnabled%", - "default": true - }, - "merge-conflict.autoNavigateNextConflict.enabled": { - "type": "boolean", - "description": "%config.autoNavigateNextConflictEnabled%", - "default": false - }, - "merge-conflict.diffViewPosition": { - "type": "string", - "enum": [ - "Current", - "Beside", - "Below" - ], - "description": "%config.diffViewPosition%", - "enumDescriptions": [ - "%config.diffViewPosition.current%", - "%config.diffViewPosition.beside%", - "%config.diffViewPosition.below%" - ], - "default": "Current" - } - } - } - }, - "dependencies": { - "vscode-nls": "^4.0.0" - }, - "devDependencies": { - "@types/node": "^12.19.9" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/merge-conflict/yarn.lock b/lib/vscode/extensions/merge-conflict/yarn.lock deleted file mode 100644 index 687f15f481e5..000000000000 --- a/lib/vscode/extensions/merge-conflict/yarn.lock +++ /dev/null @@ -1,13 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -vscode-nls@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" - integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== diff --git a/lib/vscode/extensions/microsoft-authentication/package.json b/lib/vscode/extensions/microsoft-authentication/package.json deleted file mode 100644 index 7b47354df0fb..000000000000 --- a/lib/vscode/extensions/microsoft-authentication/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "microsoft-authentication", - "publisher": "vscode", - "license": "MIT", - "displayName": "%displayName%", - "description": "%description%", - "version": "0.0.1", - "engines": { - "vscode": "^1.42.0" - }, - "icon": "media/icon.png", - "categories": [ - "Other" - ], - "enableProposedApi": true, - "activationEvents": [ - "onAuthenticationRequest:microsoft" - ], - "capabilities": { - "virtualWorkspaces": true, - "untrustedWorkspaces": { - "supported": true - } - }, - "extensionKind": [ - "ui", - "workspace", - "web" - ], - "contributes": { - "authentication": [ - { - "label": "Microsoft", - "id": "microsoft" - } - ] - }, - "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", - "main": "./out/extension.js", - "browser": "./dist/browser/extension.js", - "scripts": { - "vscode:prepublish": "npm run compile", - "compile": "gulp compile-extension:microsoft-authentication", - "compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none", - "watch": "gulp watch-extension:microsoft-authentication", - "watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose" - }, - "devDependencies": { - "@types/node": "^12.19.9", - "@types/node-fetch": "^2.5.7", - "@types/randombytes": "^2.0.0", - "@types/sha.js": "^2.4.0", - "@types/uuid": "8.0.0" - }, - "dependencies": { - "buffer": "^5.6.0", - "node-fetch": "2.6.1", - "randombytes": "github:rmacfarlane/randombytes#b28d4ecee46262801ea09f15fa1f1513a05c5971", - "sha.js": "2.4.11", - "stream": "0.0.2", - "uuid": "^8.2.0", - "vscode-extension-telemetry": "0.1.7", - "vscode-nls": "^4.1.1" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/microsoft-authentication/yarn.lock b/lib/vscode/extensions/microsoft-authentication/yarn.lock deleted file mode 100644 index fada1d6e8bf5..000000000000 --- a/lib/vscode/extensions/microsoft-authentication/yarn.lock +++ /dev/null @@ -1,235 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node-fetch@^2.5.7": - version "2.5.7" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.7.tgz#20a2afffa882ab04d44ca786449a276f9f6bbf3c" - integrity sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw== - dependencies: - "@types/node" "*" - form-data "^3.0.0" - -"@types/node@*": - version "14.0.23" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.23.tgz#676fa0883450ed9da0bb24156213636290892806" - integrity sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw== - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -"@types/randombytes@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/randombytes/-/randombytes-2.0.0.tgz#0087ff5e60ae68023b9bc4398b406fea7ad18304" - integrity sha512-bz8PhAVlwN72vqefzxa14DKNT8jK/mV66CSjwdVQM/k3Th3EPKfUtdMniwZgMedQTFuywAsfjnZsg+pEnltaMA== - dependencies: - "@types/node" "*" - -"@types/sha.js@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@types/sha.js/-/sha.js-2.4.0.tgz#bce682ef860b40f419d024fa08600c3b8d24bb01" - integrity sha512-amxKgPy6WJTKuw8mpUwjX2BSxuBtBmZfRwIUDIuPJKNwGN8CWDli8JTg5ONTWOtcTkHIstvT7oAhhYXqEjStHQ== - dependencies: - "@types/node" "*" - -"@types/uuid@8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.0.0.tgz#165aae4819ad2174a17476dbe66feebd549556c0" - integrity sha512-xSQfNcvOiE5f9dyd4Kzxbof1aTrLobL278pGLKOZI6esGfZ7ts9Ka16CzIN6Y8hFHE1C7jIBZokULhK1bOgjRw== - -applicationinsights@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" - integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== - dependencies: - cls-hooked "^4.2.2" - continuation-local-storage "^3.2.1" - diagnostic-channel "0.2.0" - diagnostic-channel-publishers "^0.3.3" - -async-hook-jl@^1.7.6: - version "1.7.6" - resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" - integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== - dependencies: - stack-chain "^1.3.7" - -async-listener@^0.6.0: - version "0.6.10" - resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" - integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== - dependencies: - semver "^5.3.0" - shimmer "^1.1.0" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -base64-js@^1.0.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" - integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== - -buffer@^5.6.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" - integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - -cls-hooked@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" - integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== - dependencies: - async-hook-jl "^1.7.6" - emitter-listener "^1.0.1" - semver "^5.4.1" - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -continuation-local-storage@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" - integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== - dependencies: - async-listener "^0.6.0" - emitter-listener "^1.1.1" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -diagnostic-channel-publishers@^0.3.3: - version "0.3.5" - resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" - integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== - -diagnostic-channel@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" - integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= - dependencies: - semver "^5.3.0" - -emitter-component@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/emitter-component/-/emitter-component-1.1.1.tgz#065e2dbed6959bf470679edabeaf7981d1003ab6" - integrity sha1-Bl4tvtaVm/RwZ57avq95gdEAOrY= - -emitter-listener@^1.0.1, emitter-listener@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" - integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== - dependencies: - shimmer "^1.2.0" - -form-data@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" - integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -ieee754@^1.1.4: - version "1.1.13" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" - integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== - -inherits@^2.0.1: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -mime-db@1.44.0: - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== - -mime-types@^2.1.12: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== - dependencies: - mime-db "1.44.0" - -node-fetch@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - -"randombytes@github:rmacfarlane/randombytes#b28d4ecee46262801ea09f15fa1f1513a05c5971": - version "2.1.0" - resolved "https://codeload.github.com/rmacfarlane/randombytes/tar.gz/b28d4ecee46262801ea09f15fa1f1513a05c5971" - dependencies: - safe-buffer "^5.1.0" - -safe-buffer@^5.0.1: - version "5.2.0" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" - integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== - -safe-buffer@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -semver@^5.3.0, semver@^5.4.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -sha.js@2.4.11: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shimmer@^1.1.0, shimmer@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" - integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== - -stack-chain@^1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" - integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= - -stream@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/stream/-/stream-0.0.2.tgz#7f5363f057f6592c5595f00bc80a27f5cec1f0ef" - integrity sha1-f1Nj8Ff2WSxVlfALyAon9c7B8O8= - dependencies: - emitter-component "^1.1.1" - -uuid@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.2.0.tgz#cb10dd6b118e2dada7d0cd9730ba7417c93d920e" - integrity sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q== - -vscode-extension-telemetry@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" - integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== - dependencies: - applicationinsights "1.7.4" - -vscode-nls@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.1.tgz#f9916b64e4947b20322defb1e676a495861f133c" - integrity sha512-4R+2UoUUU/LdnMnFjePxfLqNhBS8lrAFyX7pjb2ud/lqDkrUavFUTcG7wR0HBZFakae0Q6KLBFjMS6W93F403A== diff --git a/lib/vscode/extensions/notebook-markdown-extensions/notebook/emoji.ts b/lib/vscode/extensions/notebook-markdown-extensions/notebook/emoji.ts deleted file mode 100644 index bf82f98ba0f7..000000000000 --- a/lib/vscode/extensions/notebook-markdown-extensions/notebook/emoji.ts +++ /dev/null @@ -1,11 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -import type * as markdownIt from 'markdown-it'; - -const emoji = require('markdown-it-emoji'); - -export function extendMarkdownIt(md: markdownIt.MarkdownIt) { - return md.use(emoji); -} diff --git a/lib/vscode/extensions/notebook-markdown-extensions/notebook/katex.ts b/lib/vscode/extensions/notebook-markdown-extensions/notebook/katex.ts deleted file mode 100644 index f862fd94940a..000000000000 --- a/lib/vscode/extensions/notebook-markdown-extensions/notebook/katex.ts +++ /dev/null @@ -1,20 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -import type * as markdownIt from 'markdown-it'; - -const styleHref = import.meta.url.replace(/katex.js$/, 'katex.min.css'); - -const link = document.createElement('link'); -link.rel = 'stylesheet'; -link.classList.add('markdown-style'); -link.href = styleHref; - -document.head.append(link); - -const katex = require('@iktakahiro/markdown-it-katex'); - -export function extendMarkdownIt(md: markdownIt.MarkdownIt) { - return md.use(katex); -} diff --git a/lib/vscode/extensions/notebook-markdown-extensions/package.json b/lib/vscode/extensions/notebook-markdown-extensions/package.json deleted file mode 100644 index 1622659825ff..000000000000 --- a/lib/vscode/extensions/notebook-markdown-extensions/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "notebook-markdown-extensions", - "displayName": "%displayName%", - "description": "%description%", - "version": "1.0.0", - "icon": "icon.png", - "publisher": "vscode", - "enableProposedApi": true, - "license": "MIT", - "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", - "engines": { - "vscode": "^1.54.0" - }, - "categories": [ - "Other" - ], - "capabilities": { - "virtualWorkspaces": false - }, - "contributes": { - "notebookMarkupRenderers": [ - { - "id": "markdownItRenderer-katex", - "displayName": "Markdown it katex renderer", - "entrypoint": "./notebook-out/katex.js", - "dependsOn": "markdownItRenderer" - }, - { - "id": "markdownItRenderer-emoji", - "displayName": "Markdown it emoji renderer", - "entrypoint": "./notebook-out/emoji.js", - "dependsOn": "markdownItRenderer" - } - ] - }, - "scripts": { - "compile": "npm run build-notebook", - "watch": "npm run build-notebook", - "build-notebook": "node ./esbuild" - }, - "devDependencies": { - "@iktakahiro/markdown-it-katex": "https://github.com/mjbvz/markdown-it-katex.git", - "@types/markdown-it": "^0.0.0", - "markdown-it": "^12.0.4", - "markdown-it-emoji": "^2.0.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/notebook-markdown-extensions/yarn.lock b/lib/vscode/extensions/notebook-markdown-extensions/yarn.lock deleted file mode 100644 index 58952667358a..000000000000 --- a/lib/vscode/extensions/notebook-markdown-extensions/yarn.lock +++ /dev/null @@ -1,69 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@iktakahiro/markdown-it-katex@https://github.com/mjbvz/markdown-it-katex.git": - version "4.0.1" - resolved "https://github.com/mjbvz/markdown-it-katex.git#e88925a7cb3fd593a14ed117fb43627c4ba910b6" - dependencies: - katex "^0.13.0" - -"@types/markdown-it@^0.0.0": - version "0.0.0" - resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.0.tgz#8f6acaa5e3245e275f684e95deb3e518d1c6ab16" - integrity sha1-j2rKpeMkXidfaE6V3rPlGNHGqxY= - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -commander@^6.0.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" - integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== - -entities@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" - integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== - -katex@^0.13.0: - version "0.13.0" - resolved "https://registry.yarnpkg.com/katex/-/katex-0.13.0.tgz#62900e56c1ad8fdf7da23399e50d7a7b690b39ab" - integrity sha512-6cHbzbegYgS9vvVGuH8UA+o97X+ZshtboSqJJCdq7trBYzuD75JNwr7Ef606xkUjecPPhFnyB+afx1dVafielg== - dependencies: - commander "^6.0.0" - -linkify-it@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.2.tgz#f55eeb8bc1d3ae754049e124ab3bb56d97797fb8" - integrity sha512-gDBO4aHNZS6coiZCKVhSNh43F9ioIL4JwRjLZPkoLIY4yZFwg264Y5lu2x6rb1Js42Gh6Yqm2f6L2AJcnkzinQ== - dependencies: - uc.micro "^1.0.1" - -markdown-it-emoji@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/markdown-it-emoji/-/markdown-it-emoji-2.0.0.tgz#3164ad4c009efd946e98274f7562ad611089a231" - integrity sha512-39j7/9vP/CPCKbEI44oV8yoPJTpvfeReTn/COgRhSpNrjWF3PfP/JUxxB0hxV6ynOY8KH8Y8aX9NMDdo6z+6YQ== - -markdown-it@^12.0.4: - version "12.0.4" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.4.tgz#eec8247d296327eac3ba9746bdeec9cfcc751e33" - integrity sha512-34RwOXZT8kyuOJy25oJNJoulO8L0bTHYWXcdZBYZqFnjIy3NgjeoM3FmPXIOFQ26/lSHYMr8oc62B6adxXcb3Q== - dependencies: - argparse "^2.0.1" - entities "~2.1.0" - linkify-it "^3.0.1" - mdurl "^1.0.1" - uc.micro "^1.0.5" - -mdurl@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" - integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= - -uc.micro@^1.0.1, uc.micro@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" - integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== diff --git a/lib/vscode/extensions/npm/package.json b/lib/vscode/extensions/npm/package.json deleted file mode 100644 index ab75bdf34eb4..000000000000 --- a/lib/vscode/extensions/npm/package.json +++ /dev/null @@ -1,329 +0,0 @@ -{ - "name": "npm", - "publisher": "vscode", - "displayName": "%displayName%", - "description": "%description%", - "version": "1.0.1", - "license": "MIT", - "engines": { - "vscode": "0.10.x" - }, - "enableProposedApi": true, - "icon": "images/npm_icon.png", - "categories": [ - "Other" - ], - "scripts": { - "compile": "gulp compile-extension:npm", - "watch": "gulp watch-extension:npm" - }, - "dependencies": { - "find-up": "^4.1.0", - "find-yarn-workspace-root": "^2.0.0", - "jsonc-parser": "^2.2.1", - "minimatch": "^3.0.4", - "request-light": "^0.4.0", - "vscode-nls": "^4.1.1", - "which": "^2.0.2", - "which-pm": "^2.0.0" - }, - "devDependencies": { - "@types/minimatch": "^3.0.3", - "@types/node": "^12.19.9", - "@types/which": "^2.0.0" - }, - "resolutions": { - "which-pm/load-yaml-file/**/argparse": "1.0.9" - }, - "main": "./out/npmMain", - "browser": "./dist/browser/npmBrowserMain", - "activationEvents": [ - "onCommand:workbench.action.tasks.runTask", - "onCommand:npm.runScriptFromFolder", - "onLanguage:json", - "workspaceContains:package.json", - "onView:npm" - ], - "capabilities": { - "virtualWorkspaces": false, - "untrustedWorkspaces": { - "supported": "limited", - "description": "%workspaceTrust%" - } - }, - "contributes": { - "languages": [ - { - "id": "ignore", - "extensions": [ - ".npmignore" - ] - }, - { - "id": "properties", - "extensions": [ - ".npmrc" - ] - } - ], - "views": { - "explorer": [ - { - "id": "npm", - "name": "%view.name%", - "when": "npm:showScriptExplorer", - "icon": "$(json)", - "visibility": "hidden" - } - ] - }, - "commands": [ - { - "command": "npm.runScript", - "title": "%command.run%", - "icon": "$(run)" - }, - { - "command": "npm.debugScript", - "title": "%command.debug%", - "icon": "$(debug)" - }, - { - "command": "npm.openScript", - "title": "%command.openScript%" - }, - { - "command": "npm.runInstall", - "title": "%command.runInstall%" - }, - { - "command": "npm.refresh", - "title": "%command.refresh%", - "icon": "$(refresh)" - }, - { - "command": "npm.runSelectedScript", - "title": "%command.runSelectedScript%" - }, - { - "command": "npm.runScriptFromFolder", - "title": "%command.runScriptFromFolder%" - }, - { - "command": "npm.packageManager", - "title": "%command.packageManager" - } - ], - "menus": { - "commandPalette": [ - { - "command": "npm.refresh", - "when": "false" - }, - { - "command": "npm.runScript", - "when": "false" - }, - { - "command": "npm.debugScript", - "when": "false" - }, - { - "command": "npm.openScript", - "when": "false" - }, - { - "command": "npm.runInstall", - "when": "false" - }, - { - "command": "npm.runSelectedScript", - "when": "false" - }, - { - "command": "npm.runScriptFromFolder", - "when": "false" - }, - { - "command": "npm.packageManager", - "when": "false" - } - ], - "editor/context": [ - { - "command": "npm.runSelectedScript", - "when": "resourceFilename == 'package.json' && resourceScheme == file", - "group": "navigation@+1" - } - ], - "view/title": [ - { - "command": "npm.refresh", - "when": "view == npm", - "group": "navigation" - } - ], - "view/item/context": [ - { - "command": "npm.openScript", - "when": "view == npm && viewItem == packageJSON", - "group": "navigation@1" - }, - { - "command": "npm.runInstall", - "when": "view == npm && viewItem == packageJSON", - "group": "navigation@2" - }, - { - "command": "npm.openScript", - "when": "view == npm && viewItem == script", - "group": "navigation@1" - }, - { - "command": "npm.runScript", - "when": "view == npm && viewItem == script", - "group": "navigation@2" - }, - { - "command": "npm.runScript", - "when": "view == npm && viewItem == script", - "group": "inline" - }, - { - "command": "npm.debugScript", - "when": "view == npm && viewItem == script", - "group": "inline" - }, - { - "command": "npm.debugScript", - "when": "view == npm && viewItem == script", - "group": "navigation@3" - } - ], - "explorer/context": [ - { - "when": "config.npm.enableRunFromFolder && explorerViewletVisible && explorerResourceIsFolder && resourceScheme == file", - "command": "npm.runScriptFromFolder", - "group": "2_workspace" - } - ] - }, - "configuration": { - "id": "npm", - "type": "object", - "title": "Npm", - "properties": { - "npm.autoDetect": { - "type": "string", - "enum": [ - "off", - "on" - ], - "default": "on", - "scope": "resource", - "description": "%config.npm.autoDetect%" - }, - "npm.runSilent": { - "type": "boolean", - "default": false, - "scope": "resource", - "markdownDescription": "%config.npm.runSilent%" - }, - "npm.packageManager": { - "scope": "resource", - "type": "string", - "enum": [ - "auto", - "npm", - "yarn", - "pnpm" - ], - "enumDescriptions": [ - "%config.npm.packageManager.auto%", - "%config.npm.packageManager.npm%", - "%config.npm.packageManager.yarn%", - "%config.npm.packageManager.pnpm%" - ], - "default": "auto", - "description": "%config.npm.packageManager%" - }, - "npm.exclude": { - "type": [ - "string", - "array" - ], - "items": { - "type": "string" - }, - "description": "%config.npm.exclude%", - "scope": "resource" - }, - "npm.enableScriptExplorer": { - "type": "boolean", - "default": false, - "scope": "resource", - "deprecationMessage": "The NPM Script Explorer is now available in 'Views' menu in the Explorer in all folders.", - "description": "%config.npm.enableScriptExplorer%" - }, - "npm.enableRunFromFolder": { - "type": "boolean", - "default": false, - "scope": "resource", - "description": "%config.npm.enableRunFromFolder%" - }, - "npm.scriptExplorerAction": { - "type": "string", - "enum": [ - "open", - "run" - ], - "markdownDescription": "%config.npm.scriptExplorerAction%", - "scope": "window", - "default": "open" - }, - "npm.fetchOnlinePackageInfo": { - "type": "boolean", - "description": "%config.npm.fetchOnlinePackageInfo%", - "default": true, - "scope": "window", - "tags": [ - "usesOnlineServices" - ] - } - } - }, - "jsonValidation": [ - { - "fileMatch": "package.json", - "url": "https://json.schemastore.org/package" - }, - { - "fileMatch": "bower.json", - "url": "https://json.schemastore.org/bower" - } - ], - "taskDefinitions": [ - { - "type": "npm", - "required": [ - "script" - ], - "properties": { - "script": { - "type": "string", - "description": "%taskdef.script%" - }, - "path": { - "type": "string", - "description": "%taskdef.path%" - } - }, - "when": "shellExecutionSupported" - } - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/npm/package.nls.json b/lib/vscode/extensions/npm/package.nls.json deleted file mode 100644 index b8570d0da82e..000000000000 --- a/lib/vscode/extensions/npm/package.nls.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "description": "Extension to add task support for npm scripts.", - "displayName": "NPM support for VS Code", - "workspaceTrust": "This extension calls the `tasks.executeTask()` API, which requires trust to run.", - "config.npm.autoDetect": "Controls whether npm scripts should be automatically detected.", - "config.npm.runSilent": "Run npm commands with the `--silent` option.", - "config.npm.packageManager": "The package manager used to run scripts.", - "config.npm.packageManager.npm": "Use npm as the package manager for running scripts.", - "config.npm.packageManager.yarn": "Use yarn as the package manager for running scripts.", - "config.npm.packageManager.pnpm": "Use pnpm as the package manager for running scripts.", - "config.npm.packageManager.auto": "Auto-detect which package manager to use for running scripts based on lock files and installed package managers.", - "config.npm.exclude": "Configure glob patterns for folders that should be excluded from automatic script detection.", - "config.npm.enableScriptExplorer": "Enable an explorer view for npm scripts when there is no top-level 'package.json' file.", - "config.npm.scriptExplorerAction": "The default click action used in the npm scripts explorer: `open` or `run`, the default is `open`.", - "config.npm.enableRunFromFolder": "Enable running npm scripts contained in a folder from the Explorer context menu.", - "config.npm.fetchOnlinePackageInfo": "Fetch data from https://registry.npmjs.org and https://registry.bower.io to provide auto-completion and information on hover features on npm dependencies.", - "npm.parseError": "Npm task detection: failed to parse the file {0}", - "taskdef.script": "The npm script to customize.", - "taskdef.path": "The path to the folder of the package.json file that provides the script. Can be omitted.", - "view.name": "NPM Scripts", - "command.refresh": "Refresh", - "command.run": "Run", - "command.debug": "Debug", - "command.openScript": "Open", - "command.runInstall": "Run Install", - "command.runSelectedScript": "Run Script", - "command.runScriptFromFolder": "Run NPM Script in Folder...", - "command.packageManager": "Get Configured Package Manager" -} diff --git a/lib/vscode/extensions/npm/yarn.lock b/lib/vscode/extensions/npm/yarn.lock deleted file mode 100644 index 6b653dec9d99..000000000000 --- a/lib/vscode/extensions/npm/yarn.lock +++ /dev/null @@ -1,276 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/minimatch@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -"@types/which@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/which/-/which-2.0.0.tgz#446d35586611dee657120de8e0457382a658fc25" - integrity sha512-JHTNOEpZnACQdsTojWggn+SQ8IucfqEhtz7g8Z0G67WdSj4x3F0X5I2c/CVcl8z/QukGrIHeQ/N49v1au74XFQ== - -agent-base@4: - version "4.2.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.0.tgz#9838b5c3392b962bad031e6a4c5e1024abec45ce" - integrity sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg== - dependencies: - es6-promisify "^5.0.0" - -agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== - dependencies: - es6-promisify "^5.0.0" - -argparse@1.0.9, argparse@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" - integrity sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY= - dependencies: - sprintf-js "~1.0.2" - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -debug@3.1.0, debug@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -es6-promise@^4.0.3: - version "4.2.4" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" - integrity sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find-yarn-workspace-root@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" - integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== - dependencies: - micromatch "^4.0.2" - -graceful-fs@^4.1.5: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - -http-proxy-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" - integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== - dependencies: - agent-base "4" - debug "3.1.0" - -https-proxy-agent@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" - integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -js-yaml@^3.13.0: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsonc-parser@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc" - integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w== - -load-yaml-file@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/load-yaml-file/-/load-yaml-file-0.2.0.tgz#af854edaf2bea89346c07549122753c07372f64d" - integrity sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw== - dependencies: - graceful-fs "^4.1.5" - js-yaml "^3.13.0" - pify "^4.0.1" - strip-bom "^3.0.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -micromatch@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" - integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== - dependencies: - braces "^3.0.1" - picomatch "^2.0.5" - -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -picomatch@^2.0.5: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -request-light@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/request-light/-/request-light-0.4.0.tgz#c6b91ef00b18cb0de75d2127e55b3a2c9f7f90f9" - integrity sha512-fimzjIVw506FBZLspTAXHdpvgvQebyjpNyLRd0e6drPPRq7gcrROeGWRyF81wLqFg5ijPgnOQbmfck5wdTqpSA== - dependencies: - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.4" - vscode-nls "^4.1.2" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -vscode-nls@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.1.tgz#f9916b64e4947b20322defb1e676a495861f133c" - integrity sha512-4R+2UoUUU/LdnMnFjePxfLqNhBS8lrAFyX7pjb2ud/lqDkrUavFUTcG7wR0HBZFakae0Q6KLBFjMS6W93F403A== - -vscode-nls@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" - integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== - -which-pm@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-pm/-/which-pm-2.0.0.tgz#8245609ecfe64bf751d0eef2f376d83bf1ddb7ae" - integrity sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w== - dependencies: - load-yaml-file "^0.2.0" - path-exists "^4.0.0" - -which@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" diff --git a/lib/vscode/extensions/package.json b/lib/vscode/extensions/package.json deleted file mode 100644 index 645ea5c23cb1..000000000000 --- a/lib/vscode/extensions/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "vscode-extensions", - "version": "0.0.1", - "license": "MIT", - "description": "Dependencies shared by all extensions", - "dependencies": { - "typescript": "4.2.4" - }, - "scripts": { - "postinstall": "node ./postinstall" - }, - "devDependencies": { - "esbuild": "^0.11.12", - "vscode-grammar-updater": "^1.0.3" - } -} diff --git a/lib/vscode/extensions/php-language-features/package.json b/lib/vscode/extensions/php-language-features/package.json deleted file mode 100644 index 3763949d6477..000000000000 --- a/lib/vscode/extensions/php-language-features/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "name": "php-language-features", - "displayName": "%displayName%", - "description": "%description%", - "version": "1.0.0", - "publisher": "vscode", - "license": "MIT", - "icon": "icons/logo.png", - "engines": { - "vscode": "0.10.x" - }, - "enableProposedApi": true, - "activationEvents": [ - "onLanguage:php" - ], - "main": "./out/phpMain", - "categories": [ - "Programming Languages" - ], - "capabilities": { - "virtualWorkspaces": false, - "untrustedWorkspaces": { - "supported": "limited", - "description": "%workspaceTrust%", - "restrictedConfigurations": [ - "php.validate.executablePath" - ] - } - }, - "contributes": { - "configuration": { - "title": "%configuration.title%", - "type": "object", - "order": 20, - "properties": { - "php.suggest.basic": { - "type": "boolean", - "default": true, - "description": "%configuration.suggest.basic%" - }, - "php.validate.enable": { - "type": "boolean", - "default": true, - "description": "%configuration.validate.enable%" - }, - "php.validate.executablePath": { - "type": [ - "string", - "null" - ], - "default": null, - "description": "%configuration.validate.executablePath%", - "scope": "machine-overridable" - }, - "php.validate.run": { - "type": "string", - "enum": [ - "onSave", - "onType" - ], - "default": "onSave", - "description": "%configuration.validate.run%" - } - } - }, - "jsonValidation": [ - { - "fileMatch": "composer.json", - "url": "https://getcomposer.org/schema.json" - } - ], - "commands": [ - { - "title": "%command.untrustValidationExecutable%", - "category": "%commands.categroy.php%", - "command": "php.untrustValidationExecutable" - } - ], - "menus": { - "commandPalette": [ - { - "command": "php.untrustValidationExecutable", - "when": "php.untrustValidationExecutableContext" - } - ] - } - }, - "scripts": { - "compile": "npx gulp compile-extension:php-language-features", - "watch": "npx gulp watch-extension:php-language-features" - }, - "dependencies": { - "vscode-nls": "^4.0.0", - "which": "^2.0.2" - }, - "devDependencies": { - "@types/node": "^12.19.9", - "@types/which": "^2.0.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/php-language-features/yarn.lock b/lib/vscode/extensions/php-language-features/yarn.lock deleted file mode 100644 index b0fa5625a6df..000000000000 --- a/lib/vscode/extensions/php-language-features/yarn.lock +++ /dev/null @@ -1,30 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -"@types/which@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/which/-/which-2.0.0.tgz#446d35586611dee657120de8e0457382a658fc25" - integrity sha512-JHTNOEpZnACQdsTojWggn+SQ8IucfqEhtz7g8Z0G67WdSj4x3F0X5I2c/CVcl8z/QukGrIHeQ/N49v1au74XFQ== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -vscode-nls@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.0.0.tgz#4001c8a6caba5cedb23a9c5ce1090395c0e44002" - integrity sha512-qCfdzcH+0LgQnBpZA53bA32kzp9rpq/f66Som577ObeuDlFIrtbEJ+A/+CCxjIh4G8dpJYNCKIsxpRAHIfsbNw== - -which@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" diff --git a/lib/vscode/extensions/php/cgmanifest.json b/lib/vscode/extensions/php/cgmanifest.json deleted file mode 100644 index 15b73aeaf6c8..000000000000 --- a/lib/vscode/extensions/php/cgmanifest.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "registrations": [ - { - "component": { - "type": "git", - "git": { - "name": "language-php", - "repositoryUrl": "https://github.com/atom/language-php", - "commitHash": "72739e6341b1b4bf4aa185e928932983baca449e" - } - }, - "license": "MIT", - "version": "0.46.0" - } - ], - "version": 1 -} \ No newline at end of file diff --git a/lib/vscode/extensions/php/language-configuration.json b/lib/vscode/extensions/php/language-configuration.json deleted file mode 100644 index 9c24c7b724bc..000000000000 --- a/lib/vscode/extensions/php/language-configuration.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "comments": { - "lineComment": "//", // "#" - "blockComment": [ "/*", "*/" ] - }, - "brackets": [ - ["{", "}"], - ["[", "]"], - ["(", ")"] - ], - "autoClosingPairs": [ - { "open": "{", "close": "}", "notIn": ["string"] }, - { "open": "[", "close": "]", "notIn": ["string"] }, - { "open": "(", "close": ")", "notIn": ["string"] }, - { "open": "'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "\"", "close": "\"", "notIn": ["string", "comment"] }, - { "open": "/**", "close": " */", "notIn": ["string"] } - ], - "surroundingPairs": [ - ["{", "}"], - ["[", "]"], - ["(", ")"], - ["'", "'"], - ["\"", "\""], - ["`", "`"] - ], - "indentationRules": { - "increaseIndentPattern": "({(?!.*}).*|\\(|\\[|((else(\\s)?)?if|else|for(each)?|while|switch|case).*:)\\s*((/[/*].*|)?$|\\?>)", - "decreaseIndentPattern": "^(.*\\*\\/)?\\s*((\\})|(\\)+[;,])|(\\][;,])|\\b(else:)|\\b((end(if|for(each)?|while|switch));))" - }, - "folding": { - "markers": { - "start": "^\\s*(#|\/\/)region\\b", - "end": "^\\s*(#|\/\/)endregion\\b" - } - } -} diff --git a/lib/vscode/extensions/php/syntaxes/html.tmLanguage.json b/lib/vscode/extensions/php/syntaxes/html.tmLanguage.json deleted file mode 100644 index 4bf15294159f..000000000000 --- a/lib/vscode/extensions/php/syntaxes/html.tmLanguage.json +++ /dev/null @@ -1,189 +0,0 @@ -{ - "information_for_contributors": [ - "This file has been converted from https://github.com/atom/language-php/blob/master/grammars/html.cson", - "If you want to provide a fix or improvement, please create a pull request against the original repository.", - "Once accepted there, we are happy to receive an update request." - ], - "version": "https://github.com/atom/language-php/commit/b6c5e83016b52311cdc622c2579462861ee91587", - "name": "PHP", - "scopeName": "text.html.php", - "injections": { - "L:source.php string.quoted.single.sql.php source.sql.embedded.php": { - "patterns": [ - { - "match": "(#)(\\\\'|[^'])*(?='|$)", - "name": "comment.line.number-sign.sql", - "captures": { - "1": { - "name": "punctuation.definition.comment.sql" - } - } - }, - { - "match": "(--)(\\\\'|[^'])*(?='|$)", - "name": "comment.line.double-dash.sql", - "captures": { - "1": { - "name": "punctuation.definition.comment.sql" - } - } - }, - { - "match": "\\\\[\\\\'`\"]", - "name": "constant.character.escape.php" - }, - { - "match": "\"(?=((\\\\\")|[^\"'])*('|$))", - "name": "string.quoted.double.unclosed.sql" - } - ] - }, - "L:source.php string.quoted.double.sql.php source.sql.embedded.php": { - "patterns": [ - { - "match": "(#)(\\\\\"|[^\"])*(?=\"|$)", - "name": "comment.line.number-sign.sql", - "captures": { - "1": { - "name": "punctuation.definition.comment.sql" - } - } - }, - { - "match": "(--)(\\\\\"|[^\"])*(?=\"|$)", - "name": "comment.line.double-dash.sql", - "captures": { - "1": { - "name": "punctuation.definition.comment.sql" - } - } - }, - { - "match": "\\\\[\\\\'`\"]", - "name": "constant.character.escape.php" - }, - { - "match": "(')([^'\\\\]*)(')", - "name": "string.quoted.single.sql", - "captures": { - "1": { - "name": "punctuation.definition.string.begin.sql" - }, - "2": { - "patterns": [ - { - "include": "source.php#interpolation_double_quoted" - } - ] - }, - "3": { - "name": "punctuation.definition.string.end.sql" - } - } - }, - { - "match": "(`)([^`\\\\]*)(`)", - "name": "string.quoted.other.backtick.sql", - "captures": { - "1": { - "name": "punctuation.definition.string.begin.sql" - }, - "2": { - "patterns": [ - { - "include": "source.php#interpolation_double_quoted" - } - ] - }, - "3": { - "name": "punctuation.definition.string.end.sql" - } - } - }, - { - "match": "'(?=((\\\\')|[^'\"])*(\"|$))", - "name": "string.quoted.single.unclosed.sql" - }, - { - "include": "source.php#interpolation_double_quoted" - } - ] - }, - "text.html.php - (meta.embedded | meta.tag), L:((text.html.php meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.css - (meta.embedded.block.php | meta.embedded.line.php))": { - "patterns": [ - { - "include": "#php-tag" - } - ] - } - }, - "patterns": [ - { - "begin": "\\A#!", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.php" - } - }, - "end": "$", - "name": "comment.line.shebang.php" - }, - { - "include": "text.html.derivative" - } - ], - "repository": { - "php-tag": { - "patterns": [ - { - "begin": "<\\?(?i:php|=)?(?![^?]*\\?>)", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - } - }, - "end": "(\\?)>", - "endCaptures": { - "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "source.php" - } - }, - "name": "meta.embedded.block.php", - "contentName": "source.php", - "patterns": [ - { - "include": "source.php" - } - ] - }, - { - "begin": "<\\?(?i:php|=)?", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - } - }, - "end": "(\\?)>", - "endCaptures": { - "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "source.php" - } - }, - "name": "meta.embedded.line.php", - "contentName": "source.php", - "patterns": [ - { - "include": "source.php" - } - ] - } - ] - } - } -} \ No newline at end of file diff --git a/lib/vscode/extensions/ruby/language-configuration.json b/lib/vscode/extensions/ruby/language-configuration.json deleted file mode 100644 index 81fdee540f21..000000000000 --- a/lib/vscode/extensions/ruby/language-configuration.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "comments": { - "lineComment": "#", - "blockComment": [ "=begin", "=end" ] - }, - "brackets": [ - ["{", "}"], - ["[", "]"], - ["(", ")"] - ], - "autoClosingPairs": [ - ["{", "}"], - ["[", "]"], - ["(", ")"], - { "open": "\"", "close": "\"", "notIn": ["string"] }, - { "open": "'", "close": "'", "notIn": ["string"] }, - { "open": "`", "close": "`", "notIn": ["string"] } - ], - "surroundingPairs": [ - ["{", "}"], - ["[", "]"], - ["(", ")"], - ["\"", "\""], - ["'", "'"], - ["`", "`"] - ], - "indentationRules": { - "increaseIndentPattern": "^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|(\"|'|\/).*\\4)*(#.*)?$", - "decreaseIndentPattern": "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)" - } -} diff --git a/lib/vscode/extensions/scss/cgmanifest.json b/lib/vscode/extensions/scss/cgmanifest.json deleted file mode 100644 index a67a4f546096..000000000000 --- a/lib/vscode/extensions/scss/cgmanifest.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "registrations": [ - { - "component": { - "type": "git", - "git": { - "name": "atom/language-sass", - "repositoryUrl": "https://github.com/atom/language-sass", - "commitHash": "303bbf0c250fe380b9e57375598cfd916110758b" - } - }, - "license": "MIT", - "description": "The file syntaxes/scss.json was derived from the Atom package https://github.com/atom/language-sass which was originally converted from the TextMate bundle https://github.com/alexsancho/SASS.tmbundle.", - "version": "0.61.4" - } - ], - "version": 1 -} \ No newline at end of file diff --git a/lib/vscode/extensions/shellscript/package.json b/lib/vscode/extensions/shellscript/package.json deleted file mode 100644 index a8ecba9b104c..000000000000 --- a/lib/vscode/extensions/shellscript/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "shellscript", - "displayName": "%displayName%", - "description": "%description%", - "version": "1.0.0", - "publisher": "vscode", - "license": "MIT", - "engines": { - "vscode": "*" - }, - "scripts": { - "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-shellscript grammars/shell-unix-bash.cson ./syntaxes/shell-unix-bash.tmLanguage.json" - }, - "contributes": { - "languages": [ - { - "id": "shellscript", - "aliases": [ - "Shell Script", - "shellscript", - "bash", - "sh", - "zsh", - "ksh", - "csh" - ], - "extensions": [ - ".sh", - ".bash", - ".bashrc", - ".bash_aliases", - ".bash_profile", - ".bash_login", - ".ebuild", - ".install", - ".profile", - ".bash_logout", - ".xprofile", - ".xsession", - ".xsessionrc", - ".Xsession", - ".zsh", - ".zshrc", - ".zprofile", - ".zlogin", - ".zlogout", - ".zshenv", - ".zsh-theme", - ".ksh", - ".csh", - ".cshrc", - ".tcshrc", - ".yashrc", - ".yash_profile" - ], - "filenames": [ - "APKBUILD", - "PKGBUILD", - ".envrc", - ".hushlogin", - "zshrc", - "zshenv", - "zlogin", - "zprofile", - "zlogout", - "bashrc_Apple_Terminal", - "zshrc_Apple_Terminal" - ], - "firstLine": "^#!.*\\b(bash|zsh|sh|ksh|dtksh|pdksh|mksh|ash|dash|yash|sh|csh|jcsh|tcsh|itcsh).*|^#\\s*-\\*-[^*]*mode:\\s*shell-script[^*]*-\\*-", - "configuration": "./language-configuration.json", - "mimetypes": [ - "text/x-shellscript" - ] - } - ], - "grammars": [ - { - "language": "shellscript", - "scopeName": "source.shell", - "path": "./syntaxes/shell-unix-bash.tmLanguage.json" - } - ], - "configurationDefaults": { - "[shellscript]": { - "files.eol": "\n" - } - } - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/simple-browser/package.json b/lib/vscode/extensions/simple-browser/package.json deleted file mode 100644 index 5fd030b186aa..000000000000 --- a/lib/vscode/extensions/simple-browser/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "simple-browser", - "displayName": "%displayName%", - "description": "%description%", - "enableProposedApi": true, - "version": "1.0.0", - "icon": "media/icon.png", - "publisher": "vscode", - "license": "MIT", - "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", - "engines": { - "vscode": "^1.53.0" - }, - "main": "./out/extension", - "browser": "./dist/browser/extension", - "categories": [ - "Other" - ], - "extensionKind": [ - "ui", - "workspace", - "web" - ], - "activationEvents": [ - "onCommand:simpleBrowser.show", - "onCommand:simpleBrowser.api.open", - "onOpenExternalUri:http", - "onOpenExternalUri:https" - ], - "capabilities": { - "virtualWorkspaces": true, - "untrustedWorkspaces": { - "supported": true - } - }, - "contributes": { - "commands": [ - { - "command": "simpleBrowser.show", - "title": "Show", - "category": "Simple Browser" - } - ], - "configuration": [ - { - "title": "Simple Browser", - "properties": { - "simpleBrowser.focusLockIndicator.enabled": { - "type": "boolean", - "default": true, - "title": "Focus Lock Indicator Enabled", - "description": "%configuration.focusLockIndicator.enabled.description%" - } - } - } - ] - }, - "scripts": { - "compile": "gulp compile-extension:markdown-language-features && npm run build-preview", - "watch": "npm run build-preview && gulp watch-extension:markdown-language-features", - "vscode:prepublish": "npm run build-ext && npm run build-preview", - "build-ext": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:markdown-language-features ./tsconfig.json", - "build-preview": "npx webpack-cli --mode development", - "build-preview-production": "npx webpack-cli --mode production", - "compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none", - "watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose" - }, - "dependencies": { - "vscode-extension-telemetry": "0.1.7", - "vscode-nls": "^4.0.0" - }, - "devDependencies": { - "vscode-codicons": "^0.0.14", - "@types/node": "^12.11.7" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/simple-browser/preview-src/index.ts b/lib/vscode/extensions/simple-browser/preview-src/index.ts deleted file mode 100644 index 36fe4eb8e158..000000000000 --- a/lib/vscode/extensions/simple-browser/preview-src/index.ts +++ /dev/null @@ -1,111 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { onceDocumentLoaded } from './events'; - -declare let acquireVsCodeApi: any; -const vscode = acquireVsCodeApi(); - -function getSettings() { - const element = document.getElementById('simple-browser-settings'); - if (element) { - const data = element.getAttribute('data-settings'); - if (data) { - return JSON.parse(data); - } - } - - throw new Error(`Could not load settings`); -} - -const settings = getSettings(); - -const iframe = document.querySelector('iframe')!; -const header = document.querySelector('.header')!; -const input = header.querySelector('.url-input')!; -const forwardButton = header.querySelector('.forward-button')!; -const backButton = header.querySelector('.back-button')!; -const reloadButton = header.querySelector('.reload-button')!; -const openExternalButton = header.querySelector('.open-external-button')!; - -window.addEventListener('message', e => { - switch (e.data.type) { - case 'focus': - { - iframe.focus(); - break; - } - case 'didChangeFocusLockIndicatorEnabled': - { - toggleFocusLockIndicatorEnabled(e.data.enabled); - break; - } - } -}); - -onceDocumentLoaded(() => { - setInterval(() => { - const iframeFocused = document.activeElement?.tagName === 'IFRAME'; - document.body.classList.toggle('iframe-focused', iframeFocused); - }, 50); - - iframe.addEventListener('load', () => { - // Noop - }); - - input.addEventListener('change', e => { - const url = (e.target as HTMLInputElement).value; - navigateTo(url); - }); - - forwardButton.addEventListener('click', () => { - history.forward(); - }); - - backButton.addEventListener('click', () => { - history.back(); - }); - - openExternalButton.addEventListener('click', () => { - vscode.postMessage({ - type: 'openExternal', - url: input.value - }); - }); - - reloadButton.addEventListener('click', () => { - // This does not seem to trigger what we want - // history.go(0); - - // This incorrectly adds entries to the history but does reload - // It also always incorrectly always loads the value in the input bar, - // which may not match the current page if the user has navigated - navigateTo(input.value); - }); - - navigateTo(settings.url); - input.value = settings.url; - - toggleFocusLockIndicatorEnabled(settings.focusLockIndicatorEnabled); - - function navigateTo(rawUrl: string): void { - try { - const url = new URL(rawUrl); - - // Try to bust the cache for the iframe - // There does not appear to be any way to reliably do this except modifying the url - url.searchParams.append('vscodeBrowserReqId', Date.now().toString()); - - iframe.src = url.toString(); - } catch { - iframe.src = rawUrl; - } - } -}); - -function toggleFocusLockIndicatorEnabled(enabled: boolean) { - document.body.classList.toggle('enable-focus-lock-indicator', enabled); -} - diff --git a/lib/vscode/extensions/simple-browser/preview-src/tsconfig.json b/lib/vscode/extensions/simple-browser/preview-src/tsconfig.json deleted file mode 100644 index b1bede72c17e..000000000000 --- a/lib/vscode/extensions/simple-browser/preview-src/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist/", - "jsx": "react", - "lib": [ - "es2018", - "DOM", - "DOM.Iterable" - ] - } -} diff --git a/lib/vscode/extensions/simple-browser/yarn.lock b/lib/vscode/extensions/simple-browser/yarn.lock deleted file mode 100644 index 804f85a68aee..000000000000 --- a/lib/vscode/extensions/simple-browser/yarn.lock +++ /dev/null @@ -1,101 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.11.7": - version "12.12.69" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.69.tgz#7cb6a3aa0d16664bf2dcd1450ccb8477464fbd79" - integrity sha512-2F2VQRSFmzqgUEXw75L51MgnnZqc6bKWVSUPfrDPzp6mzGGibeVwyQcpvZvBr5RnsoMRHmC8EcBQiobSeqeJxg== - -applicationinsights@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" - integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== - dependencies: - cls-hooked "^4.2.2" - continuation-local-storage "^3.2.1" - diagnostic-channel "0.2.0" - diagnostic-channel-publishers "^0.3.3" - -async-hook-jl@^1.7.6: - version "1.7.6" - resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" - integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== - dependencies: - stack-chain "^1.3.7" - -async-listener@^0.6.0: - version "0.6.10" - resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" - integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== - dependencies: - semver "^5.3.0" - shimmer "^1.1.0" - -cls-hooked@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" - integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== - dependencies: - async-hook-jl "^1.7.6" - emitter-listener "^1.0.1" - semver "^5.4.1" - -continuation-local-storage@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" - integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== - dependencies: - async-listener "^0.6.0" - emitter-listener "^1.1.1" - -diagnostic-channel-publishers@^0.3.3: - version "0.3.5" - resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" - integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== - -diagnostic-channel@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" - integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= - dependencies: - semver "^5.3.0" - -emitter-listener@^1.0.1, emitter-listener@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" - integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== - dependencies: - shimmer "^1.2.0" - -semver@^5.3.0, semver@^5.4.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -shimmer@^1.1.0, shimmer@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" - integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== - -stack-chain@^1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" - integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= - -vscode-codicons@^0.0.14: - version "0.0.14" - resolved "https://registry.yarnpkg.com/vscode-codicons/-/vscode-codicons-0.0.14.tgz#e0d05418e2e195564ff6f6a2199d70415911c18f" - integrity sha512-6CEH5KT9ct5WMw7n5dlX7rB8ya4CUI2FSq1Wk36XaW+c5RglFtAanUV0T+gvZVVFhl/WxfjTvFHq06Hz9c1SLA== - -vscode-extension-telemetry@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" - integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== - dependencies: - applicationinsights "1.7.4" - -vscode-nls@^4.0.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" - integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== diff --git a/lib/vscode/extensions/theme-seti/CONTRIBUTING.md b/lib/vscode/extensions/theme-seti/CONTRIBUTING.md deleted file mode 100644 index 888829ff0042..000000000000 --- a/lib/vscode/extensions/theme-seti/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# theme-seti - -This is an icon theme that uses the icons from [`seti-ui`](https://github.com/jesseweed/seti-ui). - -## Updating icons - -There is script that can be used to update icons, [./build/update-icon-theme.js](build/update-icon-theme.js). - -To run this script, run `npm run update` from the `theme-seti` directory. - -This can be run in one of two ways: looking at a local copy of `seti-ui` for icons, or getting them straight from GitHub. - -If you want to run it from a local copy of `seti-ui`, first clone [`seti-ui`](https://github.com/jesseweed/seti-ui) to the folder next to your `vscode` repo (from the `theme-seti` directory, `../../`). -Then, inside the `set-ui` directory, run `npm install` followed by `npm run prepublishOnly`. This will generate updated icons. - -If you want to download the icons straight from GitHub, change the `FROM_DISK` variable to `false` inside of `update-icon-theme.js`. - -### Languages not shipped with `vscode` - -Languages that are not shipped with `vscode` must be added to the `nonBuiltInLanguages` object inside of `update-icon-theme.js`. - -These should match [the file mapping in `seti-ui`](https://github.com/jesseweed/seti-ui/blob/master/styles/components/icons/mapping.less). - -Please try and keep this list in alphabetical order! Thank you. - -## Previewing icons - -There is a [`./icons/preview.html`](./icons/preview.html) file that can be opened to see all of the icons included in the theme. -Note that to view this, it needs to be hosted by a web server. - -When updating icons, it is always a good idea to make sure that they work properly by looking at this page. -When submitting a PR that updates these icons, a screenshot of the preview page should accompany it. diff --git a/lib/vscode/extensions/theme-seti/cgmanifest.json b/lib/vscode/extensions/theme-seti/cgmanifest.json deleted file mode 100644 index c13fbcb15bef..000000000000 --- a/lib/vscode/extensions/theme-seti/cgmanifest.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "registrations": [ - { - "component": { - "type": "git", - "git": { - "name": "seti-ui", - "repositoryUrl": "https://github.com/jesseweed/seti-ui", - "commitHash": "894c49fa9f5ce43dd4f012173a7bb107346e524e" - } - }, - "version": "0.1.0" - } - ], - "version": 1 -} \ No newline at end of file diff --git a/lib/vscode/extensions/theme-seti/icons/seti.woff b/lib/vscode/extensions/theme-seti/icons/seti.woff deleted file mode 100644 index 928e91b30c12..000000000000 Binary files a/lib/vscode/extensions/theme-seti/icons/seti.woff and /dev/null differ diff --git a/lib/vscode/extensions/typescript-language-features/package.json b/lib/vscode/extensions/typescript-language-features/package.json deleted file mode 100644 index 738dc68e183d..000000000000 --- a/lib/vscode/extensions/typescript-language-features/package.json +++ /dev/null @@ -1,1252 +0,0 @@ -{ - "name": "typescript-language-features", - "description": "%description%", - "displayName": "%displayName%", - "version": "1.0.0", - "author": "vscode", - "publisher": "vscode", - "license": "MIT", - "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", - "enableProposedApi": true, - "capabilities": { - "virtualWorkspaces": true, - "untrustedWorkspaces": { - "supported": "limited", - "description": "%workspaceTrust%", - "restrictedConfigurations": [ - "typescript.tsdk", - "typescript.tsserver.pluginPaths", - "typescript.npm" - ] - } - }, - "engines": { - "vscode": "^1.30.0" - }, - "icon": "media/icon.png", - "categories": [ - "Programming Languages" - ], - "dependencies": { - "jsonc-parser": "^2.2.1", - "semver": "5.5.1", - "typescript-vscode-sh-plugin": "^0.7.3", - "vscode-extension-telemetry": "0.1.7", - "vscode-nls": "^4.1.1" - }, - "devDependencies": { - "@types/node": "^12.19.9", - "@types/semver": "^5.5.0" - }, - "scripts": { - "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:typescript-language-features", - "compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none", - "watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose" - }, - "activationEvents": [ - "onLanguage:javascript", - "onLanguage:javascriptreact", - "onLanguage:typescript", - "onLanguage:typescriptreact", - "onLanguage:jsx-tags", - "onCommand:typescript.reloadProjects", - "onCommand:javascript.reloadProjects", - "onCommand:typescript.selectTypeScriptVersion", - "onCommand:javascript.goToProjectConfig", - "onCommand:typescript.goToProjectConfig", - "onCommand:typescript.openTsServerLog", - "onCommand:workbench.action.tasks.runTask", - "onCommand:_typescript.configurePlugin", - "onCommand:_typescript.learnMoreAboutRefactorings", - "onCommand:typescript.fileReferences", - "onLanguage:jsonc" - ], - "main": "./out/extension", - "browser": "./dist/browser/extension", - "contributes": { - "jsonValidation": [ - { - "fileMatch": "package.json", - "url": "./schemas/package.schema.json" - }, - { - "fileMatch": "tsconfig.json", - "url": "https://json.schemastore.org/tsconfig" - }, - { - "fileMatch": "tsconfig.json", - "url": "./schemas/tsconfig.schema.json" - }, - { - "fileMatch": "tsconfig.*.json", - "url": "https://json.schemastore.org/tsconfig" - }, - { - "fileMatch": "tsconfig-*.json", - "url": "./schemas/tsconfig.schema.json" - }, - { - "fileMatch": "tsconfig-*.json", - "url": "https://json.schemastore.org/tsconfig" - }, - { - "fileMatch": "tsconfig.*.json", - "url": "./schemas/tsconfig.schema.json" - }, - { - "fileMatch": "typings.json", - "url": "https://json.schemastore.org/typings" - }, - { - "fileMatch": ".bowerrc", - "url": "https://json.schemastore.org/bowerrc" - }, - { - "fileMatch": ".babelrc", - "url": "https://json.schemastore.org/babelrc" - }, - { - "fileMatch": ".babelrc.json", - "url": "https://json.schemastore.org/babelrc" - }, - { - "fileMatch": "babel.config.json", - "url": "https://json.schemastore.org/babelrc" - }, - { - "fileMatch": "jsconfig.json", - "url": "https://json.schemastore.org/jsconfig" - }, - { - "fileMatch": "jsconfig.json", - "url": "./schemas/jsconfig.schema.json" - }, - { - "fileMatch": "jsconfig.*.json", - "url": "https://json.schemastore.org/jsconfig" - }, - { - "fileMatch": "jsconfig.*.json", - "url": "./schemas/jsconfig.schema.json" - } - ], - "configuration": { - "type": "object", - "title": "%configuration.typescript%", - "order": 20, - "properties": { - "typescript.tsdk": { - "type": [ - "string", - "null" - ], - "default": null, - "markdownDescription": "%typescript.tsdk.desc%", - "scope": "window" - }, - "typescript.disableAutomaticTypeAcquisition": { - "type": "boolean", - "default": false, - "markdownDescription": "%typescript.disableAutomaticTypeAcquisition%", - "scope": "window", - "tags": [ - "usesOnlineServices" - ] - }, - "typescript.enablePromptUseWorkspaceTsdk": { - "type": "boolean", - "default": false, - "description": "%typescript.enablePromptUseWorkspaceTsdk%", - "scope": "window" - }, - "typescript.npm": { - "type": [ - "string", - "null" - ], - "default": null, - "markdownDescription": "%typescript.npm%", - "scope": "machine" - }, - "typescript.check.npmIsInstalled": { - "type": "boolean", - "default": true, - "markdownDescription": "%typescript.check.npmIsInstalled%", - "scope": "window" - }, - "javascript.referencesCodeLens.enabled": { - "type": "boolean", - "default": false, - "description": "%javascript.referencesCodeLens.enabled%", - "scope": "window" - }, - "javascript.referencesCodeLens.showOnAllFunctions": { - "type": "boolean", - "default": false, - "description": "%javascript.referencesCodeLens.showOnAllFunctions%", - "scope": "window" - }, - "typescript.referencesCodeLens.enabled": { - "type": "boolean", - "default": false, - "description": "%typescript.referencesCodeLens.enabled%", - "scope": "window" - }, - "typescript.referencesCodeLens.showOnAllFunctions": { - "type": "boolean", - "default": false, - "description": "%typescript.referencesCodeLens.showOnAllFunctions%", - "scope": "window" - }, - "typescript.implementationsCodeLens.enabled": { - "type": "boolean", - "default": false, - "description": "%typescript.implementationsCodeLens.enabled%", - "scope": "window" - }, - "typescript.tsserver.enableTracing": { - "type": "boolean", - "default": false, - "description": "%typescript.tsserver.enableTracing%", - "scope": "window" - }, - "typescript.tsserver.log": { - "type": "string", - "enum": [ - "off", - "terse", - "normal", - "verbose" - ], - "default": "off", - "description": "%typescript.tsserver.log%", - "scope": "window" - }, - "typescript.tsserver.pluginPaths": { - "type": "array", - "items": { - "type": "string", - "description": "%typescript.tsserver.pluginPaths.item%" - }, - "default": [], - "description": "%typescript.tsserver.pluginPaths%", - "scope": "machine" - }, - "typescript.tsserver.trace": { - "type": "string", - "enum": [ - "off", - "messages", - "verbose" - ], - "default": "off", - "description": "%typescript.tsserver.trace%", - "scope": "window" - }, - "javascript.suggest.completeFunctionCalls": { - "type": "boolean", - "default": false, - "description": "%configuration.suggest.completeFunctionCalls%", - "scope": "resource" - }, - "typescript.suggest.completeFunctionCalls": { - "type": "boolean", - "default": false, - "description": "%configuration.suggest.completeFunctionCalls%", - "scope": "resource" - }, - "javascript.suggest.includeAutomaticOptionalChainCompletions": { - "type": "boolean", - "default": true, - "description": "%configuration.suggest.includeAutomaticOptionalChainCompletions%", - "scope": "resource" - }, - "typescript.suggest.includeAutomaticOptionalChainCompletions": { - "type": "boolean", - "default": true, - "description": "%configuration.suggest.includeAutomaticOptionalChainCompletions%", - "scope": "resource" - }, - "javascript.suggest.includeCompletionsForImportStatements": { - "type": "boolean", - "default": true, - "description": "%configuration.suggest.includeCompletionsForImportStatements%", - "scope": "resource" - }, - "typescript.suggest.includeCompletionsForImportStatements": { - "type": "boolean", - "default": true, - "description": "%configuration.suggest.includeCompletionsForImportStatements%", - "scope": "resource" - }, - "typescript.suggest.includeCompletionsWithSnippetText": { - "type": "boolean", - "default": true, - "description": "%configuration.suggest.includeCompletionsWithSnippetText%", - "scope": "resource" - }, - "typescript.reportStyleChecksAsWarnings": { - "type": "boolean", - "default": true, - "description": "%typescript.reportStyleChecksAsWarnings%", - "scope": "window" - }, - "typescript.validate.enable": { - "type": "boolean", - "default": true, - "description": "%typescript.validate.enable%", - "scope": "window" - }, - "typescript.format.enable": { - "type": "boolean", - "default": true, - "description": "%typescript.format.enable%", - "scope": "window" - }, - "typescript.format.insertSpaceAfterCommaDelimiter": { - "type": "boolean", - "default": true, - "description": "%format.insertSpaceAfterCommaDelimiter%", - "scope": "resource" - }, - "typescript.format.insertSpaceAfterConstructor": { - "type": "boolean", - "default": false, - "description": "%format.insertSpaceAfterConstructor%", - "scope": "resource" - }, - "typescript.format.insertSpaceAfterSemicolonInForStatements": { - "type": "boolean", - "default": true, - "description": "%format.insertSpaceAfterSemicolonInForStatements%", - "scope": "resource" - }, - "typescript.format.insertSpaceBeforeAndAfterBinaryOperators": { - "type": "boolean", - "default": true, - "description": "%format.insertSpaceBeforeAndAfterBinaryOperators%", - "scope": "resource" - }, - "typescript.format.insertSpaceAfterKeywordsInControlFlowStatements": { - "type": "boolean", - "default": true, - "description": "%format.insertSpaceAfterKeywordsInControlFlowStatements%", - "scope": "resource" - }, - "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": { - "type": "boolean", - "default": true, - "description": "%format.insertSpaceAfterFunctionKeywordForAnonymousFunctions%", - "scope": "resource" - }, - "typescript.format.insertSpaceBeforeFunctionParenthesis": { - "type": "boolean", - "default": false, - "description": "%format.insertSpaceBeforeFunctionParenthesis%", - "scope": "resource" - }, - "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": { - "type": "boolean", - "default": false, - "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis%", - "scope": "resource" - }, - "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": { - "type": "boolean", - "default": false, - "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets%", - "scope": "resource" - }, - "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": { - "type": "boolean", - "default": true, - "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces%", - "scope": "resource" - }, - "typescript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": { - "type": "boolean", - "default": true, - "description": "%format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces%", - "scope": "resource" - }, - "typescript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": { - "type": "boolean", - "default": false, - "description": "%format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces%", - "scope": "resource" - }, - "typescript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": { - "type": "boolean", - "default": false, - "description": "%format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces%", - "scope": "resource" - }, - "typescript.format.insertSpaceAfterTypeAssertion": { - "type": "boolean", - "default": false, - "description": "%format.insertSpaceAfterTypeAssertion%", - "scope": "resource" - }, - "typescript.format.placeOpenBraceOnNewLineForFunctions": { - "type": "boolean", - "default": false, - "description": "%format.placeOpenBraceOnNewLineForFunctions%", - "scope": "resource" - }, - "typescript.format.placeOpenBraceOnNewLineForControlBlocks": { - "type": "boolean", - "default": false, - "description": "%format.placeOpenBraceOnNewLineForControlBlocks%", - "scope": "resource" - }, - "typescript.format.semicolons": { - "type": "string", - "default": "ignore", - "description": "%format.semicolons%", - "scope": "resource", - "enum": [ - "ignore", - "insert", - "remove" - ], - "enumDescriptions": [ - "%format.semicolons.ignore%", - "%format.semicolons.insert%", - "%format.semicolons.remove%" - ] - }, - "javascript.validate.enable": { - "type": "boolean", - "default": true, - "description": "%javascript.validate.enable%", - "scope": "window" - }, - "javascript.format.enable": { - "type": "boolean", - "default": true, - "description": "%javascript.format.enable%", - "scope": "window" - }, - "javascript.format.insertSpaceAfterCommaDelimiter": { - "type": "boolean", - "default": true, - "description": "%format.insertSpaceAfterCommaDelimiter%", - "scope": "resource" - }, - "javascript.format.insertSpaceAfterConstructor": { - "type": "boolean", - "default": false, - "description": "%format.insertSpaceAfterConstructor%", - "scope": "resource" - }, - "javascript.format.insertSpaceAfterSemicolonInForStatements": { - "type": "boolean", - "default": true, - "description": "%format.insertSpaceAfterSemicolonInForStatements%", - "scope": "resource" - }, - "javascript.format.insertSpaceBeforeAndAfterBinaryOperators": { - "type": "boolean", - "default": true, - "description": "%format.insertSpaceBeforeAndAfterBinaryOperators%", - "scope": "resource" - }, - "javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": { - "type": "boolean", - "default": true, - "description": "%format.insertSpaceAfterKeywordsInControlFlowStatements%", - "scope": "resource" - }, - "javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": { - "type": "boolean", - "default": true, - "description": "%format.insertSpaceAfterFunctionKeywordForAnonymousFunctions%", - "scope": "resource" - }, - "javascript.format.insertSpaceBeforeFunctionParenthesis": { - "type": "boolean", - "default": false, - "description": "%format.insertSpaceBeforeFunctionParenthesis%", - "scope": "resource" - }, - "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": { - "type": "boolean", - "default": false, - "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis%", - "scope": "resource" - }, - "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": { - "type": "boolean", - "default": false, - "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets%", - "scope": "resource" - }, - "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": { - "type": "boolean", - "default": true, - "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces%", - "scope": "resource" - }, - "javascript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": { - "type": "boolean", - "default": true, - "description": "%format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces%", - "scope": "resource" - }, - "javascript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": { - "type": "boolean", - "default": false, - "description": "%format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces%", - "scope": "resource" - }, - "javascript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": { - "type": "boolean", - "default": false, - "description": "%format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces%", - "scope": "resource" - }, - "javascript.format.placeOpenBraceOnNewLineForFunctions": { - "type": "boolean", - "default": false, - "description": "%format.placeOpenBraceOnNewLineForFunctions%", - "scope": "resource" - }, - "javascript.format.placeOpenBraceOnNewLineForControlBlocks": { - "type": "boolean", - "default": false, - "description": "%format.placeOpenBraceOnNewLineForControlBlocks%", - "scope": "resource" - }, - "javascript.format.semicolons": { - "type": "string", - "default": "ignore", - "description": "%format.semicolons%", - "scope": "resource", - "enum": [ - "ignore", - "insert", - "remove" - ], - "enumDescriptions": [ - "%format.semicolons.ignore%", - "%format.semicolons.insert%", - "%format.semicolons.remove%" - ] - }, - "javascript.implicitProjectConfig.checkJs": { - "type": "boolean", - "default": false, - "markdownDescription": "%configuration.implicitProjectConfig.checkJs%", - "markdownDeprecationMessage": "%configuration.javascript.checkJs.checkJs.deprecation%", - "scope": "window" - }, - "js/ts.implicitProjectConfig.checkJs": { - "type": "boolean", - "default": false, - "markdownDescription": "%configuration.implicitProjectConfig.checkJs%", - "scope": "window" - }, - "javascript.implicitProjectConfig.experimentalDecorators": { - "type": "boolean", - "default": false, - "markdownDescription": "%configuration.implicitProjectConfig.experimentalDecorators%", - "markdownDeprecationMessage": "%configuration.javascript.checkJs.experimentalDecorators.deprecation%", - "scope": "window" - }, - "js/ts.implicitProjectConfig.experimentalDecorators": { - "type": "boolean", - "default": false, - "markdownDescription": "%configuration.implicitProjectConfig.experimentalDecorators%", - "scope": "window" - }, - "js/ts.implicitProjectConfig.strictNullChecks": { - "type": "boolean", - "default": false, - "markdownDescription": "%configuration.implicitProjectConfig.strictNullChecks%", - "scope": "window" - }, - "js/ts.implicitProjectConfig.strictFunctionTypes": { - "type": "boolean", - "default": true, - "markdownDescription": "%configuration.implicitProjectConfig.strictFunctionTypes%", - "scope": "window" - }, - "javascript.suggest.names": { - "type": "boolean", - "default": true, - "markdownDescription": "%configuration.suggest.names%", - "scope": "resource" - }, - "typescript.tsc.autoDetect": { - "type": "string", - "default": "on", - "enum": [ - "on", - "off", - "build", - "watch" - ], - "markdownEnumDescriptions": [ - "%typescript.tsc.autoDetect.on%", - "%typescript.tsc.autoDetect.off%", - "%typescript.tsc.autoDetect.build%", - "%typescript.tsc.autoDetect.watch%" - ], - "description": "%typescript.tsc.autoDetect%", - "scope": "window" - }, - "javascript.suggest.paths": { - "type": "boolean", - "default": true, - "description": "%configuration.suggest.paths%", - "scope": "resource" - }, - "typescript.suggest.paths": { - "type": "boolean", - "default": true, - "description": "%configuration.suggest.paths%", - "scope": "resource" - }, - "javascript.suggest.autoImports": { - "type": "boolean", - "default": true, - "description": "%configuration.suggest.autoImports%", - "scope": "resource" - }, - "typescript.suggest.autoImports": { - "type": "boolean", - "default": true, - "description": "%configuration.suggest.autoImports%", - "scope": "resource" - }, - "javascript.suggest.completeJSDocs": { - "type": "boolean", - "default": true, - "description": "%configuration.suggest.completeJSDocs%", - "scope": "resource" - }, - "typescript.suggest.completeJSDocs": { - "type": "boolean", - "default": true, - "description": "%configuration.suggest.completeJSDocs%", - "scope": "resource" - }, - "javascript.suggest.jsdoc.generateReturns": { - "type": "boolean", - "default": true, - "markdownDescription": "%configuration.suggest.jsdoc.generateReturns%", - "scope": "resource" - }, - "typescript.suggest.jsdoc.generateReturns": { - "type": "boolean", - "default": true, - "markdownDescription": "%configuration.suggest.jsdoc.generateReturns%", - "scope": "resource" - }, - "typescript.locale": { - "type": [ - "string", - "null" - ], - "enum": [ - "de", - "es", - "en", - "fr", - "it", - "ja", - "ko", - "ru", - "zh-CN", - "zh-TW", - null - ], - "default": null, - "markdownDescription": "%typescript.locale%", - "scope": "window" - }, - "javascript.suggestionActions.enabled": { - "type": "boolean", - "default": true, - "description": "%javascript.suggestionActions.enabled%", - "scope": "resource" - }, - "typescript.suggestionActions.enabled": { - "type": "boolean", - "default": true, - "description": "%typescript.suggestionActions.enabled%", - "scope": "resource" - }, - "javascript.preferences.quoteStyle": { - "type": "string", - "enum": [ - "auto", - "single", - "double" - ], - "default": "auto", - "markdownDescription": "%typescript.preferences.quoteStyle%", - "scope": "resource" - }, - "typescript.preferences.quoteStyle": { - "type": "string", - "enum": [ - "auto", - "single", - "double" - ], - "default": "auto", - "markdownDescription": "%typescript.preferences.quoteStyle%", - "scope": "resource" - }, - "javascript.preferences.importModuleSpecifier": { - "type": "string", - "enum": [ - "shortest", - "relative", - "non-relative", - "project-relative" - ], - "markdownEnumDescriptions": [ - "%typescript.preferences.importModuleSpecifier.shortest%", - "%typescript.preferences.importModuleSpecifier.relative%", - "%typescript.preferences.importModuleSpecifier.nonRelative%", - "%typescript.preferences.importModuleSpecifier.projectRelative%" - ], - "default": "shortest", - "description": "%typescript.preferences.importModuleSpecifier%", - "scope": "resource" - }, - "typescript.preferences.importModuleSpecifier": { - "type": "string", - "enum": [ - "shortest", - "relative", - "non-relative", - "project-relative" - ], - "markdownEnumDescriptions": [ - "%typescript.preferences.importModuleSpecifier.shortest%", - "%typescript.preferences.importModuleSpecifier.relative%", - "%typescript.preferences.importModuleSpecifier.nonRelative%", - "%typescript.preferences.importModuleSpecifier.projectRelative%" - ], - "default": "shortest", - "description": "%typescript.preferences.importModuleSpecifier%", - "scope": "resource" - }, - "javascript.preferences.importModuleSpecifierEnding": { - "type": "string", - "enum": [ - "auto", - "minimal", - "index", - "js" - ], - "markdownEnumDescriptions": [ - "%typescript.preferences.importModuleSpecifierEnding.auto%", - "%typescript.preferences.importModuleSpecifierEnding.minimal%", - "%typescript.preferences.importModuleSpecifierEnding.index%", - "%typescript.preferences.importModuleSpecifierEnding.js%" - ], - "default": "auto", - "description": "%typescript.preferences.importModuleSpecifierEnding%", - "scope": "resource" - }, - "typescript.preferences.importModuleSpecifierEnding": { - "type": "string", - "enum": [ - "auto", - "minimal", - "index", - "js" - ], - "markdownEnumDescriptions": [ - "%typescript.preferences.importModuleSpecifierEnding.auto%", - "%typescript.preferences.importModuleSpecifierEnding.minimal%", - "%typescript.preferences.importModuleSpecifierEnding.index%", - "%typescript.preferences.importModuleSpecifierEnding.js%" - ], - "default": "auto", - "description": "%typescript.preferences.importModuleSpecifierEnding%", - "scope": "resource" - }, - "typescript.preferences.includePackageJsonAutoImports": { - "type": "string", - "enum": [ - "auto", - "on", - "off" - ], - "enumDescriptions": [ - "%typescript.preferences.includePackageJsonAutoImports.auto%", - "%typescript.preferences.includePackageJsonAutoImports.on%", - "%typescript.preferences.includePackageJsonAutoImports.off%" - ], - "default": "auto", - "markdownDescription": "%typescript.preferences.includePackageJsonAutoImports%", - "scope": "window" - }, - "javascript.preferences.renameShorthandProperties": { - "type": "boolean", - "default": true, - "description": "%typescript.preferences.useAliasesForRenames%", - "deprecationMessage": "%typescript.preferences.renameShorthandProperties.deprecationMessage%", - "scope": "resource" - }, - "typescript.preferences.renameShorthandProperties": { - "type": "boolean", - "default": true, - "description": "%typescript.preferences.useAliasesForRenames%", - "deprecationMessage": "%typescript.preferences.renameShorthandProperties.deprecationMessage%", - "scope": "resource" - }, - "javascript.preferences.useAliasesForRenames": { - "type": "boolean", - "default": true, - "description": "%typescript.preferences.useAliasesForRenames%", - "scope": "resource" - }, - "typescript.preferences.useAliasesForRenames": { - "type": "boolean", - "default": true, - "description": "%typescript.preferences.useAliasesForRenames%", - "scope": "resource" - }, - "typescript.updateImportsOnFileMove.enabled": { - "type": "string", - "enum": [ - "prompt", - "always", - "never" - ], - "markdownEnumDescriptions": [ - "%typescript.updateImportsOnFileMove.enabled.prompt%", - "%typescript.updateImportsOnFileMove.enabled.always%", - "%typescript.updateImportsOnFileMove.enabled.never%" - ], - "default": "prompt", - "description": "%typescript.updateImportsOnFileMove.enabled%", - "scope": "resource" - }, - "javascript.updateImportsOnFileMove.enabled": { - "type": "string", - "enum": [ - "prompt", - "always", - "never" - ], - "markdownEnumDescriptions": [ - "%typescript.updateImportsOnFileMove.enabled.prompt%", - "%typescript.updateImportsOnFileMove.enabled.always%", - "%typescript.updateImportsOnFileMove.enabled.never%" - ], - "default": "prompt", - "description": "%typescript.updateImportsOnFileMove.enabled%", - "scope": "resource" - }, - "typescript.autoClosingTags": { - "type": "boolean", - "default": true, - "description": "%typescript.autoClosingTags%" - }, - "javascript.autoClosingTags": { - "type": "boolean", - "default": true, - "description": "%typescript.autoClosingTags%" - }, - "javascript.suggest.enabled": { - "type": "boolean", - "default": true, - "description": "%typescript.suggest.enabled%", - "scope": "resource" - }, - "typescript.suggest.enabled": { - "type": "boolean", - "default": true, - "description": "%typescript.suggest.enabled%", - "scope": "resource" - }, - "typescript.surveys.enabled": { - "type": "boolean", - "default": true, - "description": "%configuration.surveys.enabled%", - "scope": "window" - }, - "typescript.tsserver.useSeparateSyntaxServer": { - "type": "boolean", - "default": true, - "description": "%configuration.tsserver.useSeparateSyntaxServer%", - "scope": "window" - }, - "typescript.tsserver.maxTsServerMemory": { - "type": "number", - "default": 3072, - "description": "%configuration.tsserver.maxTsServerMemory%", - "scope": "window" - }, - "typescript.tsserver.experimental.enableProjectDiagnostics": { - "type": "boolean", - "default": false, - "description": "%configuration.tsserver.experimental.enableProjectDiagnostics%", - "scope": "window" - }, - "typescript.tsserver.watchOptions": { - "type": "object", - "description": "%configuration.tsserver.watchOptions%", - "scope": "window", - "properties": { - "watchFile": { - "type": "string", - "description": "%configuration.tsserver.watchOptions.watchFile%", - "enum": [ - "fixedChunkSizePolling", - "fixedPollingInterval", - "priorityPollingInterval", - "dynamicPriorityPolling", - "useFsEvents", - "useFsEventsOnParentDirectory" - ], - "enumDescriptions": [ - "%configuration.tsserver.watchOptions.watchFile.fixedChunkSizePolling%", - "%configuration.tsserver.watchOptions.watchFile.fixedPollingInterval%", - "%configuration.tsserver.watchOptions.watchFile.priorityPollingInterval%", - "%configuration.tsserver.watchOptions.watchFile.dynamicPriorityPolling%", - "%configuration.tsserver.watchOptions.watchFile.useFsEvents%", - "%configuration.tsserver.watchOptions.watchFile.useFsEventsOnParentDirectory%" - ], - "default": "useFsEvents" - }, - "watchDirectory": { - "type": "string", - "description": "%configuration.tsserver.watchOptions.watchDirectory%", - "enum": [ - "fixedChunkSizePolling", - "fixedPollingInterval", - "dynamicPriorityPolling", - "useFsEvents" - ], - "enumDescriptions": [ - "%configuration.tsserver.watchOptions.watchDirectory.fixedChunkSizePolling%", - "%configuration.tsserver.watchOptions.watchDirectory.fixedPollingInterval%", - "%configuration.tsserver.watchOptions.watchDirectory.dynamicPriorityPolling%", - "%configuration.tsserver.watchOptions.watchDirectory.useFsEvents%" - ], - "default": "useFsEvents" - }, - "fallbackPolling": { - "type": "string", - "description": "%configuration.tsserver.watchOptions.fallbackPolling%", - "enum": [ - "fixedPollingInterval", - "priorityPollingInterval", - "dynamicPriorityPolling" - ], - "enumDescriptions": [ - "configuration.tsserver.watchOptions.fallbackPolling.fixedPollingInterval", - "configuration.tsserver.watchOptions.fallbackPolling.priorityPollingInterval", - "configuration.tsserver.watchOptions.fallbackPolling.dynamicPriorityPolling" - ] - }, - "synchronousWatchDirectory": { - "type": "boolean", - "description": "%configuration.tsserver.watchOptions.synchronousWatchDirectory%" - } - } - }, - "typescript.workspaceSymbols.scope": { - "type": "string", - "enum": [ - "allOpenProjects", - "currentProject" - ], - "enumDescriptions": [ - "%typescript.workspaceSymbols.scope.allOpenProjects%", - "%typescript.workspaceSymbols.scope.currentProject%" - ], - "default": "allOpenProjects", - "markdownDescription": "%typescript.workspaceSymbols.scope%", - "scope": "window" - } - } - }, - "commands": [ - { - "command": "typescript.reloadProjects", - "title": "%reloadProjects.title%", - "category": "TypeScript" - }, - { - "command": "javascript.reloadProjects", - "title": "%reloadProjects.title%", - "category": "JavaScript" - }, - { - "command": "typescript.selectTypeScriptVersion", - "title": "%typescript.selectTypeScriptVersion.title%", - "category": "TypeScript" - }, - { - "command": "typescript.goToProjectConfig", - "title": "%goToProjectConfig.title%", - "category": "TypeScript" - }, - { - "command": "javascript.goToProjectConfig", - "title": "%goToProjectConfig.title%", - "category": "JavaScript" - }, - { - "command": "typescript.openTsServerLog", - "title": "%typescript.openTsServerLog.title%", - "category": "TypeScript" - }, - { - "command": "typescript.restartTsServer", - "title": "%typescript.restartTsServer%", - "category": "TypeScript" - }, - { - "command": "typescript.findAllFileReferences", - "title": "%typescript.findAllFileReferences%", - "category": "TypeScript" - } - ], - "menus": { - "commandPalette": [ - { - "command": "typescript.reloadProjects", - "when": "editorLangId == typescript && typescript.isManagedFile" - }, - { - "command": "typescript.reloadProjects", - "when": "editorLangId == typescriptreact && typescript.isManagedFile" - }, - { - "command": "javascript.reloadProjects", - "when": "editorLangId == javascript && typescript.isManagedFile" - }, - { - "command": "javascript.reloadProjects", - "when": "editorLangId == javascriptreact && typescript.isManagedFile" - }, - { - "command": "typescript.goToProjectConfig", - "when": "editorLangId == typescript && typescript.isManagedFile" - }, - { - "command": "typescript.goToProjectConfig", - "when": "editorLangId == typescriptreact" - }, - { - "command": "javascript.goToProjectConfig", - "when": "editorLangId == javascript && typescript.isManagedFile" - }, - { - "command": "javascript.goToProjectConfig", - "when": "editorLangId == javascriptreact && typescript.isManagedFile" - }, - { - "command": "typescript.selectTypeScriptVersion", - "when": "typescript.isManagedFile" - }, - { - "command": "typescript.openTsServerLog", - "when": "typescript.isManagedFile" - }, - { - "command": "typescript.restartTsServer", - "when": "typescript.isManagedFile" - }, - { - "command": "typescript.findAllFileReferences", - "when": "tsSupportsFileReferences && typescript.isManagedFile" - } - ], - "explorer/context": [ - { - "command": "typescript.findAllFileReferences", - "when": "tsSupportsFileReferences && resourceLangId == javascript" - }, - { - "command": "typescript.findAllFileReferences", - "when": "tsSupportsFileReferences && resourceLangId == javascriptreact" - }, - { - "command": "typescript.findAllFileReferences", - "when": "tsSupportsFileReferences && resourceLangId == typescript" - }, - { - "command": "typescript.findAllFileReferences", - "when": "tsSupportsFileReferences && resourceLangId == typescriptreact" - } - ], - "editor/title/context": [ - { - "command": "typescript.findAllFileReferences", - "when": "tsSupportsFileReferences && resourceLangId == javascript" - }, - { - "command": "typescript.findAllFileReferences", - "when": "tsSupportsFileReferences && resourceLangId == javascriptreact" - }, - { - "command": "typescript.findAllFileReferences", - "when": "tsSupportsFileReferences && resourceLangId == typescript" - }, - { - "command": "typescript.findAllFileReferences", - "when": "tsSupportsFileReferences && resourceLangId == typescriptreact" - } - ] - }, - "breakpoints": [ - { - "language": "typescript" - }, - { - "language": "typescriptreact" - } - ], - "taskDefinitions": [ - { - "type": "typescript", - "required": [ - "tsconfig" - ], - "properties": { - "tsconfig": { - "type": "string", - "description": "%taskDefinition.tsconfig.description%" - }, - "option": { - "type": "string" - } - }, - "when": "shellExecutionSupported" - } - ], - "problemPatterns": [ - { - "name": "tsc", - "regexp": "^([^\\s].*)[\\(:](\\d+)[,:](\\d+)(?:\\):\\s+|\\s+-\\s+)(error|warning|info)\\s+TS(\\d+)\\s*:\\s*(.*)$", - "file": 1, - "line": 2, - "column": 3, - "severity": 4, - "code": 5, - "message": 6 - } - ], - "problemMatchers": [ - { - "name": "tsc", - "label": "%typescript.problemMatchers.tsc.label%", - "owner": "typescript", - "source": "ts", - "applyTo": "closedDocuments", - "fileLocation": [ - "relative", - "${cwd}" - ], - "pattern": "$tsc" - }, - { - "name": "tsc-watch", - "label": "%typescript.problemMatchers.tscWatch.label%", - "owner": "typescript", - "source": "ts", - "applyTo": "closedDocuments", - "fileLocation": [ - "relative", - "${cwd}" - ], - "pattern": "$tsc", - "background": { - "activeOnStart": true, - "beginsPattern": { - "regexp": "^\\s*(?:message TS6032:|\\[?\\D*.{1,2}[:.].{1,2}[:.].{1,2}\\D*(โ”œ\\D*\\d{1,2}\\D+โ”ค)?(?:\\]| -)) File change detected\\. Starting incremental compilation\\.\\.\\." - }, - "endsPattern": { - "regexp": "^\\s*(?:message TS6042:|\\[?\\D*.{1,2}[:.].{1,2}[:.].{1,2}\\D*(โ”œ\\D*\\d{1,2}\\D+โ”ค)?(?:\\]| -)) (?:Compilation complete\\.|Found \\d+ errors?\\.) Watching for file changes\\." - } - } - } - ], - "codeActions": [ - { - "languages": [ - "javascript", - "javascriptreact", - "typescript", - "typescriptreact" - ], - "actions": [ - { - "kind": "refactor.extract.constant", - "title": "%codeActions.refactor.extract.constant.title%", - "description": "%codeActions.refactor.extract.constant.description%" - }, - { - "kind": "refactor.extract.function", - "title": "%codeActions.refactor.extract.function.title%", - "description": "%codeActions.refactor.extract.function.description%" - }, - { - "kind": "refactor.extract.interface", - "title": "%codeActions.refactor.extract.interface.title%", - "description": "%codeActions.refactor.extract.interface.description%" - }, - { - "kind": "refactor.extract.type", - "title": "%codeActions.refactor.extract.type.title%", - "description": "%codeActions.refactor.extract.type.description%" - }, - { - "kind": "refactor.rewrite.import", - "title": "%codeActions.refactor.rewrite.import.title%", - "description": "%codeActions.refactor.rewrite.import.description%" - }, - { - "kind": "refactor.rewrite.export", - "title": "%codeActions.refactor.rewrite.export.title%", - "description": "%codeActions.refactor.rewrite.export.description%" - }, - { - "kind": "refactor.rewrite.arrow.braces", - "title": "%codeActions.refactor.rewrite.arrow.braces.title%", - "description": "%codeActions.refactor.rewrite.arrow.braces.description%" - }, - { - "kind": "refactor.rewrite.parameters.toDestructured", - "title": "%codeActions.refactor.rewrite.parameters.toDestructured.title%" - }, - { - "kind": "refactor.rewrite.property.generateAccessors", - "title": "%codeActions.refactor.rewrite.property.generateAccessors.title%", - "description": "%codeActions.refactor.rewrite.property.generateAccessors.description%" - }, - { - "kind": "refactor.move.newFile", - "title": "%codeActions.refactor.move.newFile.title%", - "description": "%codeActions.refactor.move.newFile.description%" - }, - { - "kind": "source.organizeImports", - "title": "%codeActions.source.organizeImports.title%" - } - ] - } - ], - "typescriptServerPlugins": [ - { - "name": "typescript-vscode-sh-plugin", - "enableForWorkspaceTypeScriptVersions": true - } - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/typescript-language-features/package.nls.json b/lib/vscode/extensions/typescript-language-features/package.nls.json deleted file mode 100644 index 3f400cf4abe5..000000000000 --- a/lib/vscode/extensions/typescript-language-features/package.nls.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "displayName": "TypeScript and JavaScript Language Features", - "description": "Provides rich language support for JavaScript and TypeScript.", - "workspaceTrust": "The extension requires workspace trust when the workspace version is used because it executes code specified by the workspace.", - "reloadProjects.title": "Reload Project", - "configuration.typescript": "TypeScript", - "configuration.suggest.completeFunctionCalls": "Complete functions with their parameter signature.", - "configuration.suggest.includeAutomaticOptionalChainCompletions": "Enable/disable showing completions on potentially undefined values that insert an optional chain call. Requires TS 3.7+ and strict null checks to be enabled.", - "configuration.suggest.includeCompletionsForImportStatements": "Enable/disable auto-import-style completions on partially-typed import statements. Requires using TypeScript 4.3+ in the workspace.", - "configuration.suggest.includeCompletionsWithSnippetText": "Enable/disable snippet completions from TS Server. Requires using TypeScript 4.3+ in the workspace.", - "typescript.tsdk.desc": "Specifies the folder path to the tsserver and `lib*.d.ts` files under a TypeScript install to use for IntelliSense, for example: `./node_modules/typescript/lib`.\n\n- When specified as a user setting, the TypeScript version from `typescript.tsdk` automatically replaces the built-in TypeScript version.\n- When specified as a workspace setting, `typescript.tsdk` allows you to switch to use that workspace version of TypeScript for IntelliSense with the `TypeScript: Select TypeScript version` command.\n\nSee the [TypeScript documentation](https://code.visualstudio.com/docs/typescript/typescript-compiling#_using-newer-typescript-versions) for more detail about managing TypeScript versions.", - "typescript.disableAutomaticTypeAcquisition": "Disables [automatic type acquisition](https://code.visualstudio.com/docs/nodejs/working-with-javascript#_typings-and-automatic-type-acquisition). Automatic type acquisition fetches `@types` packages from npm to improve IntelliSense for external libraries.", - "typescript.enablePromptUseWorkspaceTsdk": "Enables prompting of users to use the TypeScript version configured in the workspace for Intellisense.", - "typescript.tsserver.enableTracing": "Enables tracing TS server performance to a directory. These trace files can be used to diagnose TS Server performance issues. The log may contain file paths, source code, and other potentially sensitive information from your project.", - "typescript.tsserver.log": "Enables logging of the TS server to a file. This log can be used to diagnose TS Server issues. The log may contain file paths, source code, and other potentially sensitive information from your project.", - "typescript.tsserver.pluginPaths": "Additional paths to discover TypeScript Language Service plugins.", - "typescript.tsserver.pluginPaths.item": "Either an absolute or relative path. Relative path will be resolved against workspace folder(s).", - "typescript.tsserver.trace": "Enables tracing of messages sent to the TS server. This trace can be used to diagnose TS Server issues. The trace may contain file paths, source code, and other potentially sensitive information from your project.", - "typescript.validate.enable": "Enable/disable TypeScript validation.", - "typescript.format.enable": "Enable/disable default TypeScript formatter.", - "javascript.format.enable": "Enable/disable default JavaScript formatter.", - "format.insertSpaceAfterCommaDelimiter": "Defines space handling after a comma delimiter.", - "format.insertSpaceAfterConstructor": "Defines space handling after the constructor keyword.", - "format.insertSpaceAfterSemicolonInForStatements": "Defines space handling after a semicolon in a for statement.", - "format.insertSpaceBeforeAndAfterBinaryOperators": "Defines space handling after a binary operator.", - "format.insertSpaceAfterKeywordsInControlFlowStatements": "Defines space handling after keywords in a control flow statement.", - "format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": "Defines space handling after function keyword for anonymous functions.", - "format.insertSpaceBeforeFunctionParenthesis": "Defines space handling before function argument parentheses.", - "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Defines space handling after opening and before closing non-empty parenthesis.", - "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Defines space handling after opening and before closing non-empty brackets.", - "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Defines space handling after opening and before closing non-empty braces.", - "format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": "Defines space handling after opening and before closing empty braces.", - "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Defines space handling after opening and before closing template string braces.", - "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Defines space handling after opening and before closing JSX expression braces.", - "format.insertSpaceAfterTypeAssertion": "Defines space handling after type assertions in TypeScript.", - "format.placeOpenBraceOnNewLineForFunctions": "Defines whether an open brace is put onto a new line for functions or not.", - "format.placeOpenBraceOnNewLineForControlBlocks": "Defines whether an open brace is put onto a new line for control blocks or not.", - "format.semicolons": "Defines handling of optional semicolons. Requires using TypeScript 3.7 or newer in the workspace.", - "format.semicolons.ignore": "Don't insert or remove any semicolons.", - "format.semicolons.insert": "Insert semicolons at statement ends.", - "format.semicolons.remove": "Remove unnecessary semicolons.", - "javascript.validate.enable": "Enable/disable JavaScript validation.", - "goToProjectConfig.title": "Go to Project Configuration", - "javascript.referencesCodeLens.enabled": "Enable/disable references CodeLens in JavaScript files.", - "javascript.referencesCodeLens.showOnAllFunctions": "Enable/disable references CodeLens on all functions in JavaScript files.", - "typescript.referencesCodeLens.enabled": "Enable/disable references CodeLens in TypeScript files.", - "typescript.referencesCodeLens.showOnAllFunctions": "Enable/disable references CodeLens on all functions in TypeScript files.", - "typescript.implementationsCodeLens.enabled": "Enable/disable implementations CodeLens. This CodeLens shows the implementers of an interface.", - "typescript.openTsServerLog.title": "Open TS Server log", - "typescript.restartTsServer": "Restart TS server", - "typescript.selectTypeScriptVersion.title": "Select TypeScript Version...", - "typescript.reportStyleChecksAsWarnings": "Report style checks as warnings.", - "typescript.npm": "Specifies the path to the npm executable used for [Automatic Type Acquisition](https://code.visualstudio.com/docs/nodejs/working-with-javascript#_typings-and-automatic-type-acquisition).", - "typescript.check.npmIsInstalled": "Check if npm is installed for [Automatic Type Acquisition](https://code.visualstudio.com/docs/nodejs/working-with-javascript#_typings-and-automatic-type-acquisition).", - "configuration.suggest.names": "Enable/disable including unique names from the file in JavaScript suggestions. Note that name suggestions are always disabled in JavaScript code that is semantically checked using `@ts-check` or `checkJs`.", - "typescript.tsc.autoDetect": "Controls auto detection of tsc tasks.", - "typescript.tsc.autoDetect.off": "Disable this feature.", - "typescript.tsc.autoDetect.on": "Create both build and watch tasks.", - "typescript.tsc.autoDetect.build": "Only create single run compile tasks.", - "typescript.tsc.autoDetect.watch": "Only create compile and watch tasks.", - "typescript.problemMatchers.tsc.label": "TypeScript problems", - "typescript.problemMatchers.tscWatch.label": "TypeScript problems (watch mode)", - "configuration.suggest.paths": "Enable/disable suggestions for paths in import statements and require calls.", - "configuration.tsserver.useSeparateSyntaxServer": "Enable/disable spawning a separate TypeScript server that can more quickly respond to syntax related operations, such as calculating folding or computing document symbols. Requires using TypeScript 3.4.0 or newer in the workspace.", - "configuration.tsserver.maxTsServerMemory": "The maximum amount of memory (in MB) to allocate to the TypeScript server process.", - "configuration.tsserver.experimental.enableProjectDiagnostics": "(Experimental) Enables project wide error reporting.", - "typescript.locale": "Sets the locale used to report JavaScript and TypeScript errors. Default of `null` uses VS Code's locale.", - "configuration.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing `jsconfig.json` or `tsconfig.json` files override this setting.", - "configuration.javascript.checkJs.checkJs.deprecation": "This setting has been deprecated in favor of `js/ts.implicitProjectConfig.checkJs`.", - "configuration.implicitProjectConfig.experimentalDecorators": "Enable/disable `experimentalDecorators` in JavaScript files that are not part of a project. Existing `jsconfig.json` or `tsconfig.json` files override this setting.", - "configuration.javascript.checkJs.experimentalDecorators.deprecation": "This setting has been deprecated in favor of `js/ts.implicitProjectConfig.experimentalDecorators`.", - "configuration.implicitProjectConfig.strictNullChecks": "Enable/disable [strict null checks](https://www.typescriptlang.org/tsconfig#strictNullChecks) in JavaScript and TypeScript files that are not part of a project. Existing `jsconfig.json` or `tsconfig.json` files override this setting.", - "configuration.implicitProjectConfig.strictFunctionTypes": "Enable/disable [strict function types](https://www.typescriptlang.org/tsconfig#strictFunctionTypes) in JavaScript and TypeScript files that are not part of a project. Existing `jsconfig.json` or `tsconfig.json` files override this setting.", - "configuration.suggest.jsdoc.generateReturns": "Enable/disable generating `@return` annotations for JSDoc templates. Requires using TypeScript 4.2+ in the workspace.", - "configuration.suggest.autoImports": "Enable/disable auto import suggestions.", - "taskDefinition.tsconfig.description": "The tsconfig file that defines the TS build.", - "javascript.suggestionActions.enabled": "Enable/disable suggestion diagnostics for JavaScript files in the editor.", - "typescript.suggestionActions.enabled": "Enable/disable suggestion diagnostics for TypeScript files in the editor.", - "typescript.preferences.quoteStyle": "Preferred quote style to use for quick fixes: `single` quotes, `double` quotes, or `auto` infer quote type from existing imports.", - "typescript.preferences.importModuleSpecifier": "Preferred path style for auto imports.", - "typescript.preferences.importModuleSpecifier.shortest": "Prefers a non-relative import only if one is available that has fewer path segments than a relative import.", - "typescript.preferences.importModuleSpecifier.relative": "Prefers a relative path to the imported file location.", - "typescript.preferences.importModuleSpecifier.nonRelative": "Prefers a non-relative import based on the `baseUrl` or `paths` configured in your `jsconfig.json` / `tsconfig.json`.", - "typescript.preferences.importModuleSpecifier.projectRelative": "Prefers a non-relative import only if the relative import path would leave the package or project directory. Requires using TypeScript 4.2+ in the workspace.", - "typescript.preferences.importModuleSpecifierEnding": "Preferred path ending for auto imports.", - "typescript.preferences.importModuleSpecifierEnding.auto": "Use project settings to select a default.", - "typescript.preferences.importModuleSpecifierEnding.minimal": "Shorten `./component/index.js` to `./component`.", - "typescript.preferences.importModuleSpecifierEnding.index": "Shorten `./component/index.js` to `./component/index`.", - "typescript.preferences.importModuleSpecifierEnding.js": "Do not shorten path endings; include the `.js` extension.", - "typescript.preferences.includePackageJsonAutoImports": "Enable/disable searching `package.json` dependencies for available auto imports.", - "typescript.preferences.includePackageJsonAutoImports.auto": "Search dependencies based on estimated performance impact.", - "typescript.preferences.includePackageJsonAutoImports.on": "Always search dependencies.", - "typescript.preferences.includePackageJsonAutoImports.off": "Never search dependencies.", - "typescript.updateImportsOnFileMove.enabled": "Enable/disable automatic updating of import paths when you rename or move a file in VS Code.", - "typescript.updateImportsOnFileMove.enabled.prompt": "Prompt on each rename.", - "typescript.updateImportsOnFileMove.enabled.always": "Always update paths automatically.", - "typescript.updateImportsOnFileMove.enabled.never": "Never rename paths and don't prompt.", - "typescript.autoClosingTags": "Enable/disable automatic closing of JSX tags.", - "typescript.suggest.enabled": "Enabled/disable autocomplete suggestions.", - "configuration.surveys.enabled": "Enabled/disable occasional surveys that help us improve VS Code's JavaScript and TypeScript support.", - "configuration.suggest.completeJSDocs": "Enable/disable suggestion to complete JSDoc comments.", - "configuration.tsserver.watchOptions": "Configure which watching strategies should be used to keep track of files and directories. Requires using TypeScript 3.8+ in the workspace.", - "configuration.tsserver.watchOptions.watchFile": "Strategy for how individual files are watched.", - "configuration.tsserver.watchOptions.watchFile.fixedChunkSizePolling": "Polls files in chunks at regular interval. Requires using TypeScript 4.3+ in the workspace.", - "configuration.tsserver.watchOptions.watchFile.fixedPollingInterval": "Check every file for changes several times a second at a fixed interval.", - "configuration.tsserver.watchOptions.watchFile.priorityPollingInterval": "Check every file for changes several times a second, but use heuristics to check certain types of files less frequently than others.", - "configuration.tsserver.watchOptions.watchFile.dynamicPriorityPolling": "Use a dynamic queue where less-frequently modified files will be checked less often.", - "configuration.tsserver.watchOptions.watchFile.useFsEvents": "Attempt to use the operating system/file systemโ€™s native events for file changes.", - "configuration.tsserver.watchOptions.watchFile.useFsEventsOnParentDirectory": "Attempt to use the operating system/file systemโ€™s native events to listen for changes on a fileโ€™s containing directories. This can use fewer file watchers, but might be less accurate.", - "configuration.tsserver.watchOptions.watchDirectory": "Strategy for how entire directory trees are watched under systems that lack recursive file-watching functionality.", - "configuration.tsserver.watchOptions.watchDirectory.fixedChunkSizePolling": "Polls directories in chunks at regular interval. Requires using TypeScript 4.3+ in the workspace.", - "configuration.tsserver.watchOptions.watchDirectory.fixedPollingInterval": "Check every directory for changes several times a second at a fixed interval.", - "configuration.tsserver.watchOptions.watchDirectory.dynamicPriorityPolling": "Use a dynamic queue where less-frequently modified directories will be checked less often.", - "configuration.tsserver.watchOptions.watchDirectory.useFsEvents": "Attempt to use the operating system/file systemโ€™s native events for directory changes.", - "configuration.tsserver.watchOptions.fallbackPolling": "When using file system events, this option specifies the polling strategy that gets used when the system runs out of native file watchers and/or doesnโ€™t support native file watchers.", - "configuration.tsserver.watchOptions.fallbackPolling.fixedPollingInterval": "Check every file for changes several times a second at a fixed interval.", - "configuration.tsserver.watchOptions.fallbackPolling.priorityPollingInterval": "Check every file for changes several times a second, but use heuristics to check certain types of files less frequently than others.", - "configuration.tsserver.watchOptions.fallbackPolling.dynamicPriorityPolling ": "Use a dynamic queue where less-frequently modified files will be checked less often.", - "configuration.tsserver.watchOptions.synchronousWatchDirectory": "Disable deferred watching on directories. Deferred watching is useful when lots of file changes might occur at once (e.g. a change in node_modules from running npm install), but you might want to disable it with this flag for some less-common setups.", - "typescript.preferences.renameShorthandProperties.deprecationMessage": "The setting 'typescript.preferences.renameShorthandProperties' has been deprecated in favor of 'typescript.preferences.useAliasesForRenames'", - "typescript.preferences.useAliasesForRenames": "Enable/disable introducing aliases for object shorthand properties during renames. Requires using TypeScript 3.4 or newer in the workspace.", - "typescript.workspaceSymbols.scope": "Controls which files are searched by [go to symbol in workspace](https://code.visualstudio.com/docs/editor/editingevolved#_open-symbol-by-name).", - "typescript.workspaceSymbols.scope.allOpenProjects": "Search all open JavaScript or TypeScript projects for symbols. Requires using TypeScript 3.9 or newer in the workspace.", - "typescript.workspaceSymbols.scope.currentProject": "Only search for symbols in the current JavaScript or TypeScript project.", - "codeActions.refactor.extract.constant.title": "Extract constant", - "codeActions.refactor.extract.constant.description": "Extract expression to constant.", - "codeActions.refactor.extract.function.title": "Extract function", - "codeActions.refactor.extract.function.description": "Extract expression to method or function.", - "codeActions.refactor.extract.type.title": "Extract type", - "codeActions.refactor.extract.type.description": "Extract type to a type alias.", - "codeActions.refactor.extract.interface.title": "Extract interface", - "codeActions.refactor.extract.interface.description": "Extract type to an interface.", - "codeActions.refactor.rewrite.import.title": "Convert import", - "codeActions.refactor.rewrite.import.description": "Convert between named imports and namespace imports.", - "codeActions.refactor.rewrite.export.title": "Convert export", - "codeActions.refactor.rewrite.export.description": "Convert between default export and named export.", - "codeActions.refactor.move.newFile.title": "Move to a new file", - "codeActions.refactor.move.newFile.description": "Move the expression to a new file.", - "codeActions.refactor.rewrite.arrow.braces.title": "Rewrite arrow braces", - "codeActions.refactor.rewrite.arrow.braces.description": "Add or remove braces in an arrow function.", - "codeActions.refactor.rewrite.parameters.toDestructured.title": "Convert parameters to destructured object", - "codeActions.refactor.rewrite.property.generateAccessors.title": "Generate accessors", - "codeActions.refactor.rewrite.property.generateAccessors.description": "Generate 'get' and 'set' accessors", - "codeActions.source.organizeImports.title": "Organize imports", - "typescript.findAllFileReferences": "Find File References" -} diff --git a/lib/vscode/extensions/typescript-language-features/src/commands/commandManager.ts b/lib/vscode/extensions/typescript-language-features/src/commands/commandManager.ts deleted file mode 100644 index 7bf1d7e33aa7..000000000000 --- a/lib/vscode/extensions/typescript-language-features/src/commands/commandManager.ts +++ /dev/null @@ -1,38 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; - -export interface Command { - readonly id: string | string[]; - - execute(...args: any[]): void; -} - -export class CommandManager { - private readonly commands = new Map(); - - public dispose() { - for (const registration of this.commands.values()) { - registration.dispose(); - } - this.commands.clear(); - } - - public register(command: T): T { - for (const id of Array.isArray(command.id) ? command.id : [command.id]) { - this.registerCommand(id, command.execute, command); - } - return command; - } - - private registerCommand(id: string, impl: (...args: any[]) => void, thisArg?: any) { - if (this.commands.has(id)) { - return; - } - - this.commands.set(id, vscode.commands.registerCommand(id, impl, thisArg)); - } -} \ No newline at end of file diff --git a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/organizeImports.ts b/lib/vscode/extensions/typescript-language-features/src/languageFeatures/organizeImports.ts deleted file mode 100644 index 3b8111b7c1f3..000000000000 --- a/lib/vscode/extensions/typescript-language-features/src/languageFeatures/organizeImports.ts +++ /dev/null @@ -1,118 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; -import * as nls from 'vscode-nls'; -import type * as Proto from '../protocol'; -import { ClientCapability, ITypeScriptServiceClient } from '../typescriptService'; -import API from '../utils/api'; -import { nulToken } from '../utils/cancellation'; -import { Command, CommandManager } from '../commands/commandManager'; -import { conditionalRegistration, requireMinVersion, requireSomeCapability } from '../utils/dependentRegistration'; -import { DocumentSelector } from '../utils/documentSelector'; -import { TelemetryReporter } from '../utils/telemetry'; -import * as typeConverters from '../utils/typeConverters'; -import FileConfigurationManager from './fileConfigurationManager'; - -const localize = nls.loadMessageBundle(); - - -class OrganizeImportsCommand implements Command { - public static readonly Id = '_typescript.organizeImports'; - - public readonly id = OrganizeImportsCommand.Id; - - constructor( - private readonly client: ITypeScriptServiceClient, - private readonly telemetryReporter: TelemetryReporter, - ) { } - - public async execute(file: string): Promise { - /* __GDPR__ - "organizeImports.execute" : { - "${include}": [ - "${TypeScriptCommonProperties}" - ] - } - */ - this.telemetryReporter.logTelemetry('organizeImports.execute', {}); - - const args: Proto.OrganizeImportsRequestArgs = { - scope: { - type: 'file', - args: { - file - } - } - }; - const response = await this.client.interruptGetErr(() => this.client.execute('organizeImports', args, nulToken)); - if (response.type !== 'response' || !response.body) { - return false; - } - - const edits = typeConverters.WorkspaceEdit.fromFileCodeEdits(this.client, response.body); - return vscode.workspace.applyEdit(edits); - } -} - -export class OrganizeImportsCodeActionProvider implements vscode.CodeActionProvider { - public static readonly minVersion = API.v280; - - public constructor( - private readonly client: ITypeScriptServiceClient, - commandManager: CommandManager, - private readonly fileConfigManager: FileConfigurationManager, - telemetryReporter: TelemetryReporter, - - ) { - commandManager.register(new OrganizeImportsCommand(client, telemetryReporter)); - } - - public readonly metadata: vscode.CodeActionProviderMetadata = { - providedCodeActionKinds: [vscode.CodeActionKind.SourceOrganizeImports] - }; - - public provideCodeActions( - document: vscode.TextDocument, - _range: vscode.Range, - context: vscode.CodeActionContext, - token: vscode.CancellationToken - ): vscode.CodeAction[] { - const file = this.client.toOpenedFilePath(document); - if (!file) { - return []; - } - - if (!context.only || !context.only.contains(vscode.CodeActionKind.SourceOrganizeImports)) { - return []; - } - - this.fileConfigManager.ensureConfigurationForDocument(document, token); - - const action = new vscode.CodeAction( - localize('organizeImportsAction.title', "Organize Imports"), - vscode.CodeActionKind.SourceOrganizeImports); - action.command = { title: '', command: OrganizeImportsCommand.Id, arguments: [file] }; - return [action]; - } -} - -export function register( - selector: DocumentSelector, - client: ITypeScriptServiceClient, - commandManager: CommandManager, - fileConfigurationManager: FileConfigurationManager, - telemetryReporter: TelemetryReporter, -) { - return conditionalRegistration([ - requireMinVersion(client, OrganizeImportsCodeActionProvider.minVersion), - requireSomeCapability(client, ClientCapability.Semantic), - ], () => { - const organizeImportsProvider = new OrganizeImportsCodeActionProvider(client, commandManager, fileConfigurationManager, telemetryReporter); - return vscode.languages.registerCodeActionsProvider(selector.semantic, - organizeImportsProvider, - organizeImportsProvider.metadata); - }); -} diff --git a/lib/vscode/extensions/typescript-language-features/src/tsServer/server.ts b/lib/vscode/extensions/typescript-language-features/src/tsServer/server.ts deleted file mode 100644 index 5ede4ef49fc6..000000000000 --- a/lib/vscode/extensions/typescript-language-features/src/tsServer/server.ts +++ /dev/null @@ -1,628 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; -import type * as Proto from '../protocol'; -import { EventName } from '../protocol.const'; -import { CallbackMap } from '../tsServer/callbackMap'; -import { RequestItem, RequestQueue, RequestQueueingType } from '../tsServer/requestQueue'; -import { TypeScriptServerError } from '../tsServer/serverError'; -import { ServerResponse, ServerType, TypeScriptRequests } from '../typescriptService'; -import { TypeScriptServiceConfiguration } from '../utils/configuration'; -import { Disposable } from '../utils/dispose'; -import { TelemetryReporter } from '../utils/telemetry'; -import Tracer from '../utils/tracer'; -import { OngoingRequestCanceller } from './cancellation'; -import { TypeScriptVersionManager } from './versionManager'; -import { TypeScriptVersion } from './versionProvider'; - -export enum ExecutionTarget { - Semantic, - Syntax -} - -export interface ITypeScriptServer { - readonly onEvent: vscode.Event; - readonly onExit: vscode.Event; - readonly onError: vscode.Event; - - readonly tsServerLogFile: string | undefined; - - kill(): void; - - executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: false, lowPriority?: boolean, executionTarget?: ExecutionTarget }): undefined; - executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Promise>; - executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Promise> | undefined; - - dispose(): void; -} - -export interface TsServerDelegate { - onFatalError(command: string, error: Error): void; -} - -export const enum TsServerProcessKind { - Main = 'main', - Syntax = 'syntax', - Semantic = 'semantic', - Diagnostics = 'diagnostics' -} - -export interface TsServerProcessFactory { - fork( - tsServerPath: string, - args: readonly string[], - kind: TsServerProcessKind, - configuration: TypeScriptServiceConfiguration, - versionManager: TypeScriptVersionManager, - ): TsServerProcess; -} - -export interface TsServerProcess { - write(serverRequest: Proto.Request): void; - - onData(handler: (data: Proto.Response) => void): void; - onExit(handler: (code: number | null) => void): void; - onError(handler: (error: Error) => void): void; - - kill(): void; -} - -export class ProcessBasedTsServer extends Disposable implements ITypeScriptServer { - private readonly _requestQueue = new RequestQueue(); - private readonly _callbacks = new CallbackMap(); - private readonly _pendingResponses = new Set(); - - constructor( - private readonly _serverId: string, - private readonly _serverSource: ServerType, - private readonly _process: TsServerProcess, - private readonly _tsServerLogFile: string | undefined, - private readonly _requestCanceller: OngoingRequestCanceller, - private readonly _version: TypeScriptVersion, - private readonly _telemetryReporter: TelemetryReporter, - private readonly _tracer: Tracer, - ) { - super(); - - this._process.onData(msg => { - this.dispatchMessage(msg); - }); - - this._process.onExit(code => { - this._onExit.fire(code); - this._callbacks.destroy('server exited'); - }); - - this._process.onError(error => { - this._onError.fire(error); - this._callbacks.destroy('server errored'); - }); - } - - private readonly _onEvent = this._register(new vscode.EventEmitter()); - public readonly onEvent = this._onEvent.event; - - private readonly _onExit = this._register(new vscode.EventEmitter()); - public readonly onExit = this._onExit.event; - - private readonly _onError = this._register(new vscode.EventEmitter()); - public readonly onError = this._onError.event; - - public get tsServerLogFile() { return this._tsServerLogFile; } - - private write(serverRequest: Proto.Request) { - this._process.write(serverRequest); - } - - public override dispose() { - super.dispose(); - this._callbacks.destroy('server disposed'); - this._pendingResponses.clear(); - } - - public kill() { - this._process.kill(); - } - - private dispatchMessage(message: Proto.Message) { - try { - switch (message.type) { - case 'response': - if (this._serverSource) { - this.dispatchResponse({ - ...(message as Proto.Response), - _serverType: this._serverSource - }); - } else { - this.dispatchResponse(message as Proto.Response); - } - break; - - case 'event': - const event = message as Proto.Event; - if (event.event === 'requestCompleted') { - const seq = (event as Proto.RequestCompletedEvent).body.request_seq; - const callback = this._callbacks.fetch(seq); - if (callback) { - this._tracer.traceRequestCompleted(this._serverId, 'requestCompleted', seq, callback); - callback.onSuccess(undefined); - } - } else { - this._tracer.traceEvent(this._serverId, event); - this._onEvent.fire(event); - } - break; - - default: - throw new Error(`Unknown message type ${message.type} received`); - } - } finally { - this.sendNextRequests(); - } - } - - private tryCancelRequest(seq: number, command: string): boolean { - try { - if (this._requestQueue.tryDeletePendingRequest(seq)) { - this.logTrace(`Canceled request with sequence number ${seq}`); - return true; - } - - if (this._requestCanceller.tryCancelOngoingRequest(seq)) { - return true; - } - - this.logTrace(`Tried to cancel request with sequence number ${seq}. But request got already delivered.`); - return false; - } finally { - const callback = this.fetchCallback(seq); - if (callback) { - callback.onSuccess(new ServerResponse.Cancelled(`Cancelled request ${seq} - ${command}`)); - } - } - } - - private dispatchResponse(response: Proto.Response) { - const callback = this.fetchCallback(response.request_seq); - if (!callback) { - return; - } - - this._tracer.traceResponse(this._serverId, response, callback); - if (response.success) { - callback.onSuccess(response); - } else if (response.message === 'No content available.') { - // Special case where response itself is successful but there is not any data to return. - callback.onSuccess(ServerResponse.NoContent); - } else { - callback.onError(TypeScriptServerError.create(this._serverId, this._version, response)); - } - } - - public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: false, lowPriority?: boolean, executionTarget?: ExecutionTarget }): undefined; - public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Promise>; - public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Promise> | undefined { - const request = this._requestQueue.createRequest(command, args); - const requestInfo: RequestItem = { - request, - expectsResponse: executeInfo.expectsResult, - isAsync: executeInfo.isAsync, - queueingType: ProcessBasedTsServer.getQueueingType(command, executeInfo.lowPriority) - }; - let result: Promise> | undefined; - if (executeInfo.expectsResult) { - result = new Promise>((resolve, reject) => { - this._callbacks.add(request.seq, { onSuccess: resolve as () => ServerResponse.Response | undefined, onError: reject, queuingStartTime: Date.now(), isAsync: executeInfo.isAsync }, executeInfo.isAsync); - - if (executeInfo.token) { - executeInfo.token.onCancellationRequested(() => { - this.tryCancelRequest(request.seq, command); - }); - } - }).catch((err: Error) => { - if (err instanceof TypeScriptServerError) { - if (!executeInfo.token || !executeInfo.token.isCancellationRequested) { - /* __GDPR__ - "languageServiceErrorResponse" : { - "${include}": [ - "${TypeScriptCommonProperties}", - "${TypeScriptRequestErrorProperties}" - ] - } - */ - this._telemetryReporter.logTelemetry('languageServiceErrorResponse', err.telemetry); - } - } - - throw err; - }); - } - - this._requestQueue.enqueue(requestInfo); - this.sendNextRequests(); - - return result; - } - - private sendNextRequests(): void { - while (this._pendingResponses.size === 0 && this._requestQueue.length > 0) { - const item = this._requestQueue.dequeue(); - if (item) { - this.sendRequest(item); - } - } - } - - private sendRequest(requestItem: RequestItem): void { - const serverRequest = requestItem.request; - this._tracer.traceRequest(this._serverId, serverRequest, requestItem.expectsResponse, this._requestQueue.length); - - if (requestItem.expectsResponse && !requestItem.isAsync) { - this._pendingResponses.add(requestItem.request.seq); - } - - try { - this.write(serverRequest); - } catch (err) { - const callback = this.fetchCallback(serverRequest.seq); - if (callback) { - callback.onError(err); - } - } - } - - private fetchCallback(seq: number) { - const callback = this._callbacks.fetch(seq); - if (!callback) { - return undefined; - } - - this._pendingResponses.delete(seq); - return callback; - } - - private logTrace(message: string) { - this._tracer.logTrace(this._serverId, message); - } - - private static readonly fenceCommands = new Set(['change', 'close', 'open', 'updateOpen']); - - private static getQueueingType( - command: string, - lowPriority?: boolean - ): RequestQueueingType { - if (ProcessBasedTsServer.fenceCommands.has(command)) { - return RequestQueueingType.Fence; - } - return lowPriority ? RequestQueueingType.LowPriority : RequestQueueingType.Normal; - } -} - - -interface ExecuteInfo { - readonly isAsync: boolean; - readonly token?: vscode.CancellationToken; - readonly expectsResult: boolean; - readonly lowPriority?: boolean; - readonly executionTarget?: ExecutionTarget; -} - -class RequestRouter { - - private static readonly sharedCommands = new Set([ - 'change', - 'close', - 'open', - 'updateOpen', - 'configure', - ]); - - constructor( - private readonly servers: ReadonlyArray<{ - readonly server: ITypeScriptServer; - canRun?(command: keyof TypeScriptRequests, executeInfo: ExecuteInfo): void; - }>, - private readonly delegate: TsServerDelegate, - ) { } - - public execute(command: keyof TypeScriptRequests, args: any, executeInfo: ExecuteInfo): Promise> | undefined { - if (RequestRouter.sharedCommands.has(command) && typeof executeInfo.executionTarget === 'undefined') { - // Dispatch shared commands to all servers but only return from first one - - const requestStates: RequestState.State[] = this.servers.map(() => RequestState.Unresolved); - - // Also make sure we never cancel requests to just one server - let token: vscode.CancellationToken | undefined = undefined; - if (executeInfo.token) { - const source = new vscode.CancellationTokenSource(); - executeInfo.token.onCancellationRequested(() => { - if (requestStates.some(state => state === RequestState.Resolved)) { - // Don't cancel. - // One of the servers completed this request so we don't want to leave the other - // in a different state. - return; - } - source.cancel(); - }); - token = source.token; - } - - let firstRequest: Promise> | undefined; - - for (let serverIndex = 0; serverIndex < this.servers.length; ++serverIndex) { - const server = this.servers[serverIndex].server; - - const request = server.executeImpl(command, args, { ...executeInfo, token }) as Promise> | undefined; - if (serverIndex === 0) { - firstRequest = request; - } - if (request) { - request - .then(result => { - requestStates[serverIndex] = RequestState.Resolved; - const erroredRequest = requestStates.find(state => state.type === RequestState.Type.Errored) as RequestState.Errored | undefined; - if (erroredRequest) { - // We've gone out of sync - this.delegate.onFatalError(command, erroredRequest.err); - } - return result; - }, err => { - requestStates[serverIndex] = new RequestState.Errored(err); - if (requestStates.some(state => state === RequestState.Resolved)) { - // We've gone out of sync - this.delegate.onFatalError(command, err); - } - throw err; - }); - } - } - - return firstRequest; - } - - for (const { canRun, server } of this.servers) { - if (!canRun || canRun(command, executeInfo)) { - return server.executeImpl(command, args, executeInfo); - } - } - - throw new Error(`Could not find server for command: '${command}'`); - } -} - -export class GetErrRoutingTsServer extends Disposable implements ITypeScriptServer { - - private static readonly diagnosticEvents = new Set([ - EventName.configFileDiag, - EventName.syntaxDiag, - EventName.semanticDiag, - EventName.suggestionDiag - ]); - - private readonly getErrServer: ITypeScriptServer; - private readonly mainServer: ITypeScriptServer; - private readonly router: RequestRouter; - - public constructor( - servers: { getErr: ITypeScriptServer, primary: ITypeScriptServer }, - delegate: TsServerDelegate, - ) { - super(); - - this.getErrServer = servers.getErr; - this.mainServer = servers.primary; - - this.router = new RequestRouter( - [ - { server: this.getErrServer, canRun: (command) => ['geterr', 'geterrForProject'].includes(command) }, - { server: this.mainServer, canRun: undefined /* gets all other commands */ } - ], - delegate); - - this._register(this.getErrServer.onEvent(e => { - if (GetErrRoutingTsServer.diagnosticEvents.has(e.event)) { - this._onEvent.fire(e); - } - // Ignore all other events - })); - this._register(this.mainServer.onEvent(e => { - if (!GetErrRoutingTsServer.diagnosticEvents.has(e.event)) { - this._onEvent.fire(e); - } - // Ignore all other events - })); - - this._register(this.getErrServer.onError(e => this._onError.fire(e))); - this._register(this.mainServer.onError(e => this._onError.fire(e))); - - this._register(this.mainServer.onExit(e => { - this._onExit.fire(e); - this.getErrServer.kill(); - })); - } - - private readonly _onEvent = this._register(new vscode.EventEmitter()); - public readonly onEvent = this._onEvent.event; - - private readonly _onExit = this._register(new vscode.EventEmitter()); - public readonly onExit = this._onExit.event; - - private readonly _onError = this._register(new vscode.EventEmitter()); - public readonly onError = this._onError.event; - - public get tsServerLogFile() { return this.mainServer.tsServerLogFile; } - - public kill(): void { - this.getErrServer.kill(); - this.mainServer.kill(); - } - - public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: false, lowPriority?: boolean, executionTarget?: ExecutionTarget }): undefined; - public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Promise>; - public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Promise> | undefined { - return this.router.execute(command, args, executeInfo); - } -} - - -export class SyntaxRoutingTsServer extends Disposable implements ITypeScriptServer { - - /** - * Commands that should always be run on the syntax server. - */ - private static readonly syntaxAlwaysCommands = new Set([ - 'navtree', - 'getOutliningSpans', - 'jsxClosingTag', - 'selectionRange', - 'format', - 'formatonkey', - 'docCommentTemplate', - ]); - - /** - * Commands that should always be run on the semantic server. - */ - private static readonly semanticCommands = new Set([ - 'geterr', - 'geterrForProject', - 'projectInfo', - 'configurePlugin', - ]); - - /** - * Commands that can be run on the syntax server but would benefit from being upgraded to the semantic server. - */ - private static readonly syntaxAllowedCommands = new Set([ - 'completions', - 'completionEntryDetails', - 'completionInfo', - 'definition', - 'definitionAndBoundSpan', - 'documentHighlights', - 'implementation', - 'navto', - 'quickinfo', - 'references', - 'rename', - 'signatureHelp', - ]); - - private readonly syntaxServer: ITypeScriptServer; - private readonly semanticServer: ITypeScriptServer; - private readonly router: RequestRouter; - - private _projectLoading = true; - - public constructor( - servers: { syntax: ITypeScriptServer, semantic: ITypeScriptServer }, - delegate: TsServerDelegate, - enableDynamicRouting: boolean, - ) { - super(); - - this.syntaxServer = servers.syntax; - this.semanticServer = servers.semantic; - - this.router = new RequestRouter( - [ - { - server: this.syntaxServer, - canRun: (command, execInfo) => { - switch (execInfo.executionTarget) { - case ExecutionTarget.Semantic: return false; - case ExecutionTarget.Syntax: return true; - } - - if (SyntaxRoutingTsServer.syntaxAlwaysCommands.has(command)) { - return true; - } - if (SyntaxRoutingTsServer.semanticCommands.has(command)) { - return false; - } - if (enableDynamicRouting && this.projectLoading && SyntaxRoutingTsServer.syntaxAllowedCommands.has(command)) { - return true; - } - return false; - } - }, { - server: this.semanticServer, - canRun: undefined /* gets all other commands */ - } - ], - delegate); - - this._register(this.syntaxServer.onEvent(e => { - return this._onEvent.fire(e); - })); - - this._register(this.semanticServer.onEvent(e => { - switch (e.event) { - case EventName.projectLoadingStart: - this._projectLoading = true; - break; - - case EventName.projectLoadingFinish: - case EventName.semanticDiag: - case EventName.syntaxDiag: - case EventName.suggestionDiag: - case EventName.configFileDiag: - this._projectLoading = false; - break; - } - return this._onEvent.fire(e); - })); - - this._register(this.semanticServer.onExit(e => { - this._onExit.fire(e); - this.syntaxServer.kill(); - })); - - this._register(this.semanticServer.onError(e => this._onError.fire(e))); - } - - private get projectLoading() { return this._projectLoading; } - - private readonly _onEvent = this._register(new vscode.EventEmitter()); - public readonly onEvent = this._onEvent.event; - - private readonly _onExit = this._register(new vscode.EventEmitter()); - public readonly onExit = this._onExit.event; - - private readonly _onError = this._register(new vscode.EventEmitter()); - public readonly onError = this._onError.event; - - public get tsServerLogFile() { return this.semanticServer.tsServerLogFile; } - - public kill(): void { - this.syntaxServer.kill(); - this.semanticServer.kill(); - } - - public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: false, lowPriority?: boolean, executionTarget?: ExecutionTarget }): undefined; - public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Promise>; - public executeImpl(command: keyof TypeScriptRequests, args: any, executeInfo: { isAsync: boolean, token?: vscode.CancellationToken, expectsResult: boolean, lowPriority?: boolean, executionTarget?: ExecutionTarget }): Promise> | undefined { - return this.router.execute(command, args, executeInfo); - } -} - -namespace RequestState { - export const enum Type { Unresolved, Resolved, Errored } - - export const Unresolved = { type: Type.Unresolved } as const; - - export const Resolved = { type: Type.Resolved } as const; - - export class Errored { - readonly type = Type.Errored; - - constructor( - public readonly err: Error - ) { } - } - - export type State = typeof Unresolved | typeof Resolved | Errored; -} diff --git a/lib/vscode/extensions/typescript-language-features/src/utils/configuration.ts b/lib/vscode/extensions/typescript-language-features/src/utils/configuration.ts deleted file mode 100644 index c43a121079cb..000000000000 --- a/lib/vscode/extensions/typescript-language-features/src/utils/configuration.ts +++ /dev/null @@ -1,219 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as os from 'os'; -import * as path from 'path'; -import * as vscode from 'vscode'; -import * as objects from '../utils/objects'; - -export enum TsServerLogLevel { - Off, - Normal, - Terse, - Verbose, -} - -export namespace TsServerLogLevel { - export function fromString(value: string): TsServerLogLevel { - switch (value && value.toLowerCase()) { - case 'normal': - return TsServerLogLevel.Normal; - case 'terse': - return TsServerLogLevel.Terse; - case 'verbose': - return TsServerLogLevel.Verbose; - case 'off': - default: - return TsServerLogLevel.Off; - } - } - - export function toString(value: TsServerLogLevel): string { - switch (value) { - case TsServerLogLevel.Normal: - return 'normal'; - case TsServerLogLevel.Terse: - return 'terse'; - case TsServerLogLevel.Verbose: - return 'verbose'; - case TsServerLogLevel.Off: - default: - return 'off'; - } - } -} - -export const enum SeparateSyntaxServerConfiguration { - Disabled, - Enabled, -} - -export class ImplicitProjectConfiguration { - - public readonly checkJs: boolean; - public readonly experimentalDecorators: boolean; - public readonly strictNullChecks: boolean; - public readonly strictFunctionTypes: boolean; - - constructor(configuration: vscode.WorkspaceConfiguration) { - this.checkJs = ImplicitProjectConfiguration.readCheckJs(configuration); - this.experimentalDecorators = ImplicitProjectConfiguration.readExperimentalDecorators(configuration); - this.strictNullChecks = ImplicitProjectConfiguration.readImplicitStrictNullChecks(configuration); - this.strictFunctionTypes = ImplicitProjectConfiguration.readImplicitStrictFunctionTypes(configuration); - } - - public isEqualTo(other: ImplicitProjectConfiguration): boolean { - return objects.equals(this, other); - } - - private static readCheckJs(configuration: vscode.WorkspaceConfiguration): boolean { - return configuration.get('js/ts.implicitProjectConfig.checkJs') - ?? configuration.get('javascript.implicitProjectConfig.checkJs', false); - } - - private static readExperimentalDecorators(configuration: vscode.WorkspaceConfiguration): boolean { - return configuration.get('js/ts.implicitProjectConfig.experimentalDecorators') - ?? configuration.get('javascript.implicitProjectConfig.experimentalDecorators', false); - } - - private static readImplicitStrictNullChecks(configuration: vscode.WorkspaceConfiguration): boolean { - return configuration.get('js/ts.implicitProjectConfig.strictNullChecks', false); - } - - private static readImplicitStrictFunctionTypes(configuration: vscode.WorkspaceConfiguration): boolean { - return configuration.get('js/ts.implicitProjectConfig.strictFunctionTypes', true); - } -} - -export class TypeScriptServiceConfiguration { - public readonly locale: string | null; - public readonly globalTsdk: string | null; - public readonly localTsdk: string | null; - public readonly npmLocation: string | null; - public readonly tsServerLogLevel: TsServerLogLevel = TsServerLogLevel.Off; - public readonly tsServerPluginPaths: readonly string[]; - public readonly implictProjectConfiguration: ImplicitProjectConfiguration; - public readonly disableAutomaticTypeAcquisition: boolean; - public readonly separateSyntaxServer: SeparateSyntaxServerConfiguration; - public readonly enableProjectDiagnostics: boolean; - public readonly maxTsServerMemory: number; - public readonly enablePromptUseWorkspaceTsdk: boolean; - public readonly watchOptions: protocol.WatchOptions | undefined; - public readonly includePackageJsonAutoImports: 'auto' | 'on' | 'off' | undefined; - public readonly enableTsServerTracing: boolean; - - public static loadFromWorkspace(): TypeScriptServiceConfiguration { - return new TypeScriptServiceConfiguration(); - } - - private constructor() { - const configuration = vscode.workspace.getConfiguration(); - - this.locale = TypeScriptServiceConfiguration.extractLocale(configuration); - this.globalTsdk = TypeScriptServiceConfiguration.extractGlobalTsdk(configuration); - this.localTsdk = TypeScriptServiceConfiguration.extractLocalTsdk(configuration); - this.npmLocation = TypeScriptServiceConfiguration.readNpmLocation(configuration); - this.tsServerLogLevel = TypeScriptServiceConfiguration.readTsServerLogLevel(configuration); - this.tsServerPluginPaths = TypeScriptServiceConfiguration.readTsServerPluginPaths(configuration); - this.implictProjectConfiguration = new ImplicitProjectConfiguration(configuration); - this.disableAutomaticTypeAcquisition = TypeScriptServiceConfiguration.readDisableAutomaticTypeAcquisition(configuration); - this.separateSyntaxServer = TypeScriptServiceConfiguration.readUseSeparateSyntaxServer(configuration); - this.enableProjectDiagnostics = TypeScriptServiceConfiguration.readEnableProjectDiagnostics(configuration); - this.maxTsServerMemory = TypeScriptServiceConfiguration.readMaxTsServerMemory(configuration); - this.enablePromptUseWorkspaceTsdk = TypeScriptServiceConfiguration.readEnablePromptUseWorkspaceTsdk(configuration); - this.watchOptions = TypeScriptServiceConfiguration.readWatchOptions(configuration); - this.includePackageJsonAutoImports = TypeScriptServiceConfiguration.readIncludePackageJsonAutoImports(configuration); - this.enableTsServerTracing = TypeScriptServiceConfiguration.readEnableTsServerTracing(configuration); - } - - public isEqualTo(other: TypeScriptServiceConfiguration): boolean { - return objects.equals(this, other); - } - - private static fixPathPrefixes(inspectValue: string): string { - const pathPrefixes = ['~' + path.sep]; - for (const pathPrefix of pathPrefixes) { - if (inspectValue.startsWith(pathPrefix)) { - return path.join(os.homedir(), inspectValue.slice(pathPrefix.length)); - } - } - return inspectValue; - } - - private static extractGlobalTsdk(configuration: vscode.WorkspaceConfiguration): string | null { - const inspect = configuration.inspect('typescript.tsdk'); - if (inspect && typeof inspect.globalValue === 'string') { - return this.fixPathPrefixes(inspect.globalValue); - } - return null; - } - - private static extractLocalTsdk(configuration: vscode.WorkspaceConfiguration): string | null { - const inspect = configuration.inspect('typescript.tsdk'); - if (inspect && typeof inspect.workspaceValue === 'string') { - return this.fixPathPrefixes(inspect.workspaceValue); - } - return null; - } - - private static readTsServerLogLevel(configuration: vscode.WorkspaceConfiguration): TsServerLogLevel { - const setting = configuration.get('typescript.tsserver.log', 'off'); - return TsServerLogLevel.fromString(setting); - } - - private static readTsServerPluginPaths(configuration: vscode.WorkspaceConfiguration): string[] { - return configuration.get('typescript.tsserver.pluginPaths', []); - } - - private static readNpmLocation(configuration: vscode.WorkspaceConfiguration): string | null { - return configuration.get('typescript.npm', null); - } - - private static readDisableAutomaticTypeAcquisition(configuration: vscode.WorkspaceConfiguration): boolean { - return configuration.get('typescript.disableAutomaticTypeAcquisition', false); - } - - private static extractLocale(configuration: vscode.WorkspaceConfiguration): string | null { - return configuration.get('typescript.locale', null); - } - - private static readUseSeparateSyntaxServer(configuration: vscode.WorkspaceConfiguration): SeparateSyntaxServerConfiguration { - const value = configuration.get('typescript.tsserver.useSeparateSyntaxServer', true); - if (value === true) { - return SeparateSyntaxServerConfiguration.Enabled; - } - return SeparateSyntaxServerConfiguration.Disabled; - } - - private static readEnableProjectDiagnostics(configuration: vscode.WorkspaceConfiguration): boolean { - return configuration.get('typescript.tsserver.experimental.enableProjectDiagnostics', false); - } - - private static readWatchOptions(configuration: vscode.WorkspaceConfiguration): protocol.WatchOptions | undefined { - return configuration.get('typescript.tsserver.watchOptions'); - } - - private static readIncludePackageJsonAutoImports(configuration: vscode.WorkspaceConfiguration): 'auto' | 'on' | 'off' | undefined { - return configuration.get<'auto' | 'on' | 'off'>('typescript.preferences.includePackageJsonAutoImports'); - } - - private static readMaxTsServerMemory(configuration: vscode.WorkspaceConfiguration): number { - const defaultMaxMemory = 3072; - const minimumMaxMemory = 128; - const memoryInMB = configuration.get('typescript.tsserver.maxTsServerMemory', defaultMaxMemory); - if (!Number.isSafeInteger(memoryInMB)) { - return defaultMaxMemory; - } - return Math.max(memoryInMB, minimumMaxMemory); - } - - private static readEnablePromptUseWorkspaceTsdk(configuration: vscode.WorkspaceConfiguration): boolean { - return configuration.get('typescript.enablePromptUseWorkspaceTsdk', false); - } - - private static readEnableTsServerTracing(configuration: vscode.WorkspaceConfiguration): boolean { - return configuration.get('typescript.tsserver.enableTracing', false); - } -} diff --git a/lib/vscode/extensions/typescript-language-features/yarn.lock b/lib/vscode/extensions/typescript-language-features/yarn.lock deleted file mode 100644 index 5ac428c1065f..000000000000 --- a/lib/vscode/extensions/typescript-language-features/yarn.lock +++ /dev/null @@ -1,116 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -"@types/semver@^5.5.0": - version "5.5.0" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" - integrity sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ== - -applicationinsights@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.7.4.tgz#e7d96435594d893b00cf49f70a5927105dbb8749" - integrity sha512-XFLsNlcanpjFhHNvVWEfcm6hr7lu9znnb6Le1Lk5RE03YUV9X2B2n2MfM4kJZRrUdV+C0hdHxvWyv+vWoLfY7A== - dependencies: - cls-hooked "^4.2.2" - continuation-local-storage "^3.2.1" - diagnostic-channel "0.2.0" - diagnostic-channel-publishers "^0.3.3" - -async-hook-jl@^1.7.6: - version "1.7.6" - resolved "https://registry.yarnpkg.com/async-hook-jl/-/async-hook-jl-1.7.6.tgz#4fd25c2f864dbaf279c610d73bf97b1b28595e68" - integrity sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg== - dependencies: - stack-chain "^1.3.7" - -async-listener@^0.6.0: - version "0.6.10" - resolved "https://registry.yarnpkg.com/async-listener/-/async-listener-0.6.10.tgz#a7c97abe570ba602d782273c0de60a51e3e17cbc" - integrity sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw== - dependencies: - semver "^5.3.0" - shimmer "^1.1.0" - -cls-hooked@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/cls-hooked/-/cls-hooked-4.2.2.tgz#ad2e9a4092680cdaffeb2d3551da0e225eae1908" - integrity sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw== - dependencies: - async-hook-jl "^1.7.6" - emitter-listener "^1.0.1" - semver "^5.4.1" - -continuation-local-storage@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" - integrity sha512-jx44cconVqkCEEyLSKWwkvUXwO561jXMa3LPjTPsm5QR22PA0/mhe33FT4Xb5y74JDvt/Cq+5lm8S8rskLv9ZA== - dependencies: - async-listener "^0.6.0" - emitter-listener "^1.1.1" - -diagnostic-channel-publishers@^0.3.3: - version "0.3.5" - resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz#a84a05fd6cc1d7619fdd17791c17e540119a7536" - integrity sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ== - -diagnostic-channel@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" - integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= - dependencies: - semver "^5.3.0" - -emitter-listener@^1.0.1, emitter-listener@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" - integrity sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ== - dependencies: - shimmer "^1.2.0" - -jsonc-parser@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.3.1.tgz#59549150b133f2efacca48fe9ce1ec0659af2342" - integrity sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg== - -semver@5.5.1: - version "5.5.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" - integrity sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw== - -semver@^5.3.0, semver@^5.4.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -shimmer@^1.1.0, shimmer@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" - integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== - -stack-chain@^1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" - integrity sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU= - -typescript-vscode-sh-plugin@^0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/typescript-vscode-sh-plugin/-/typescript-vscode-sh-plugin-0.7.3.tgz#acdc223e5baf2cd43b8e9cf21775fba162b05029" - integrity sha512-IAjOX1fE35G6DiNCJv6oq7JmYkPV7KI/g1SGX6i8Cgauv7hsXbS94fboSZNM2Dai+m3xNGARHG5V6Ka7YcZRgQ== - -vscode-extension-telemetry@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz#18389bc24127c89dade29cd2b71ba69a6ee6ad26" - integrity sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ== - dependencies: - applicationinsights "1.7.4" - -vscode-nls@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" - integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== diff --git a/lib/vscode/extensions/vscode-api-tests/package.json b/lib/vscode/extensions/vscode-api-tests/package.json deleted file mode 100644 index e1c16dace634..000000000000 --- a/lib/vscode/extensions/vscode-api-tests/package.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "name": "vscode-api-tests", - "description": "API tests for VS Code", - "version": "0.0.1", - "publisher": "vscode", - "license": "MIT", - "enableProposedApi": true, - "private": true, - "activationEvents": [], - "main": "./out/extension", - "engines": { - "vscode": "^1.55.0" - }, - "icon": "media/icon.png", - "contributes": { - "configuration": { - "type": "object", - "title": "Test Config", - "properties": { - "farboo.config0": { - "type": "boolean", - "default": true - }, - "farboo.nested.config1": { - "type": "number", - "default": 42 - }, - "farboo.nested.config2": { - "type": "string", - "default": "Das Pferd frisst kein Reis." - }, - "farboo.config4": { - "type": "string" - }, - "farboo.get": { - "type": "string", - "default": "get-prop" - } - } - }, - "views": { - "remote": [ - { - "id": "test.treeId", - "name": "test-tree", - "when": "never" - } - ] - }, - "configurationDefaults": { - "[abcLang]": { - "editor.lineNumbers": "off", - "editor.tabSize": 2 - } - }, - "taskDefinitions": [ - { - "type": "custombuildscript", - "required": [ - "flavor" - ], - "properties": { - "flavor": { - "type": "string", - "description": "The build flavor. Should be either '32' or '64'." - }, - "flags": { - "type": "array", - "description": "Additional build flags." - } - } - } - ], - "breakpoints": [ - { - "language": "markdown" - } - ], - "debuggers": [ - { - "type": "mock", - "label": "Mock Debug", - "languages": [ - "markdown" - ], - "configurationAttributes": { - "launch": { - "required": [ - "program" - ], - "properties": { - "program": { - "type": "string", - "description": "Absolute path to a text file.", - "default": "${workspaceFolder}/file.md" - }, - "stopOnEntry": { - "type": "boolean", - "description": "Automatically stop after launch.", - "default": true - }, - "trace": { - "type": "boolean", - "description": "Enable logging of the Debug Adapter Protocol.", - "default": true - } - } - } - }, - "initialConfigurations": [ - { - "type": "mock", - "request": "launch", - "name": "Debug file.md", - "program": "${workspaceFolder}/file.md" - } - ] - } - ], - "notebookProvider": [ - { - "viewType": "notebookCoreTest", - "displayName": "Notebook Core Test", - "selector": [ - { - "filenamePattern": "*.vsctestnb", - "excludeFileNamePattern": "" - } - ] - }, - { - "viewType": "notebook.nbdtest", - "displayName": "notebook.nbdtest", - "selector": [ - { - "filenamePattern": "**/*.nbdtest" - } - ] - }, - { - "viewType": "notebook.nbdserializer", - "displayName": "notebook.nbdserializer", - "selector": [ - { - "filenamePattern": "**/*.nbdserializer" - } - ] - } - ] - }, - "scripts": { - "compile": "node ./node_modules/vscode/bin/compile -watch -p ./", - "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-api-tests ./tsconfig.json" - }, - "devDependencies": { - "@types/mocha": "^8.2.0", - "@types/node": "^12.19.9" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/configuration.test.ts b/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/configuration.test.ts deleted file mode 100644 index 0a9ddf7aa2d6..000000000000 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/configuration.test.ts +++ /dev/null @@ -1,49 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import 'mocha'; -import * as assert from 'assert'; -import * as vscode from 'vscode'; -import { assertNoRpc } from '../utils'; - -suite('vscode API - configuration', () => { - - teardown(assertNoRpc); - - test('configurations, language defaults', function () { - const defaultLanguageSettings = vscode.workspace.getConfiguration().get('[abcLang]'); - - assert.deepEqual(defaultLanguageSettings, { - 'editor.lineNumbers': 'off', - 'editor.tabSize': 2 - }); - }); - - test('configuration, defaults', () => { - const config = vscode.workspace.getConfiguration('farboo'); - - assert.ok(config.has('config0')); - assert.equal(config.get('config0'), true); - assert.equal(config.get('config4'), ''); - assert.equal(config['config0'], true); - assert.equal(config['config4'], ''); - - assert.throws(() => (config)['config4'] = 'valuevalue'); - - assert.ok(config.has('nested.config1')); - assert.equal(config.get('nested.config1'), 42); - assert.ok(config.has('nested.config2')); - assert.equal(config.get('nested.config2'), 'Das Pferd frisst kein Reis.'); - }); - - test('configuration, name vs property', () => { - const config = vscode.workspace.getConfiguration('farboo'); - - assert.ok(config.has('get')); - assert.equal(config.get('get'), 'get-prop'); - assert.deepEqual(config['get'], config.get); - assert.throws(() => config['get'] = 'get-prop'); - }); -}); diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts b/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts deleted file mode 100644 index ef16bbe1c61a..000000000000 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts +++ /dev/null @@ -1,267 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as assert from 'assert'; -import { workspace, window, Position, Range, commands, TextEditor, TextDocument, TextEditorCursorStyle, TextEditorLineNumbersStyle, SnippetString, Selection, Uri, env } from 'vscode'; -import { createRandomFile, deleteFile, closeAllEditors, assertNoRpc } from '../utils'; - -suite('vscode API - editors', () => { - - teardown(async function () { - assertNoRpc(); - await closeAllEditors(); - }); - - function withRandomFileEditor(initialContents: string, run: (editor: TextEditor, doc: TextDocument) => Thenable): Thenable { - return createRandomFile(initialContents).then(file => { - return workspace.openTextDocument(file).then(doc => { - return window.showTextDocument(doc).then((editor) => { - return run(editor, doc).then(_ => { - if (doc.isDirty) { - return doc.save().then(saved => { - assert.ok(saved); - assert.ok(!doc.isDirty); - return deleteFile(file); - }); - } else { - return deleteFile(file); - } - }); - }); - }); - }); - } - - test('insert snippet', () => { - const snippetString = new SnippetString() - .appendText('This is a ') - .appendTabstop() - .appendPlaceholder('placeholder') - .appendText(' snippet'); - - return withRandomFileEditor('', (editor, doc) => { - return editor.insertSnippet(snippetString).then(inserted => { - assert.ok(inserted); - assert.equal(doc.getText(), 'This is a placeholder snippet'); - assert.ok(doc.isDirty); - }); - }); - }); - - test('insert snippet with clipboard variables', async function () { - const old = await env.clipboard.readText(); - - const newValue = 'INTEGRATION-TESTS'; - await env.clipboard.writeText(newValue); - - const actualValue = await env.clipboard.readText(); - - if (actualValue !== newValue) { - // clipboard not working?!? - this.skip(); - return; - } - - const snippetString = new SnippetString('running: $CLIPBOARD'); - - await withRandomFileEditor('', async (editor, doc) => { - const inserted = await editor.insertSnippet(snippetString); - assert.ok(inserted); - assert.equal(doc.getText(), 'running: INTEGRATION-TESTS'); - assert.ok(doc.isDirty); - }); - - await env.clipboard.writeText(old); - }); - - test('insert snippet with replacement, editor selection', () => { - const snippetString = new SnippetString() - .appendText('has been'); - - return withRandomFileEditor('This will be replaced', (editor, doc) => { - editor.selection = new Selection( - new Position(0, 5), - new Position(0, 12) - ); - - return editor.insertSnippet(snippetString).then(inserted => { - assert.ok(inserted); - assert.equal(doc.getText(), 'This has been replaced'); - assert.ok(doc.isDirty); - }); - }); - }); - - test('insert snippet with replacement, selection as argument', () => { - const snippetString = new SnippetString() - .appendText('has been'); - - return withRandomFileEditor('This will be replaced', (editor, doc) => { - const selection = new Selection( - new Position(0, 5), - new Position(0, 12) - ); - - return editor.insertSnippet(snippetString, selection).then(inserted => { - assert.ok(inserted); - assert.equal(doc.getText(), 'This has been replaced'); - assert.ok(doc.isDirty); - }); - }); - }); - - test('make edit', () => { - return withRandomFileEditor('', (editor, doc) => { - return editor.edit((builder) => { - builder.insert(new Position(0, 0), 'Hello World'); - }).then(applied => { - assert.ok(applied); - assert.equal(doc.getText(), 'Hello World'); - assert.ok(doc.isDirty); - }); - }); - }); - - test('issue #6281: Edits fail to validate ranges correctly before applying', () => { - return withRandomFileEditor('Hello world!', (editor, doc) => { - return editor.edit((builder) => { - builder.replace(new Range(0, 0, Number.MAX_VALUE, Number.MAX_VALUE), 'new'); - }).then(applied => { - assert.ok(applied); - assert.equal(doc.getText(), 'new'); - assert.ok(doc.isDirty); - }); - }); - }); - - function executeReplace(editor: TextEditor, range: Range, text: string, undoStopBefore: boolean, undoStopAfter: boolean): Thenable { - return editor.edit((builder) => { - builder.replace(range, text); - }, { undoStopBefore: undoStopBefore, undoStopAfter: undoStopAfter }); - } - - test('TextEditor.edit can control undo/redo stack 1', () => { - return withRandomFileEditor('Hello world!', async (editor, doc) => { - const applied1 = await executeReplace(editor, new Range(0, 0, 0, 1), 'h', false, false); - assert.ok(applied1); - assert.equal(doc.getText(), 'hello world!'); - assert.ok(doc.isDirty); - - const applied2 = await executeReplace(editor, new Range(0, 1, 0, 5), 'ELLO', false, false); - assert.ok(applied2); - assert.equal(doc.getText(), 'hELLO world!'); - assert.ok(doc.isDirty); - - await commands.executeCommand('undo'); - if (doc.getText() === 'hello world!') { - // see https://github.com/microsoft/vscode/issues/109131 - // it looks like an undo stop was inserted in between these two edits - // it is unclear why this happens, but it can happen for a multitude of reasons - await commands.executeCommand('undo'); - } - assert.equal(doc.getText(), 'Hello world!'); - }); - }); - - test('TextEditor.edit can control undo/redo stack 2', () => { - return withRandomFileEditor('Hello world!', (editor, doc) => { - return executeReplace(editor, new Range(0, 0, 0, 1), 'h', false, false).then(applied => { - assert.ok(applied); - assert.equal(doc.getText(), 'hello world!'); - assert.ok(doc.isDirty); - return executeReplace(editor, new Range(0, 1, 0, 5), 'ELLO', true, false); - }).then(applied => { - assert.ok(applied); - assert.equal(doc.getText(), 'hELLO world!'); - assert.ok(doc.isDirty); - return commands.executeCommand('undo'); - }).then(_ => { - assert.equal(doc.getText(), 'hello world!'); - }); - }); - }); - - test('issue #16573: Extension API: insertSpaces and tabSize are undefined', () => { - return withRandomFileEditor('Hello world!\n\tHello world!', (editor, _doc) => { - - assert.equal(editor.options.tabSize, 4); - assert.equal(editor.options.insertSpaces, false); - assert.equal(editor.options.cursorStyle, TextEditorCursorStyle.Line); - assert.equal(editor.options.lineNumbers, TextEditorLineNumbersStyle.On); - - editor.options = { - tabSize: 2 - }; - - assert.equal(editor.options.tabSize, 2); - assert.equal(editor.options.insertSpaces, false); - assert.equal(editor.options.cursorStyle, TextEditorCursorStyle.Line); - assert.equal(editor.options.lineNumbers, TextEditorLineNumbersStyle.On); - - editor.options.tabSize = 'invalid'; - - assert.equal(editor.options.tabSize, 2); - assert.equal(editor.options.insertSpaces, false); - assert.equal(editor.options.cursorStyle, TextEditorCursorStyle.Line); - assert.equal(editor.options.lineNumbers, TextEditorLineNumbersStyle.On); - - return Promise.resolve(); - }); - }); - - test('issue #20757: Overlapping ranges are not allowed!', () => { - return withRandomFileEditor('Hello world!\n\tHello world!', (editor, _doc) => { - return editor.edit((builder) => { - // create two edits that overlap (i.e. are illegal) - builder.replace(new Range(0, 0, 0, 2), 'He'); - builder.replace(new Range(0, 1, 0, 3), 'el'); - }).then( - - (_applied) => { - assert.ok(false, 'edit with overlapping ranges should fail'); - }, - - (_err) => { - assert.ok(true, 'edit with overlapping ranges should fail'); - } - ); - }); - }); - - test('throw when using invalid edit', async function () { - await withRandomFileEditor('foo', editor => { - return new Promise((resolve, reject) => { - editor.edit(edit => { - edit.insert(new Position(0, 0), 'bar'); - setTimeout(() => { - try { - edit.insert(new Position(0, 0), 'bar'); - reject(new Error('expected error')); - } catch (err) { - assert.ok(true); - resolve(); - } - }, 0); - }); - }); - }); - }); - - test('editor contents are correctly read (small file)', function () { - return testEditorContents('/far.js'); - }); - - test('editor contents are correctly read (large file)', async function () { - return testEditorContents('/lorem.txt'); - }); - - async function testEditorContents(relativePath: string) { - const root = workspace.workspaceFolders![0]!.uri; - const file = Uri.parse(root.toString() + relativePath); - const document = await workspace.openTextDocument(file); - - assert.equal(document.getText(), Buffer.from(await workspace.fs.readFile(file)).toString()); - } -}); diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/notebook.document.test.ts b/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/notebook.document.test.ts deleted file mode 100644 index 70e6e7042315..000000000000 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/notebook.document.test.ts +++ /dev/null @@ -1,346 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as assert from 'assert'; -import * as vscode from 'vscode'; -import * as utils from '../utils'; - -suite('Notebook Document', function () { - - const simpleContentProvider = new class implements vscode.NotebookSerializer { - deserializeNotebook(_data: Uint8Array): vscode.NotebookData | Thenable { - return new vscode.NotebookData( - [new vscode.NotebookCellData(vscode.NotebookCellKind.Code, '// SIMPLE', 'javascript')], - new vscode.NotebookDocumentMetadata() - ); - } - serializeNotebook(_data: vscode.NotebookData): Uint8Array | Thenable { - return new Uint8Array(); - } - }; - - const complexContentProvider = new class implements vscode.NotebookContentProvider { - async openNotebook(uri: vscode.Uri, _openContext: vscode.NotebookDocumentOpenContext): Promise { - return new vscode.NotebookData( - [new vscode.NotebookCellData(vscode.NotebookCellKind.Code, uri.toString(), 'javascript')], - new vscode.NotebookDocumentMetadata() - ); - } - async saveNotebook(_document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) { - // - } - async saveNotebookAs(_targetResource: vscode.Uri, _document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) { - // - } - async backupNotebook(_document: vscode.NotebookDocument, _context: vscode.NotebookDocumentBackupContext, _cancellation: vscode.CancellationToken) { - return { id: '', delete() { } }; - } - }; - - const disposables: vscode.Disposable[] = []; - - suiteTeardown(async function () { - utils.assertNoRpc(); - await utils.revertAllDirty(); - await utils.closeAllEditors(); - utils.disposeAll(disposables); - disposables.length = 0; - - for (let doc of vscode.notebook.notebookDocuments) { - assert.strictEqual(doc.isDirty, false, doc.uri.toString()); - } - }); - - suiteSetup(function () { - disposables.push(vscode.notebook.registerNotebookContentProvider('notebook.nbdtest', complexContentProvider)); - disposables.push(vscode.notebook.registerNotebookSerializer('notebook.nbdserializer', simpleContentProvider)); - }); - - test('cannot register sample provider multiple times', function () { - assert.throws(() => { - vscode.notebook.registerNotebookContentProvider('notebook.nbdtest', complexContentProvider); - }); - // assert.throws(() => { - // vscode.notebook.registerNotebookSerializer('notebook.nbdserializer', simpleContentProvider); - // }); - }); - - test('cannot open unknown types', async function () { - try { - await vscode.notebook.openNotebookDocument(vscode.Uri.parse('some:///thing.notTypeKnown')); - assert.ok(false); - } catch { - assert.ok(true); - } - }); - - test('document basics', async function () { - const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); - const notebook = await vscode.notebook.openNotebookDocument(uri); - - assert.strictEqual(notebook.uri.toString(), uri.toString()); - assert.strictEqual(notebook.isDirty, false); - assert.strictEqual(notebook.isUntitled, false); - assert.strictEqual(notebook.cellCount, 1); - - assert.strictEqual(notebook.viewType, 'notebook.nbdtest'); - }); - - test('notebook open/close, notebook ready when cell-document open event is fired', async function () { - const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); - let didHappen = false; - const p = utils.asPromise(vscode.workspace.onDidOpenTextDocument).then(doc => { - if (doc.uri.scheme !== 'vscode-notebook-cell') { - return; - } - const notebook = vscode.notebook.notebookDocuments.find(notebook => { - const cell = notebook.getCells().find(cell => cell.document === doc); - return Boolean(cell); - }); - assert.ok(notebook, `notebook for cell ${doc.uri} NOT found`); - didHappen = true; - }); - - await vscode.notebook.openNotebookDocument(uri); - await p; - assert.strictEqual(didHappen, true); - }); - - test('notebook open/close, all cell-documents are ready', async function () { - const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); - - const p = utils.asPromise(vscode.notebook.onDidOpenNotebookDocument).then(notebook => { - for (let i = 0; i < notebook.cellCount; i++) { - let cell = notebook.cellAt(i); - - const doc = vscode.workspace.textDocuments.find(doc => doc.uri.toString() === cell.document.uri.toString()); - assert.ok(doc); - assert.strictEqual(doc.notebook === notebook, true); - assert.strictEqual(doc === cell.document, true); - assert.strictEqual(doc?.languageId, cell.document.languageId); - assert.strictEqual(doc?.isDirty, false); - assert.strictEqual(doc?.isClosed, false); - } - }); - - await vscode.notebook.openNotebookDocument(uri); - await p; - }); - - - test('workspace edit API (replaceCells)', async function () { - const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); - - const document = await vscode.notebook.openNotebookDocument(uri); - assert.strictEqual(document.cellCount, 1); - - // inserting two new cells - { - const edit = new vscode.WorkspaceEdit(); - edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, 0), [{ - kind: vscode.NotebookCellKind.Markdown, - language: 'markdown', - metadata: undefined, - outputs: [], - source: 'new_markdown' - }, { - kind: vscode.NotebookCellKind.Code, - language: 'fooLang', - metadata: undefined, - outputs: [], - source: 'new_code' - }]); - - const success = await vscode.workspace.applyEdit(edit); - assert.strictEqual(success, true); - } - - assert.strictEqual(document.cellCount, 3); - assert.strictEqual(document.cellAt(0).document.getText(), 'new_markdown'); - assert.strictEqual(document.cellAt(1).document.getText(), 'new_code'); - - // deleting cell 1 and 3 - { - const edit = new vscode.WorkspaceEdit(); - edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, 1), []); - edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(2, 3), []); - const success = await vscode.workspace.applyEdit(edit); - assert.strictEqual(success, true); - } - - assert.strictEqual(document.cellCount, 1); - assert.strictEqual(document.cellAt(0).document.getText(), 'new_code'); - - // replacing all cells - { - const edit = new vscode.WorkspaceEdit(); - edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, 1), [{ - kind: vscode.NotebookCellKind.Markdown, - language: 'markdown', - metadata: undefined, - outputs: [], - source: 'new2_markdown' - }, { - kind: vscode.NotebookCellKind.Code, - language: 'fooLang', - metadata: undefined, - outputs: [], - source: 'new2_code' - }]); - const success = await vscode.workspace.applyEdit(edit); - assert.strictEqual(success, true); - } - assert.strictEqual(document.cellCount, 2); - assert.strictEqual(document.cellAt(0).document.getText(), 'new2_markdown'); - assert.strictEqual(document.cellAt(1).document.getText(), 'new2_code'); - - // remove all cells - { - const edit = new vscode.WorkspaceEdit(); - edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, document.cellCount), []); - const success = await vscode.workspace.applyEdit(edit); - assert.strictEqual(success, true); - } - assert.strictEqual(document.cellCount, 0); - }); - - test('workspace edit API (replaceCells, event)', async function () { - const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); - const document = await vscode.notebook.openNotebookDocument(uri); - assert.strictEqual(document.cellCount, 1); - - const edit = new vscode.WorkspaceEdit(); - edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, 0), [{ - kind: vscode.NotebookCellKind.Markdown, - language: 'markdown', - metadata: undefined, - outputs: [], - source: 'new_markdown' - }, { - kind: vscode.NotebookCellKind.Code, - language: 'fooLang', - metadata: undefined, - outputs: [], - source: 'new_code' - }]); - - const event = utils.asPromise(vscode.notebook.onDidChangeNotebookCells); - - const success = await vscode.workspace.applyEdit(edit); - assert.strictEqual(success, true); - - const data = await event; - - // check document - assert.strictEqual(document.cellCount, 3); - assert.strictEqual(document.cellAt(0).document.getText(), 'new_markdown'); - assert.strictEqual(document.cellAt(1).document.getText(), 'new_code'); - - // check event data - assert.strictEqual(data.document === document, true); - assert.strictEqual(data.changes.length, 1); - assert.strictEqual(data.changes[0].deletedCount, 0); - assert.strictEqual(data.changes[0].deletedItems.length, 0); - assert.strictEqual(data.changes[0].items.length, 2); - assert.strictEqual(data.changes[0].items[0], document.cellAt(0)); - assert.strictEqual(data.changes[0].items[1], document.cellAt(1)); - }); - - test('document save API', async function () { - const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); - const notebook = await vscode.notebook.openNotebookDocument(uri); - - assert.strictEqual(notebook.uri.toString(), uri.toString()); - assert.strictEqual(notebook.isDirty, false); - assert.strictEqual(notebook.isUntitled, false); - assert.strictEqual(notebook.cellCount, 1); - assert.strictEqual(notebook.viewType, 'notebook.nbdtest'); - - const edit = new vscode.WorkspaceEdit(); - edit.replaceNotebookCells(notebook.uri, new vscode.NotebookRange(0, 0), [{ - kind: vscode.NotebookCellKind.Markdown, - language: 'markdown', - metadata: undefined, - outputs: [], - source: 'new_markdown' - }, { - kind: vscode.NotebookCellKind.Code, - language: 'fooLang', - metadata: undefined, - outputs: [], - source: 'new_code' - }]); - - const success = await vscode.workspace.applyEdit(edit); - assert.strictEqual(success, true); - assert.strictEqual(notebook.isDirty, true); - - await notebook.save(); - assert.strictEqual(notebook.isDirty, false); - }); - - - test('setTextDocumentLanguage for notebook cells', async function () { - - const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest'); - const notebook = await vscode.notebook.openNotebookDocument(uri); - const first = notebook.cellAt(0); - assert.strictEqual(first.document.languageId, 'javascript'); - - const pclose = utils.asPromise(vscode.workspace.onDidCloseTextDocument); - const popen = utils.asPromise(vscode.workspace.onDidOpenTextDocument); - - await vscode.languages.setTextDocumentLanguage(first.document, 'css'); - assert.strictEqual(first.document.languageId, 'css'); - - const closed = await pclose; - const opened = await popen; - - assert.strictEqual(closed.uri.toString(), first.document.uri.toString()); - assert.strictEqual(opened.uri.toString(), first.document.uri.toString()); - assert.strictEqual(opened === closed, true); - }); - - test('setTextDocumentLanguage when notebook editor is not open', async function () { - const uri = await utils.createRandomFile('', undefined, '.nbdtest'); - const notebook = await vscode.notebook.openNotebookDocument(uri); - const firstCelUri = notebook.cellAt(0).document.uri; - await vscode.commands.executeCommand('workbench.action.closeActiveEditor'); - - let cellDoc = await vscode.workspace.openTextDocument(firstCelUri); - cellDoc = await vscode.languages.setTextDocumentLanguage(cellDoc, 'css'); - assert.strictEqual(cellDoc.languageId, 'css'); - }); - - test('dirty state - complex', async function () { - const resource = await utils.createRandomFile(undefined, undefined, '.nbdtest'); - const document = await vscode.notebook.openNotebookDocument(resource); - assert.strictEqual(document.isDirty, false); - - const edit = new vscode.WorkspaceEdit(); - edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, document.cellCount), []); - assert.ok(await vscode.workspace.applyEdit(edit)); - - assert.strictEqual(document.isDirty, true); - - await document.save(); - assert.strictEqual(document.isDirty, false); - }); - - test('dirty state - serializer', async function () { - const resource = await utils.createRandomFile(undefined, undefined, '.nbdserializer'); - const document = await vscode.notebook.openNotebookDocument(resource); - assert.strictEqual(document.isDirty, false); - - const edit = new vscode.WorkspaceEdit(); - edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, document.cellCount), []); - assert.ok(await vscode.workspace.applyEdit(edit)); - - assert.strictEqual(document.isDirty, true); - - await document.save(); - assert.strictEqual(document.isDirty, false); - }); -}); diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts b/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts deleted file mode 100644 index a23d3e55c73f..000000000000 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts +++ /dev/null @@ -1,825 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { window, Pseudoterminal, EventEmitter, TerminalDimensions, workspace, ConfigurationTarget, Disposable, UIKind, env, EnvironmentVariableMutatorType, EnvironmentVariableMutator, extensions, ExtensionContext, TerminalOptions, ExtensionTerminalOptions, Terminal } from 'vscode'; -import { doesNotThrow, equal, deepEqual, throws, strictEqual } from 'assert'; -import { assertNoRpc } from '../utils'; - -// Disable terminal tests: -// - Web https://github.com/microsoft/vscode/issues/92826 -(env.uiKind === UIKind.Web ? suite.skip : suite)('vscode API - terminal', () => { - let extensionContext: ExtensionContext; - - suiteSetup(async () => { - // Trigger extension activation and grab the context as some tests depend on it - await extensions.getExtension('vscode.vscode-api-tests')?.activate(); - extensionContext = (global as any).testExtensionContext; - - const config = workspace.getConfiguration('terminal.integrated'); - // Disable conpty in integration tests because of https://github.com/microsoft/vscode/issues/76548 - await config.update('windowsEnableConpty', false, ConfigurationTarget.Global); - // Disable exit alerts as tests may trigger then and we're not testing the notifications - await config.update('showExitAlert', false, ConfigurationTarget.Global); - // Canvas may cause problems when running in a container - await config.update('gpuAcceleration', 'off', ConfigurationTarget.Global); - // Disable env var relaunch for tests to prevent terminals relaunching themselves - await config.update('environmentChangesRelaunch', false, ConfigurationTarget.Global); - }); - - suite('Terminal', () => { - let disposables: Disposable[] = []; - - teardown(() => { - assertNoRpc(); - disposables.forEach(d => d.dispose()); - disposables.length = 0; - }); - - test('sendText immediately after createTerminal should not throw', async () => { - const terminal = window.createTerminal(); - const result = await new Promise(r => { - disposables.push(window.onDidOpenTerminal(t => { - if (t === terminal) { - r(t); - } - })); - }); - equal(result, terminal); - doesNotThrow(terminal.sendText.bind(terminal, 'echo "foo"')); - await new Promise(r => { - disposables.push(window.onDidCloseTerminal(t => { - if (t === terminal) { - r(); - } - })); - terminal.dispose(); - }); - }); - - test('echo works in the default shell', async () => { - const terminal = await new Promise(r => { - disposables.push(window.onDidOpenTerminal(t => { - if (t === terminal) { - r(terminal); - } - })); - // Use a single character to avoid winpty/conpty issues with injected sequences - const terminal = window.createTerminal({ - env: { TEST: '`' } - }); - terminal.show(); - }); - - let data = ''; - await new Promise(r => { - disposables.push(window.onDidWriteTerminalData(e => { - if (e.terminal === terminal) { - data += e.data; - if (data.indexOf('`') !== 0) { - r(); - } - } - })); - // Print an environment variable value so the echo statement doesn't get matched - if (process.platform === 'win32') { - terminal.sendText(`$env:TEST`); - } else { - terminal.sendText(`echo $TEST`); - } - }); - - await new Promise(r => { - terminal.dispose(); - disposables.push(window.onDidCloseTerminal(t => { - strictEqual(terminal, t); - r(); - })); - }); - }); - - test('onDidCloseTerminal event fires when terminal is disposed', async () => { - const terminal = window.createTerminal(); - const result = await new Promise(r => { - disposables.push(window.onDidOpenTerminal(t => { - if (t === terminal) { - r(t); - } - })); - }); - equal(result, terminal); - await new Promise(r => { - disposables.push(window.onDidCloseTerminal(t => { - if (t === terminal) { - r(); - } - })); - terminal.dispose(); - }); - }); - - test('processId immediately after createTerminal should fetch the pid', async () => { - const terminal = window.createTerminal(); - const result = await new Promise(r => { - disposables.push(window.onDidOpenTerminal(t => { - if (t === terminal) { - r(t); - } - })); - }); - equal(result, terminal); - let pid = await result.processId; - equal(true, pid && pid > 0); - await new Promise(r => { - disposables.push(window.onDidCloseTerminal(t => { - if (t === terminal) { - r(); - } - })); - terminal.dispose(); - }); - }); - - test('name in constructor should set terminal.name', async () => { - const terminal = window.createTerminal('a'); - const result = await new Promise(r => { - disposables.push(window.onDidOpenTerminal(t => { - if (t === terminal) { - r(t); - } - })); - }); - equal(result, terminal); - await new Promise(r => { - disposables.push(window.onDidCloseTerminal(t => { - if (t === terminal) { - r(); - } - })); - terminal.dispose(); - }); - }); - - test('creationOptions should be set and readonly for TerminalOptions terminals', async () => { - const options = { - name: 'foo', - hideFromUser: true - }; - const terminal = window.createTerminal(options); - const terminalOptions = terminal.creationOptions as TerminalOptions; - const result = await new Promise(r => { - disposables.push(window.onDidOpenTerminal(t => { - if (t === terminal) { - r(t); - } - })); - }); - equal(result, terminal); - await new Promise(r => { - disposables.push(window.onDidCloseTerminal(t => { - if (t === terminal) { - r(); - } - })); - terminal.dispose(); - }); - throws(() => terminalOptions.name = 'bad', 'creationOptions should be readonly at runtime'); - }); - - test('onDidOpenTerminal should fire when a terminal is created', async () => { - const terminal = window.createTerminal('b'); - const result = await new Promise(r => { - disposables.push(window.onDidOpenTerminal(t => { - if (t === terminal) { - r(t); - } - })); - }); - equal(result, terminal); - await new Promise(r => { - disposables.push(window.onDidCloseTerminal(t => { - if (t === terminal) { - r(); - } - })); - terminal.dispose(); - }); - }); - - test('exitStatus.code should be set to undefined after a terminal is disposed', async () => { - const terminal = window.createTerminal(); - const result = await new Promise(r => { - disposables.push(window.onDidOpenTerminal(t => { - if (t === terminal) { - r(t); - } - })); - }); - equal(result, terminal); - await new Promise(r => { - disposables.push(window.onDidCloseTerminal(t => { - if (t === terminal) { - deepEqual(t.exitStatus, { code: undefined }); - r(); - } - })); - terminal.dispose(); - }); - }); - - // test('onDidChangeActiveTerminal should fire when new terminals are created', (done) => { - // const reg1 = window.onDidChangeActiveTerminal((active: Terminal | undefined) => { - // equal(active, terminal); - // equal(active, window.activeTerminal); - // reg1.dispose(); - // const reg2 = window.onDidChangeActiveTerminal((active: Terminal | undefined) => { - // equal(active, undefined); - // equal(active, window.activeTerminal); - // reg2.dispose(); - // done(); - // }); - // terminal.dispose(); - // }); - // const terminal = window.createTerminal(); - // terminal.show(); - // }); - - // test('onDidChangeTerminalDimensions should fire when new terminals are created', (done) => { - // const reg1 = window.onDidChangeTerminalDimensions(async (event: TerminalDimensionsChangeEvent) => { - // equal(event.terminal, terminal1); - // equal(typeof event.dimensions.columns, 'number'); - // equal(typeof event.dimensions.rows, 'number'); - // ok(event.dimensions.columns > 0); - // ok(event.dimensions.rows > 0); - // reg1.dispose(); - // let terminal2: Terminal; - // const reg2 = window.onDidOpenTerminal((newTerminal) => { - // // This is guarantees to fire before dimensions change event - // if (newTerminal !== terminal1) { - // terminal2 = newTerminal; - // reg2.dispose(); - // } - // }); - // let firstCalled = false; - // let secondCalled = false; - // const reg3 = window.onDidChangeTerminalDimensions((event: TerminalDimensionsChangeEvent) => { - // if (event.terminal === terminal1) { - // // The original terminal should fire dimension change after a split - // firstCalled = true; - // } else if (event.terminal !== terminal1) { - // // The new split terminal should fire dimension change - // secondCalled = true; - // } - // if (firstCalled && secondCalled) { - // let firstDisposed = false; - // let secondDisposed = false; - // const reg4 = window.onDidCloseTerminal(term => { - // if (term === terminal1) { - // firstDisposed = true; - // } - // if (term === terminal2) { - // secondDisposed = true; - // } - // if (firstDisposed && secondDisposed) { - // reg4.dispose(); - // done(); - // } - // }); - // terminal1.dispose(); - // terminal2.dispose(); - // reg3.dispose(); - // } - // }); - // await timeout(500); - // commands.executeCommand('workbench.action.terminal.split'); - // }); - // const terminal1 = window.createTerminal({ name: 'test' }); - // terminal1.show(); - // }); - - suite('hideFromUser', () => { - test('should be available to terminals API', async () => { - const terminal = window.createTerminal({ name: 'bg', hideFromUser: true }); - const result = await new Promise(r => { - disposables.push(window.onDidOpenTerminal(t => { - if (t === terminal) { - r(t); - } - })); - }); - equal(result, terminal); - equal(true, window.terminals.indexOf(terminal) !== -1); - await new Promise(r => { - disposables.push(window.onDidCloseTerminal(t => { - if (t === terminal) { - r(); - } - })); - terminal.dispose(); - }); - }); - }); - - suite('window.onDidWriteTerminalData', () => { - test('should listen to all future terminal data events', (done) => { - const openEvents: string[] = []; - const dataEvents: { name: string, data: string }[] = []; - const closeEvents: string[] = []; - disposables.push(window.onDidOpenTerminal(e => openEvents.push(e.name))); - - let resolveOnceDataWritten: (() => void) | undefined; - let resolveOnceClosed: (() => void) | undefined; - - disposables.push(window.onDidWriteTerminalData(e => { - dataEvents.push({ name: e.terminal.name, data: e.data }); - - resolveOnceDataWritten!(); - })); - - disposables.push(window.onDidCloseTerminal(e => { - closeEvents.push(e.name); - try { - if (closeEvents.length === 1) { - deepEqual(openEvents, ['test1']); - deepEqual(dataEvents, [{ name: 'test1', data: 'write1' }]); - deepEqual(closeEvents, ['test1']); - } else if (closeEvents.length === 2) { - deepEqual(openEvents, ['test1', 'test2']); - deepEqual(dataEvents, [{ name: 'test1', data: 'write1' }, { name: 'test2', data: 'write2' }]); - deepEqual(closeEvents, ['test1', 'test2']); - } - resolveOnceClosed!(); - } catch (e) { - done(e); - } - })); - - const term1Write = new EventEmitter(); - const term1Close = new EventEmitter(); - window.createTerminal({ - name: 'test1', pty: { - onDidWrite: term1Write.event, - onDidClose: term1Close.event, - open: async () => { - term1Write.fire('write1'); - - // Wait until the data is written - await new Promise(resolve => { resolveOnceDataWritten = resolve; }); - - term1Close.fire(); - - // Wait until the terminal is closed - await new Promise(resolve => { resolveOnceClosed = resolve; }); - - const term2Write = new EventEmitter(); - const term2Close = new EventEmitter(); - window.createTerminal({ - name: 'test2', pty: { - onDidWrite: term2Write.event, - onDidClose: term2Close.event, - open: async () => { - term2Write.fire('write2'); - - // Wait until the data is written - await new Promise(resolve => { resolveOnceDataWritten = resolve; }); - - term2Close.fire(); - - // Wait until the terminal is closed - await new Promise(resolve => { resolveOnceClosed = resolve; }); - - done(); - }, - close: () => { } - } - }); - }, - close: () => { } - } - }); - }); - }); - - suite('Extension pty terminals', () => { - test('should fire onDidOpenTerminal and onDidCloseTerminal', (done) => { - disposables.push(window.onDidOpenTerminal(term => { - try { - equal(term.name, 'c'); - } catch (e) { - done(e); - return; - } - disposables.push(window.onDidCloseTerminal(() => done())); - term.dispose(); - })); - const pty: Pseudoterminal = { - onDidWrite: new EventEmitter().event, - open: () => { }, - close: () => { } - }; - window.createTerminal({ name: 'c', pty }); - }); - - // The below tests depend on global UI state and each other - // test('should not provide dimensions on start as the terminal has not been shown yet', (done) => { - // const reg1 = window.onDidOpenTerminal(term => { - // equal(terminal, term); - // reg1.dispose(); - // }); - // const pty: Pseudoterminal = { - // onDidWrite: new EventEmitter().event, - // open: (dimensions) => { - // equal(dimensions, undefined); - // const reg3 = window.onDidCloseTerminal(() => { - // reg3.dispose(); - // done(); - // }); - // // Show a terminal and wait a brief period before dispose, this will cause - // // the panel to init it's dimenisons and be provided to following terminals. - // // The following test depends on this. - // terminal.show(); - // setTimeout(() => terminal.dispose(), 200); - // }, - // close: () => {} - // }; - // const terminal = window.createTerminal({ name: 'foo', pty }); - // }); - // test('should provide dimensions on start as the terminal has been shown', (done) => { - // const reg1 = window.onDidOpenTerminal(term => { - // equal(terminal, term); - // reg1.dispose(); - // }); - // const pty: Pseudoterminal = { - // onDidWrite: new EventEmitter().event, - // open: (dimensions) => { - // // This test depends on Terminal.show being called some time before such - // // that the panel dimensions are initialized and cached. - // ok(dimensions!.columns > 0); - // ok(dimensions!.rows > 0); - // const reg3 = window.onDidCloseTerminal(() => { - // reg3.dispose(); - // done(); - // }); - // terminal.dispose(); - // }, - // close: () => {} - // }; - // const terminal = window.createTerminal({ name: 'foo', pty }); - // }); - - test.skip('should respect dimension overrides', (done) => { - disposables.push(window.onDidOpenTerminal(term => { - try { - equal(terminal, term); - } catch (e) { - done(e); - return; - } - term.show(); - disposables.push(window.onDidChangeTerminalDimensions(e => { - // The default pty dimensions have a chance to appear here since override - // dimensions happens after the terminal is created. If so just ignore and - // wait for the right dimensions - if (e.dimensions.columns === 10 || e.dimensions.rows === 5) { - try { - equal(e.terminal, terminal); - } catch (e) { - done(e); - return; - } - disposables.push(window.onDidCloseTerminal(() => done())); - terminal.dispose(); - } - })); - })); - const writeEmitter = new EventEmitter(); - const overrideDimensionsEmitter = new EventEmitter(); - const pty: Pseudoterminal = { - onDidWrite: writeEmitter.event, - onDidOverrideDimensions: overrideDimensionsEmitter.event, - open: () => overrideDimensionsEmitter.fire({ columns: 10, rows: 5 }), - close: () => { } - }; - const terminal = window.createTerminal({ name: 'foo', pty }); - }); - - test('exitStatus.code should be set to the exit code (undefined)', (done) => { - disposables.push(window.onDidOpenTerminal(term => { - try { - equal(terminal, term); - equal(terminal.exitStatus, undefined); - } catch (e) { - done(e); - return; - } - disposables.push(window.onDidCloseTerminal(t => { - try { - equal(terminal, t); - deepEqual(terminal.exitStatus, { code: undefined }); - } catch (e) { - done(e); - return; - } - done(); - })); - })); - const writeEmitter = new EventEmitter(); - const closeEmitter = new EventEmitter(); - const pty: Pseudoterminal = { - onDidWrite: writeEmitter.event, - onDidClose: closeEmitter.event, - open: () => closeEmitter.fire(undefined), - close: () => { } - }; - const terminal = window.createTerminal({ name: 'foo', pty }); - }); - - test('exitStatus.code should be set to the exit code (zero)', (done) => { - disposables.push(window.onDidOpenTerminal(term => { - try { - equal(terminal, term); - equal(terminal.exitStatus, undefined); - } catch (e) { - done(e); - return; - } - disposables.push(window.onDidCloseTerminal(t => { - try { - equal(terminal, t); - deepEqual(terminal.exitStatus, { code: 0 }); - } catch (e) { - done(e); - return; - } - done(); - })); - })); - const writeEmitter = new EventEmitter(); - const closeEmitter = new EventEmitter(); - const pty: Pseudoterminal = { - onDidWrite: writeEmitter.event, - onDidClose: closeEmitter.event, - open: () => closeEmitter.fire(0), - close: () => { } - }; - const terminal = window.createTerminal({ name: 'foo', pty }); - }); - - test('exitStatus.code should be set to the exit code (non-zero)', (done) => { - disposables.push(window.onDidOpenTerminal(term => { - try { - equal(terminal, term); - equal(terminal.exitStatus, undefined); - } catch (e) { - done(e); - return; - } - disposables.push(window.onDidCloseTerminal(t => { - try { - equal(terminal, t); - deepEqual(terminal.exitStatus, { code: 22 }); - } catch (e) { - done(e); - return; - } - done(); - })); - })); - const writeEmitter = new EventEmitter(); - const closeEmitter = new EventEmitter(); - const pty: Pseudoterminal = { - onDidWrite: writeEmitter.event, - onDidClose: closeEmitter.event, - open: () => { - // Wait 500ms as any exits that occur within 500ms of terminal launch are - // are counted as "exiting during launch" which triggers a notification even - // when showExitAlerts is true - setTimeout(() => closeEmitter.fire(22), 500); - }, - close: () => { } - }; - const terminal = window.createTerminal({ name: 'foo', pty }); - }); - - test('creationOptions should be set and readonly for ExtensionTerminalOptions terminals', (done) => { - disposables.push(window.onDidOpenTerminal(term => { - try { - equal(terminal, term); - } catch (e) { - done(e); - return; - } - terminal.dispose(); - disposables.push(window.onDidCloseTerminal(() => done())); - })); - const writeEmitter = new EventEmitter(); - const pty: Pseudoterminal = { - onDidWrite: writeEmitter.event, - open: () => { }, - close: () => { } - }; - const options = { name: 'foo', pty }; - const terminal = window.createTerminal(options); - try { - equal(terminal.name, 'foo'); - const terminalOptions = terminal.creationOptions as ExtensionTerminalOptions; - equal(terminalOptions.name, 'foo'); - equal(terminalOptions.pty, pty); - throws(() => terminalOptions.name = 'bad', 'creationOptions should be readonly at runtime'); - } catch (e) { - done(e); - } - }); - }); - - // https://github.com/microsoft/vscode/issues/119826 - suite.skip('environmentVariableCollection', () => { - test('should have collection variables apply to terminals immediately after setting', (done) => { - // Text to match on before passing the test - const expectedText = [ - '~a2~', - 'b1~b2~', - '~c2~c1' - ]; - disposables.push(window.onDidWriteTerminalData(e => { - if (terminal !== e.terminal) { - return; - } - // Multiple expected could show up in the same data event - while (expectedText.length > 0 && e.data.indexOf(expectedText[0]) >= 0) { - expectedText.shift(); - // Check if all string are found, if so finish the test - if (expectedText.length === 0) { - disposables.push(window.onDidCloseTerminal(() => done())); - terminal.dispose(); - } - } - })); - const collection = extensionContext.environmentVariableCollection; - disposables.push({ dispose: () => collection.clear() }); - collection.replace('A', '~a2~'); - collection.append('B', '~b2~'); - collection.prepend('C', '~c2~'); - const terminal = window.createTerminal({ - env: { - A: 'a1', - B: 'b1', - C: 'c1' - } - }); - // Run both PowerShell and sh commands, errors don't matter we're just looking for - // the correct output - terminal.sendText('$env:A'); - terminal.sendText('echo $A'); - terminal.sendText('$env:B'); - terminal.sendText('echo $B'); - terminal.sendText('$env:C'); - terminal.sendText('echo $C'); - }); - - test('should have collection variables apply to environment variables that don\'t exist', (done) => { - // Text to match on before passing the test - const expectedText = [ - '~a2~', - '~b2~', - '~c2~' - ]; - disposables.push(window.onDidWriteTerminalData(e => { - if (terminal !== e.terminal) { - return; - } - // Multiple expected could show up in the same data event - while (expectedText.length > 0 && e.data.indexOf(expectedText[0]) >= 0) { - expectedText.shift(); - // Check if all string are found, if so finish the test - if (expectedText.length === 0) { - disposables.push(window.onDidCloseTerminal(() => done())); - terminal.dispose(); - } - } - })); - const collection = extensionContext.environmentVariableCollection; - disposables.push({ dispose: () => collection.clear() }); - collection.replace('A', '~a2~'); - collection.append('B', '~b2~'); - collection.prepend('C', '~c2~'); - const terminal = window.createTerminal({ - env: { - A: null, - B: null, - C: null - } - }); - // Run both PowerShell and sh commands, errors don't matter we're just looking for - // the correct output - terminal.sendText('$env:A'); - terminal.sendText('echo $A'); - terminal.sendText('$env:B'); - terminal.sendText('echo $B'); - terminal.sendText('$env:C'); - terminal.sendText('echo $C'); - }); - - test('should respect clearing entries', (done) => { - // Text to match on before passing the test - const expectedText = [ - '~a1~', - '~b1~' - ]; - disposables.push(window.onDidWriteTerminalData(e => { - if (terminal !== e.terminal) { - return; - } - // Multiple expected could show up in the same data event - while (expectedText.length > 0 && e.data.indexOf(expectedText[0]) >= 0) { - expectedText.shift(); - // Check if all string are found, if so finish the test - if (expectedText.length === 0) { - disposables.push(window.onDidCloseTerminal(() => done())); - terminal.dispose(); - } - } - })); - const collection = extensionContext.environmentVariableCollection; - disposables.push({ dispose: () => collection.clear() }); - collection.replace('A', '~a2~'); - collection.replace('B', '~a2~'); - collection.clear(); - const terminal = window.createTerminal({ - env: { - A: '~a1~', - B: '~b1~' - } - }); - // Run both PowerShell and sh commands, errors don't matter we're just looking for - // the correct output - terminal.sendText('$env:A'); - terminal.sendText('echo $A'); - terminal.sendText('$env:B'); - terminal.sendText('echo $B'); - }); - - test('should respect deleting entries', (done) => { - // Text to match on before passing the test - const expectedText = [ - '~a1~', - '~b2~' - ]; - disposables.push(window.onDidWriteTerminalData(e => { - if (terminal !== e.terminal) { - return; - } - // Multiple expected could show up in the same data event - while (expectedText.length > 0 && e.data.indexOf(expectedText[0]) >= 0) { - expectedText.shift(); - // Check if all string are found, if so finish the test - if (expectedText.length === 0) { - disposables.push(window.onDidCloseTerminal(() => done())); - terminal.dispose(); - } - } - })); - const collection = extensionContext.environmentVariableCollection; - disposables.push({ dispose: () => collection.clear() }); - collection.replace('A', '~a2~'); - collection.replace('B', '~b2~'); - collection.delete('A'); - const terminal = window.createTerminal({ - env: { - A: '~a1~', - B: '~b2~' - } - }); - // Run both PowerShell and sh commands, errors don't matter we're just looking for - // the correct output - terminal.sendText('$env:A'); - terminal.sendText('echo $A'); - terminal.sendText('$env:B'); - terminal.sendText('echo $B'); - }); - - test('get and forEach should work', () => { - const collection = extensionContext.environmentVariableCollection; - disposables.push({ dispose: () => collection.clear() }); - collection.replace('A', '~a2~'); - collection.append('B', '~b2~'); - collection.prepend('C', '~c2~'); - - // Verify get - deepEqual(collection.get('A'), { value: '~a2~', type: EnvironmentVariableMutatorType.Replace }); - deepEqual(collection.get('B'), { value: '~b2~', type: EnvironmentVariableMutatorType.Append }); - deepEqual(collection.get('C'), { value: '~c2~', type: EnvironmentVariableMutatorType.Prepend }); - - // Verify forEach - const entries: [string, EnvironmentVariableMutator][] = []; - collection.forEach((v, m) => entries.push([v, m])); - deepEqual(entries, [ - ['A', { value: '~a2~', type: EnvironmentVariableMutatorType.Replace }], - ['B', { value: '~b2~', type: EnvironmentVariableMutatorType.Append }], - ['C', { value: '~c2~', type: EnvironmentVariableMutatorType.Prepend }] - ]); - }); - }); - }); -}); diff --git a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts b/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts deleted file mode 100644 index e60998c24bee..000000000000 --- a/lib/vscode/extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts +++ /dev/null @@ -1,1132 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as assert from 'assert'; -import * as vscode from 'vscode'; -import { createRandomFile, deleteFile, closeAllEditors, pathEquals, rndName, disposeAll, testFs, delay, withLogDisabled, revertAllDirty, assertNoRpc } from '../utils'; -import { join, posix, basename } from 'path'; -import * as fs from 'fs'; -import { TestFS } from '../memfs'; - -suite('vscode API - workspace', () => { - - teardown(async function () { - assertNoRpc(); - await closeAllEditors(); - }); - - test('MarkdownString', function () { - let md = new vscode.MarkdownString(); - assert.equal(md.value, ''); - assert.equal(md.isTrusted, undefined); - - md = new vscode.MarkdownString('**bold**'); - assert.equal(md.value, '**bold**'); - - md.appendText('**bold?**'); - assert.equal(md.value, '**bold**\\*\\*bold?\\*\\*'); - - md.appendMarkdown('**bold**'); - assert.equal(md.value, '**bold**\\*\\*bold?\\*\\***bold**'); - }); - - - test('textDocuments', () => { - assert.ok(Array.isArray(vscode.workspace.textDocuments)); - assert.throws(() => (vscode.workspace).textDocuments = null); - }); - - test('rootPath', () => { - assert.ok(pathEquals(vscode.workspace.rootPath!, join(__dirname, '../../testWorkspace'))); - assert.throws(() => (vscode.workspace as any).rootPath = 'farboo'); - }); - - test('workspaceFile', () => { - assert.ok(!vscode.workspace.workspaceFile); - }); - - test('workspaceFolders', () => { - if (vscode.workspace.workspaceFolders) { - assert.equal(vscode.workspace.workspaceFolders.length, 1); - assert.ok(pathEquals(vscode.workspace.workspaceFolders[0].uri.fsPath, join(__dirname, '../../testWorkspace'))); - } - }); - - test('getWorkspaceFolder', () => { - const folder = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(join(__dirname, '../../testWorkspace/far.js'))); - assert.ok(!!folder); - - if (folder) { - assert.ok(pathEquals(folder.uri.fsPath, join(__dirname, '../../testWorkspace'))); - } - }); - - test('openTextDocument', async () => { - const uri = await createRandomFile(); - - // not yet there - const existing1 = vscode.workspace.textDocuments.find(doc => doc.uri.toString() === uri.toString()); - assert.equal(existing1, undefined); - - // open and assert its there - const doc = await vscode.workspace.openTextDocument(uri); - assert.ok(doc); - assert.equal(doc.uri.toString(), uri.toString()); - const existing2 = vscode.workspace.textDocuments.find(doc => doc.uri.toString() === uri.toString()); - assert.equal(existing2 === doc, true); - }); - - test('openTextDocument, illegal path', () => { - return vscode.workspace.openTextDocument('funkydonky.txt').then(_doc => { - throw new Error('missing error'); - }, _err => { - // good! - }); - }); - - test('openTextDocument, untitled is dirty', async function () { - return vscode.workspace.openTextDocument(vscode.workspace.workspaceFolders![0].uri.with({ scheme: 'untitled', path: posix.join(vscode.workspace.workspaceFolders![0].uri.path, 'newfile.txt') })).then(doc => { - assert.equal(doc.uri.scheme, 'untitled'); - assert.ok(doc.isDirty); - }); - }); - - test('openTextDocument, untitled with host', function () { - const uri = vscode.Uri.parse('untitled://localhost/c%24/Users/jrieken/code/samples/foobar.txt'); - return vscode.workspace.openTextDocument(uri).then(doc => { - assert.equal(doc.uri.scheme, 'untitled'); - }); - }); - - test('openTextDocument, untitled without path', function () { - return vscode.workspace.openTextDocument().then(doc => { - assert.equal(doc.uri.scheme, 'untitled'); - assert.ok(doc.isDirty); - }); - }); - - test('openTextDocument, untitled without path but language ID', function () { - return vscode.workspace.openTextDocument({ language: 'xml' }).then(doc => { - assert.equal(doc.uri.scheme, 'untitled'); - assert.equal(doc.languageId, 'xml'); - assert.ok(doc.isDirty); - }); - }); - - test('openTextDocument, untitled without path but language ID and content', function () { - return vscode.workspace.openTextDocument({ language: 'html', content: '

    Hello world!

    ' }).then(doc => { - assert.equal(doc.uri.scheme, 'untitled'); - assert.equal(doc.languageId, 'html'); - assert.ok(doc.isDirty); - assert.equal(doc.getText(), '

    Hello world!

    '); - }); - }); - - test('openTextDocument, untitled closes on save', function () { - const path = join(vscode.workspace.rootPath || '', './newfile.txt'); - - return vscode.workspace.openTextDocument(vscode.Uri.parse('untitled:' + path)).then(doc => { - assert.equal(doc.uri.scheme, 'untitled'); - assert.ok(doc.isDirty); - - let closed: vscode.TextDocument; - let d0 = vscode.workspace.onDidCloseTextDocument(e => closed = e); - - return vscode.window.showTextDocument(doc).then(() => { - return doc.save().then((didSave: boolean) => { - - assert.equal(didSave, true, `FAILED to save${doc.uri.toString()}`); - - assert.ok(closed === doc); - assert.ok(!doc.isDirty); - assert.ok(fs.existsSync(path)); - - d0.dispose(); - fs.unlinkSync(join(vscode.workspace.rootPath || '', './newfile.txt')); - }); - }); - - }); - }); - - test('openTextDocument, uri scheme/auth/path', function () { - - let registration = vscode.workspace.registerTextDocumentContentProvider('sc', { - provideTextDocumentContent() { - return 'SC'; - } - }); - - return Promise.all([ - vscode.workspace.openTextDocument(vscode.Uri.parse('sc://auth')).then(doc => { - assert.equal(doc.uri.authority, 'auth'); - assert.equal(doc.uri.path, ''); - }), - vscode.workspace.openTextDocument(vscode.Uri.parse('sc:///path')).then(doc => { - assert.equal(doc.uri.authority, ''); - assert.equal(doc.uri.path, '/path'); - }), - vscode.workspace.openTextDocument(vscode.Uri.parse('sc://auth/path')).then(doc => { - assert.equal(doc.uri.authority, 'auth'); - assert.equal(doc.uri.path, '/path'); - }) - ]).then(() => { - registration.dispose(); - }); - }); - - test('openTextDocument, actual casing first', async function () { - - const fs = new TestFS('this-fs', false); - const reg = vscode.workspace.registerFileSystemProvider(fs.scheme, fs, { isCaseSensitive: fs.isCaseSensitive }); - - let uriOne = vscode.Uri.parse('this-fs:/one'); - let uriTwo = vscode.Uri.parse('this-fs:/two'); - let uriONE = vscode.Uri.parse('this-fs:/ONE'); // same resource, different uri - let uriTWO = vscode.Uri.parse('this-fs:/TWO'); - - fs.writeFile(uriOne, Buffer.from('one'), { create: true, overwrite: true }); - fs.writeFile(uriTwo, Buffer.from('two'), { create: true, overwrite: true }); - - // lower case (actual case) comes first - let docOne = await vscode.workspace.openTextDocument(uriOne); - assert.equal(docOne.uri.toString(), uriOne.toString()); - - let docONE = await vscode.workspace.openTextDocument(uriONE); - assert.equal(docONE === docOne, true); - assert.equal(docONE.uri.toString(), uriOne.toString()); - assert.equal(docONE.uri.toString() !== uriONE.toString(), true); // yep - - // upper case (NOT the actual case) comes first - let docTWO = await vscode.workspace.openTextDocument(uriTWO); - assert.equal(docTWO.uri.toString(), uriTWO.toString()); - - let docTwo = await vscode.workspace.openTextDocument(uriTwo); - assert.equal(docTWO === docTwo, true); - assert.equal(docTwo.uri.toString(), uriTWO.toString()); - assert.equal(docTwo.uri.toString() !== uriTwo.toString(), true); // yep - - reg.dispose(); - }); - - test('eol, read', () => { - const a = createRandomFile('foo\nbar\nbar').then(file => { - return vscode.workspace.openTextDocument(file).then(doc => { - assert.equal(doc.eol, vscode.EndOfLine.LF); - }); - }); - const b = createRandomFile('foo\nbar\nbar\r\nbaz').then(file => { - return vscode.workspace.openTextDocument(file).then(doc => { - assert.equal(doc.eol, vscode.EndOfLine.LF); - }); - }); - const c = createRandomFile('foo\r\nbar\r\nbar').then(file => { - return vscode.workspace.openTextDocument(file).then(doc => { - assert.equal(doc.eol, vscode.EndOfLine.CRLF); - }); - }); - return Promise.all([a, b, c]); - }); - - test('eol, change via editor', () => { - return createRandomFile('foo\nbar\nbar').then(file => { - return vscode.workspace.openTextDocument(file).then(doc => { - assert.equal(doc.eol, vscode.EndOfLine.LF); - return vscode.window.showTextDocument(doc).then(editor => { - return editor.edit(builder => builder.setEndOfLine(vscode.EndOfLine.CRLF)); - - }).then(value => { - assert.ok(value); - assert.ok(doc.isDirty); - assert.equal(doc.eol, vscode.EndOfLine.CRLF); - }); - }); - }); - }); - - test('eol, change via applyEdit', () => { - return createRandomFile('foo\nbar\nbar').then(file => { - return vscode.workspace.openTextDocument(file).then(doc => { - assert.equal(doc.eol, vscode.EndOfLine.LF); - - const edit = new vscode.WorkspaceEdit(); - edit.set(file, [vscode.TextEdit.setEndOfLine(vscode.EndOfLine.CRLF)]); - return vscode.workspace.applyEdit(edit).then(value => { - assert.ok(value); - assert.ok(doc.isDirty); - assert.equal(doc.eol, vscode.EndOfLine.CRLF); - }); - }); - }); - }); - - test('eol, change via onWillSave', async function () { - let called = false; - let sub = vscode.workspace.onWillSaveTextDocument(e => { - called = true; - e.waitUntil(Promise.resolve([vscode.TextEdit.setEndOfLine(vscode.EndOfLine.LF)])); - }); - - const file = await createRandomFile('foo\r\nbar\r\nbar'); - const doc = await vscode.workspace.openTextDocument(file); - assert.equal(doc.eol, vscode.EndOfLine.CRLF); - - const edit = new vscode.WorkspaceEdit(); - edit.set(file, [vscode.TextEdit.insert(new vscode.Position(0, 0), '-changes-')]); - const successEdit = await vscode.workspace.applyEdit(edit); - assert.ok(successEdit); - - const successSave = await doc.save(); - assert.ok(successSave); - assert.ok(called); - assert.ok(!doc.isDirty); - assert.equal(doc.eol, vscode.EndOfLine.LF); - sub.dispose(); - }); - - function assertEqualPath(a: string, b: string): void { - assert.ok(pathEquals(a, b), `${a} <-> ${b}`); - } - - test('events: onDidOpenTextDocument, onDidChangeTextDocument, onDidSaveTextDocument', async () => { - const file = await createRandomFile(); - let disposables: vscode.Disposable[] = []; - - await revertAllDirty(); // needed for a clean state for `onDidSaveTextDocument` (#102365) - - let pendingAsserts: Function[] = []; - let onDidOpenTextDocument = false; - disposables.push(vscode.workspace.onDidOpenTextDocument(e => { - pendingAsserts.push(() => assertEqualPath(e.uri.fsPath, file.fsPath)); - onDidOpenTextDocument = true; - })); - - let onDidChangeTextDocument = false; - disposables.push(vscode.workspace.onDidChangeTextDocument(e => { - pendingAsserts.push(() => assertEqualPath(e.document.uri.fsPath, file.fsPath)); - onDidChangeTextDocument = true; - })); - - let onDidSaveTextDocument = false; - disposables.push(vscode.workspace.onDidSaveTextDocument(e => { - pendingAsserts.push(() => assertEqualPath(e.uri.fsPath, file.fsPath)); - onDidSaveTextDocument = true; - })); - - const doc = await vscode.workspace.openTextDocument(file); - const editor = await vscode.window.showTextDocument(doc); - - await editor.edit((builder) => { - builder.insert(new vscode.Position(0, 0), 'Hello World'); - }); - await doc.save(); - - assert.ok(onDidOpenTextDocument); - assert.ok(onDidChangeTextDocument); - assert.ok(onDidSaveTextDocument); - pendingAsserts.forEach(assert => assert()); - disposeAll(disposables); - return deleteFile(file); - }); - - test('events: onDidSaveTextDocument fires even for non dirty file when saved', async () => { - const file = await createRandomFile(); - let disposables: vscode.Disposable[] = []; - let pendingAsserts: Function[] = []; - - await revertAllDirty(); // needed for a clean state for `onDidSaveTextDocument` (#102365) - - let onDidSaveTextDocument = false; - disposables.push(vscode.workspace.onDidSaveTextDocument(e => { - pendingAsserts.push(() => assertEqualPath(e.uri.fsPath, file.fsPath)); - onDidSaveTextDocument = true; - })); - - const doc = await vscode.workspace.openTextDocument(file); - await vscode.window.showTextDocument(doc); - await vscode.commands.executeCommand('workbench.action.files.save'); - - assert.ok(onDidSaveTextDocument); - pendingAsserts.forEach(fn => fn()); - disposeAll(disposables); - return deleteFile(file); - }); - - test('openTextDocument, with selection', function () { - return createRandomFile('foo\nbar\nbar').then(file => { - return vscode.workspace.openTextDocument(file).then(doc => { - return vscode.window.showTextDocument(doc, { selection: new vscode.Range(new vscode.Position(1, 1), new vscode.Position(1, 2)) }).then(editor => { - assert.equal(editor.selection.start.line, 1); - assert.equal(editor.selection.start.character, 1); - assert.equal(editor.selection.end.line, 1); - assert.equal(editor.selection.end.character, 2); - }); - }); - }); - }); - - test('registerTextDocumentContentProvider, simple', function () { - - let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { - provideTextDocumentContent(uri) { - return uri.toString(); - } - }); - - const uri = vscode.Uri.parse('foo://testing/virtual.js'); - return vscode.workspace.openTextDocument(uri).then(doc => { - assert.equal(doc.getText(), uri.toString()); - assert.equal(doc.isDirty, false); - assert.equal(doc.uri.toString(), uri.toString()); - registration.dispose(); - }); - }); - - test('registerTextDocumentContentProvider, constrains', function () { - - // built-in - assert.throws(function () { - vscode.workspace.registerTextDocumentContentProvider('untitled', { provideTextDocumentContent() { return null; } }); - }); - // built-in - assert.throws(function () { - vscode.workspace.registerTextDocumentContentProvider('file', { provideTextDocumentContent() { return null; } }); - }); - - // missing scheme - return vscode.workspace.openTextDocument(vscode.Uri.parse('notThere://foo/far/boo/bar')).then(() => { - assert.ok(false, 'expected failure'); - }, _err => { - // expected - }); - }); - - test('registerTextDocumentContentProvider, multiple', function () { - - // duplicate registration - let registration1 = vscode.workspace.registerTextDocumentContentProvider('foo', { - provideTextDocumentContent(uri) { - if (uri.authority === 'foo') { - return '1'; - } - return undefined; - } - }); - let registration2 = vscode.workspace.registerTextDocumentContentProvider('foo', { - provideTextDocumentContent(uri) { - if (uri.authority === 'bar') { - return '2'; - } - return undefined; - } - }); - - return Promise.all([ - vscode.workspace.openTextDocument(vscode.Uri.parse('foo://foo/bla')).then(doc => { assert.equal(doc.getText(), '1'); }), - vscode.workspace.openTextDocument(vscode.Uri.parse('foo://bar/bla')).then(doc => { assert.equal(doc.getText(), '2'); }) - ]).then(() => { - registration1.dispose(); - registration2.dispose(); - }); - }); - - test('registerTextDocumentContentProvider, evil provider', function () { - - // duplicate registration - let registration1 = vscode.workspace.registerTextDocumentContentProvider('foo', { - provideTextDocumentContent(_uri) { - return '1'; - } - }); - let registration2 = vscode.workspace.registerTextDocumentContentProvider('foo', { - provideTextDocumentContent(_uri): string { - throw new Error('fail'); - } - }); - - return vscode.workspace.openTextDocument(vscode.Uri.parse('foo://foo/bla')).then(doc => { - assert.equal(doc.getText(), '1'); - registration1.dispose(); - registration2.dispose(); - }); - }); - - test('registerTextDocumentContentProvider, invalid text', function () { - - let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { - provideTextDocumentContent(_uri) { - return 123; - } - }); - return vscode.workspace.openTextDocument(vscode.Uri.parse('foo://auth/path')).then(() => { - assert.ok(false, 'expected failure'); - }, _err => { - // expected - registration.dispose(); - }); - }); - - test('registerTextDocumentContentProvider, show virtual document', function () { - - let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { - provideTextDocumentContent(_uri) { - return 'I am virtual'; - } - }); - - return vscode.workspace.openTextDocument(vscode.Uri.parse('foo://something/path')).then(doc => { - return vscode.window.showTextDocument(doc).then(editor => { - - assert.ok(editor.document === doc); - assert.equal(editor.document.getText(), 'I am virtual'); - registration.dispose(); - }); - }); - }); - - test('registerTextDocumentContentProvider, open/open document', function () { - - let callCount = 0; - let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { - provideTextDocumentContent(_uri) { - callCount += 1; - return 'I am virtual'; - } - }); - - const uri = vscode.Uri.parse('foo://testing/path'); - - return Promise.all([vscode.workspace.openTextDocument(uri), vscode.workspace.openTextDocument(uri)]).then(docs => { - let [first, second] = docs; - assert.ok(first === second); - assert.ok(vscode.workspace.textDocuments.some(doc => doc.uri.toString() === uri.toString())); - assert.equal(callCount, 1); - registration.dispose(); - }); - }); - - test('registerTextDocumentContentProvider, empty doc', function () { - - let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { - provideTextDocumentContent(_uri) { - return ''; - } - }); - - const uri = vscode.Uri.parse('foo:doc/empty'); - - return vscode.workspace.openTextDocument(uri).then(doc => { - assert.equal(doc.getText(), ''); - assert.equal(doc.uri.toString(), uri.toString()); - registration.dispose(); - }); - }); - - test('registerTextDocumentContentProvider, change event', async function () { - - let callCount = 0; - let emitter = new vscode.EventEmitter(); - - let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { - onDidChange: emitter.event, - provideTextDocumentContent(_uri) { - return 'call' + (callCount++); - } - }); - - const uri = vscode.Uri.parse('foo://testing/path3'); - const doc = await vscode.workspace.openTextDocument(uri); - - assert.equal(callCount, 1); - assert.equal(doc.getText(), 'call0'); - - return new Promise(resolve => { - - let subscription = vscode.workspace.onDidChangeTextDocument(event => { - assert.ok(event.document === doc); - assert.equal(event.document.getText(), 'call1'); - subscription.dispose(); - registration.dispose(); - resolve(); - }); - - emitter.fire(doc.uri); - }); - }); - - test('findFiles', () => { - return vscode.workspace.findFiles('**/image.png').then((res) => { - assert.equal(res.length, 2); - assert.equal(basename(vscode.workspace.asRelativePath(res[0])), 'image.png'); - }); - }); - - test('findFiles - null exclude', async () => { - await vscode.workspace.findFiles('**/file.txt').then((res) => { - // search.exclude folder is still searched, files.exclude folder is not - assert.equal(res.length, 1); - assert.equal(basename(vscode.workspace.asRelativePath(res[0])), 'file.txt'); - }); - - await vscode.workspace.findFiles('**/file.txt', null).then((res) => { - // search.exclude and files.exclude folders are both searched - assert.equal(res.length, 2); - assert.equal(basename(vscode.workspace.asRelativePath(res[0])), 'file.txt'); - }); - }); - - test('findFiles - exclude', () => { - return vscode.workspace.findFiles('**/image.png').then((res) => { - assert.equal(res.length, 2); - assert.equal(basename(vscode.workspace.asRelativePath(res[0])), 'image.png'); - }); - }); - - test('findFiles, exclude', () => { - return vscode.workspace.findFiles('**/image.png', '**/sub/**').then((res) => { - assert.equal(res.length, 1); - assert.equal(basename(vscode.workspace.asRelativePath(res[0])), 'image.png'); - }); - }); - - test('findFiles, cancellation', () => { - - const source = new vscode.CancellationTokenSource(); - const token = source.token; // just to get an instance first - source.cancel(); - - return vscode.workspace.findFiles('*.js', null, 100, token).then((res) => { - assert.deepEqual(res, []); - }); - }); - - test('findTextInFiles', async () => { - const options: vscode.FindTextInFilesOptions = { - include: '*.ts', - previewOptions: { - matchLines: 1, - charsPerLine: 100 - } - }; - - const results: vscode.TextSearchResult[] = []; - await vscode.workspace.findTextInFiles({ pattern: 'foo' }, options, result => { - results.push(result); - }); - - assert.equal(results.length, 1); - const match = results[0]; - assert(match.preview.text.indexOf('foo') >= 0); - assert.equal(basename(vscode.workspace.asRelativePath(match.uri)), '10linefile.ts'); - }); - - test('findTextInFiles, cancellation', async () => { - const results: vscode.TextSearchResult[] = []; - const cancellation = new vscode.CancellationTokenSource(); - cancellation.cancel(); - - await vscode.workspace.findTextInFiles({ pattern: 'foo' }, result => { - results.push(result); - }, cancellation.token); - }); - - test('applyEdit', async () => { - const doc = await vscode.workspace.openTextDocument(vscode.Uri.parse('untitled:' + join(vscode.workspace.rootPath || '', './new2.txt'))); - - let edit = new vscode.WorkspaceEdit(); - edit.insert(doc.uri, new vscode.Position(0, 0), new Array(1000).join('Hello World')); - - let success = await vscode.workspace.applyEdit(edit); - assert.equal(success, true); - assert.equal(doc.isDirty, true); - }); - - test('applyEdit should fail when editing deleted resource', withLogDisabled(async () => { - const resource = await createRandomFile(); - - const edit = new vscode.WorkspaceEdit(); - edit.deleteFile(resource); - edit.insert(resource, new vscode.Position(0, 0), ''); - - let success = await vscode.workspace.applyEdit(edit); - assert.equal(success, false); - })); - - test('applyEdit should fail when renaming deleted resource', withLogDisabled(async () => { - const resource = await createRandomFile(); - - const edit = new vscode.WorkspaceEdit(); - edit.deleteFile(resource); - edit.renameFile(resource, resource); - - let success = await vscode.workspace.applyEdit(edit); - assert.equal(success, false); - })); - - test('applyEdit should fail when editing renamed from resource', withLogDisabled(async () => { - const resource = await createRandomFile(); - const newResource = vscode.Uri.file(resource.fsPath + '.1'); - const edit = new vscode.WorkspaceEdit(); - edit.renameFile(resource, newResource); - edit.insert(resource, new vscode.Position(0, 0), ''); - - let success = await vscode.workspace.applyEdit(edit); - assert.equal(success, false); - })); - - test('applyEdit "edit A -> rename A to B -> edit B"', async () => { - await testEditRenameEdit(oldUri => oldUri.with({ path: oldUri.path + 'NEW' })); - }); - - test('applyEdit "edit A -> rename A to B (different case)" -> edit B', async () => { - await testEditRenameEdit(oldUri => oldUri.with({ path: oldUri.path.toUpperCase() })); - }); - - test('applyEdit "edit A -> rename A to B (same case)" -> edit B', async () => { - await testEditRenameEdit(oldUri => oldUri); - }); - - async function testEditRenameEdit(newUriCreator: (oldUri: vscode.Uri) => vscode.Uri): Promise { - const oldUri = await createRandomFile(); - const newUri = newUriCreator(oldUri); - const edit = new vscode.WorkspaceEdit(); - edit.insert(oldUri, new vscode.Position(0, 0), 'BEFORE'); - edit.renameFile(oldUri, newUri); - edit.insert(newUri, new vscode.Position(0, 0), 'AFTER'); - - assert.ok(await vscode.workspace.applyEdit(edit)); - - let doc = await vscode.workspace.openTextDocument(newUri); - assert.equal(doc.getText(), 'AFTERBEFORE'); - assert.equal(doc.isDirty, true); - } - - function nameWithUnderscore(uri: vscode.Uri) { - return uri.with({ path: posix.join(posix.dirname(uri.path), `_${posix.basename(uri.path)}`) }); - } - - test('WorkspaceEdit: applying edits before and after rename duplicates resource #42633', withLogDisabled(async function () { - let docUri = await createRandomFile(); - let newUri = nameWithUnderscore(docUri); - - let we = new vscode.WorkspaceEdit(); - we.insert(docUri, new vscode.Position(0, 0), 'Hello'); - we.insert(docUri, new vscode.Position(0, 0), 'Foo'); - we.renameFile(docUri, newUri); - we.insert(newUri, new vscode.Position(0, 0), 'Bar'); - - assert.ok(await vscode.workspace.applyEdit(we)); - let doc = await vscode.workspace.openTextDocument(newUri); - assert.equal(doc.getText(), 'BarHelloFoo'); - })); - - test('WorkspaceEdit: Problem recreating a renamed resource #42634', withLogDisabled(async function () { - let docUri = await createRandomFile(); - let newUri = nameWithUnderscore(docUri); - - let we = new vscode.WorkspaceEdit(); - we.insert(docUri, new vscode.Position(0, 0), 'Hello'); - we.insert(docUri, new vscode.Position(0, 0), 'Foo'); - we.renameFile(docUri, newUri); - - we.createFile(docUri); - we.insert(docUri, new vscode.Position(0, 0), 'Bar'); - - assert.ok(await vscode.workspace.applyEdit(we)); - - let newDoc = await vscode.workspace.openTextDocument(newUri); - assert.equal(newDoc.getText(), 'HelloFoo'); - let doc = await vscode.workspace.openTextDocument(docUri); - assert.equal(doc.getText(), 'Bar'); - })); - - test('WorkspaceEdit api - after saving a deleted file, it still shows up as deleted. #42667', withLogDisabled(async function () { - let docUri = await createRandomFile(); - let we = new vscode.WorkspaceEdit(); - we.deleteFile(docUri); - we.insert(docUri, new vscode.Position(0, 0), 'InsertText'); - - assert.ok(!(await vscode.workspace.applyEdit(we))); - try { - await vscode.workspace.openTextDocument(docUri); - assert.ok(false); - } catch (e) { - assert.ok(true); - } - })); - - test('WorkspaceEdit: edit and rename parent folder duplicates resource #42641', async function () { - - let dir = vscode.Uri.parse(`${testFs.scheme}:/before-${rndName()}`); - await testFs.createDirectory(dir); - - let docUri = await createRandomFile('', dir); - let docParent = docUri.with({ path: posix.dirname(docUri.path) }); - let newParent = nameWithUnderscore(docParent); - - let we = new vscode.WorkspaceEdit(); - we.insert(docUri, new vscode.Position(0, 0), 'Hello'); - we.renameFile(docParent, newParent); - - assert.ok(await vscode.workspace.applyEdit(we)); - - try { - await vscode.workspace.openTextDocument(docUri); - assert.ok(false); - } catch (e) { - assert.ok(true); - } - - let newUri = newParent.with({ path: posix.join(newParent.path, posix.basename(docUri.path)) }); - let doc = await vscode.workspace.openTextDocument(newUri); - assert.ok(doc); - - assert.equal(doc.getText(), 'Hello'); - }); - - test('WorkspaceEdit: rename resource followed by edit does not work #42638', withLogDisabled(async function () { - let docUri = await createRandomFile(); - let newUri = nameWithUnderscore(docUri); - - let we = new vscode.WorkspaceEdit(); - we.renameFile(docUri, newUri); - we.insert(newUri, new vscode.Position(0, 0), 'Hello'); - - assert.ok(await vscode.workspace.applyEdit(we)); - - let doc = await vscode.workspace.openTextDocument(newUri); - assert.equal(doc.getText(), 'Hello'); - })); - - test('WorkspaceEdit: create & override', withLogDisabled(async function () { - - let docUri = await createRandomFile('before'); - - let we = new vscode.WorkspaceEdit(); - we.createFile(docUri); - assert.ok(!await vscode.workspace.applyEdit(we)); - assert.equal((await vscode.workspace.openTextDocument(docUri)).getText(), 'before'); - - we = new vscode.WorkspaceEdit(); - we.createFile(docUri, { overwrite: true }); - assert.ok(await vscode.workspace.applyEdit(we)); - assert.equal((await vscode.workspace.openTextDocument(docUri)).getText(), ''); - })); - - test('WorkspaceEdit: create & ignoreIfExists', withLogDisabled(async function () { - let docUri = await createRandomFile('before'); - - let we = new vscode.WorkspaceEdit(); - we.createFile(docUri, { ignoreIfExists: true }); - assert.ok(await vscode.workspace.applyEdit(we)); - assert.equal((await vscode.workspace.openTextDocument(docUri)).getText(), 'before'); - - we = new vscode.WorkspaceEdit(); - we.createFile(docUri, { overwrite: true, ignoreIfExists: true }); - assert.ok(await vscode.workspace.applyEdit(we)); - assert.equal((await vscode.workspace.openTextDocument(docUri)).getText(), ''); - })); - - test('WorkspaceEdit: rename & ignoreIfExists', withLogDisabled(async function () { - let aUri = await createRandomFile('aaa'); - let bUri = await createRandomFile('bbb'); - - let we = new vscode.WorkspaceEdit(); - we.renameFile(aUri, bUri); - assert.ok(!await vscode.workspace.applyEdit(we)); - - we = new vscode.WorkspaceEdit(); - we.renameFile(aUri, bUri, { ignoreIfExists: true }); - assert.ok(await vscode.workspace.applyEdit(we)); - - we = new vscode.WorkspaceEdit(); - we.renameFile(aUri, bUri, { overwrite: false, ignoreIfExists: true }); - assert.ok(!await vscode.workspace.applyEdit(we)); - - we = new vscode.WorkspaceEdit(); - we.renameFile(aUri, bUri, { overwrite: true, ignoreIfExists: true }); - assert.ok(await vscode.workspace.applyEdit(we)); - })); - - test('WorkspaceEdit: delete & ignoreIfNotExists', withLogDisabled(async function () { - - let docUri = await createRandomFile(); - let we = new vscode.WorkspaceEdit(); - we.deleteFile(docUri, { ignoreIfNotExists: false }); - assert.ok(await vscode.workspace.applyEdit(we)); - - we = new vscode.WorkspaceEdit(); - we.deleteFile(docUri, { ignoreIfNotExists: false }); - assert.ok(!await vscode.workspace.applyEdit(we)); - - we = new vscode.WorkspaceEdit(); - we.deleteFile(docUri, { ignoreIfNotExists: true }); - assert.ok(await vscode.workspace.applyEdit(we)); - })); - - test('WorkspaceEdit: insert & rename multiple', async function () { - - let [f1, f2, f3] = await Promise.all([createRandomFile(), createRandomFile(), createRandomFile()]); - - let we = new vscode.WorkspaceEdit(); - we.insert(f1, new vscode.Position(0, 0), 'f1'); - we.insert(f2, new vscode.Position(0, 0), 'f2'); - we.insert(f3, new vscode.Position(0, 0), 'f3'); - - let f1_ = nameWithUnderscore(f1); - we.renameFile(f1, f1_); - - assert.ok(await vscode.workspace.applyEdit(we)); - - assert.equal((await vscode.workspace.openTextDocument(f3)).getText(), 'f3'); - assert.equal((await vscode.workspace.openTextDocument(f2)).getText(), 'f2'); - assert.equal((await vscode.workspace.openTextDocument(f1_)).getText(), 'f1'); - try { - await vscode.workspace.fs.stat(f1); - assert.ok(false); - } catch { - assert.ok(true); - } - }); - - test('workspace.applyEdit drops the TextEdit if there is a RenameFile later #77735 (with opened editor)', async function () { - await test77735(true); - }); - - test('workspace.applyEdit drops the TextEdit if there is a RenameFile later #77735 (without opened editor)', async function () { - await test77735(false); - }); - - async function test77735(withOpenedEditor: boolean): Promise { - const docUriOriginal = await createRandomFile(); - const docUriMoved = docUriOriginal.with({ path: `${docUriOriginal.path}.moved` }); - - if (withOpenedEditor) { - const document = await vscode.workspace.openTextDocument(docUriOriginal); - await vscode.window.showTextDocument(document); - } else { - await vscode.commands.executeCommand('workbench.action.closeAllEditors'); - } - - for (let i = 0; i < 4; i++) { - let we = new vscode.WorkspaceEdit(); - let oldUri: vscode.Uri; - let newUri: vscode.Uri; - let expected: string; - - if (i % 2 === 0) { - oldUri = docUriOriginal; - newUri = docUriMoved; - we.insert(oldUri, new vscode.Position(0, 0), 'Hello'); - expected = 'Hello'; - } else { - oldUri = docUriMoved; - newUri = docUriOriginal; - we.delete(oldUri, new vscode.Range(new vscode.Position(0, 0), new vscode.Position(0, 5))); - expected = ''; - } - - we.renameFile(oldUri, newUri); - assert.ok(await vscode.workspace.applyEdit(we)); - - const document = await vscode.workspace.openTextDocument(newUri); - assert.equal(document.isDirty, true); - - await document.save(); - assert.equal(document.isDirty, false); - - assert.equal(document.getText(), expected); - - await delay(10); - } - } - - test('The api workspace.applyEdit failed for some case of mixing resourceChange and textEdit #80688', async function () { - const file1 = await createRandomFile(); - const file2 = await createRandomFile(); - let we = new vscode.WorkspaceEdit(); - we.insert(file1, new vscode.Position(0, 0), 'import1;'); - - const file2Name = basename(file2.fsPath); - const file2NewUri = vscode.Uri.parse(file2.toString().replace(file2Name, `new/${file2Name}`)); - we.renameFile(file2, file2NewUri); - - we.insert(file1, new vscode.Position(0, 0), 'import2;'); - await vscode.workspace.applyEdit(we); - - const document = await vscode.workspace.openTextDocument(file1); - // const expected = 'import1;import2;'; - const expected2 = 'import2;import1;'; - assert.equal(document.getText(), expected2); - }); - - test('The api workspace.applyEdit failed for some case of mixing resourceChange and textEdit #80688', async function () { - const file1 = await createRandomFile(); - const file2 = await createRandomFile(); - let we = new vscode.WorkspaceEdit(); - we.insert(file1, new vscode.Position(0, 0), 'import1;'); - we.insert(file1, new vscode.Position(0, 0), 'import2;'); - - const file2Name = basename(file2.fsPath); - const file2NewUri = vscode.Uri.parse(file2.toString().replace(file2Name, `new/${file2Name}`)); - we.renameFile(file2, file2NewUri); - - await vscode.workspace.applyEdit(we); - - const document = await vscode.workspace.openTextDocument(file1); - const expected = 'import1;import2;'; - // const expected2 = 'import2;import1;'; - assert.equal(document.getText(), expected); - }); - - test('Should send a single FileWillRenameEvent instead of separate events when moving multiple files at once#111867', async function () { - - const file1 = await createRandomFile(); - const file2 = await createRandomFile(); - - const file1New = await createRandomFile(); - const file2New = await createRandomFile(); - - const event = new Promise(resolve => { - let sub = vscode.workspace.onWillRenameFiles(e => { - sub.dispose(); - resolve(e); - }); - }); - - const we = new vscode.WorkspaceEdit(); - we.renameFile(file1, file1New, { overwrite: true }); - we.renameFile(file2, file2New, { overwrite: true }); - await vscode.workspace.applyEdit(we); - - const e = await event; - - assert.strictEqual(e.files.length, 2); - assert.strictEqual(e.files[0].oldUri.toString(), file1.toString()); - assert.strictEqual(e.files[1].oldUri.toString(), file2.toString()); - }); - - test('Should send a single FileWillRenameEvent instead of separate events when moving multiple files at once#111867', async function () { - - const event = new Promise(resolve => { - let sub = vscode.workspace.onWillCreateFiles(e => { - sub.dispose(); - resolve(e); - }); - }); - - const file1 = vscode.Uri.parse(`fake-fs:/${rndName()}`); - const file2 = vscode.Uri.parse(`fake-fs:/${rndName()}`); - - const we = new vscode.WorkspaceEdit(); - we.createFile(file1, { overwrite: true }); - we.createFile(file2, { overwrite: true }); - await vscode.workspace.applyEdit(we); - - const e = await event; - - assert.strictEqual(e.files.length, 2); - assert.strictEqual(e.files[0].toString(), file1.toString()); - assert.strictEqual(e.files[1].toString(), file2.toString()); - }); - - test('Should send a single FileWillRenameEvent instead of separate events when moving multiple files at once#111867', async function () { - - const file1 = await createRandomFile(); - const file2 = await createRandomFile(); - - const event = new Promise(resolve => { - let sub = vscode.workspace.onWillDeleteFiles(e => { - sub.dispose(); - resolve(e); - }); - }); - - const we = new vscode.WorkspaceEdit(); - we.deleteFile(file1); - we.deleteFile(file2); - await vscode.workspace.applyEdit(we); - - const e = await event; - - assert.strictEqual(e.files.length, 2); - assert.strictEqual(e.files[0].toString(), file1.toString()); - assert.strictEqual(e.files[1].toString(), file2.toString()); - }); - - test('issue #107739 - Redo of rename Java Class name has no effect', async () => { - const file = await createRandomFile('hello'); - const fileName = basename(file.fsPath); - const newFile = vscode.Uri.parse(file.toString().replace(fileName, `${fileName}2`)); - - // apply edit - { - const we = new vscode.WorkspaceEdit(); - we.insert(file, new vscode.Position(0, 5), '2'); - we.renameFile(file, newFile); - await vscode.workspace.applyEdit(we); - } - - // show the new document - { - const document = await vscode.workspace.openTextDocument(newFile); - await vscode.window.showTextDocument(document); - assert.equal(document.getText(), 'hello2'); - assert.equal(document.isDirty, true); - } - - // undo and show the old document - { - await vscode.commands.executeCommand('undo'); - const document = await vscode.workspace.openTextDocument(file); - await vscode.window.showTextDocument(document); - assert.equal(document.getText(), 'hello'); - } - - // redo and show the new document - { - await vscode.commands.executeCommand('redo'); - const document = await vscode.workspace.openTextDocument(newFile); - await vscode.window.showTextDocument(document); - assert.equal(document.getText(), 'hello2'); - assert.equal(document.isDirty, true); - } - - }); - - test('issue #110141 - TextEdit.setEndOfLine applies an edit and invalidates redo stack even when no change is made', async () => { - const file = await createRandomFile('hello\nworld'); - - const document = await vscode.workspace.openTextDocument(file); - await vscode.window.showTextDocument(document); - - // apply edit - { - const we = new vscode.WorkspaceEdit(); - we.insert(file, new vscode.Position(0, 5), '2'); - await vscode.workspace.applyEdit(we); - } - - // check the document - { - assert.equal(document.getText(), 'hello2\nworld'); - assert.equal(document.isDirty, true); - } - - // apply no-op edit - { - const we = new vscode.WorkspaceEdit(); - we.set(file, [vscode.TextEdit.setEndOfLine(vscode.EndOfLine.LF)]); - await vscode.workspace.applyEdit(we); - } - - // undo - { - await vscode.commands.executeCommand('undo'); - assert.equal(document.getText(), 'hello\nworld'); - assert.equal(document.isDirty, false); - } - }); -}); diff --git a/lib/vscode/extensions/vscode-api-tests/src/utils.ts b/lib/vscode/extensions/vscode-api-tests/src/utils.ts deleted file mode 100644 index a36b75496267..000000000000 --- a/lib/vscode/extensions/vscode-api-tests/src/utils.ts +++ /dev/null @@ -1,139 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; -import { TestFS } from './memfs'; -import * as assert from 'assert'; - -export function rndName() { - return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 10); -} - -export const testFs = new TestFS('fake-fs', true); -vscode.workspace.registerFileSystemProvider(testFs.scheme, testFs, { isCaseSensitive: testFs.isCaseSensitive }); - -export async function createRandomFile(contents = '', dir: vscode.Uri | undefined = undefined, ext = ''): Promise { - let fakeFile: vscode.Uri; - if (dir) { - assert.strictEqual(dir.scheme, testFs.scheme); - fakeFile = dir.with({ path: dir.path + '/' + rndName() + ext }); - } else { - fakeFile = vscode.Uri.parse(`${testFs.scheme}:/${rndName() + ext}`); - } - testFs.writeFile(fakeFile, Buffer.from(contents), { create: true, overwrite: true }); - return fakeFile; -} - -export async function deleteFile(file: vscode.Uri): Promise { - try { - testFs.delete(file); - return true; - } catch { - return false; - } -} - -export function pathEquals(path1: string, path2: string): boolean { - if (process.platform !== 'linux') { - path1 = path1.toLowerCase(); - path2 = path2.toLowerCase(); - } - - return path1 === path2; -} - -export function closeAllEditors(): Thenable { - return vscode.commands.executeCommand('workbench.action.closeAllEditors'); -} - -export function saveAllEditors(): Thenable { - return vscode.commands.executeCommand('workbench.action.files.saveAll'); -} - -export async function revertAllDirty(): Promise { - return vscode.commands.executeCommand('_workbench.revertAllDirty'); -} - -export function disposeAll(disposables: vscode.Disposable[]) { - vscode.Disposable.from(...disposables).dispose(); -} - -export function delay(ms: number) { - return new Promise(resolve => setTimeout(resolve, ms)); -} - -export function withLogDisabled(runnable: () => Promise): () => Promise { - return async (): Promise => { - const logLevel = await vscode.commands.executeCommand('_extensionTests.getLogLevel'); - await vscode.commands.executeCommand('_extensionTests.setLogLevel', 6 /* critical */); - - try { - await runnable(); - } finally { - await vscode.commands.executeCommand('_extensionTests.setLogLevel', logLevel); - } - }; -} - -export function assertNoRpc() { - assertNoRpcFromEntry([vscode, 'vscode']); -} - -export function assertNoRpcFromEntry(entry: [obj: any, name: string]) { - - const symProxy = Symbol.for('rpcProxy'); - const symProtocol = Symbol.for('rpcProtocol'); - - const proxyPaths: string[] = []; - const rpcPaths: string[] = []; - - function walk(obj: any, path: string, seen: Set) { - if (!obj) { - return; - } - if (typeof obj !== 'object' && typeof obj !== 'function') { - return; - } - if (seen.has(obj)) { - return; - } - seen.add(obj); - - if (obj[symProtocol]) { - rpcPaths.push(`PROTOCOL via ${path}`); - } - if (obj[symProxy]) { - proxyPaths.push(`PROXY '${obj[symProxy]}' via ${path}`); - } - - for (const key in obj) { - walk(obj[key], `${path}.${String(key)}`, seen); - } - } - - try { - walk(entry[0], entry[1], new Set()); - } catch (err) { - assert.fail(err); - } - assert.strictEqual(rpcPaths.length, 0, rpcPaths.join('\n')); - assert.strictEqual(proxyPaths.length, 0, proxyPaths.join('\n')); // happens... -} - -export async function asPromise(event: vscode.Event, timeout = vscode.env.uiKind === vscode.UIKind.Desktop ? 5000 : 15000): Promise { - return new Promise((resolve, reject) => { - - const handle = setTimeout(() => { - sub.dispose(); - reject(new Error('asPromise TIMEOUT reached')); - }, timeout); - - const sub = event(e => { - clearTimeout(handle); - sub.dispose(); - resolve(e); - }); - }); -} diff --git a/lib/vscode/extensions/vscode-api-tests/src/workspace-tests/workspace.test.ts b/lib/vscode/extensions/vscode-api-tests/src/workspace-tests/workspace.test.ts deleted file mode 100644 index 1b4ef88325aa..000000000000 --- a/lib/vscode/extensions/vscode-api-tests/src/workspace-tests/workspace.test.ts +++ /dev/null @@ -1,38 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as assert from 'assert'; -import * as vscode from 'vscode'; -import { closeAllEditors, pathEquals } from '../utils'; -import { join } from 'path'; - -suite('vscode API - workspace', () => { - - teardown(closeAllEditors); - - test('rootPath', () => { - assert.ok(pathEquals(vscode.workspace.rootPath!, join(__dirname, '../../testWorkspace'))); - }); - - test('workspaceFile', () => { - assert.ok(pathEquals(vscode.workspace.workspaceFile!.fsPath, join(__dirname, '../../testworkspace.code-workspace'))); - }); - - test('workspaceFolders', () => { - assert.equal(vscode.workspace.workspaceFolders!.length, 2); - assert.ok(pathEquals(vscode.workspace.workspaceFolders![0].uri.fsPath, join(__dirname, '../../testWorkspace'))); - assert.ok(pathEquals(vscode.workspace.workspaceFolders![1].uri.fsPath, join(__dirname, '../../testWorkspace2'))); - assert.ok(pathEquals(vscode.workspace.workspaceFolders![1].name, 'Test Workspace 2')); - }); - - test('getWorkspaceFolder', () => { - const folder = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(join(__dirname, '../../testWorkspace2/far.js'))); - assert.ok(!!folder); - - if (folder) { - assert.ok(pathEquals(folder.uri.fsPath, join(__dirname, '../../testWorkspace2'))); - } - }); -}); diff --git a/lib/vscode/extensions/vscode-api-tests/yarn.lock b/lib/vscode/extensions/vscode-api-tests/yarn.lock deleted file mode 100644 index 0e3ca71c654a..000000000000 --- a/lib/vscode/extensions/vscode-api-tests/yarn.lock +++ /dev/null @@ -1,13 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/mocha@^8.2.0": - version "8.2.0" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.0.tgz#3eb56d13a1de1d347ecb1957c6860c911704bc44" - integrity sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ== - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== diff --git a/lib/vscode/extensions/vscode-colorize-tests/package.json b/lib/vscode/extensions/vscode-colorize-tests/package.json deleted file mode 100644 index 0ec286b33853..000000000000 --- a/lib/vscode/extensions/vscode-colorize-tests/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "vscode-colorize-tests", - "description": "Colorize tests for VS Code", - "version": "0.0.1", - "publisher": "vscode", - "license": "MIT", - "private": true, - "activationEvents": [ - "onLanguage:json" - ], - "main": "./out/colorizerTestMain", - "enableProposedApi": true, - "engines": { - "vscode": "*" - }, - "icon": "media/icon.png", - "scripts": { - "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-colorize-tests ./tsconfig.json" - }, - "dependencies": { - "jsonc-parser": "2.2.1" - }, - "devDependencies": { - "@types/node": "^12.19.9" - }, - "contributes": { - "semanticTokenTypes": [ - { - "id": "testToken", - "description": "A test token" - } - ], - "semanticTokenModifiers": [ - { - "id": "testModifier", - "description": "A test modifier" - } - ], - "semanticTokenScopes": [ - { - "scopes": { - "testToken": [ - "entity.name.function.special" - ] - } - } - ], - "productIconThemes": [ - { - "id": "Test Product Icons", - "label": "The Test Product Icon Theme", - "path": "./producticons/test-product-icon-theme.json", - "_watch": true - } - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cs b/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cs deleted file mode 100644 index d4ebb2fe753d..000000000000 --- a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-fixtures/test.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -namespace SampleNamespace -{ - class TestClass - { - static void Main(string[] args) - { - int[] radii = { 15, 32, 108, 74, 9 }; - const double pi = 3.14159; - foreach (int radius in radii) { - double circumference = pi * (2 * radius); - // Display the number of command line arguments: - System.Console.WriteLine("Circumference = {0:N2}", circumference); - } - } - } -} \ No newline at end of file diff --git a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_cs.json b/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_cs.json deleted file mode 100644 index 5893af16e9db..000000000000 --- a/lib/vscode/extensions/vscode-colorize-tests/test/colorize-results/test_cs.json +++ /dev/null @@ -1,1377 +0,0 @@ -[ - { - "c": "using", - "t": "source.cs keyword.other.using.cs", - "r": { - "dark_plus": "keyword.other.using: #C586C0", - "light_plus": "keyword.other.using: #AF00DB", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword.other.using: #C586C0" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "System", - "t": "source.cs entity.name.type.namespace.cs", - "r": { - "dark_plus": "entity.name.type: #4EC9B0", - "light_plus": "entity.name.type: #267F99", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "entity.name.type: #4EC9B0" - } - }, - { - "c": ";", - "t": "source.cs punctuation.terminator.statement.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "namespace", - "t": "source.cs keyword.other.namespace.cs", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "SampleNamespace", - "t": "source.cs entity.name.type.namespace.cs", - "r": { - "dark_plus": "entity.name.type: #4EC9B0", - "light_plus": "entity.name.type: #267F99", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "entity.name.type: #4EC9B0" - } - }, - { - "c": "{", - "t": "source.cs punctuation.curlybrace.open.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "class", - "t": "source.cs keyword.other.class.cs", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "TestClass", - "t": "source.cs entity.name.type.class.cs", - "r": { - "dark_plus": "entity.name.type: #4EC9B0", - "light_plus": "entity.name.type: #267F99", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "entity.name.type: #4EC9B0" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "{", - "t": "source.cs punctuation.curlybrace.open.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "static", - "t": "source.cs storage.modifier.cs", - "r": { - "dark_plus": "storage.modifier: #569CD6", - "light_plus": "storage.modifier: #0000FF", - "dark_vs": "storage.modifier: #569CD6", - "light_vs": "storage.modifier: #0000FF", - "hc_black": "storage.modifier: #569CD6" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "void", - "t": "source.cs keyword.type.cs", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "Main", - "t": "source.cs entity.name.function.cs", - "r": { - "dark_plus": "entity.name.function: #DCDCAA", - "light_plus": "entity.name.function: #795E26", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "entity.name.function: #DCDCAA" - } - }, - { - "c": "(", - "t": "source.cs punctuation.parenthesis.open.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "string", - "t": "source.cs keyword.type.cs", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": "[", - "t": "source.cs punctuation.squarebracket.open.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "]", - "t": "source.cs punctuation.squarebracket.close.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "args", - "t": "source.cs entity.name.variable.parameter.cs", - "r": { - "dark_plus": "entity.name.variable: #9CDCFE", - "light_plus": "entity.name.variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": ")", - "t": "source.cs punctuation.parenthesis.close.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "{", - "t": "source.cs punctuation.curlybrace.open.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "int", - "t": "source.cs keyword.type.cs", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": "[", - "t": "source.cs punctuation.squarebracket.open.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "]", - "t": "source.cs punctuation.squarebracket.close.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "radii", - "t": "source.cs entity.name.variable.local.cs", - "r": { - "dark_plus": "entity.name.variable: #9CDCFE", - "light_plus": "entity.name.variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "=", - "t": "source.cs keyword.operator.assignment.cs", - "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "{", - "t": "source.cs punctuation.curlybrace.open.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "15", - "t": "source.cs constant.numeric.decimal.cs", - "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #098658", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #098658", - "hc_black": "constant.numeric: #B5CEA8" - } - }, - { - "c": ",", - "t": "source.cs punctuation.separator.comma.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "32", - "t": "source.cs constant.numeric.decimal.cs", - "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #098658", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #098658", - "hc_black": "constant.numeric: #B5CEA8" - } - }, - { - "c": ",", - "t": "source.cs punctuation.separator.comma.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "108", - "t": "source.cs constant.numeric.decimal.cs", - "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #098658", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #098658", - "hc_black": "constant.numeric: #B5CEA8" - } - }, - { - "c": ",", - "t": "source.cs punctuation.separator.comma.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "74", - "t": "source.cs constant.numeric.decimal.cs", - "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #098658", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #098658", - "hc_black": "constant.numeric: #B5CEA8" - } - }, - { - "c": ",", - "t": "source.cs punctuation.separator.comma.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "9", - "t": "source.cs constant.numeric.decimal.cs", - "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #098658", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #098658", - "hc_black": "constant.numeric: #B5CEA8" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "}", - "t": "source.cs punctuation.curlybrace.close.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": ";", - "t": "source.cs punctuation.terminator.statement.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "const", - "t": "source.cs storage.modifier.cs", - "r": { - "dark_plus": "storage.modifier: #569CD6", - "light_plus": "storage.modifier: #0000FF", - "dark_vs": "storage.modifier: #569CD6", - "light_vs": "storage.modifier: #0000FF", - "hc_black": "storage.modifier: #569CD6" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "double", - "t": "source.cs keyword.type.cs", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "pi", - "t": "source.cs entity.name.variable.local.cs", - "r": { - "dark_plus": "entity.name.variable: #9CDCFE", - "light_plus": "entity.name.variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "=", - "t": "source.cs keyword.operator.assignment.cs", - "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "3.14159", - "t": "source.cs constant.numeric.decimal.cs", - "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #098658", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #098658", - "hc_black": "constant.numeric: #B5CEA8" - } - }, - { - "c": ";", - "t": "source.cs punctuation.terminator.statement.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "foreach", - "t": "source.cs keyword.control.loop.foreach.cs", - "r": { - "dark_plus": "keyword.control: #C586C0", - "light_plus": "keyword.control: #AF00DB", - "dark_vs": "keyword.control: #569CD6", - "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #C586C0" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "(", - "t": "source.cs punctuation.parenthesis.open.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "int", - "t": "source.cs keyword.type.cs", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "radius", - "t": "source.cs entity.name.variable.local.cs", - "r": { - "dark_plus": "entity.name.variable: #9CDCFE", - "light_plus": "entity.name.variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "in", - "t": "source.cs keyword.control.loop.in.cs", - "r": { - "dark_plus": "keyword.control: #C586C0", - "light_plus": "keyword.control: #AF00DB", - "dark_vs": "keyword.control: #569CD6", - "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #C586C0" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "radii", - "t": "source.cs variable.other.readwrite.cs", - "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "variable: #9CDCFE" - } - }, - { - "c": ")", - "t": "source.cs punctuation.parenthesis.close.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "{", - "t": "source.cs punctuation.curlybrace.open.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "double", - "t": "source.cs keyword.type.cs", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "circumference", - "t": "source.cs entity.name.variable.local.cs", - "r": { - "dark_plus": "entity.name.variable: #9CDCFE", - "light_plus": "entity.name.variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "=", - "t": "source.cs keyword.operator.assignment.cs", - "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "pi", - "t": "source.cs variable.other.readwrite.cs", - "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "variable: #9CDCFE" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "*", - "t": "source.cs keyword.operator.arithmetic.cs", - "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "(", - "t": "source.cs punctuation.parenthesis.open.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "2", - "t": "source.cs constant.numeric.decimal.cs", - "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #098658", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #098658", - "hc_black": "constant.numeric: #B5CEA8" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "*", - "t": "source.cs keyword.operator.arithmetic.cs", - "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "radius", - "t": "source.cs variable.other.readwrite.cs", - "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "variable: #9CDCFE" - } - }, - { - "c": ")", - "t": "source.cs punctuation.parenthesis.close.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": ";", - "t": "source.cs punctuation.terminator.statement.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs punctuation.whitespace.comment.leading.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "//", - "t": "source.cs comment.line.double-slash.cs punctuation.definition.comment.cs", - "r": { - "dark_plus": "comment: #6A9955", - "light_plus": "comment: #008000", - "dark_vs": "comment: #6A9955", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": " Display the number of command line arguments:", - "t": "source.cs comment.line.double-slash.cs", - "r": { - "dark_plus": "comment: #6A9955", - "light_plus": "comment: #008000", - "dark_vs": "comment: #6A9955", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "System", - "t": "source.cs variable.other.object.cs", - "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "variable: #9CDCFE" - } - }, - { - "c": ".", - "t": "source.cs punctuation.accessor.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "Console", - "t": "source.cs variable.other.object.property.cs", - "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "variable: #9CDCFE" - } - }, - { - "c": ".", - "t": "source.cs punctuation.accessor.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "WriteLine", - "t": "source.cs entity.name.function.cs", - "r": { - "dark_plus": "entity.name.function: #DCDCAA", - "light_plus": "entity.name.function: #795E26", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "entity.name.function: #DCDCAA" - } - }, - { - "c": "(", - "t": "source.cs punctuation.parenthesis.open.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "\"", - "t": "source.cs string.quoted.double.cs punctuation.definition.string.begin.cs", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": "Circumference = {0:N2}", - "t": "source.cs string.quoted.double.cs", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": "\"", - "t": "source.cs string.quoted.double.cs punctuation.definition.string.end.cs", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": ",", - "t": "source.cs punctuation.separator.comma.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "circumference", - "t": "source.cs variable.other.readwrite.cs", - "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "variable: #9CDCFE" - } - }, - { - "c": ")", - "t": "source.cs punctuation.parenthesis.close.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": ";", - "t": "source.cs punctuation.terminator.statement.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "}", - "t": "source.cs punctuation.curlybrace.close.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "}", - "t": "source.cs punctuation.curlybrace.close.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "}", - "t": "source.cs punctuation.curlybrace.close.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "}", - "t": "source.cs punctuation.curlybrace.close.cs", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - } -] diff --git a/lib/vscode/extensions/vscode-colorize-tests/yarn.lock b/lib/vscode/extensions/vscode-colorize-tests/yarn.lock deleted file mode 100644 index a02d17759287..000000000000 --- a/lib/vscode/extensions/vscode-colorize-tests/yarn.lock +++ /dev/null @@ -1,13 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -jsonc-parser@2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc" - integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w== diff --git a/lib/vscode/extensions/vscode-custom-editor-tests/package.json b/lib/vscode/extensions/vscode-custom-editor-tests/package.json deleted file mode 100644 index c718e324bc98..000000000000 --- a/lib/vscode/extensions/vscode-custom-editor-tests/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "vscode-custom-editor-tests", - "description": "Custom editor tests for VS Code", - "version": "0.0.1", - "publisher": "vscode", - "license": "MIT", - "private": true, - "activationEvents": [ - "onCustomEditor:testWebviewEditor.abc" - ], - "main": "./out/extension", - "enableProposedApi": true, - "engines": { - "vscode": "^1.48.0" - }, - "icon": "media/icon.png", - "scripts": { - "compile": "node ./node_modules/vscode/bin/compile -watch -p ./", - "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-notebook-tests ./tsconfig.json" - }, - "dependencies": { - "p-limit": "^3.0.2" - }, - "devDependencies": { - "@types/node": "^12.19.9", - "@types/p-limit": "^2.2.0" - }, - "contributes": { - "customEditors": [ - { - "viewType": "testWebviewEditor.abc", - "displayName": "Test ABC editor", - "selector": [ - { - "filenamePattern": "*.abc" - } - ] - } - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/vscode-custom-editor-tests/yarn.lock b/lib/vscode/extensions/vscode-custom-editor-tests/yarn.lock deleted file mode 100644 index 29a81a09a498..000000000000 --- a/lib/vscode/extensions/vscode-custom-editor-tests/yarn.lock +++ /dev/null @@ -1,27 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== - -"@types/p-limit@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@types/p-limit/-/p-limit-2.2.0.tgz#94a608e9b258a6c6156a13d1a14fd720dba70b97" - integrity sha512-fGFbybl1r0oE9mqgfc2EHHUin9ZL5rbQIexWI6jYRU1ADVn4I3LHzT+g/kpPpZsfp8PB94CQ655pfAjNF8LP6A== - dependencies: - p-limit "*" - -p-limit@*, p-limit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.0.2.tgz#1664e010af3cadc681baafd3e2a437be7b0fb5fe" - integrity sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg== - dependencies: - p-try "^2.0.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== diff --git a/lib/vscode/extensions/vscode-notebook-tests/package.json b/lib/vscode/extensions/vscode-notebook-tests/package.json deleted file mode 100644 index f1bdd988bee5..000000000000 --- a/lib/vscode/extensions/vscode-notebook-tests/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "vscode-notebook-tests", - "description": "Notebook tests for VS Code", - "version": "0.0.1", - "publisher": "vscode", - "license": "MIT", - "private": true, - "activationEvents": [ - "*" - ], - "main": "./out/extension", - "enableProposedApi": true, - "engines": { - "vscode": "^1.25.0" - }, - "icon": "media/icon.png", - "scripts": { - "compile": "node ./node_modules/vscode/bin/compile -watch -p ./", - "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-notebook-tests ./tsconfig.json" - }, - "dependencies": {}, - "devDependencies": { - "@types/node": "^12.19.9" - }, - "contributes": { - "commands": [ - { - "command": "vscode-notebook-tests.createNewNotebook", - "title": "Create New Notebook" - }, - { - "command": "vscode-notebook-tests.debugAction", - "title": "Debug Notebook Test Cell Action", - "icon": "$(debug)" - } - ], - "notebookProvider": [ - { - "viewType": "notebookSmokeTest", - "displayName": "Notebook Smoke Test", - "selector": [ - { - "filenamePattern": "*.smoke-nb", - "excludeFileNamePattern": "" - } - ] - } - ], - "notebookOutputRenderer": [ - { - "id": "notebookCoreTestRenderer", - "displayName": "Notebook Core Test Renderer", - "entrypoint": "./src/customRenderer.js", - "mimeTypes": [ - "text/custom" - ] - } - ], - "menus": { - "notebook/cell/title": [ - { - "command": "vscode-notebook-tests.debugAction", - "when": "notebookViewType == notebookSmokeTest", - "group": "inline@1" - } - ] - }, - "jsonValidation": [ - { - "fileMatch": "vscode://vscode-notebook-cell-metadata/*", - "url": "vscode://schemas/notebook/cellmetadata" - } - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/vscode-notebook-tests/src/extension.ts b/lib/vscode/extensions/vscode-notebook-tests/src/extension.ts deleted file mode 100644 index ff0b4981d508..000000000000 --- a/lib/vscode/extensions/vscode-notebook-tests/src/extension.ts +++ /dev/null @@ -1,90 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; -import * as child_process from 'child_process'; -import * as path from 'path'; - -function wait(ms: number): Promise { - return new Promise(r => setTimeout(r, ms)); -} - -export function activate(context: vscode.ExtensionContext): any { - context.subscriptions.push(vscode.commands.registerCommand('vscode-notebook-tests.createNewNotebook', async () => { - const workspacePath = vscode.workspace.workspaceFolders![0].uri.fsPath; - const notebookPath = path.join(workspacePath, 'test.smoke-nb'); - child_process.execSync('echo \'\' > ' + notebookPath); - await wait(500); - await vscode.commands.executeCommand('vscode.open', vscode.Uri.file(notebookPath)); - })); - - context.subscriptions.push(vscode.notebook.registerNotebookContentProvider('notebookSmokeTest', { - openNotebook: async (_resource: vscode.Uri) => { - const dto: vscode.NotebookData = { - metadata: new vscode.NotebookDocumentMetadata(), - cells: [ - { - source: 'code()', - language: 'typescript', - kind: vscode.NotebookCellKind.Code, - outputs: [], - metadata: new vscode.NotebookCellMetadata().with({ custom: { testCellMetadata: 123 } }) - }, - { - source: 'Markdown Cell', - language: 'markdown', - kind: vscode.NotebookCellKind.Markdown, - outputs: [], - metadata: new vscode.NotebookCellMetadata().with({ custom: { testCellMetadata: 123 } }) - } - ] - }; - - return dto; - }, - saveNotebook: async (_document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) => { - return; - }, - saveNotebookAs: async (_targetResource: vscode.Uri, _document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) => { - return; - }, - backupNotebook: async (_document: vscode.NotebookDocument, _context: vscode.NotebookDocumentBackupContext, _cancellation: vscode.CancellationToken) => { - return { - id: '1', - delete: () => { } - }; - } - })); - - const controller = vscode.notebook.createNotebookController( - 'notebookSmokeTest', - 'notebookSmokeTest', - 'notebookSmokeTest' - ); - - controller.executeHandler = (cells) => { - for (const cell of cells) { - const task = controller.createNotebookCellExecutionTask(cell); - task.start(); - task.replaceOutput([new vscode.NotebookCellOutput([ - new vscode.NotebookCellOutputItem('text/html', ['test output'], undefined) - ])]); - task.end({ success: true }); - } - }; - - context.subscriptions.push(controller); - - context.subscriptions.push(vscode.commands.registerCommand('vscode-notebook-tests.debugAction', async (cell: vscode.NotebookCell) => { - if (cell) { - const edit = new vscode.WorkspaceEdit(); - const fullRange = new vscode.Range(0, 0, cell.document.lineCount - 1, cell.document.lineAt(cell.document.lineCount - 1).range.end.character); - edit.replace(cell.document.uri, fullRange, 'test'); - await vscode.workspace.applyEdit(edit); - } else { - throw new Error('Cell not set correctly'); - } - })); -} diff --git a/lib/vscode/extensions/vscode-notebook-tests/yarn.lock b/lib/vscode/extensions/vscode-notebook-tests/yarn.lock deleted file mode 100644 index e03bdd573eab..000000000000 --- a/lib/vscode/extensions/vscode-notebook-tests/yarn.lock +++ /dev/null @@ -1,8 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== diff --git a/lib/vscode/extensions/vscode-test-resolver/package.json b/lib/vscode/extensions/vscode-test-resolver/package.json deleted file mode 100644 index 2256c0473594..000000000000 --- a/lib/vscode/extensions/vscode-test-resolver/package.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "name": "vscode-test-resolver", - "description": "Test resolver for VS Code", - "version": "0.0.1", - "publisher": "vscode", - "license": "MIT", - "enableProposedApi": true, - "private": true, - "engines": { - "vscode": "^1.25.0" - }, - "icon": "media/icon.png", - "extensionKind": [ - "ui" - ], - "scripts": { - "compile": "node ./node_modules/vscode/bin/compile -watch -p ./", - "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-test-resolver" - }, - "activationEvents": [ - "onResolveRemoteAuthority:test", - "onCommand:vscode-testresolver.newWindow", - "onCommand:vscode-testresolver.newWindowWithError", - "onCommand:vscode-testresolver.showLog", - "onCommand:vscode-testresolver.openTunnel", - "onCommand:vscode-testresolver.startRemoteServer" - ], - "main": "./out/extension", - "devDependencies": { - "@types/node": "^12.19.9" - }, - "contributes": { - "resourceLabelFormatters": [ - { - "scheme": "vscode-remote", - "authority": "test+*", - "formatting": { - "label": "${path}", - "separator": "/", - "tildify": true, - "workspaceSuffix": "TestResolver" - } - } - ], - "commands": [ - { - "title": "New TestResolver Window", - "category": "Remote-TestResolver", - "command": "vscode-testresolver.newWindow" - }, - { - "title": "Show TestResolver Log", - "category": "Remote-TestResolver", - "command": "vscode-testresolver.showLog" - }, - { - "title": "Kill Remote Server and Trigger Handled Error", - "category": "Remote-TestResolver", - "command": "vscode-testresolver.killServerAndTriggerHandledError" - }, - { - "title": "Open Tunnel...", - "category": "Remote-TestResolver", - "command": "vscode-testresolver.openTunnel" - }, - { - "title": "Open Remote Server...", - "category": "Remote-TestResolver", - "command": "vscode-testresolver.startRemoteServer" - } - ], - "menus": { - "commandPalette": [ - { - "command": "vscode-testresolver.openTunnel", - "when": "remoteName == test" - }, - { - "command": "vscode-testresolver.startRemoteServer", - "when": "remoteName == test" - } - ], - "statusBar/remoteIndicator": [ - { - "command": "vscode-testresolver.newWindow", - "when": "!remoteName", - "group": "remote_90_test_1_local@2" - }, - { - "command": "vscode-testresolver.showLog", - "when": "remoteName == test", - "group": "remote_90_test_1_open@3" - }, - { - "command": "vscode-testresolver.newWindow", - "when": "remoteName == test", - "group": "remote_90_test_1_open@1" - }, - { - "command": "vscode-testresolver.openTunnel", - "when": "remoteName == test", - "group": "remote_90_test_2_more@4" - }, - { - "command": "vscode-testresolver.startRemoteServer", - "when": "remoteName == test", - "group": "remote_90_test_2_more@5" - } - ] - }, - "configuration": { - "properties": { - "testresolver.startupDelay": { - "description": "If set, the resolver will delay for the given amount of seconds. Use ths setting for testing a slow resolver", - "type": "number", - "default": 0 - }, - "testresolver.startupError": { - "description": "If set, the resolver will fail. Use ths setting for testing the failure of a resolver.", - "type": "boolean", - "default": false - }, - "testresolver.pause": { - "description": "If set, connection is paused", - "type": "boolean", - "default": false - }, - "testresolver.supportPublicPorts": { - "description": "If set, the test resolver tunnel factory will support mock public ports. Forwarded ports will not actually be public. Requires reload.", - "type": "boolean", - "default": false - } - } - } - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - } -} diff --git a/lib/vscode/extensions/vscode-test-resolver/src/extension.ts b/lib/vscode/extensions/vscode-test-resolver/src/extension.ts deleted file mode 100644 index c338957146bf..000000000000 --- a/lib/vscode/extensions/vscode-test-resolver/src/extension.ts +++ /dev/null @@ -1,436 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as vscode from 'vscode'; -import * as cp from 'child_process'; -import * as path from 'path'; -import * as fs from 'fs'; -import * as os from 'os'; -import * as net from 'net'; -import * as http from 'http'; -import { downloadAndUnzipVSCodeServer } from './download'; -import { terminateProcess } from './util/processes'; - -let extHostProcess: cp.ChildProcess | undefined; -const enum CharCode { - Backspace = 8, - LineFeed = 10 -} - -let outputChannel: vscode.OutputChannel; - -export function activate(context: vscode.ExtensionContext) { - - function doResolve(_authority: string, progress: vscode.Progress<{ message?: string; increment?: number }>): Promise { - const serverPromise = new Promise(async (res, rej) => { - progress.report({ message: 'Starting Test Resolver' }); - outputChannel = vscode.window.createOutputChannel('TestResolver'); - - let isResolved = false; - async function processError(message: string) { - outputChannel.appendLine(message); - if (!isResolved) { - isResolved = true; - outputChannel.show(); - - const result = await vscode.window.showErrorMessage(message, { modal: true }, ...getActions()); - if (result) { - await result.execute(); - } - rej(vscode.RemoteAuthorityResolverError.NotAvailable(message, true)); - } - } - - let lastProgressLine = ''; - function processOutput(output: string) { - outputChannel.append(output); - for (let i = 0; i < output.length; i++) { - const chr = output.charCodeAt(i); - if (chr === CharCode.LineFeed) { - const match = lastProgressLine.match(/Extension host agent listening on (\d+)/); - if (match) { - isResolved = true; - res(new vscode.ResolvedAuthority('localhost', parseInt(match[1], 10))); // success! - } - lastProgressLine = ''; - } else if (chr === CharCode.Backspace) { - lastProgressLine = lastProgressLine.substr(0, lastProgressLine.length - 1); - } else { - lastProgressLine += output.charAt(i); - } - } - } - const delay = getConfiguration('startupDelay'); - if (typeof delay === 'number') { - let remaining = Math.ceil(delay); - outputChannel.append(`Delaying startup by ${remaining} seconds (configured by "testresolver.startupDelay").`); - while (remaining > 0) { - progress.report({ message: `Delayed resolving: Remaining ${remaining}s` }); - await (sleep(1000)); - remaining--; - } - } - - if (getConfiguration('startupError') === true) { - processError('Test Resolver failed for testing purposes (configured by "testresolver.startupError").'); - return; - } - - const { updateUrl, commit, quality, serverDataFolderName, dataFolderName } = getProductConfiguration(); - const commandArgs = ['--port=0', '--disable-telemetry']; - const env = getNewEnv(); - const remoteDataDir = process.env['TESTRESOLVER_DATA_FOLDER'] || path.join(os.homedir(), serverDataFolderName || `${dataFolderName}-testresolver`); - - env['VSCODE_AGENT_FOLDER'] = remoteDataDir; - outputChannel.appendLine(`Using data folder at ${remoteDataDir}`); - - if (!commit) { // dev mode - const serverCommand = process.platform === 'win32' ? 'server.bat' : 'server.sh'; - const vscodePath = path.resolve(path.join(context.extensionPath, '..', '..')); - const serverCommandPath = path.join(vscodePath, 'resources', 'server', 'bin-dev', serverCommand); - extHostProcess = cp.spawn(serverCommandPath, commandArgs, { env, cwd: vscodePath }); - } else { - const extensionToInstall = process.env['TESTRESOLVER_INSTALL_BUILTIN_EXTENSION']; - if (extensionToInstall) { - commandArgs.push('--install-builtin-extension', extensionToInstall); - commandArgs.push('--start-server'); - } - const serverCommand = process.platform === 'win32' ? 'server.cmd' : 'server.sh'; - let serverLocation = env['VSCODE_REMOTE_SERVER_PATH']; // support environment variable to specify location of server on disk - if (!serverLocation) { - const serverBin = path.join(remoteDataDir, 'bin'); - progress.report({ message: 'Installing VSCode Server' }); - serverLocation = await downloadAndUnzipVSCodeServer(updateUrl, commit, quality, serverBin, m => outputChannel.appendLine(m)); - } - - outputChannel.appendLine(`Using server build at ${serverLocation}`); - outputChannel.appendLine(`Server arguments ${commandArgs.join(' ')}`); - - extHostProcess = cp.spawn(path.join(serverLocation, serverCommand), commandArgs, { env, cwd: serverLocation }); - } - extHostProcess.stdout!.on('data', (data: Buffer) => processOutput(data.toString())); - extHostProcess.stderr!.on('data', (data: Buffer) => processOutput(data.toString())); - extHostProcess.on('error', (error: Error) => { - processError(`server failed with error:\n${error.message}`); - extHostProcess = undefined; - }); - extHostProcess.on('close', (code: number) => { - processError(`server closed unexpectedly.\nError code: ${code}`); - extHostProcess = undefined; - }); - context.subscriptions.push({ - dispose: () => { - if (extHostProcess) { - terminateProcess(extHostProcess, context.extensionPath); - } - } - }); - }); - return serverPromise.then(serverAddr => { - return new Promise(async (res, _rej) => { - const proxyServer = net.createServer(proxySocket => { - outputChannel.appendLine(`Proxy connection accepted`); - let remoteReady = true, localReady = true; - const remoteSocket = net.createConnection({ port: serverAddr.port }); - - let isDisconnected = getConfiguration('pause') === true; - vscode.workspace.onDidChangeConfiguration(_ => { - let newIsDisconnected = getConfiguration('pause') === true; - if (isDisconnected !== newIsDisconnected) { - outputChannel.appendLine(`Connection state: ${newIsDisconnected ? 'open' : 'paused'}`); - isDisconnected = newIsDisconnected; - if (!isDisconnected) { - outputChannel.appendLine(`Resume remote and proxy sockets.`); - if (remoteSocket.isPaused() && localReady) { - remoteSocket.resume(); - } - if (proxySocket.isPaused() && remoteReady) { - proxySocket.resume(); - } - } else { - outputChannel.appendLine(`Pausing remote and proxy sockets.`); - if (!remoteSocket.isPaused()) { - remoteSocket.pause(); - } - if (!proxySocket.isPaused()) { - proxySocket.pause(); - } - } - } - }); - - proxySocket.on('data', (data) => { - remoteReady = remoteSocket.write(data); - if (!remoteReady) { - proxySocket.pause(); - } - }); - remoteSocket.on('data', (data) => { - localReady = proxySocket.write(data); - if (!localReady) { - remoteSocket.pause(); - } - }); - proxySocket.on('drain', () => { - localReady = true; - if (!isDisconnected) { - remoteSocket.resume(); - } - }); - remoteSocket.on('drain', () => { - remoteReady = true; - if (!isDisconnected) { - proxySocket.resume(); - } - }); - proxySocket.on('close', () => { - outputChannel.appendLine(`Proxy socket closed, closing remote socket.`); - remoteSocket.end(); - }); - remoteSocket.on('close', () => { - outputChannel.appendLine(`Remote socket closed, closing proxy socket.`); - proxySocket.end(); - }); - context.subscriptions.push({ - dispose: () => { - proxySocket.end(); - remoteSocket.end(); - } - }); - }); - proxyServer.listen(0, () => { - const port = (proxyServer.address()).port; - outputChannel.appendLine(`Going through proxy at port ${port}`); - const r: vscode.ResolverResult = new vscode.ResolvedAuthority('127.0.0.1', port); - res(r); - }); - context.subscriptions.push({ - dispose: () => { - proxyServer.close(); - } - }); - }); - }); - } - - const authorityResolverDisposable = vscode.workspace.registerRemoteAuthorityResolver('test', { - resolve(_authority: string): Thenable { - return vscode.window.withProgress({ - location: vscode.ProgressLocation.Notification, - title: 'Open TestResolver Remote ([details](command:vscode-testresolver.showLog))', - cancellable: false - }, (progress) => doResolve(_authority, progress)); - }, - tunnelFactory, - tunnelFeatures: { elevation: true, public: !!vscode.workspace.getConfiguration('testresolver').get('supportPublicPorts') }, - showCandidatePort - }); - context.subscriptions.push(authorityResolverDisposable); - - context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.newWindow', () => { - return vscode.commands.executeCommand('vscode.newWindow', { remoteAuthority: 'test+test' }); - })); - context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.newWindowWithError', () => { - return vscode.commands.executeCommand('vscode.newWindow', { remoteAuthority: 'test+error' }); - })); - context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.killServerAndTriggerHandledError', () => { - authorityResolverDisposable.dispose(); - if (extHostProcess) { - terminateProcess(extHostProcess, context.extensionPath); - } - vscode.workspace.registerRemoteAuthorityResolver('test', { - async resolve(_authority: string): Promise { - setTimeout(async () => { - await vscode.window.showErrorMessage('Just a custom message.', { modal: true, useCustom: true }, 'OK', 'Great'); - }, 2000); - throw vscode.RemoteAuthorityResolverError.NotAvailable('Intentional Error', true); - } - }); - })); - context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.showLog', () => { - if (outputChannel) { - outputChannel.show(); - } - })); - - context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.openTunnel', async () => { - const result = await vscode.window.showInputBox({ - prompt: 'Enter the remote port for the tunnel', - value: '5000', - validateInput: input => /^[\d]+$/.test(input) ? undefined : 'Not a valid number' - }); - if (result) { - const port = Number.parseInt(result); - vscode.workspace.openTunnel({ - remoteAddress: { - host: 'localhost', - port: port - }, - localAddressPort: port + 1 - }); - } - - })); - context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.startRemoteServer', async () => { - const result = await vscode.window.showInputBox({ - prompt: 'Enter the port for the remote server', - value: '5000', - validateInput: input => /^[\d]+$/.test(input) ? undefined : 'Not a valid number' - }); - if (result) { - runHTTPTestServer(Number.parseInt(result)); - } - - })); - vscode.commands.executeCommand('setContext', 'forwardedPortsViewEnabled', true); -} - -type ActionItem = (vscode.MessageItem & { execute: () => void; }); - -function getActions(): ActionItem[] { - const actions: ActionItem[] = []; - const isDirty = vscode.workspace.textDocuments.some(d => d.isDirty) || vscode.workspace.workspaceFile && vscode.workspace.workspaceFile.scheme === 'untitled'; - - actions.push({ - title: 'Retry', - execute: async () => { - await vscode.commands.executeCommand('workbench.action.reloadWindow'); - } - }); - if (!isDirty) { - actions.push({ - title: 'Close Remote', - execute: async () => { - await vscode.commands.executeCommand('vscode.newWindow', { reuseWindow: true, remoteAuthority: null }); - } - }); - } - actions.push({ - title: 'Ignore', - isCloseAffordance: true, - execute: async () => { - vscode.commands.executeCommand('vscode-testresolver.showLog'); // no need to wait - } - }); - return actions; -} - -export interface IProductConfiguration { - updateUrl: string; - commit: string; - quality: string; - dataFolderName: string; - serverDataFolderName?: string; -} - -function getProductConfiguration(): IProductConfiguration { - const content = fs.readFileSync(path.join(vscode.env.appRoot, 'product.json')).toString(); - return JSON.parse(content) as IProductConfiguration; -} - -function getNewEnv(): { [x: string]: string | undefined } { - const env = { ...process.env }; - delete env['ELECTRON_RUN_AS_NODE']; - return env; -} - -function sleep(ms: number): Promise { - return new Promise(resolve => { - setTimeout(resolve, ms); - }); -} - -function getConfiguration(id: string): T | undefined { - return vscode.workspace.getConfiguration('testresolver').get(id); -} - -const remoteServers: number[] = []; - -async function showCandidatePort(_host: string, port: number, _detail: string): Promise { - return remoteServers.includes(port) || port === 100; -} - -async function tunnelFactory(tunnelOptions: vscode.TunnelOptions, tunnelCreationOptions: vscode.TunnelCreationOptions): Promise { - outputChannel.appendLine(`Tunnel factory request: Remote ${tunnelOptions.remoteAddress.port} -> local ${tunnelOptions.localAddressPort}`); - if (tunnelCreationOptions.elevationRequired) { - await vscode.window.showInformationMessage('This is a fake elevation message. A real resolver would show a native elevation prompt.', { modal: true }, 'Ok'); - } - - return createTunnelService(); - - function newTunnel(localAddress: { host: string, port: number }) { - const onDidDispose: vscode.EventEmitter = new vscode.EventEmitter(); - let isDisposed = false; - return { - localAddress, - remoteAddress: tunnelOptions.remoteAddress, - public: !!vscode.workspace.getConfiguration('testresolver').get('supportPublicPorts') && tunnelOptions.public, - onDidDispose: onDidDispose.event, - dispose: () => { - if (!isDisposed) { - isDisposed = true; - onDidDispose.fire(); - } - } - }; - } - - function createTunnelService(): Promise { - return new Promise((res, _rej) => { - const proxyServer = net.createServer(proxySocket => { - const remoteSocket = net.createConnection({ host: tunnelOptions.remoteAddress.host, port: tunnelOptions.remoteAddress.port }); - remoteSocket.pipe(proxySocket); - proxySocket.pipe(remoteSocket); - }); - let localPort = 0; - - if (tunnelOptions.localAddressPort) { - // When the tunnelOptions include a localAddressPort, we should use that. - // However, the test resolver all runs on one machine, so if the localAddressPort is the same as the remote port, - // then we must use a different port number. - localPort = tunnelOptions.localAddressPort; - } else { - localPort = tunnelOptions.remoteAddress.port; - } - - if (localPort === tunnelOptions.remoteAddress.port) { - localPort += 1; - } - - // The test resolver can't actually handle privileged ports, it only pretends to. - if (localPort < 1024 && process.platform !== 'win32') { - localPort = 0; - } - proxyServer.listen(localPort, () => { - const localPort = (proxyServer.address()).port; - outputChannel.appendLine(`New test resolver tunnel service: Remote ${tunnelOptions.remoteAddress.port} -> local ${localPort}`); - const tunnel = newTunnel({ host: 'localhost', port: localPort }); - tunnel.onDidDispose(() => proxyServer.close()); - res(tunnel); - }); - }); - } -} - -function runHTTPTestServer(port: number): vscode.Disposable { - const server = http.createServer((_req, res) => { - res.writeHead(200); - res.end(`Hello, World from test server running on port ${port}!`); - }); - remoteServers.push(port); - server.listen(port); - const message = `Opened HTTP server on http://localhost:${port}`; - console.log(message); - outputChannel.appendLine(message); - return { - dispose: () => { - server.close(); - const index = remoteServers.indexOf(port); - if (index !== -1) { - remoteServers.splice(index, 1); - } - } - }; -} diff --git a/lib/vscode/extensions/vscode-test-resolver/yarn.lock b/lib/vscode/extensions/vscode-test-resolver/yarn.lock deleted file mode 100644 index e03bdd573eab..000000000000 --- a/lib/vscode/extensions/vscode-test-resolver/yarn.lock +++ /dev/null @@ -1,8 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/node@^12.19.9": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== diff --git a/lib/vscode/extensions/yarn.lock b/lib/vscode/extensions/yarn.lock deleted file mode 100644 index 067a5ebba64c..000000000000 --- a/lib/vscode/extensions/yarn.lock +++ /dev/null @@ -1,38 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -coffee-script@^1.10.0: - version "1.12.7" - resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.12.7.tgz#c05dae0cb79591d05b3070a8433a98c9a89ccc53" - integrity sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw== - -cson-parser@^1.3.3: - version "1.3.5" - resolved "https://registry.yarnpkg.com/cson-parser/-/cson-parser-1.3.5.tgz#7ec675e039145533bf2a6a856073f1599d9c2d24" - integrity sha1-fsZ14DkUVTO/KmqFYHPxWZ2cLSQ= - dependencies: - coffee-script "^1.10.0" - -esbuild@^0.11.12: - version "0.11.12" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.11.12.tgz#8cbe15bcb44212624c3e77c896a835f74dc71c3c" - integrity sha512-c8cso/1RwVj+fbDvLtUgSG4ZJQ0y9Zdrl6Ot/GAjyy4pdMCHaFnDMts5gqFnWRPLajWtEnI+3hlET4R9fVoZng== - -fast-plist@0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/fast-plist/-/fast-plist-0.1.2.tgz#a45aff345196006d406ca6cdcd05f69051ef35b8" - integrity sha1-pFr/NFGWAG1AbKbNzQX2kFHvNbg= - -typescript@4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961" - integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== - -vscode-grammar-updater@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/vscode-grammar-updater/-/vscode-grammar-updater-1.0.3.tgz#695ccaf0567c6a000005a969cd87ecc3b5c25018" - integrity sha512-V/OnMGyAk7Ldv5NC2p+NovidsAghdfbFFnimEzQ7F/TYIqDLJCVe28RcvaU2gywCSCtxNfS5MYe0egiaRIWNEw== - dependencies: - cson-parser "^1.3.3" - fast-plist "0.1.2" diff --git a/lib/vscode/package.json b/lib/vscode/package.json deleted file mode 100644 index 73d8584c9d66..000000000000 --- a/lib/vscode/package.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "name": "code-oss-dev", - "version": "1.56.0", - "distro": "3d76109d9437bda93a3f337625de2833149ca724", - "author": { - "name": "Microsoft Corporation" - }, - "license": "MIT", - "main": "./out/main", - "private": true, - "scripts": { - "test": "mocha", - "test-browser": "node test/unit/browser/index.js", - "preinstall": "node build/npm/preinstall.js", - "postinstall": "node build/npm/postinstall.js", - "compile": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js compile", - "watch": "npm-run-all -lp watch-client watch-extensions watch-extension-media", - "watchd": "deemon yarn watch", - "watch-webd": "deemon yarn watch-web", - "kill-watchd": "deemon --kill yarn watch", - "kill-watch-webd": "deemon --kill yarn watch-web", - "restart-watchd": "deemon --restart yarn watch", - "restart-watch-webd": "deemon --restart yarn watch-web", - "watch-client": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js watch-client", - "watch-clientd": "deemon yarn watch-client", - "kill-watch-clientd": "deemon --kill yarn watch-client", - "watch-extensions": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js watch-extensions", - "watch-extension-media": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js watch-extension-media", - "watch-extensionsd": "deemon yarn watch-extensions", - "kill-watch-extensionsd": "deemon --kill yarn watch-extensions", - "watch-extension-mediad": "deemon yarn watch-extension-media", - "kill-watch-extension-mediad": "deemon --kill yarn watch-extension-media", - "mocha": "mocha test/unit/node/all.js --delay", - "precommit": "node build/hygiene.js", - "gulp": "node --max_old_space_size=8192 ./node_modules/gulp/bin/gulp.js", - "electron": "node build/lib/electron", - "7z": "7z", - "update-grammars": "node build/npm/update-all-grammars.js", - "update-localization-extension": "node build/npm/update-localization-extension.js", - "smoketest": "cd test/smoke && yarn compile && node test/index.js", - "smoketest-no-compile": "cd test/smoke && node test/index.js", - "download-builtin-extensions": "node build/lib/builtInExtensions.js", - "download-builtin-extensions-cg": "node build/lib/builtInExtensionsCG.js", - "monaco-compile-check": "tsc -p src/tsconfig.monaco.json --noEmit", - "tsec-compile-check": "node node_modules/tsec/bin/tsec -p src/tsconfig.tsec.json", - "valid-layers-check": "node build/lib/layersChecker.js", - "update-distro": "node build/npm/update-distro.js", - "web": "node resources/web/code-web.js", - "compile-web": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js compile-web", - "watch-web": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js watch-web", - "eslint": "node build/eslint", - "playwright-install": "node build/azure-pipelines/common/installPlaywright.js", - "compile-build": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js compile-build", - "compile-extensions-build": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js compile-extensions-build", - "minify-vscode": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js minify-vscode", - "minify-vscode-reh": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js minify-vscode-reh", - "minify-vscode-reh-web": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js minify-vscode-reh-web", - "hygiene": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js hygiene", - "core-ci": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js core-ci", - "extensions-ci": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js extensions-ci" - }, - "dependencies_comment": "Move rimraf to dependencies because it is used in the postinstall script.", - "dependencies": { - "@coder/logger": "^1.1.16", - "applicationinsights": "1.0.8", - "chokidar": "3.5.1", - "graceful-fs": "4.2.3", - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.3", - "iconv-lite-umd": "0.6.8", - "jschardet": "2.3.0", - "minimist": "^1.2.5", - "native-is-elevated": "0.4.3", - "native-watchdog": "1.3.0", - "node-pty": "0.10.1", - "nsfw": "2.1.2", - "proxy-agent": "^4.0.1", - "proxy-from-env": "^1.1.0", - "spdlog": "^0.11.1", - "sudo-prompt": "9.2.1", - "tas-client-umd": "0.1.4", - "v8-inspect-profiler": "^0.0.20", - "vscode-oniguruma": "1.3.1", - "vscode-proxy-agent": "^0.11.0", - "vscode-regexpp": "^3.1.0", - "vscode-ripgrep": "^1.11.3", - "vscode-sqlite3": "4.0.11", - "vscode-textmate": "5.2.0", - "xterm": "4.12.0-beta.26", - "xterm-addon-search": "0.9.0-beta.2", - "xterm-addon-unicode11": "0.3.0-beta.5", - "xterm-addon-webgl": "0.11.0-beta.8", - "yauzl": "^2.9.2", - "yazl": "^2.4.3" - }, - "devDependencies_comment": "set gulp-rename to ~1.2.0 (instead of ^1.2.0), build breaks on 1.4.4", - "devDependencies": { - "7zip": "0.0.6", - "@types/applicationinsights": "0.20.0", - "@types/chokidar": "2.1.3", - "@types/cookie": "^0.3.3", - "@types/copy-webpack-plugin": "^6.0.3", - "@types/cssnano": "^4.0.0", - "@types/debug": "4.1.5", - "@types/graceful-fs": "4.1.2", - "@types/gulp-postcss": "^8.0.0", - "@types/http-proxy-agent": "^2.0.1", - "@types/minimist": "^1.2.1", - "@types/mocha": "^8.2.0", - "@types/node": "^14.14.37", - "@types/sinon": "^1.16.36", - "@types/trusted-types": "^1.0.6", - "@types/vscode-windows-registry": "^1.0.0", - "@types/webpack": "^4.41.25", - "@types/wicg-file-system-access": "^2020.9.1", - "@types/windows-foreground-love": "^0.3.0", - "@types/windows-mutex": "^0.4.0", - "@types/windows-process-tree": "^0.2.0", - "@types/winreg": "^1.2.30", - "@types/yauzl": "^2.9.1", - "@types/yazl": "^2.4.2", - "@typescript-eslint/eslint-plugin": "3.2.0", - "@typescript-eslint/parser": "^3.3.0", - "ansi-colors": "^3.2.3", - "asar": "^3.0.3", - "chromium-pickle-js": "^0.2.0", - "copy-webpack-plugin": "^6.0.3", - "cson-parser": "^1.3.3", - "css-loader": "^3.2.0", - "cssnano": "^4.1.11", - "debounce": "^1.0.0", - "deemon": "^1.4.0", - "eslint": "6.8.0", - "eslint-plugin-jsdoc": "^19.1.0", - "event-stream": "3.3.4", - "fancy-log": "^1.3.3", - "fast-plist": "0.1.2", - "file-loader": "^4.2.0", - "glob": "^5.0.13", - "gulp": "^4.0.0", - "gulp-atom-electron": "^1.30.1", - "gulp-azure-storage": "^0.11.1", - "gulp-bom": "^3.0.0", - "gulp-buffer": "0.0.2", - "gulp-concat": "^2.6.1", - "gulp-eslint": "^5.0.0", - "gulp-filter": "^5.1.0", - "gulp-flatmap": "^1.0.2", - "gulp-gunzip": "^1.0.0", - "gulp-gzip": "^1.4.2", - "gulp-json-editor": "^2.5.0", - "gulp-plumber": "^1.2.0", - "gulp-postcss": "^9.0.0", - "gulp-remote-retry-src": "^0.6.0", - "gulp-rename": "~1.2.0", - "gulp-replace": "^0.5.4", - "gulp-shell": "^0.6.5", - "gulp-sourcemaps": "^3.0.0", - "gulp-tsb": "4.0.6", - "gulp-untar": "^0.0.7", - "gulp-vinyl-zip": "^2.1.2", - "husky": "^0.13.1", - "innosetup": "6.0.5", - "is": "^3.1.0", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.0", - "jsdom-no-contextify": "^3.1.0", - "lazy.js": "^0.4.2", - "merge-options": "^1.0.1", - "mime": "^1.4.1", - "minimatch": "^3.0.4", - "minimist": "^1.2.5", - "mkdirp": "^1.0.4", - "mocha": "^8.2.1", - "mocha-junit-reporter": "^2.0.0", - "mocha-multi-reporters": "^1.5.1", - "npm-run-all": "^4.1.5", - "opn": "^6.0.0", - "optimist": "0.3.5", - "p-all": "^1.0.0", - "playwright": "1.8.0", - "pump": "^1.0.1", - "queue": "3.0.6", - "rcedit": "^1.1.0", - "request": "^2.85.0", - "rimraf": "^3.0.2", - "sinon": "^1.17.2", - "source-map": "0.6.1", - "source-map-support": "^0.3.2", - "style-loader": "^1.0.0", - "ts-loader": "^6.2.1", - "tsec": "0.1.4", - "typescript": "^4.3.0-dev.20210426", - "typescript-formatter": "7.1.0", - "underscore": "^1.8.2", - "vinyl": "^2.0.0", - "vinyl-fs": "^3.0.0", - "vscode-debugprotocol": "1.47.0", - "vscode-nls-dev": "^3.3.1", - "vscode-telemetry-extractor": "^1.7.0", - "webpack": "^4.43.0", - "webpack-cli": "^3.3.12", - "webpack-stream": "^5.2.1", - "xml2js": "^0.4.17", - "yaserver": "^0.2.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - }, - "bugs": { - "url": "https://github.com/microsoft/vscode/issues" - }, - "optionalDependencies": { - "vscode-windows-registry": "1.0.3", - "windows-foreground-love": "0.2.0", - "windows-mutex": "0.3.0", - "windows-process-tree": "0.3.0" - }, - "resolutions": { - "elliptic": "^6.5.3", - "nwmatcher": "^1.4.4" - } -} diff --git a/lib/vscode/product.json b/lib/vscode/product.json deleted file mode 100644 index df09a299f097..000000000000 --- a/lib/vscode/product.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "nameShort": "code-server", - "nameLong": "code-server", - "applicationName": "code-oss", - "dataFolderName": ".vscode-oss", - "win32MutexName": "vscodeoss", - "licenseName": "MIT", - "licenseUrl": "https://github.com/microsoft/vscode/blob/main/LICENSE.txt", - "win32DirName": "Microsoft Code OSS", - "win32NameVersion": "Microsoft Code OSS", - "win32RegValueName": "CodeOSS", - "win32AppId": "{{E34003BB-9E10-4501-8C11-BE3FAA83F23F}", - "win32x64AppId": "{{D77B7E06-80BA-4137-BCF4-654B95CCEBC5}", - "win32arm64AppId": "{{D1ACE434-89C5-48D1-88D3-E2991DF85475}", - "win32UserAppId": "{{C6065F05-9603-4FC4-8101-B9781A25D88E}", - "win32x64UserAppId": "{{CC6B787D-37A0-49E8-AE24-8559A032BE0C}", - "win32arm64UserAppId": "{{3AEBF0C8-F733-4AD4-BADE-FDB816D53D7B}", - "win32AppUserModelId": "Microsoft.CodeOSS", - "win32ShellNameShort": "C&ode - OSS", - "darwinBundleIdentifier": "com.visualstudio.code.oss", - "linuxIconName": "com.visualstudio.code.oss", - "licenseFileName": "LICENSE.txt", - "reportIssueUrl": "https://github.com/cdr/code-server/issues/new", - "urlProtocol": "code-oss", - "extensionAllowedProposedApi": [ - "ms-vscode.vscode-js-profile-flame", - "ms-vscode.vscode-js-profile-table", - "ms-vscode.github-browser", - "ms-vscode.github-richnav", - "ms-vscode.remotehub", - "ms-vscode.remotehub-insiders" - ], - "builtInExtensions": [ - { - "name": "ms-vscode.node-debug", - "version": "1.44.27", - "repo": "https://github.com/microsoft/vscode-node-debug", - "metadata": { - "id": "b6ded8fb-a0a0-4c1c-acbd-ab2a3bc995a6", - "publisherId": { - "publisherId": "5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee", - "publisherName": "ms-vscode", - "displayName": "Microsoft", - "flags": "verified" - }, - "publisherDisplayName": "Microsoft" - } - }, - { - "name": "ms-vscode.node-debug2", - "version": "1.42.6", - "repo": "https://github.com/microsoft/vscode-node-debug2", - "metadata": { - "id": "36d19e17-7569-4841-a001-947eb18602b2", - "publisherId": { - "publisherId": "5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee", - "publisherName": "ms-vscode", - "displayName": "Microsoft", - "flags": "verified" - }, - "publisherDisplayName": "Microsoft" - } - }, - { - "name": "ms-vscode.references-view", - "version": "0.0.80", - "repo": "https://github.com/microsoft/vscode-references-view", - "metadata": { - "id": "dc489f46-520d-4556-ae85-1f9eab3c412d", - "publisherId": { - "publisherId": "5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee", - "publisherName": "ms-vscode", - "displayName": "Microsoft", - "flags": "verified" - }, - "publisherDisplayName": "Microsoft" - } - }, - { - "name": "ms-vscode.js-debug-companion", - "version": "1.0.13", - "repo": "https://github.com/microsoft/vscode-js-debug-companion", - "metadata": { - "id": "99cb0b7f-7354-4278-b8da-6cc79972169d", - "publisherId": { - "publisherId": "5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee", - "publisherName": "ms-vscode", - "displayName": "Microsoft", - "flags": "verified" - }, - "publisherDisplayName": "Microsoft" - } - }, - { - "name": "ms-vscode.js-debug", - "version": "1.56.2", - "repo": "https://github.com/microsoft/vscode-js-debug", - "metadata": { - "id": "25629058-ddac-4e17-abba-74678e126c5d", - "publisherId": { - "publisherId": "5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee", - "publisherName": "ms-vscode", - "displayName": "Microsoft", - "flags": "verified" - }, - "publisherDisplayName": "Microsoft" - } - }, - { - "name": "ms-vscode.vscode-js-profile-table", - "version": "0.0.18", - "repo": "https://github.com/microsoft/vscode-js-profile-visualizer", - "metadata": { - "id": "7e52b41b-71ad-457b-ab7e-0620f1fc4feb", - "publisherId": { - "publisherId": "5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee", - "publisherName": "ms-vscode", - "displayName": "Microsoft", - "flags": "verified" - }, - "publisherDisplayName": "Microsoft" - } - }, - { - "name": "ms-vscode.remotehub", - "version": "0.5.3", - "repo": "https://github.com/microsoft/vscode-remotehub", - "metadata": { - "id": "ed0ffe1d-36f0-49a0-bafe-da68355eb33a", - "publisherId": { - "publisherId": "5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee", - "publisherName": "ms-vscode", - "displayName": "Microsoft", - "flags": "verified" - }, - "publisherDisplayName": "Microsoft" - } - } - ], - "webBuiltInExtensions": [ - { - "name": "ms-vscode.remotehub", - "version": "0.5.3", - "repo": "https://github.com/microsoft/vscode-remotehub", - "metadata": { - "id": "ed0ffe1d-36f0-49a0-bafe-da68355eb33a", - "publisherId": { - "publisherId": "5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee", - "publisherName": "ms-vscode", - "displayName": "Microsoft", - "flags": "verified" - }, - "publisherDisplayName": "Microsoft" - } - } - ], - - "//": "https://github.com/VSCodium/vscodium/pull/155/files", - "documentationUrl": "https://go.microsoft.com/fwlink/?LinkID=533484#vscode", - "keyboardShortcutsUrlMac": "https://go.microsoft.com/fwlink/?linkid=832143", - "keyboardShortcutsUrlLinux": "https://go.microsoft.com/fwlink/?linkid=832144", - "keyboardShortcutsUrlWin": "https://go.microsoft.com/fwlink/?linkid=832145", - "introductoryVideosUrl": "https://go.microsoft.com/fwlink/?linkid=832146", - "tipsAndTricksUrl": "https://go.microsoft.com/fwlink/?linkid=852118", - "newsletterSignupUrl": "https://www.research.net/r/vsc-newsletter" -} diff --git a/lib/vscode/remote/package.json b/lib/vscode/remote/package.json deleted file mode 100644 index ff56643c0c83..000000000000 --- a/lib/vscode/remote/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "vscode-reh", - "version": "0.0.0", - "private": true, - "dependencies": { - "applicationinsights": "1.0.8", - "chokidar": "3.5.1", - "cookie": "^0.4.0", - "graceful-fs": "4.2.3", - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.3", - "iconv-lite-umd": "0.6.8", - "jschardet": "2.3.0", - "minimist": "^1.2.5", - "native-watchdog": "1.3.0", - "node-pty": "0.10.1", - "nsfw": "2.1.2", - "spdlog": "^0.11.1", - "tas-client-umd": "0.1.4", - "vscode-oniguruma": "1.3.1", - "vscode-proxy-agent": "^0.11.0", - "vscode-regexpp": "^3.1.0", - "vscode-ripgrep": "^1.11.3", - "vscode-textmate": "5.2.0", - "xterm": "4.12.0-beta.26", - "xterm-addon-search": "0.9.0-beta.2", - "xterm-addon-unicode11": "0.3.0-beta.5", - "xterm-addon-webgl": "0.11.0-beta.8", - "yauzl": "^2.9.2", - "yazl": "^2.4.3" - }, - "optionalDependencies": { - "vscode-windows-registry": "1.0.2", - "windows-process-tree": "0.2.4" - } -} diff --git a/lib/vscode/remote/web/package.json b/lib/vscode/remote/web/package.json deleted file mode 100644 index 317ccc0dcd2d..000000000000 --- a/lib/vscode/remote/web/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "vscode-web", - "version": "0.0.0", - "private": true, - "dependencies": { - "iconv-lite-umd": "0.6.8", - "jschardet": "2.3.0", - "tas-client-umd": "0.1.4", - "vscode-oniguruma": "1.3.1", - "vscode-textmate": "5.2.0", - "xterm": "4.12.0-beta.26", - "xterm-addon-search": "0.9.0-beta.2", - "xterm-addon-unicode11": "0.3.0-beta.5", - "xterm-addon-webgl": "0.11.0-beta.8" - } -} diff --git a/lib/vscode/remote/web/yarn.lock b/lib/vscode/remote/web/yarn.lock deleted file mode 100644 index 6f88d68228b0..000000000000 --- a/lib/vscode/remote/web/yarn.lock +++ /dev/null @@ -1,48 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -iconv-lite-umd@0.6.8: - version "0.6.8" - resolved "https://registry.yarnpkg.com/iconv-lite-umd/-/iconv-lite-umd-0.6.8.tgz#5ad310ec126b260621471a2d586f7f37b9958ec0" - integrity sha512-zvXJ5gSwMC9JD3wDzH8CoZGc1pbiJn12Tqjk8BXYCnYz3hYL5GRjHW8LEykjXhV9WgNGI4rgpgHcbIiBfrRq6A== - -jschardet@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-2.3.0.tgz#06e2636e16c8ada36feebbdc08aa34e6a9b3ff75" - integrity sha512-6I6xT7XN/7sBB7q8ObzKbmv5vN+blzLcboDE1BNEsEfmRXJValMxO6OIRT69ylPBRemS3rw6US+CMCar0OBc9g== - -tas-client-umd@0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/tas-client-umd/-/tas-client-umd-0.1.4.tgz#49db4130dd63a8342fabf77185a740fc6a7bea80" - integrity sha512-1hFqJeLD3ryNikniIaO7TItlXhS5vx7bJ+wbPDf8o+IifgwwOWK2ARisdEM9SnJd0ccfcwNPG6Po+RiKn5L2hg== - -vscode-oniguruma@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.3.1.tgz#e2383879c3485b19f533ec34efea9d7a2b14be8f" - integrity sha512-gz6ZBofA7UXafVA+m2Yt2zHKgXC2qedArprIsHAPKByTkwq9l5y/izAGckqxYml7mSbYxTRTfdRwsFq3cwF4LQ== - -vscode-textmate@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e" - integrity sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ== - -xterm-addon-search@0.9.0-beta.2: - version "0.9.0-beta.2" - resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.2.tgz#46de7c7d5f1d0ae546b84552c08182916d83025d" - integrity sha512-Ljg+O8HcGx1z2RjpV+nX070zpSjmefU09SFPBVWAHjGT983y6b5yoqG7AVVZdirsJ0zGiccAZL9Kila1CQN6nQ== - -xterm-addon-unicode11@0.3.0-beta.5: - version "0.3.0-beta.5" - resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.3.0-beta.5.tgz#7e490799d530d3b301125c7a4e92317c161761c4" - integrity sha512-SgDDL3PoMH1G48JO6T45whKAex4NPxi80UzUVitnrqyd8dFQP+oF6cxqUutULgm9HSGk62qy3mrZvIMGO5VXog== - -xterm-addon-webgl@0.11.0-beta.8: - version "0.11.0-beta.8" - resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.11.0-beta.8.tgz#8cb4925d67c31beb8144275daf46358f42eff9fe" - integrity sha512-udRmQ/jgH8cL8VQOZweytkToIROevVeiA7WY0tIe878Wt2zKY+AYHZV8js3c1W9wHDu5G90BhmzTidJ5UwZK3Q== - -xterm@4.12.0-beta.26: - version "4.12.0-beta.26" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.12.0-beta.26.tgz#57c75b732808795398a66bc1a3e06d09eaff2ada" - integrity sha512-yZB1kMBXQu2G0G1ch7TUi6f893iTZC+tmfjw/PQNZTmN46b4oX1l7rplc3sFcdrICHtmQ0Q5n1u0d6WUAdq1Kw== diff --git a/lib/vscode/remote/yarn.lock b/lib/vscode/remote/yarn.lock deleted file mode 100644 index 2a0d2ccc6c6f..000000000000 --- a/lib/vscode/remote/yarn.lock +++ /dev/null @@ -1,580 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@tootallnate/once@1", "@tootallnate/once@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - -agent-base@4: - version "4.2.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.0.tgz#9838b5c3392b962bad031e6a4c5e1024abec45ce" - integrity sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg== - dependencies: - es6-promisify "^5.0.0" - -agent-base@5: - version "5.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" - integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== - -agent-base@6, agent-base@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== - dependencies: - es6-promisify "^5.0.0" - -anymatch@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" - integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -applicationinsights@1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.0.8.tgz#db6e3d983cf9f9405fe1ee5ba30ac6e1914537b5" - integrity sha512-KzOOGdphOS/lXWMFZe5440LUdFbrLpMvh2SaRxn7BmiI550KAoSb2gIhiq6kJZ9Ir3AxRRztjhzif+e5P5IXIg== - dependencies: - diagnostic-channel "0.2.0" - diagnostic-channel-publishers "0.2.1" - zone.js "0.7.6" - -binary-extensions@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" - integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== - -bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= - -chokidar@3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" - integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.5.0" - optionalDependencies: - fsevents "~2.3.1" - -cookie@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" - integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -data-uri-to-buffer@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" - integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== - -debug@3.1.0, debug@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -debug@4: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - -debug@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - dependencies: - ms "2.1.2" - -diagnostic-channel-publishers@0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.2.1.tgz#8e2d607a8b6d79fe880b548bc58cc6beb288c4f3" - integrity sha1-ji1geottef6IC1SLxYzGvrKIxPM= - -diagnostic-channel@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/diagnostic-channel/-/diagnostic-channel-0.2.0.tgz#cc99af9612c23fb1fff13612c72f2cbfaa8d5a17" - integrity sha1-zJmvlhLCP7H/8TYSxy8sv6qNWhc= - dependencies: - semver "^5.3.0" - -es6-promise@^4.0.3: - version "4.2.4" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" - integrity sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= - dependencies: - pend "~1.2.0" - -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - -file-uri-to-path@2: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz#7b415aeba227d575851e0a5b0c640d7656403fba" - integrity sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg== - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -fs-extra@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fsevents@~2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.1.tgz#b209ab14c61012636c8863507edf7fb68cc54e9f" - integrity sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw== - -ftp@^0.3.10: - version "0.3.10" - resolved "https://registry.yarnpkg.com/ftp/-/ftp-0.3.10.tgz#9197d861ad8142f3e63d5a83bfe4c59f7330885d" - integrity sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0= - dependencies: - readable-stream "1.1.x" - xregexp "2.0.0" - -get-uri@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-3.0.2.tgz#f0ef1356faabc70e1f9404fa3b66b2ba9bfc725c" - integrity sha512-+5s0SJbGoyiJTZZ2JTpFPLMPSch72KEqGOTvQsBqg0RBWvwhWUSYZFAtz3TPW0GXJuLBJPts1E241iHg+VRfhg== - dependencies: - "@tootallnate/once" "1" - data-uri-to-buffer "3" - debug "4" - file-uri-to-path "2" - fs-extra "^8.1.0" - ftp "^0.3.10" - -glob-parent@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" - integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== - dependencies: - is-glob "^4.0.1" - -graceful-fs@4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" - integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== - -graceful-fs@^4.1.6, graceful-fs@^4.2.0: - version "4.2.6" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" - integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== - -http-proxy-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" - integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== - dependencies: - agent-base "4" - debug "3.1.0" - -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - -https-proxy-agent@^2.2.3: - version "2.2.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" - integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - -https-proxy-agent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" - integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== - dependencies: - agent-base "5" - debug "4" - -https-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" - integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== - dependencies: - agent-base "6" - debug "4" - -iconv-lite-umd@0.6.8: - version "0.6.8" - resolved "https://registry.yarnpkg.com/iconv-lite-umd/-/iconv-lite-umd-0.6.8.tgz#5ad310ec126b260621471a2d586f7f37b9958ec0" - integrity sha512-zvXJ5gSwMC9JD3wDzH8CoZGc1pbiJn12Tqjk8BXYCnYz3hYL5GRjHW8LEykjXhV9WgNGI4rgpgHcbIiBfrRq6A== - -inherits@~2.0.1: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ip@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - -jschardet@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-2.3.0.tgz#06e2636e16c8ada36feebbdc08aa34e6a9b3ff75" - integrity sha512-6I6xT7XN/7sBB7q8ObzKbmv5vN+blzLcboDE1BNEsEfmRXJValMxO6OIRT69ylPBRemS3rw6US+CMCar0OBc9g== - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: - graceful-fs "^4.1.6" - -minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -mkdirp@^0.5.1: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.2, ms@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -nan@^2.13.2: - version "2.14.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" - integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== - -nan@^2.14.0: - version "2.14.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" - integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== - -native-watchdog@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/native-watchdog/-/native-watchdog-1.3.0.tgz#88cee94c9dc766b85c8506eda14c8bd8c9618e27" - integrity sha512-WOjGRNGkYZ5MXsntcvCYrKtSYMaewlbCFplbcUVo9bE80LPVt8TAVFHYWB8+a6fWCGYheq21+Wtt6CJrUaCJhw== - -node-addon-api@*, node-addon-api@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.1.0.tgz#98b21931557466c6729e51cb77cd39c965f42239" - integrity sha512-flmrDNB06LIl5lywUz7YlNGZH/5p0M7W28k8hzd9Lshtdh1wshD2Y+U4h9LD6KObOy1f+fEVdgprPrEymjM5uw== - -node-pty@0.10.1: - version "0.10.1" - resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.10.1.tgz#cd05d03a2710315ec40221232ec04186f6ac2c6d" - integrity sha512-JTdtUS0Im/yRsWJSx7yiW9rtpfmxqxolrtnyKwPLI+6XqTAPW/O2MjS8FYL4I5TsMbH2lVgDb2VMjp+9LoQGNg== - dependencies: - nan "^2.14.0" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -nsfw@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/nsfw/-/nsfw-2.1.2.tgz#4fa841e7f7122b60b2e1f61187d1b57ad3403428" - integrity sha512-zGPdt32aJ5b1laK9rvgXQmXGAagrx3VkcMt0JePtu6wBfzC1o4xLCM3kq7FxZxUnxyxYhODyBYzpt3H16FhaGA== - dependencies: - node-addon-api "*" - -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= - -picomatch@^2.0.4: - version "2.0.7" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.0.7.tgz#514169d8c7cd0bdbeecc8a2609e34a7163de69f6" - integrity sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA== - -picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -readable-stream@1.1.x: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readdirp@~3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" - integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== - dependencies: - picomatch "^2.2.1" - -semver@^5.3.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" - integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== - -smart-buffer@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" - integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== - -socks-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.0.tgz#7c0f364e7b1cf4a7a437e71253bed72e9004be60" - integrity sha512-lEpa1zsWCChxiynk+lCycKuC502RxDWLKJZoIhnxrWNjLSDGYRFflHA1/228VkRcnv9TIb8w98derGbpKxJRgA== - dependencies: - agent-base "6" - debug "4" - socks "^2.3.3" - -socks@^2.3.3: - version "2.6.1" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.1.tgz#989e6534a07cf337deb1b1c94aaa44296520d30e" - integrity sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA== - dependencies: - ip "^1.1.5" - smart-buffer "^4.1.0" - -spdlog@^0.11.1: - version "0.11.1" - resolved "https://registry.yarnpkg.com/spdlog/-/spdlog-0.11.1.tgz#29721b31018a5fe6a3ce2531f9d8d43e0bd6b825" - integrity sha512-M+sg9/Tnr0lrfnW2/hqgpoc4Z8Jzq7W8NUn35iiSslj+1uj1pgutI60MCpulDP2QyFzOpC8VsJmYD6Fub7wHoA== - dependencies: - bindings "^1.5.0" - mkdirp "^0.5.1" - nan "^2.14.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= - -tas-client-umd@0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/tas-client-umd/-/tas-client-umd-0.1.4.tgz#49db4130dd63a8342fabf77185a740fc6a7bea80" - integrity sha512-1hFqJeLD3ryNikniIaO7TItlXhS5vx7bJ+wbPDf8o+IifgwwOWK2ARisdEM9SnJd0ccfcwNPG6Po+RiKn5L2hg== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -vscode-oniguruma@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.3.1.tgz#e2383879c3485b19f533ec34efea9d7a2b14be8f" - integrity sha512-gz6ZBofA7UXafVA+m2Yt2zHKgXC2qedArprIsHAPKByTkwq9l5y/izAGckqxYml7mSbYxTRTfdRwsFq3cwF4LQ== - -vscode-proxy-agent@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/vscode-proxy-agent/-/vscode-proxy-agent-0.11.0.tgz#9dc8d2bb9d448f1e33bb1caef97a741289660f2f" - integrity sha512-Y5mHjDGq/OKOvKG0IwCYfj25cvQ2cLEil8ce8n55IZHRAP9RF3e1sKU4ZUNDB8X2NIpKwyltrWpK9tFFE/kc3g== - dependencies: - "@tootallnate/once" "^1.1.2" - agent-base "^6.0.2" - debug "^4.3.1" - get-uri "^3.0.2" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - socks-proxy-agent "^5.0.0" - optionalDependencies: - vscode-windows-ca-certs "^0.3.0" - -vscode-regexpp@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/vscode-regexpp/-/vscode-regexpp-3.1.0.tgz#42d059b6fffe99bd42939c0d013f632f0cad823f" - integrity sha512-pqtN65VC1jRLawfluX4Y80MMG0DHJydWhe5ZwMHewZD6sys4LbU6lHwFAHxeuaVE6Y6+xZOtAw+9hvq7/0ejkg== - -vscode-ripgrep@^1.11.3: - version "1.11.3" - resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.11.3.tgz#a997f4f4535dfeb9d775f04053c1247454d7a37a" - integrity sha512-fdD+BciXiEO1iWTrV/S3sAthlK/tHRBjHF+aJIZDxUMD/q9wpNq+YPFEiLCrW+8epahfR19241DeVHHgX/I4Ww== - dependencies: - https-proxy-agent "^4.0.0" - proxy-from-env "^1.1.0" - -vscode-textmate@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e" - integrity sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ== - -vscode-windows-ca-certs@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/vscode-windows-ca-certs/-/vscode-windows-ca-certs-0.3.0.tgz#324e1f8ba842bbf048a39e7c0ee8fe655e9adfcc" - integrity sha512-CYrpCEKmAFQJoZNReOrelNL+VKyebOVRCqL9evrBlVcpWQDliliJgU5RggGS8FPGtQ3jAKLQt9frF0qlxYYPKA== - dependencies: - node-addon-api "^3.0.2" - -vscode-windows-registry@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/vscode-windows-registry/-/vscode-windows-registry-1.0.2.tgz#b863e704a6a69c50b3098a55fbddbe595b0c124a" - integrity sha512-/CLLvuOSM2Vme2z6aNyB+4Omd7hDxpf4Thrt8ImxnXeQtxzel2bClJpFQvQqK/s4oaXlkBKS7LqVLeZM+uSVIA== - -windows-process-tree@0.2.4: - version "0.2.4" - resolved "https://registry.yarnpkg.com/windows-process-tree/-/windows-process-tree-0.2.4.tgz#747af587b54cc6c996f2be0836cc8a8fd0dc038f" - integrity sha512-9gag9AHm3Iin/4YC1EwoIfZlqW/rG2eV7rJZ4Fy5NnAMGdewmnwsie5Rz+CJo2vSolqzzfw7hPeu3oOdniNejg== - dependencies: - nan "^2.13.2" - -xregexp@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-2.0.0.tgz#52a63e56ca0b84a7f3a5f3d61872f126ad7a5943" - integrity sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM= - -xterm-addon-search@0.9.0-beta.2: - version "0.9.0-beta.2" - resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.2.tgz#46de7c7d5f1d0ae546b84552c08182916d83025d" - integrity sha512-Ljg+O8HcGx1z2RjpV+nX070zpSjmefU09SFPBVWAHjGT983y6b5yoqG7AVVZdirsJ0zGiccAZL9Kila1CQN6nQ== - -xterm-addon-unicode11@0.3.0-beta.5: - version "0.3.0-beta.5" - resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.3.0-beta.5.tgz#7e490799d530d3b301125c7a4e92317c161761c4" - integrity sha512-SgDDL3PoMH1G48JO6T45whKAex4NPxi80UzUVitnrqyd8dFQP+oF6cxqUutULgm9HSGk62qy3mrZvIMGO5VXog== - -xterm-addon-webgl@0.11.0-beta.8: - version "0.11.0-beta.8" - resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.11.0-beta.8.tgz#8cb4925d67c31beb8144275daf46358f42eff9fe" - integrity sha512-udRmQ/jgH8cL8VQOZweytkToIROevVeiA7WY0tIe878Wt2zKY+AYHZV8js3c1W9wHDu5G90BhmzTidJ5UwZK3Q== - -xterm@4.12.0-beta.26: - version "4.12.0-beta.26" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.12.0-beta.26.tgz#57c75b732808795398a66bc1a3e06d09eaff2ada" - integrity sha512-yZB1kMBXQu2G0G1ch7TUi6f893iTZC+tmfjw/PQNZTmN46b4oX1l7rplc3sFcdrICHtmQ0Q5n1u0d6WUAdq1Kw== - -yauzl@^2.9.2: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" - -yazl@^2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.4.3.tgz#ec26e5cc87d5601b9df8432dbdd3cd2e5173a071" - integrity sha1-7CblzIfVYBud+EMtvdPNLlFzoHE= - dependencies: - buffer-crc32 "~0.2.3" - -zone.js@0.7.6: - version "0.7.6" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.7.6.tgz#fbbc39d3e0261d0986f1ba06306eb3aeb0d22009" - integrity sha1-+7w50+AmHQmG8boGMG6zrrDSIAk= diff --git a/lib/vscode/scripts/test.sh b/lib/vscode/scripts/test.sh deleted file mode 100755 index 7594af3d9762..000000000000 --- a/lib/vscode/scripts/test.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -set -e - -if [[ "$OSTYPE" == "darwin"* ]]; then - realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; } - ROOT=$(dirname $(dirname $(realpath "$0"))) -else - ROOT=$(dirname $(dirname $(readlink -f $0))) - # Electron 6 introduces a chrome-sandbox that requires root to run. This can fail. Disable sandbox via --no-sandbox. - LINUX_EXTRA_ARGS="--no-sandbox --disable-dev-shm-usage --use-gl=swiftshader" -fi - -cd $ROOT - -if [[ "$OSTYPE" == "darwin"* ]]; then - NAME=`node -p "require('./product.json').nameLong"` - CODE="./.build/electron/$NAME.app/Contents/MacOS/Electron" -else - NAME=`node -p "require('./product.json').applicationName"` - CODE=".build/electron/$NAME" -fi - -# Node modules -test -d node_modules || yarn - -# Get electron -yarn electron - -# Unit Tests -if [[ "$OSTYPE" == "darwin"* ]]; then - cd $ROOT ; ulimit -n 4096 ; \ - ELECTRON_ENABLE_LOGGING=1 \ - "$CODE" \ - test/unit/electron/index.js "$@" -else - cd $ROOT ; \ - ELECTRON_ENABLE_LOGGING=1 \ - "$CODE" \ - test/unit/electron/index.js $LINUX_EXTRA_ARGS "$@" -fi diff --git a/lib/vscode/src/typings/electron.d.ts b/lib/vscode/src/typings/electron.d.ts deleted file mode 100644 index d093c27fc464..000000000000 --- a/lib/vscode/src/typings/electron.d.ts +++ /dev/null @@ -1,16051 +0,0 @@ -// Type definitions for Electron 12.0.5 -// Project: http://electronjs.org/ -// Definitions by: The Electron Team -// Definitions: https://github.com/electron/electron-typescript-definitions - -/// - -type GlobalEvent = Event & { returnValue: any }; - -declare namespace Electron { - const NodeEventEmitter: typeof import('events').EventEmitter; - - class Accelerator extends String { - - } - interface App extends NodeJS.EventEmitter { - - // Docs: https://electronjs.org/docs/api/app - - /** - * Emitted when Chrome's accessibility support changes. This event fires when - * assistive technologies, such as screen readers, are enabled or disabled. See - * https://www.chromium.org/developers/design-documents/accessibility for more - * details. - * - * @platform darwin,win32 - */ - on(event: 'accessibility-support-changed', listener: (event: Event, - /** - * `true` when Chrome's accessibility support is enabled, `false` otherwise. - */ - accessibilitySupportEnabled: boolean) => void): this; - once(event: 'accessibility-support-changed', listener: (event: Event, - /** - * `true` when Chrome's accessibility support is enabled, `false` otherwise. - */ - accessibilitySupportEnabled: boolean) => void): this; - addListener(event: 'accessibility-support-changed', listener: (event: Event, - /** - * `true` when Chrome's accessibility support is enabled, `false` otherwise. - */ - accessibilitySupportEnabled: boolean) => void): this; - removeListener(event: 'accessibility-support-changed', listener: (event: Event, - /** - * `true` when Chrome's accessibility support is enabled, `false` otherwise. - */ - accessibilitySupportEnabled: boolean) => void): this; - /** - * Emitted when the application is activated. Various actions can trigger this - * event, such as launching the application for the first time, attempting to - * re-launch the application when it's already running, or clicking on the - * application's dock or taskbar icon. - * - * @platform darwin - */ - on(event: 'activate', listener: (event: Event, - hasVisibleWindows: boolean) => void): this; - once(event: 'activate', listener: (event: Event, - hasVisibleWindows: boolean) => void): this; - addListener(event: 'activate', listener: (event: Event, - hasVisibleWindows: boolean) => void): this; - removeListener(event: 'activate', listener: (event: Event, - hasVisibleWindows: boolean) => void): this; - /** - * Emitted during Handoff after an activity from this device was successfully - * resumed on another one. - * - * @platform darwin - */ - on(event: 'activity-was-continued', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * Contains app-specific state stored by the activity. - */ - userInfo: unknown) => void): this; - once(event: 'activity-was-continued', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * Contains app-specific state stored by the activity. - */ - userInfo: unknown) => void): this; - addListener(event: 'activity-was-continued', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * Contains app-specific state stored by the activity. - */ - userInfo: unknown) => void): this; - removeListener(event: 'activity-was-continued', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * Contains app-specific state stored by the activity. - */ - userInfo: unknown) => void): this; - /** - * Emitted before the application starts closing its windows. Calling - * `event.preventDefault()` will prevent the default behavior, which is terminating - * the application. - * - * **Note:** If application quit was initiated by `autoUpdater.quitAndInstall()`, - * then `before-quit` is emitted *after* emitting `close` event on all windows and - * closing them. - * - * **Note:** On Windows, this event will not be emitted if the app is closed due to - * a shutdown/restart of the system or a user logout. - */ - on(event: 'before-quit', listener: (event: Event) => void): this; - once(event: 'before-quit', listener: (event: Event) => void): this; - addListener(event: 'before-quit', listener: (event: Event) => void): this; - removeListener(event: 'before-quit', listener: (event: Event) => void): this; - /** - * Emitted when a browserWindow gets blurred. - */ - on(event: 'browser-window-blur', listener: (event: Event, - window: BrowserWindow) => void): this; - once(event: 'browser-window-blur', listener: (event: Event, - window: BrowserWindow) => void): this; - addListener(event: 'browser-window-blur', listener: (event: Event, - window: BrowserWindow) => void): this; - removeListener(event: 'browser-window-blur', listener: (event: Event, - window: BrowserWindow) => void): this; - /** - * Emitted when a new browserWindow is created. - */ - on(event: 'browser-window-created', listener: (event: Event, - window: BrowserWindow) => void): this; - once(event: 'browser-window-created', listener: (event: Event, - window: BrowserWindow) => void): this; - addListener(event: 'browser-window-created', listener: (event: Event, - window: BrowserWindow) => void): this; - removeListener(event: 'browser-window-created', listener: (event: Event, - window: BrowserWindow) => void): this; - /** - * Emitted when a browserWindow gets focused. - */ - on(event: 'browser-window-focus', listener: (event: Event, - window: BrowserWindow) => void): this; - once(event: 'browser-window-focus', listener: (event: Event, - window: BrowserWindow) => void): this; - addListener(event: 'browser-window-focus', listener: (event: Event, - window: BrowserWindow) => void): this; - removeListener(event: 'browser-window-focus', listener: (event: Event, - window: BrowserWindow) => void): this; - /** - * Emitted when failed to verify the `certificate` for `url`, to trust the - * certificate you should prevent the default behavior with - * `event.preventDefault()` and call `callback(true)`. - */ - on(event: 'certificate-error', listener: (event: Event, - webContents: WebContents, - url: string, - /** - * The error code - */ - error: string, - certificate: Certificate, - callback: (isTrusted: boolean) => void) => void): this; - once(event: 'certificate-error', listener: (event: Event, - webContents: WebContents, - url: string, - /** - * The error code - */ - error: string, - certificate: Certificate, - callback: (isTrusted: boolean) => void) => void): this; - addListener(event: 'certificate-error', listener: (event: Event, - webContents: WebContents, - url: string, - /** - * The error code - */ - error: string, - certificate: Certificate, - callback: (isTrusted: boolean) => void) => void): this; - removeListener(event: 'certificate-error', listener: (event: Event, - webContents: WebContents, - url: string, - /** - * The error code - */ - error: string, - certificate: Certificate, - callback: (isTrusted: boolean) => void) => void): this; - /** - * Emitted when the child process unexpectedly disappears. This is normally because - * it was crashed or killed. It does not include renderer processes. - */ - on(event: 'child-process-gone', listener: (event: Event, - details: Details) => void): this; - once(event: 'child-process-gone', listener: (event: Event, - details: Details) => void): this; - addListener(event: 'child-process-gone', listener: (event: Event, - details: Details) => void): this; - removeListener(event: 'child-process-gone', listener: (event: Event, - details: Details) => void): this; - /** - * Emitted during Handoff when an activity from a different device wants to be - * resumed. You should call `event.preventDefault()` if you want to handle this - * event. - * - * A user activity can be continued only in an app that has the same developer Team - * ID as the activity's source app and that supports the activity's type. Supported - * activity types are specified in the app's `Info.plist` under the - * `NSUserActivityTypes` key. - * - * @platform darwin - */ - on(event: 'continue-activity', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * Contains app-specific state stored by the activity on another device. - */ - userInfo: unknown) => void): this; - once(event: 'continue-activity', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * Contains app-specific state stored by the activity on another device. - */ - userInfo: unknown) => void): this; - addListener(event: 'continue-activity', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * Contains app-specific state stored by the activity on another device. - */ - userInfo: unknown) => void): this; - removeListener(event: 'continue-activity', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * Contains app-specific state stored by the activity on another device. - */ - userInfo: unknown) => void): this; - /** - * Emitted during Handoff when an activity from a different device fails to be - * resumed. - * - * @platform darwin - */ - on(event: 'continue-activity-error', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * A string with the error's localized description. - */ - error: string) => void): this; - once(event: 'continue-activity-error', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * A string with the error's localized description. - */ - error: string) => void): this; - addListener(event: 'continue-activity-error', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * A string with the error's localized description. - */ - error: string) => void): this; - removeListener(event: 'continue-activity-error', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * A string with the error's localized description. - */ - error: string) => void): this; - /** - * Emitted when `desktopCapturer.getSources()` is called in the renderer process of - * `webContents`. Calling `event.preventDefault()` will make it return empty - * sources. - */ - on(event: 'desktop-capturer-get-sources', listener: (event: Event, - webContents: WebContents) => void): this; - once(event: 'desktop-capturer-get-sources', listener: (event: Event, - webContents: WebContents) => void): this; - addListener(event: 'desktop-capturer-get-sources', listener: (event: Event, - webContents: WebContents) => void): this; - removeListener(event: 'desktop-capturer-get-sources', listener: (event: Event, - webContents: WebContents) => void): this; - /** - * Emitted when mac application become active. Difference from `activate` event is - * that `did-become-active` is emitted every time the app becomes active, not only - * when Dock icon is clicked or application is re-launched. - * - * @platform darwin - */ - on(event: 'did-become-active', listener: (event: Event) => void): this; - once(event: 'did-become-active', listener: (event: Event) => void): this; - addListener(event: 'did-become-active', listener: (event: Event) => void): this; - removeListener(event: 'did-become-active', listener: (event: Event) => void): this; - /** - * Emitted whenever there is a GPU info update. - */ - on(event: 'gpu-info-update', listener: Function): this; - once(event: 'gpu-info-update', listener: Function): this; - addListener(event: 'gpu-info-update', listener: Function): this; - removeListener(event: 'gpu-info-update', listener: Function): this; - /** - * Emitted when the GPU process crashes or is killed. - * - * **Deprecated:** This event is superceded by the `child-process-gone` event which - * contains more information about why the child process disappeared. It isn't - * always because it crashed. The `killed` boolean can be replaced by checking - * `reason === 'killed'` when you switch to that event. - * - * @deprecated - */ - on(event: 'gpu-process-crashed', listener: (event: Event, - killed: boolean) => void): this; - once(event: 'gpu-process-crashed', listener: (event: Event, - killed: boolean) => void): this; - addListener(event: 'gpu-process-crashed', listener: (event: Event, - killed: boolean) => void): this; - removeListener(event: 'gpu-process-crashed', listener: (event: Event, - killed: boolean) => void): this; - /** - * Emitted when `webContents` wants to do basic auth. - * - * The default behavior is to cancel all authentications. To override this you - * should prevent the default behavior with `event.preventDefault()` and call - * `callback(username, password)` with the credentials. - * - * If `callback` is called without a username or password, the authentication - * request will be cancelled and the authentication error will be returned to the - * page. - */ - on(event: 'login', listener: (event: Event, - webContents: WebContents, - authenticationResponseDetails: AuthenticationResponseDetails, - authInfo: AuthInfo, - callback: (username?: string, password?: string) => void) => void): this; - once(event: 'login', listener: (event: Event, - webContents: WebContents, - authenticationResponseDetails: AuthenticationResponseDetails, - authInfo: AuthInfo, - callback: (username?: string, password?: string) => void) => void): this; - addListener(event: 'login', listener: (event: Event, - webContents: WebContents, - authenticationResponseDetails: AuthenticationResponseDetails, - authInfo: AuthInfo, - callback: (username?: string, password?: string) => void) => void): this; - removeListener(event: 'login', listener: (event: Event, - webContents: WebContents, - authenticationResponseDetails: AuthenticationResponseDetails, - authInfo: AuthInfo, - callback: (username?: string, password?: string) => void) => void): this; - /** - * Emitted when the user clicks the native macOS new tab button. The new tab button - * is only visible if the current `BrowserWindow` has a `tabbingIdentifier` - * - * @platform darwin - */ - on(event: 'new-window-for-tab', listener: (event: Event) => void): this; - once(event: 'new-window-for-tab', listener: (event: Event) => void): this; - addListener(event: 'new-window-for-tab', listener: (event: Event) => void): this; - removeListener(event: 'new-window-for-tab', listener: (event: Event) => void): this; - /** - * Emitted when the user wants to open a file with the application. The `open-file` - * event is usually emitted when the application is already open and the OS wants - * to reuse the application to open the file. `open-file` is also emitted when a - * file is dropped onto the dock and the application is not yet running. Make sure - * to listen for the `open-file` event very early in your application startup to - * handle this case (even before the `ready` event is emitted). - * - * You should call `event.preventDefault()` if you want to handle this event. - * - * On Windows, you have to parse `process.argv` (in the main process) to get the - * filepath. - * - * @platform darwin - */ - on(event: 'open-file', listener: (event: Event, - path: string) => void): this; - once(event: 'open-file', listener: (event: Event, - path: string) => void): this; - addListener(event: 'open-file', listener: (event: Event, - path: string) => void): this; - removeListener(event: 'open-file', listener: (event: Event, - path: string) => void): this; - /** - * Emitted when the user wants to open a URL with the application. Your - * application's `Info.plist` file must define the URL scheme within the - * `CFBundleURLTypes` key, and set `NSPrincipalClass` to `AtomApplication`. - * -You should call `event.preventDefault()` if you want to handle this event. - * - * @platform darwin - */ - on(event: 'open-url', listener: (event: Event, - url: string) => void): this; - once(event: 'open-url', listener: (event: Event, - url: string) => void): this; - addListener(event: 'open-url', listener: (event: Event, - url: string) => void): this; - removeListener(event: 'open-url', listener: (event: Event, - url: string) => void): this; - /** - * Emitted when the application is quitting. - * - * **Note:** On Windows, this event will not be emitted if the app is closed due to - * a shutdown/restart of the system or a user logout. - */ - on(event: 'quit', listener: (event: Event, - exitCode: number) => void): this; - once(event: 'quit', listener: (event: Event, - exitCode: number) => void): this; - addListener(event: 'quit', listener: (event: Event, - exitCode: number) => void): this; - removeListener(event: 'quit', listener: (event: Event, - exitCode: number) => void): this; - /** - * Emitted once, when Electron has finished initializing. On macOS, `launchInfo` - * holds the `userInfo` of the `NSUserNotification` or information from - * `UNNotificationResponse` that was used to open the application, if it was - * launched from Notification Center. You can also call `app.isReady()` to check if - * this event has already fired and `app.whenReady()` to get a Promise that is - * fulfilled when Electron is initialized. - */ - on(event: 'ready', listener: (event: Event, - launchInfo: (Record) | (NotificationResponse)) => void): this; - once(event: 'ready', listener: (event: Event, - launchInfo: (Record) | (NotificationResponse)) => void): this; - addListener(event: 'ready', listener: (event: Event, - launchInfo: (Record) | (NotificationResponse)) => void): this; - removeListener(event: 'ready', listener: (event: Event, - launchInfo: (Record) | (NotificationResponse)) => void): this; - /** - * Emitted when `remote.getBuiltin()` is called in the renderer process of - * `webContents`. Calling `event.preventDefault()` will prevent the module from - * being returned. Custom value can be returned by setting `event.returnValue`. - * - * @deprecated - */ - on(event: 'remote-get-builtin', listener: (event: Event, - webContents: WebContents, - moduleName: string) => void): this; - once(event: 'remote-get-builtin', listener: (event: Event, - webContents: WebContents, - moduleName: string) => void): this; - addListener(event: 'remote-get-builtin', listener: (event: Event, - webContents: WebContents, - moduleName: string) => void): this; - removeListener(event: 'remote-get-builtin', listener: (event: Event, - webContents: WebContents, - moduleName: string) => void): this; - /** - * Emitted when `remote.getCurrentWebContents()` is called in the renderer process - * of `webContents`. Calling `event.preventDefault()` will prevent the object from - * being returned. Custom value can be returned by setting `event.returnValue`. - * - * @deprecated - */ - on(event: 'remote-get-current-web-contents', listener: (event: Event, - webContents: WebContents) => void): this; - once(event: 'remote-get-current-web-contents', listener: (event: Event, - webContents: WebContents) => void): this; - addListener(event: 'remote-get-current-web-contents', listener: (event: Event, - webContents: WebContents) => void): this; - removeListener(event: 'remote-get-current-web-contents', listener: (event: Event, - webContents: WebContents) => void): this; - /** - * Emitted when `remote.getCurrentWindow()` is called in the renderer process of - * `webContents`. Calling `event.preventDefault()` will prevent the object from - * being returned. Custom value can be returned by setting `event.returnValue`. - * - * @deprecated - */ - on(event: 'remote-get-current-window', listener: (event: Event, - webContents: WebContents) => void): this; - once(event: 'remote-get-current-window', listener: (event: Event, - webContents: WebContents) => void): this; - addListener(event: 'remote-get-current-window', listener: (event: Event, - webContents: WebContents) => void): this; - removeListener(event: 'remote-get-current-window', listener: (event: Event, - webContents: WebContents) => void): this; - /** - * Emitted when `remote.getGlobal()` is called in the renderer process of - * `webContents`. Calling `event.preventDefault()` will prevent the global from - * being returned. Custom value can be returned by setting `event.returnValue`. - * - * @deprecated - */ - on(event: 'remote-get-global', listener: (event: Event, - webContents: WebContents, - globalName: string) => void): this; - once(event: 'remote-get-global', listener: (event: Event, - webContents: WebContents, - globalName: string) => void): this; - addListener(event: 'remote-get-global', listener: (event: Event, - webContents: WebContents, - globalName: string) => void): this; - removeListener(event: 'remote-get-global', listener: (event: Event, - webContents: WebContents, - globalName: string) => void): this; - /** - * Emitted when `remote.require()` is called in the renderer process of - * `webContents`. Calling `event.preventDefault()` will prevent the module from - * being returned. Custom value can be returned by setting `event.returnValue`. - * - * @deprecated - */ - on(event: 'remote-require', listener: (event: Event, - webContents: WebContents, - moduleName: string) => void): this; - once(event: 'remote-require', listener: (event: Event, - webContents: WebContents, - moduleName: string) => void): this; - addListener(event: 'remote-require', listener: (event: Event, - webContents: WebContents, - moduleName: string) => void): this; - removeListener(event: 'remote-require', listener: (event: Event, - webContents: WebContents, - moduleName: string) => void): this; - /** - * Emitted when the renderer process unexpectedly disappears. This is normally - * because it was crashed or killed. - */ - on(event: 'render-process-gone', listener: (event: Event, - webContents: WebContents, - details: RenderProcessGoneDetails) => void): this; - once(event: 'render-process-gone', listener: (event: Event, - webContents: WebContents, - details: RenderProcessGoneDetails) => void): this; - addListener(event: 'render-process-gone', listener: (event: Event, - webContents: WebContents, - details: RenderProcessGoneDetails) => void): this; - removeListener(event: 'render-process-gone', listener: (event: Event, - webContents: WebContents, - details: RenderProcessGoneDetails) => void): this; - /** - * Emitted when the renderer process of `webContents` crashes or is killed. - * - * **Deprecated:** This event is superceded by the `render-process-gone` event - * which contains more information about why the render process disappeared. It - * isn't always because it crashed. The `killed` boolean can be replaced by - * checking `reason === 'killed'` when you switch to that event. - * - * @deprecated - */ - on(event: 'renderer-process-crashed', listener: (event: Event, - webContents: WebContents, - killed: boolean) => void): this; - once(event: 'renderer-process-crashed', listener: (event: Event, - webContents: WebContents, - killed: boolean) => void): this; - addListener(event: 'renderer-process-crashed', listener: (event: Event, - webContents: WebContents, - killed: boolean) => void): this; - removeListener(event: 'renderer-process-crashed', listener: (event: Event, - webContents: WebContents, - killed: boolean) => void): this; - /** - * This event will be emitted inside the primary instance of your application when - * a second instance has been executed and calls `app.requestSingleInstanceLock()`. - * - * `argv` is an Array of the second instance's command line arguments, and - * `workingDirectory` is its current working directory. Usually applications - * respond to this by making their primary window focused and non-minimized. - * - * **Note:** If the second instance is started by a different user than the first, - * the `argv` array will not include the arguments. - * - * This event is guaranteed to be emitted after the `ready` event of `app` gets - * emitted. - * - * **Note:** Extra command line arguments might be added by Chromium, such as - * `--original-process-start-time`. - */ - on(event: 'second-instance', listener: (event: Event, - /** - * An array of the second instance's command line arguments - */ - argv: string[], - /** - * The second instance's working directory - */ - workingDirectory: string) => void): this; - once(event: 'second-instance', listener: (event: Event, - /** - * An array of the second instance's command line arguments - */ - argv: string[], - /** - * The second instance's working directory - */ - workingDirectory: string) => void): this; - addListener(event: 'second-instance', listener: (event: Event, - /** - * An array of the second instance's command line arguments - */ - argv: string[], - /** - * The second instance's working directory - */ - workingDirectory: string) => void): this; - removeListener(event: 'second-instance', listener: (event: Event, - /** - * An array of the second instance's command line arguments - */ - argv: string[], - /** - * The second instance's working directory - */ - workingDirectory: string) => void): this; - /** - * Emitted when a client certificate is requested. - * - * The `url` corresponds to the navigation entry requesting the client certificate - * and `callback` can be called with an entry filtered from the list. Using - * `event.preventDefault()` prevents the application from using the first - * certificate from the store. - */ - on(event: 'select-client-certificate', listener: (event: Event, - webContents: WebContents, - url: string, - certificateList: Certificate[], - callback: (certificate?: Certificate) => void) => void): this; - once(event: 'select-client-certificate', listener: (event: Event, - webContents: WebContents, - url: string, - certificateList: Certificate[], - callback: (certificate?: Certificate) => void) => void): this; - addListener(event: 'select-client-certificate', listener: (event: Event, - webContents: WebContents, - url: string, - certificateList: Certificate[], - callback: (certificate?: Certificate) => void) => void): this; - removeListener(event: 'select-client-certificate', listener: (event: Event, - webContents: WebContents, - url: string, - certificateList: Certificate[], - callback: (certificate?: Certificate) => void) => void): this; - /** - * Emitted when Electron has created a new `session`. - */ - on(event: 'session-created', listener: (session: Session) => void): this; - once(event: 'session-created', listener: (session: Session) => void): this; - addListener(event: 'session-created', listener: (session: Session) => void): this; - removeListener(event: 'session-created', listener: (session: Session) => void): this; - /** - * Emitted when Handoff is about to be resumed on another device. If you need to - * update the state to be transferred, you should call `event.preventDefault()` - * immediately, construct a new `userInfo` dictionary and call - * `app.updateCurrentActivity()` in a timely manner. Otherwise, the operation will - * fail and `continue-activity-error` will be called. - * - * @platform darwin - */ - on(event: 'update-activity-state', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * Contains app-specific state stored by the activity. - */ - userInfo: unknown) => void): this; - once(event: 'update-activity-state', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * Contains app-specific state stored by the activity. - */ - userInfo: unknown) => void): this; - addListener(event: 'update-activity-state', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * Contains app-specific state stored by the activity. - */ - userInfo: unknown) => void): this; - removeListener(event: 'update-activity-state', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string, - /** - * Contains app-specific state stored by the activity. - */ - userInfo: unknown) => void): this; - /** - * Emitted when a new webContents is created. - */ - on(event: 'web-contents-created', listener: (event: Event, - webContents: WebContents) => void): this; - once(event: 'web-contents-created', listener: (event: Event, - webContents: WebContents) => void): this; - addListener(event: 'web-contents-created', listener: (event: Event, - webContents: WebContents) => void): this; - removeListener(event: 'web-contents-created', listener: (event: Event, - webContents: WebContents) => void): this; - /** - * Emitted during Handoff before an activity from a different device wants to be - * resumed. You should call `event.preventDefault()` if you want to handle this - * event. - * - * @platform darwin - */ - on(event: 'will-continue-activity', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string) => void): this; - once(event: 'will-continue-activity', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string) => void): this; - addListener(event: 'will-continue-activity', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string) => void): this; - removeListener(event: 'will-continue-activity', listener: (event: Event, - /** - * A string identifying the activity. Maps to `NSUserActivity.activityType`. - */ - type: string) => void): this; - /** - * Emitted when the application has finished basic startup. On Windows and Linux, - * the `will-finish-launching` event is the same as the `ready` event; on macOS, - * this event represents the `applicationWillFinishLaunching` notification of - * `NSApplication`. You would usually set up listeners for the `open-file` and - * `open-url` events here, and start the crash reporter and auto updater. - * -In most cases, you should do everything in the `ready` event handler. - */ - on(event: 'will-finish-launching', listener: Function): this; - once(event: 'will-finish-launching', listener: Function): this; - addListener(event: 'will-finish-launching', listener: Function): this; - removeListener(event: 'will-finish-launching', listener: Function): this; - /** - * Emitted when all windows have been closed and the application will quit. Calling - * `event.preventDefault()` will prevent the default behavior, which is terminating - * the application. - * - * See the description of the `window-all-closed` event for the differences between - * the `will-quit` and `window-all-closed` events. - * - * **Note:** On Windows, this event will not be emitted if the app is closed due to - * a shutdown/restart of the system or a user logout. - */ - on(event: 'will-quit', listener: (event: Event) => void): this; - once(event: 'will-quit', listener: (event: Event) => void): this; - addListener(event: 'will-quit', listener: (event: Event) => void): this; - removeListener(event: 'will-quit', listener: (event: Event) => void): this; - /** - * Emitted when all windows have been closed. - * - * If you do not subscribe to this event and all windows are closed, the default - * behavior is to quit the app; however, if you subscribe, you control whether the - * app quits or not. If the user pressed `Cmd + Q`, or the developer called - * `app.quit()`, Electron will first try to close all the windows and then emit the - * `will-quit` event, and in this case the `window-all-closed` event would not be - * emitted. - */ - on(event: 'window-all-closed', listener: Function): this; - once(event: 'window-all-closed', listener: Function): this; - addListener(event: 'window-all-closed', listener: Function): this; - removeListener(event: 'window-all-closed', listener: Function): this; - /** - * Adds `path` to the recent documents list. - * - * This list is managed by the OS. On Windows, you can visit the list from the task - * bar, and on macOS, you can visit it from dock menu. - * - * @platform darwin,win32 - */ - addRecentDocument(path: string): void; - /** - * Clears the recent documents list. - * - * @platform darwin,win32 - */ - clearRecentDocuments(): void; - /** - * By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a per domain - * basis if the GPU processes crashes too frequently. This function disables that - * behavior. - -This method can only be called before app is ready. - */ - disableDomainBlockingFor3DAPIs(): void; - /** - * Disables hardware acceleration for current app. - * -This method can only be called before app is ready. - */ - disableHardwareAcceleration(): void; - /** - * Enables full sandbox mode on the app. This means that all renderers will be - * launched sandboxed, regardless of the value of the `sandbox` flag in - * WebPreferences. - -This method can only be called before app is ready. - */ - enableSandbox(): void; - /** - * Exits immediately with `exitCode`. `exitCode` defaults to 0. - * - * All windows will be closed immediately without asking the user, and the - * `before-quit` and `will-quit` events will not be emitted. - */ - exit(exitCode?: number): void; - /** - * On Linux, focuses on the first visible window. On macOS, makes the application - * the active app. On Windows, focuses on the application's first window. - * -You should seek to use the `steal` option as sparingly as possible. - */ - focus(options?: FocusOptions): void; - /** - * Resolve with an object containing the following: - * - * * `icon` NativeImage - the display icon of the app handling the protocol. - * * `path` String - installation path of the app handling the protocol. - * * `name` String - display name of the app handling the protocol. - * - * This method returns a promise that contains the application name, icon and path - * of the default handler for the protocol (aka URI scheme) of a URL. - * - * @platform darwin,win32 - */ - getApplicationInfoForProtocol(url: string): Promise; - /** - * Name of the application handling the protocol, or an empty string if there is no - * handler. For instance, if Electron is the default handler of the URL, this could - * be `Electron` on Windows and Mac. However, don't rely on the precise format - * which is not guaranteed to remain unchanged. Expect a different format on Linux, - * possibly with a `.desktop` suffix. - * - * This method returns the application name of the default handler for the protocol - * (aka URI scheme) of a URL. - */ - getApplicationNameForProtocol(url: string): string; - /** - * Array of `ProcessMetric` objects that correspond to memory and CPU usage - * statistics of all the processes associated with the app. - */ - getAppMetrics(): ProcessMetric[]; - /** - * The current application directory. - */ - getAppPath(): string; - /** - * The current value displayed in the counter badge. - * - * @platform linux,darwin - */ - getBadgeCount(): number; - /** - * The type of the currently running activity. - * - * @platform darwin - */ - getCurrentActivityType(): string; - /** - * fulfilled with the app's icon, which is a NativeImage. - * - * Fetches a path's associated icon. - * - * On _Windows_, there a 2 kinds of icons: - * - * * Icons associated with certain file extensions, like `.mp3`, `.png`, etc. - * * Icons inside the file itself, like `.exe`, `.dll`, `.ico`. - * - * On _Linux_ and _macOS_, icons depend on the application associated with file - * mime type. - */ - getFileIcon(path: string, options?: FileIconOptions): Promise; - /** - * The Graphics Feature Status from `chrome://gpu/`. - * - * **Note:** This information is only usable after the `gpu-info-update` event is - * emitted. - */ - getGPUFeatureStatus(): GPUFeatureStatus; - /** - * For `infoType` equal to `complete`: Promise is fulfilled with `Object` - * containing all the GPU Information as in chromium's GPUInfo object. This - * includes the version and driver information that's shown on `chrome://gpu` page. - * - * For `infoType` equal to `basic`: Promise is fulfilled with `Object` containing - * fewer attributes than when requested with `complete`. Here's an example of basic - * response: - * - * Using `basic` should be preferred if only basic information like `vendorId` or - * `driverId` is needed. - */ - getGPUInfo(infoType: 'basic' | 'complete'): Promise; - /** - * * `minItems` Integer - The minimum number of items that will be shown in the - * Jump List (for a more detailed description of this value see the MSDN docs). - * * `removedItems` JumpListItem[] - Array of `JumpListItem` objects that - * correspond to items that the user has explicitly removed from custom categories - * in the Jump List. These items must not be re-added to the Jump List in the - * **next** call to `app.setJumpList()`, Windows will not display any custom - * category that contains any of the removed items. - * - * @platform win32 - */ - getJumpListSettings(): JumpListSettings; - /** - * The current application locale. Possible return values are documented here. - * - * To set the locale, you'll want to use a command line switch at app startup, - * which may be found here. - * - * **Note:** When distributing your packaged app, you have to also ship the - * `locales` folder. - * - * **Note:** On Windows, you have to call it after the `ready` events gets emitted. - */ - getLocale(): string; - /** - * User operating system's locale two-letter ISO 3166 country code. The value is - * taken from native OS APIs. - * -**Note:** When unable to detect locale country code, it returns empty string. - */ - getLocaleCountryCode(): string; - /** - * If you provided `path` and `args` options to `app.setLoginItemSettings`, then - * you need to pass the same arguments here for `openAtLogin` to be set correctly. - * - * - * * `openAtLogin` Boolean - `true` if the app is set to open at login. - * * `openAsHidden` Boolean _macOS_ - `true` if the app is set to open as hidden at - * login. This setting is not available on MAS builds. - * * `wasOpenedAtLogin` Boolean _macOS_ - `true` if the app was opened at login - * automatically. This setting is not available on MAS builds. - * * `wasOpenedAsHidden` Boolean _macOS_ - `true` if the app was opened as a hidden - * login item. This indicates that the app should not open any windows at startup. - * This setting is not available on MAS builds. - * * `restoreState` Boolean _macOS_ - `true` if the app was opened as a login item - * that should restore the state from the previous session. This indicates that the - * app should restore the windows that were open the last time the app was closed. - * This setting is not available on MAS builds. - * * `executableWillLaunchAtLogin` Boolean _Windows_ - `true` if app is set to open - * at login and its run key is not deactivated. This differs from `openAtLogin` as - * it ignores the `args` option, this property will be true if the given executable - * would be launched at login with **any** arguments. - * * `launchItems` Object[] _Windows_ - * * `name` String _Windows_ - name value of a registry entry. - * * `path` String _Windows_ - The executable to an app that corresponds to a - * registry entry. - * * `args` String[] _Windows_ - the command-line arguments to pass to the - * executable. - * * `scope` String _Windows_ - one of `user` or `machine`. Indicates whether the - * registry entry is under `HKEY_CURRENT USER` or `HKEY_LOCAL_MACHINE`. - * * `enabled` Boolean _Windows_ - `true` if the app registry key is startup - * approved and therefore shows as `enabled` in Task Manager and Windows settings. - * - * @platform darwin,win32 - */ - getLoginItemSettings(options?: LoginItemSettingsOptions): LoginItemSettings; - /** - * The current application's name, which is the name in the application's - * `package.json` file. - * - * Usually the `name` field of `package.json` is a short lowercase name, according - * to the npm modules spec. You should usually also specify a `productName` field, - * which is your application's full capitalized name, and which will be preferred - * over `name` by Electron. - */ - getName(): string; - /** - * A path to a special directory or file associated with `name`. On failure, an - * `Error` is thrown. - * - * If `app.getPath('logs')` is called without called `app.setAppLogsPath()` being - * called first, a default log directory will be created equivalent to calling - * `app.setAppLogsPath()` without a `path` parameter. - */ - getPath(name: 'home' | 'appData' | 'userData' | 'cache' | 'temp' | 'exe' | 'module' | 'desktop' | 'documents' | 'downloads' | 'music' | 'pictures' | 'videos' | 'recent' | 'logs' | 'crashDumps'): string; - /** - * The version of the loaded application. If no version is found in the - * application's `package.json` file, the version of the current bundle or - * executable is returned. - */ - getVersion(): string; - /** - * This method returns whether or not this instance of your app is currently - * holding the single instance lock. You can request the lock with - * `app.requestSingleInstanceLock()` and release with - * `app.releaseSingleInstanceLock()` - */ - hasSingleInstanceLock(): boolean; - /** - * Hides all application windows without minimizing them. - * - * @platform darwin - */ - hide(): void; - /** - * Imports the certificate in pkcs12 format into the platform certificate store. - * `callback` is called with the `result` of import operation, a value of `0` - * indicates success while any other value indicates failure according to Chromium - * net_error_list. - * - * @platform linux - */ - importCertificate(options: ImportCertificateOptions, callback: (result: number) => void): void; - /** - * Invalidates the current Handoff user activity. - * - * @platform darwin - */ - invalidateCurrentActivity(): void; - /** - * `true` if Chrome's accessibility support is enabled, `false` otherwise. This API - * will return `true` if the use of assistive technologies, such as screen readers, - * has been detected. See - * https://www.chromium.org/developers/design-documents/accessibility for more - * details. - * - * @platform darwin,win32 - */ - isAccessibilitySupportEnabled(): boolean; - /** - * Whether the current executable is the default handler for a protocol (aka URI - * scheme). - * - * **Note:** On macOS, you can use this method to check if the app has been - * registered as the default protocol handler for a protocol. You can also verify - * this by checking `~/Library/Preferences/com.apple.LaunchServices.plist` on the - * macOS machine. Please refer to Apple's documentation for details. - * - * The API uses the Windows Registry and `LSCopyDefaultHandlerForURLScheme` - * internally. - */ - isDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; - /** - * whether or not the current OS version allows for native emoji pickers. - */ - isEmojiPanelSupported(): boolean; - /** - * Whether the application is currently running from the systems Application - * folder. Use in combination with `app.moveToApplicationsFolder()` - * - * @platform darwin - */ - isInApplicationsFolder(): boolean; - /** - * `true` if Electron has finished initializing, `false` otherwise. See also - * `app.whenReady()`. - */ - isReady(): boolean; - /** - * whether `Secure Keyboard Entry` is enabled. - * -By default this API will return `false`. - * - * @platform darwin - */ - isSecureKeyboardEntryEnabled(): boolean; - /** - * Whether the current desktop environment is Unity launcher. - * - * @platform linux - */ - isUnityRunning(): boolean; - /** - * Whether the move was successful. Please note that if the move is successful, - * your application will quit and relaunch. - * - * No confirmation dialog will be presented by default. If you wish to allow the - * user to confirm the operation, you may do so using the `dialog` API. - * - * **NOTE:** This method throws errors if anything other than the user causes the - * move to fail. For instance if the user cancels the authorization dialog, this - * method returns false. If we fail to perform the copy, then this method will - * throw an error. The message in the error should be informative and tell you - * exactly what went wrong. - * - * By default, if an app of the same name as the one being moved exists in the - * Applications directory and is _not_ running, the existing app will be trashed - * and the active app moved into its place. If it _is_ running, the pre-existing - * running app will assume focus and the previously active app will quit itself. - * This behavior can be changed by providing the optional conflict handler, where - * the boolean returned by the handler determines whether or not the move conflict - * is resolved with default behavior. i.e. returning `false` will ensure no - * further action is taken, returning `true` will result in the default behavior - * and the method continuing. - * - * For example: - * - * Would mean that if an app already exists in the user directory, if the user - * chooses to 'Continue Move' then the function would continue with its default - * behavior and the existing app will be trashed and the active app moved into its - * place. - * - * @platform darwin - */ - moveToApplicationsFolder(options?: MoveToApplicationsFolderOptions): boolean; - /** - * Try to close all windows. The `before-quit` event will be emitted first. If all - * windows are successfully closed, the `will-quit` event will be emitted and by - * default the application will terminate. - * - * This method guarantees that all `beforeunload` and `unload` event handlers are - * correctly executed. It is possible that a window cancels the quitting by - * returning `false` in the `beforeunload` event handler. - */ - quit(): void; - /** - * Relaunches the app when current instance exits. - * - * By default, the new instance will use the same working directory and command - * line arguments with current instance. When `args` is specified, the `args` will - * be passed as command line arguments instead. When `execPath` is specified, the - * `execPath` will be executed for relaunch instead of current app. - * - * Note that this method does not quit the app when executed, you have to call - * `app.quit` or `app.exit` after calling `app.relaunch` to make the app restart. - * - * When `app.relaunch` is called for multiple times, multiple instances will be - * started after current instance exited. - * - * An example of restarting current instance immediately and adding a new command - * line argument to the new instance: - */ - relaunch(options?: RelaunchOptions): void; - /** - * Releases all locks that were created by `requestSingleInstanceLock`. This will - * allow multiple instances of the application to once again run side by side. - */ - releaseSingleInstanceLock(): void; - /** - * Whether the call succeeded. - * - * This method checks if the current executable as the default handler for a - * protocol (aka URI scheme). If so, it will remove the app as the default handler. - * - * @platform darwin,win32 - */ - removeAsDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; - /** - * The return value of this method indicates whether or not this instance of your - * application successfully obtained the lock. If it failed to obtain the lock, - * you can assume that another instance of your application is already running with - * the lock and exit immediately. - * - * I.e. This method returns `true` if your process is the primary instance of your - * application and your app should continue loading. It returns `false` if your - * process should immediately quit as it has sent its parameters to another - * instance that has already acquired the lock. - * - * On macOS, the system enforces single instance automatically when users try to - * open a second instance of your app in Finder, and the `open-file` and `open-url` - * events will be emitted for that. However when users start your app in command - * line, the system's single instance mechanism will be bypassed, and you have to - * use this method to ensure single instance. - * - * An example of activating the window of primary instance when a second instance - * starts: - */ - requestSingleInstanceLock(): boolean; - /** - * Marks the current Handoff user activity as inactive without invalidating it. - * - * @platform darwin - */ - resignCurrentActivity(): void; - /** - * Set the about panel options. This will override the values defined in the app's - * `.plist` file on macOS. See the Apple docs for more details. On Linux, values - * must be set in order to be shown; there are no defaults. - * - * If you do not set `credits` but still wish to surface them in your app, AppKit - * will look for a file named "Credits.html", "Credits.rtf", and "Credits.rtfd", in - * that order, in the bundle returned by the NSBundle class method main. The first - * file found is used, and if none is found, the info area is left blank. See Apple - * documentation for more information. - */ - setAboutPanelOptions(options: AboutPanelOptionsOptions): void; - /** - * Manually enables Chrome's accessibility support, allowing to expose - * accessibility switch to users in application settings. See Chromium's - * accessibility docs for more details. Disabled by default. - * - * This API must be called after the `ready` event is emitted. - * - * **Note:** Rendering accessibility tree can significantly affect the performance - * of your app. It should not be enabled by default. - * - * @platform darwin,win32 - */ - setAccessibilitySupportEnabled(enabled: boolean): void; - /** - * Sets the activation policy for a given app. - * - * Activation policy types: - * - * * 'regular' - The application is an ordinary app that appears in the Dock and - * may have a user interface. - * * 'accessory' - The application doesnโ€™t appear in the Dock and doesnโ€™t have a - * menu bar, but it may be activated programmatically or by clicking on one of its - * windows. - * * 'prohibited' - The application doesnโ€™t appear in the Dock and may not create - * windows or be activated. - * - * @platform darwin - */ - setActivationPolicy(policy: 'regular' | 'accessory' | 'prohibited'): void; - /** - * Sets or creates a directory your app's logs which can then be manipulated with - * `app.getPath()` or `app.setPath(pathName, newPath)`. - * - * Calling `app.setAppLogsPath()` without a `path` parameter will result in this - * directory being set to `~/Library/Logs/YourAppName` on _macOS_, and inside the - * `userData` directory on _Linux_ and _Windows_. - */ - setAppLogsPath(path?: string): void; - /** - * Changes the Application User Model ID to `id`. - * - * @platform win32 - */ - setAppUserModelId(id: string): void; - /** - * Whether the call succeeded. - * - * Sets the current executable as the default handler for a protocol (aka URI - * scheme). It allows you to integrate your app deeper into the operating system. - * Once registered, all links with `your-protocol://` will be opened with the - * current executable. The whole link, including protocol, will be passed to your - * application as a parameter. - * - * **Note:** On macOS, you can only register protocols that have been added to your - * app's `info.plist`, which cannot be modified at runtime. However, you can change - * the file during build time via Electron Forge, Electron Packager, or by editing - * `info.plist` with a text editor. Please refer to Apple's documentation for - * details. - * - * **Note:** In a Windows Store environment (when packaged as an `appx`) this API - * will return `true` for all calls but the registry key it sets won't be - * accessible by other applications. In order to register your Windows Store - * application as a default protocol handler you must declare the protocol in your - * manifest. - * - * The API uses the Windows Registry and `LSSetDefaultHandlerForURLScheme` - * internally. - */ - setAsDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean; - /** - * Whether the call succeeded. - * - * Sets the counter badge for current app. Setting the count to `0` will hide the - * badge. - * - * On macOS, it shows on the dock icon. On Linux, it only works for Unity launcher. - * - * **Note:** Unity launcher requires the existence of a `.desktop` file to work, - * for more information please read Desktop Environment Integration. - * - * @platform linux,darwin - */ - setBadgeCount(count?: number): boolean; - /** - * Sets or removes a custom Jump List for the application, and returns one of the - * following strings: - * - * * `ok` - Nothing went wrong. - * * `error` - One or more errors occurred, enable runtime logging to figure out - * the likely cause. - * * `invalidSeparatorError` - An attempt was made to add a separator to a custom - * category in the Jump List. Separators are only allowed in the standard `Tasks` - * category. - * * `fileTypeRegistrationError` - An attempt was made to add a file link to the - * Jump List for a file type the app isn't registered to handle. - * * `customCategoryAccessDeniedError` - Custom categories can't be added to the - * Jump List due to user privacy or group policy settings. - * - * If `categories` is `null` the previously set custom Jump List (if any) will be - * replaced by the standard Jump List for the app (managed by Windows). - * - * **Note:** If a `JumpListCategory` object has neither the `type` nor the `name` - * property set then its `type` is assumed to be `tasks`. If the `name` property is - * set but the `type` property is omitted then the `type` is assumed to be - * `custom`. - * - * **Note:** Users can remove items from custom categories, and Windows will not - * allow a removed item to be added back into a custom category until **after** the - * next successful call to `app.setJumpList(categories)`. Any attempt to re-add a - * removed item to a custom category earlier than that will result in the entire - * custom category being omitted from the Jump List. The list of removed items can - * be obtained using `app.getJumpListSettings()`. - * - * **Note:** The maximum length of a Jump List item's `description` property is 260 - * characters. Beyond this limit, the item will not be added to the Jump List, nor - * will it be displayed. - * -Here's a very simple example of creating a custom Jump List: - * - * @platform win32 - */ - setJumpList(categories: (JumpListCategory[]) | (null)): void; - /** - * To work with Electron's `autoUpdater` on Windows, which uses Squirrel, you'll - * want to set the launch path to Update.exe, and pass arguments that specify your - * application name. For example: - * - * @platform darwin,win32 - */ - setLoginItemSettings(settings: Settings): void; - /** - * Overrides the current application's name. - * - * **Note:** This function overrides the name used internally by Electron; it does - * not affect the name that the OS uses. - */ - setName(name: string): void; - /** - * Overrides the `path` to a special directory or file associated with `name`. If - * the path specifies a directory that does not exist, an `Error` is thrown. In - * that case, the directory should be created with `fs.mkdirSync` or similar. - * - * You can only override paths of a `name` defined in `app.getPath`. - * - * By default, web pages' cookies and caches will be stored under the `userData` - * directory. If you want to change this location, you have to override the - * `userData` path before the `ready` event of the `app` module is emitted. - */ - setPath(name: string, path: string): void; - /** - * Set the `Secure Keyboard Entry` is enabled in your application. - * - * By using this API, important information such as password and other sensitive - * information can be prevented from being intercepted by other processes. - * - * See Apple's documentation for more details. - * - * **Note:** Enable `Secure Keyboard Entry` only when it is needed and disable it - * when it is no longer needed. - * - * @platform darwin - */ - setSecureKeyboardEntryEnabled(enabled: boolean): void; - /** - * Creates an `NSUserActivity` and sets it as the current activity. The activity is - * eligible for Handoff to another device afterward. - * - * @platform darwin - */ - setUserActivity(type: string, userInfo: any, webpageURL?: string): void; - /** - * Adds `tasks` to the Tasks category of the Jump List on Windows. - * - * `tasks` is an array of `Task` objects. - * - * Whether the call succeeded. - * - * **Note:** If you'd like to customize the Jump List even more use - * `app.setJumpList(categories)` instead. - * - * @platform win32 - */ - setUserTasks(tasks: Task[]): boolean; - /** - * Shows application windows after they were hidden. Does not automatically focus - * them. - * - * @platform darwin - */ - show(): void; - /** - * Show the app's about panel options. These options can be overridden with - * `app.setAboutPanelOptions(options)`. - */ - showAboutPanel(): void; - /** - * Show the platform's native emoji picker. - * - * @platform darwin,win32 - */ - showEmojiPanel(): void; - /** - * This function **must** be called once you have finished accessing the security - * scoped file. If you do not remember to stop accessing the bookmark, kernel - * resources will be leaked and your app will lose its ability to reach outside the - * sandbox completely, until your app is restarted. - * - * Start accessing a security scoped resource. With this method Electron - * applications that are packaged for the Mac App Store may reach outside their - * sandbox to access files chosen by the user. See Apple's documentation for a - * description of how this system works. - * - * @platform mas - */ - startAccessingSecurityScopedResource(bookmarkData: string): Function; - /** - * Updates the current activity if its type matches `type`, merging the entries - * from `userInfo` into its current `userInfo` dictionary. - * - * @platform darwin - */ - updateCurrentActivity(type: string, userInfo: any): void; - /** - * fulfilled when Electron is initialized. May be used as a convenient alternative - * to checking `app.isReady()` and subscribing to the `ready` event if the app is - * not ready yet. - */ - whenReady(): Promise; - /** - * A `Boolean` property that's `true` if Chrome's accessibility support is enabled, - * `false` otherwise. This property will be `true` if the use of assistive - * technologies, such as screen readers, has been detected. Setting this property - * to `true` manually enables Chrome's accessibility support, allowing developers - * to expose accessibility switch to users in application settings. - * - * See Chromium's accessibility docs for more details. Disabled by default. - * - * This API must be called after the `ready` event is emitted. - * - * **Note:** Rendering accessibility tree can significantly affect the performance - * of your app. It should not be enabled by default. - * - * @platform darwin,win32 - */ - accessibilitySupportEnabled: boolean; - /** - * A `Boolean` which when `true` disables the overrides that Electron has in place - * to ensure renderer processes are restarted on every navigation. The current - * default value for this property is `true`. - * - * The intention is for these overrides to become disabled by default and then at - * some point in the future this property will be removed. This property impacts - * which native modules you can use in the renderer process. For more information - * on the direction Electron is going with renderer process restarts and usage of - * native modules in the renderer process please check out this Tracking Issue. - */ - allowRendererProcessReuse: boolean; - /** - * A `Menu | null` property that returns `Menu` if one has been set and `null` - * otherwise. Users can pass a Menu to set this property. - */ - applicationMenu: (Menu) | (null); - /** - * An `Integer` property that returns the badge count for current app. Setting the - * count to `0` will hide the badge. - * - * On macOS, setting this with any nonzero integer shows on the dock icon. On - * Linux, this property only works for Unity launcher. - * - * **Note:** Unity launcher requires the existence of a `.desktop` file to work, - * for more information please read Desktop Environment Integration. - * - * **Note:** On macOS, you need to ensure that your application has the permission - * to display notifications for this property to take effect. - * - * @platform linux,darwin - */ - badgeCount: number; - /** - * A `CommandLine` object that allows you to read and manipulate the command line - * arguments that Chromium uses. - * - */ - readonly commandLine: CommandLine; - /** - * A `Dock` `| undefined` object that allows you to perform actions on your app - * icon in the user's dock on macOS. - * - * @platform darwin - */ - readonly dock: Dock; - /** - * A `Boolean` property that returns `true` if the app is packaged, `false` - * otherwise. For many apps, this property can be used to distinguish development - * and production environments. - * - */ - readonly isPackaged: boolean; - /** - * A `String` property that indicates the current application's name, which is the - * name in the application's `package.json` file. - * - * Usually the `name` field of `package.json` is a short lowercase name, according - * to the npm modules spec. You should usually also specify a `productName` field, - * which is your application's full capitalized name, and which will be preferred - * over `name` by Electron. - */ - name: string; - /** - * A `Boolean` which when `true` indicates that the app is currently running under - * the Rosetta Translator Environment. - * - * You can use this property to prompt users to download the arm64 version of your - * application when they are running the x64 version under Rosetta incorrectly. - * - * @platform darwin - */ - readonly runningUnderRosettaTranslation: boolean; - /** - * A `String` which is the user agent string Electron will use as a global - * fallback. - * - * This is the user agent that will be used when no user agent is set at the - * `webContents` or `session` level. It is useful for ensuring that your entire - * app has the same user agent. Set to a custom value as early as possible in your - * app's initialization to ensure that your overridden value is used. - */ - userAgentFallback: string; - } - - interface AutoUpdater extends NodeJS.EventEmitter { - - // Docs: https://electronjs.org/docs/api/auto-updater - - /** - * This event is emitted after a user calls `quitAndInstall()`. - * - * When this API is called, the `before-quit` event is not emitted before all - * windows are closed. As a result you should listen to this event if you wish to - * perform actions before the windows are closed while a process is quitting, as - * well as listening to `before-quit`. - */ - on(event: 'before-quit-for-update', listener: Function): this; - once(event: 'before-quit-for-update', listener: Function): this; - addListener(event: 'before-quit-for-update', listener: Function): this; - removeListener(event: 'before-quit-for-update', listener: Function): this; - /** - * Emitted when checking if an update has started. - */ - on(event: 'checking-for-update', listener: Function): this; - once(event: 'checking-for-update', listener: Function): this; - addListener(event: 'checking-for-update', listener: Function): this; - removeListener(event: 'checking-for-update', listener: Function): this; - /** - * Emitted when there is an error while updating. - */ - on(event: 'error', listener: (error: Error) => void): this; - once(event: 'error', listener: (error: Error) => void): this; - addListener(event: 'error', listener: (error: Error) => void): this; - removeListener(event: 'error', listener: (error: Error) => void): this; - /** - * Emitted when there is an available update. The update is downloaded - * automatically. - */ - on(event: 'update-available', listener: Function): this; - once(event: 'update-available', listener: Function): this; - addListener(event: 'update-available', listener: Function): this; - removeListener(event: 'update-available', listener: Function): this; - /** - * Emitted when an update has been downloaded. - * - * On Windows only `releaseName` is available. - * - * **Note:** It is not strictly necessary to handle this event. A successfully - * downloaded update will still be applied the next time the application starts. - */ - on(event: 'update-downloaded', listener: (event: Event, - releaseNotes: string, - releaseName: string, - releaseDate: Date, - updateURL: string) => void): this; - once(event: 'update-downloaded', listener: (event: Event, - releaseNotes: string, - releaseName: string, - releaseDate: Date, - updateURL: string) => void): this; - addListener(event: 'update-downloaded', listener: (event: Event, - releaseNotes: string, - releaseName: string, - releaseDate: Date, - updateURL: string) => void): this; - removeListener(event: 'update-downloaded', listener: (event: Event, - releaseNotes: string, - releaseName: string, - releaseDate: Date, - updateURL: string) => void): this; - /** - * Emitted when there is no available update. - */ - on(event: 'update-not-available', listener: Function): this; - once(event: 'update-not-available', listener: Function): this; - addListener(event: 'update-not-available', listener: Function): this; - removeListener(event: 'update-not-available', listener: Function): this; - /** - * Asks the server whether there is an update. You must call `setFeedURL` before - * using this API. - */ - checkForUpdates(): void; - /** - * The current update feed URL. - */ - getFeedURL(): string; - /** - * Restarts the app and installs the update after it has been downloaded. It should - * only be called after `update-downloaded` has been emitted. - * - * Under the hood calling `autoUpdater.quitAndInstall()` will close all application - * windows first, and automatically call `app.quit()` after all windows have been - * closed. - * - * **Note:** It is not strictly necessary to call this function to apply an update, - * as a successfully downloaded update will always be applied the next time the - * application starts. - */ - quitAndInstall(): void; - /** - * Sets the `url` and initialize the auto updater. - */ - setFeedURL(options: FeedURLOptions): void; - } - - interface BluetoothDevice { - - // Docs: https://electronjs.org/docs/api/structures/bluetooth-device - - deviceId: string; - deviceName: string; - } - - class BrowserView { - - // Docs: https://electronjs.org/docs/api/browser-view - - /** - * BrowserView - */ - constructor(options?: BrowserViewConstructorOptions); - /** - * The `bounds` of this BrowserView instance as `Object`. - * - * @experimental - */ - getBounds(): Rectangle; - setAutoResize(options: AutoResizeOptions): void; - setBackgroundColor(color: string): void; - /** - * Resizes and moves the view to the supplied bounds relative to the window. - * - * @experimental - */ - setBounds(bounds: Rectangle): void; - webContents: WebContents; - } - - class BrowserWindow extends NodeEventEmitter { - - // Docs: https://electronjs.org/docs/api/browser-window - - /** - * Emitted when the window is set or unset to show always on top of other windows. - */ - on(event: 'always-on-top-changed', listener: (event: Event, - isAlwaysOnTop: boolean) => void): this; - once(event: 'always-on-top-changed', listener: (event: Event, - isAlwaysOnTop: boolean) => void): this; - addListener(event: 'always-on-top-changed', listener: (event: Event, - isAlwaysOnTop: boolean) => void): this; - removeListener(event: 'always-on-top-changed', listener: (event: Event, - isAlwaysOnTop: boolean) => void): this; - /** - * Emitted when an App Command is invoked. These are typically related to keyboard - * media keys or browser commands, as well as the "Back" button built into some - * mice on Windows. - * - * Commands are lowercased, underscores are replaced with hyphens, and the - * `APPCOMMAND_` prefix is stripped off. e.g. `APPCOMMAND_BROWSER_BACKWARD` is - * emitted as `browser-backward`. - * - * The following app commands are explicitly supported on Linux: - * -* `browser-backward` -* `browser-forward` - * - * @platform win32,linux - */ - on(event: 'app-command', listener: (event: Event, - command: string) => void): this; - once(event: 'app-command', listener: (event: Event, - command: string) => void): this; - addListener(event: 'app-command', listener: (event: Event, - command: string) => void): this; - removeListener(event: 'app-command', listener: (event: Event, - command: string) => void): this; - /** - * Emitted when the window loses focus. - */ - on(event: 'blur', listener: Function): this; - once(event: 'blur', listener: Function): this; - addListener(event: 'blur', listener: Function): this; - removeListener(event: 'blur', listener: Function): this; - /** - * Emitted when the window is going to be closed. It's emitted before the - * `beforeunload` and `unload` event of the DOM. Calling `event.preventDefault()` - * will cancel the close. - * - * Usually you would want to use the `beforeunload` handler to decide whether the - * window should be closed, which will also be called when the window is reloaded. - * In Electron, returning any value other than `undefined` would cancel the close. - * For example: - * - * _**Note**: There is a subtle difference between the behaviors of - * `window.onbeforeunload = handler` and `window.addEventListener('beforeunload', - * handler)`. It is recommended to always set the `event.returnValue` explicitly, - * instead of only returning a value, as the former works more consistently within - * Electron._ - */ - on(event: 'close', listener: (event: Event) => void): this; - once(event: 'close', listener: (event: Event) => void): this; - addListener(event: 'close', listener: (event: Event) => void): this; - removeListener(event: 'close', listener: (event: Event) => void): this; - /** - * Emitted when the window is closed. After you have received this event you should - * remove the reference to the window and avoid using it any more. - */ - on(event: 'closed', listener: Function): this; - once(event: 'closed', listener: Function): this; - addListener(event: 'closed', listener: Function): this; - removeListener(event: 'closed', listener: Function): this; - /** - * Emitted when the window enters a full-screen state. - */ - on(event: 'enter-full-screen', listener: Function): this; - once(event: 'enter-full-screen', listener: Function): this; - addListener(event: 'enter-full-screen', listener: Function): this; - removeListener(event: 'enter-full-screen', listener: Function): this; - /** - * Emitted when the window enters a full-screen state triggered by HTML API. - */ - on(event: 'enter-html-full-screen', listener: Function): this; - once(event: 'enter-html-full-screen', listener: Function): this; - addListener(event: 'enter-html-full-screen', listener: Function): this; - removeListener(event: 'enter-html-full-screen', listener: Function): this; - /** - * Emitted when the window gains focus. - */ - on(event: 'focus', listener: Function): this; - once(event: 'focus', listener: Function): this; - addListener(event: 'focus', listener: Function): this; - removeListener(event: 'focus', listener: Function): this; - /** - * Emitted when the window is hidden. - */ - on(event: 'hide', listener: Function): this; - once(event: 'hide', listener: Function): this; - addListener(event: 'hide', listener: Function): this; - removeListener(event: 'hide', listener: Function): this; - /** - * Emitted when the window leaves a full-screen state. - */ - on(event: 'leave-full-screen', listener: Function): this; - once(event: 'leave-full-screen', listener: Function): this; - addListener(event: 'leave-full-screen', listener: Function): this; - removeListener(event: 'leave-full-screen', listener: Function): this; - /** - * Emitted when the window leaves a full-screen state triggered by HTML API. - */ - on(event: 'leave-html-full-screen', listener: Function): this; - once(event: 'leave-html-full-screen', listener: Function): this; - addListener(event: 'leave-html-full-screen', listener: Function): this; - removeListener(event: 'leave-html-full-screen', listener: Function): this; - /** - * Emitted when window is maximized. - */ - on(event: 'maximize', listener: Function): this; - once(event: 'maximize', listener: Function): this; - addListener(event: 'maximize', listener: Function): this; - removeListener(event: 'maximize', listener: Function): this; - /** - * Emitted when the window is minimized. - */ - on(event: 'minimize', listener: Function): this; - once(event: 'minimize', listener: Function): this; - addListener(event: 'minimize', listener: Function): this; - removeListener(event: 'minimize', listener: Function): this; - /** - * Emitted when the window is being moved to a new position. - */ - on(event: 'move', listener: Function): this; - once(event: 'move', listener: Function): this; - addListener(event: 'move', listener: Function): this; - removeListener(event: 'move', listener: Function): this; - /** - * Emitted once when the window is moved to a new position. - * -__Note__: On macOS this event is an alias of `move`. - * - * @platform darwin,win32 - */ - on(event: 'moved', listener: Function): this; - once(event: 'moved', listener: Function): this; - addListener(event: 'moved', listener: Function): this; - removeListener(event: 'moved', listener: Function): this; - /** - * Emitted when the native new tab button is clicked. - * - * @platform darwin - */ - on(event: 'new-window-for-tab', listener: Function): this; - once(event: 'new-window-for-tab', listener: Function): this; - addListener(event: 'new-window-for-tab', listener: Function): this; - removeListener(event: 'new-window-for-tab', listener: Function): this; - /** - * Emitted when the document changed its title, calling `event.preventDefault()` - * will prevent the native window's title from changing. `explicitSet` is false - * when title is synthesized from file URL. - */ - on(event: 'page-title-updated', listener: (event: Event, - title: string, - explicitSet: boolean) => void): this; - once(event: 'page-title-updated', listener: (event: Event, - title: string, - explicitSet: boolean) => void): this; - addListener(event: 'page-title-updated', listener: (event: Event, - title: string, - explicitSet: boolean) => void): this; - removeListener(event: 'page-title-updated', listener: (event: Event, - title: string, - explicitSet: boolean) => void): this; - /** - * Emitted when the web page has been rendered (while not being shown) and window - * can be displayed without a visual flash. - * - * Please note that using this event implies that the renderer will be considered - * "visible" and paint even though `show` is false. This event will never fire if - * you use `paintWhenInitiallyHidden: false` - */ - on(event: 'ready-to-show', listener: Function): this; - once(event: 'ready-to-show', listener: Function): this; - addListener(event: 'ready-to-show', listener: Function): this; - removeListener(event: 'ready-to-show', listener: Function): this; - /** - * Emitted after the window has been resized. - */ - on(event: 'resize', listener: Function): this; - once(event: 'resize', listener: Function): this; - addListener(event: 'resize', listener: Function): this; - removeListener(event: 'resize', listener: Function): this; - /** - * Emitted once when the window has finished being resized. - * - * This is usually emitted when the window has been resized manually. On macOS, - * resizing the window with `setBounds`/`setSize` and setting the `animate` - * parameter to `true` will also emit this event once resizing has finished. - * - * @platform darwin,win32 - */ - on(event: 'resized', listener: Function): this; - once(event: 'resized', listener: Function): this; - addListener(event: 'resized', listener: Function): this; - removeListener(event: 'resized', listener: Function): this; - /** - * Emitted when the unresponsive web page becomes responsive again. - */ - on(event: 'responsive', listener: Function): this; - once(event: 'responsive', listener: Function): this; - addListener(event: 'responsive', listener: Function): this; - removeListener(event: 'responsive', listener: Function): this; - /** - * Emitted when the window is restored from a minimized state. - */ - on(event: 'restore', listener: Function): this; - once(event: 'restore', listener: Function): this; - addListener(event: 'restore', listener: Function): this; - removeListener(event: 'restore', listener: Function): this; - /** - * Emitted on trackpad rotation gesture. Continually emitted until rotation gesture - * is ended. The `rotation` value on each emission is the angle in degrees rotated - * since the last emission. The last emitted event upon a rotation gesture will - * always be of value `0`. Counter-clockwise rotation values are positive, while - * clockwise ones are negative. - * - * @platform darwin - */ - on(event: 'rotate-gesture', listener: (event: Event, - rotation: number) => void): this; - once(event: 'rotate-gesture', listener: (event: Event, - rotation: number) => void): this; - addListener(event: 'rotate-gesture', listener: (event: Event, - rotation: number) => void): this; - removeListener(event: 'rotate-gesture', listener: (event: Event, - rotation: number) => void): this; - /** - * Emitted when scroll wheel event phase has begun. - * - * @platform darwin - */ - on(event: 'scroll-touch-begin', listener: Function): this; - once(event: 'scroll-touch-begin', listener: Function): this; - addListener(event: 'scroll-touch-begin', listener: Function): this; - removeListener(event: 'scroll-touch-begin', listener: Function): this; - /** - * Emitted when scroll wheel event phase filed upon reaching the edge of element. - * - * @platform darwin - */ - on(event: 'scroll-touch-edge', listener: Function): this; - once(event: 'scroll-touch-edge', listener: Function): this; - addListener(event: 'scroll-touch-edge', listener: Function): this; - removeListener(event: 'scroll-touch-edge', listener: Function): this; - /** - * Emitted when scroll wheel event phase has ended. - * - * @platform darwin - */ - on(event: 'scroll-touch-end', listener: Function): this; - once(event: 'scroll-touch-end', listener: Function): this; - addListener(event: 'scroll-touch-end', listener: Function): this; - removeListener(event: 'scroll-touch-end', listener: Function): this; - /** - * Emitted when window session is going to end due to force shutdown or machine - * restart or session log off. - * - * @platform win32 - */ - on(event: 'session-end', listener: Function): this; - once(event: 'session-end', listener: Function): this; - addListener(event: 'session-end', listener: Function): this; - removeListener(event: 'session-end', listener: Function): this; - /** - * Emitted when the window opens a sheet. - * - * @platform darwin - */ - on(event: 'sheet-begin', listener: Function): this; - once(event: 'sheet-begin', listener: Function): this; - addListener(event: 'sheet-begin', listener: Function): this; - removeListener(event: 'sheet-begin', listener: Function): this; - /** - * Emitted when the window has closed a sheet. - * - * @platform darwin - */ - on(event: 'sheet-end', listener: Function): this; - once(event: 'sheet-end', listener: Function): this; - addListener(event: 'sheet-end', listener: Function): this; - removeListener(event: 'sheet-end', listener: Function): this; - /** - * Emitted when the window is shown. - */ - on(event: 'show', listener: Function): this; - once(event: 'show', listener: Function): this; - addListener(event: 'show', listener: Function): this; - removeListener(event: 'show', listener: Function): this; - /** - * Emitted on 3-finger swipe. Possible directions are `up`, `right`, `down`, - * `left`. - * - * The method underlying this event is built to handle older macOS-style trackpad - * swiping, where the content on the screen doesn't move with the swipe. Most macOS - * trackpads are not configured to allow this kind of swiping anymore, so in order - * for it to emit properly the 'Swipe between pages' preference in `System - * Preferences > Trackpad > More Gestures` must be set to 'Swipe with two or three - * fingers'. - * - * @platform darwin - */ - on(event: 'swipe', listener: (event: Event, - direction: string) => void): this; - once(event: 'swipe', listener: (event: Event, - direction: string) => void): this; - addListener(event: 'swipe', listener: (event: Event, - direction: string) => void): this; - removeListener(event: 'swipe', listener: (event: Event, - direction: string) => void): this; - /** - * Emitted when the system context menu is triggered on the window, this is - * normally only triggered when the user right clicks on the non-client area of - * your window. This is the window titlebar or any area you have declared as - * `-webkit-app-region: drag` in a frameless window. - * -Calling `event.preventDefault()` will prevent the menu from being displayed. - * - * @platform win32 - */ - on(event: 'system-context-menu', listener: (event: Event, - /** - * The screen coordinates the context menu was triggered at - */ - point: Point) => void): this; - once(event: 'system-context-menu', listener: (event: Event, - /** - * The screen coordinates the context menu was triggered at - */ - point: Point) => void): this; - addListener(event: 'system-context-menu', listener: (event: Event, - /** - * The screen coordinates the context menu was triggered at - */ - point: Point) => void): this; - removeListener(event: 'system-context-menu', listener: (event: Event, - /** - * The screen coordinates the context menu was triggered at - */ - point: Point) => void): this; - /** - * Emitted when the window exits from a maximized state. - */ - on(event: 'unmaximize', listener: Function): this; - once(event: 'unmaximize', listener: Function): this; - addListener(event: 'unmaximize', listener: Function): this; - removeListener(event: 'unmaximize', listener: Function): this; - /** - * Emitted when the web page becomes unresponsive. - */ - on(event: 'unresponsive', listener: Function): this; - once(event: 'unresponsive', listener: Function): this; - addListener(event: 'unresponsive', listener: Function): this; - removeListener(event: 'unresponsive', listener: Function): this; - /** - * Emitted before the window is moved. On Windows, calling `event.preventDefault()` - * will prevent the window from being moved. - * - * Note that this is only emitted when the window is being resized manually. - * Resizing the window with `setBounds`/`setSize` will not emit this event. - * - * @platform darwin,win32 - */ - on(event: 'will-move', listener: (event: Event, - /** - * Location the window is being moved to. - */ - newBounds: Rectangle) => void): this; - once(event: 'will-move', listener: (event: Event, - /** - * Location the window is being moved to. - */ - newBounds: Rectangle) => void): this; - addListener(event: 'will-move', listener: (event: Event, - /** - * Location the window is being moved to. - */ - newBounds: Rectangle) => void): this; - removeListener(event: 'will-move', listener: (event: Event, - /** - * Location the window is being moved to. - */ - newBounds: Rectangle) => void): this; - /** - * Emitted before the window is resized. Calling `event.preventDefault()` will - * prevent the window from being resized. - * - * Note that this is only emitted when the window is being resized manually. - * Resizing the window with `setBounds`/`setSize` will not emit this event. - * - * @platform darwin,win32 - */ - on(event: 'will-resize', listener: (event: Event, - /** - * Size the window is being resized to. - */ - newBounds: Rectangle) => void): this; - once(event: 'will-resize', listener: (event: Event, - /** - * Size the window is being resized to. - */ - newBounds: Rectangle) => void): this; - addListener(event: 'will-resize', listener: (event: Event, - /** - * Size the window is being resized to. - */ - newBounds: Rectangle) => void): this; - removeListener(event: 'will-resize', listener: (event: Event, - /** - * Size the window is being resized to. - */ - newBounds: Rectangle) => void): this; - /** - * BrowserWindow - */ - constructor(options?: BrowserWindowConstructorOptions); - /** - * Adds DevTools extension located at `path`, and returns extension's name. - * - * The extension will be remembered so you only need to call this API once, this - * API is not for programming use. If you try to add an extension that has already - * been loaded, this method will not return and instead log a warning to the - * console. - * - * The method will also not return if the extension's manifest is missing or - * incomplete. - * - * **Note:** This API cannot be called before the `ready` event of the `app` module - * is emitted. - * -**Note:** This method is deprecated. Instead, use `ses.loadExtension(path)`. - * - * @deprecated - */ - static addDevToolsExtension(path: string): void; - /** - * Adds Chrome extension located at `path`, and returns extension's name. - * - * The method will also not return if the extension's manifest is missing or - * incomplete. - * - * **Note:** This API cannot be called before the `ready` event of the `app` module - * is emitted. - * -**Note:** This method is deprecated. Instead, use `ses.loadExtension(path)`. - * - * @deprecated - */ - static addExtension(path: string): void; - /** - * The window that owns the given `browserView`. If the given view is not attached - * to any window, returns `null`. - */ - static fromBrowserView(browserView: BrowserView): (BrowserWindow) | (null); - /** - * The window with the given `id`. - */ - static fromId(id: number): (BrowserWindow) | (null); - /** - * The window that owns the given `webContents` or `null` if the contents are not - * owned by a window. - */ - static fromWebContents(webContents: WebContents): (BrowserWindow) | (null); - /** - * An array of all opened browser windows. - */ - static getAllWindows(): BrowserWindow[]; - /** - * The keys are the extension names and each value is an Object containing `name` - * and `version` properties. - * - * To check if a DevTools extension is installed you can run the following: - * - * **Note:** This API cannot be called before the `ready` event of the `app` module - * is emitted. - * -**Note:** This method is deprecated. Instead, use `ses.getAllExtensions()`. - * - * @deprecated - */ - static getDevToolsExtensions(): Record; - /** - * The keys are the extension names and each value is an Object containing `name` - * and `version` properties. - * - * **Note:** This API cannot be called before the `ready` event of the `app` module - * is emitted. - * -**Note:** This method is deprecated. Instead, use `ses.getAllExtensions()`. - * - * @deprecated - */ - static getExtensions(): Record; - /** - * The window that is focused in this application, otherwise returns `null`. - */ - static getFocusedWindow(): (BrowserWindow) | (null); - /** - * Remove a DevTools extension by name. - * - * **Note:** This API cannot be called before the `ready` event of the `app` module - * is emitted. - * - * **Note:** This method is deprecated. Instead, use - * `ses.removeExtension(extension_id)`. - * - * @deprecated - */ - static removeDevToolsExtension(name: string): void; - /** - * Remove a Chrome extension by name. - * - * **Note:** This API cannot be called before the `ready` event of the `app` module - * is emitted. - * - * **Note:** This method is deprecated. Instead, use - * `ses.removeExtension(extension_id)`. - * - * @deprecated - */ - static removeExtension(name: string): void; - /** - * Replacement API for setBrowserView supporting work with multi browser views. - * - * @experimental - */ - addBrowserView(browserView: BrowserView): void; - /** - * Adds a window as a tab on this window, after the tab for the window instance. - * - * @platform darwin - */ - addTabbedWindow(browserWindow: BrowserWindow): void; - /** - * Removes focus from the window. - */ - blur(): void; - blurWebView(): void; - /** - * Resolves with a NativeImage - * - * Captures a snapshot of the page within `rect`. Omitting `rect` will capture the - * whole visible page. If the page is not visible, `rect` may be empty. - */ - capturePage(rect?: Rectangle): Promise; - /** - * Moves window to the center of the screen. - */ - center(): void; - /** - * Try to close the window. This has the same effect as a user manually clicking - * the close button of the window. The web page may cancel the close though. See - * the close event. - */ - close(): void; - /** - * Closes the currently open Quick Look panel. - * - * @platform darwin - */ - closeFilePreview(): void; - /** - * Force closing the window, the `unload` and `beforeunload` event won't be emitted - * for the web page, and `close` event will also not be emitted for this window, - * but it guarantees the `closed` event will be emitted. - */ - destroy(): void; - /** - * Starts or stops flashing the window to attract user's attention. - */ - flashFrame(flag: boolean): void; - /** - * Focuses on the window. - */ - focus(): void; - focusOnWebView(): void; - /** - * Gets the background color of the window. See Setting `backgroundColor`. - */ - getBackgroundColor(): string; - /** - * The `bounds` of the window as `Object`. - */ - getBounds(): Rectangle; - /** - * The `BrowserView` attached to `win`. Returns `null` if one is not attached. - * Throws an error if multiple `BrowserView`s are attached. - * - * @experimental - */ - getBrowserView(): (BrowserView) | (null); - /** - * an array of all BrowserViews that have been attached with `addBrowserView` or - * `setBrowserView`. - * - * **Note:** The BrowserView API is currently experimental and may change or be - * removed in future Electron releases. - * - * @experimental - */ - getBrowserViews(): BrowserView[]; - /** - * All child windows. - */ - getChildWindows(): BrowserWindow[]; - /** - * The `bounds` of the window's client area as `Object`. - */ - getContentBounds(): Rectangle; - /** - * Contains the window's client area's width and height. - */ - getContentSize(): number[]; - /** - * Contains the window's maximum width and height. - */ - getMaximumSize(): number[]; - /** - * Window id in the format of DesktopCapturerSource's id. For example - * "window:1234:0". - * - * More precisely the format is `window:id:other_id` where `id` is `HWND` on - * Windows, `CGWindowID` (`uint64_t`) on macOS and `Window` (`unsigned long`) on - * Linux. `other_id` is used to identify web contents (tabs) so within the same top - * level window. - */ - getMediaSourceId(): string; - /** - * Contains the window's minimum width and height. - */ - getMinimumSize(): number[]; - /** - * The platform-specific handle of the window. - * - * The native type of the handle is `HWND` on Windows, `NSView*` on macOS, and - * `Window` (`unsigned long`) on Linux. - */ - getNativeWindowHandle(): Buffer; - /** - * Contains the window bounds of the normal state - * - * **Note:** whatever the current state of the window : maximized, minimized or in - * fullscreen, this function always returns the position and size of the window in - * normal state. In normal state, getBounds and getNormalBounds returns the same - * `Rectangle`. - */ - getNormalBounds(): Rectangle; - /** - * between 0.0 (fully transparent) and 1.0 (fully opaque). On Linux, always returns - * 1. - */ - getOpacity(): number; - /** - * The parent window. - */ - getParentWindow(): BrowserWindow; - /** - * Contains the window's current position. - */ - getPosition(): number[]; - /** - * The pathname of the file the window represents. - * - * @platform darwin - */ - getRepresentedFilename(): string; - /** - * Contains the window's width and height. - */ - getSize(): number[]; - /** - * The title of the native window. - * - * **Note:** The title of the web page can be different from the title of the - * native window. - */ - getTitle(): string; - /** - * The current position for the traffic light buttons. Can only be used with - * `titleBarStyle` set to `hidden`. - * - * @platform darwin - */ - getTrafficLightPosition(): Point; - /** - * Whether the window has a shadow. - */ - hasShadow(): boolean; - /** - * Hides the window. - */ - hide(): void; - /** - * Hooks a windows message. The `callback` is called when the message is received - * in the WndProc. - * - * @platform win32 - */ - hookWindowMessage(message: number, callback: (wParam: any, lParam: any) => void): void; - /** - * Whether the window is always on top of other windows. - */ - isAlwaysOnTop(): boolean; - /** - * Whether the window can be manually closed by user. - * -On Linux always returns `true`. - * - * @platform darwin,win32 - */ - isClosable(): boolean; - /** - * Whether the window is destroyed. - */ - isDestroyed(): boolean; - /** - * Whether the window's document has been edited. - * - * @platform darwin - */ - isDocumentEdited(): boolean; - /** - * whether the window is enabled. - */ - isEnabled(): boolean; - /** - * Whether the window is focused. - */ - isFocused(): boolean; - /** - * Whether the window is in fullscreen mode. - */ - isFullScreen(): boolean; - /** - * Whether the maximize/zoom window button toggles fullscreen mode or maximizes the - * window. - */ - isFullScreenable(): boolean; - /** - * Whether the window is in kiosk mode. - */ - isKiosk(): boolean; - /** - * Whether the window can be manually maximized by user. - * -On Linux always returns `true`. - * - * @platform darwin,win32 - */ - isMaximizable(): boolean; - /** - * Whether the window is maximized. - */ - isMaximized(): boolean; - /** - * Whether menu bar automatically hides itself. - */ - isMenuBarAutoHide(): boolean; - /** - * Whether the menu bar is visible. - */ - isMenuBarVisible(): boolean; - /** - * Whether the window can be manually minimized by the user. - * -On Linux always returns `true`. - * - * @platform darwin,win32 - */ - isMinimizable(): boolean; - /** - * Whether the window is minimized. - */ - isMinimized(): boolean; - /** - * Whether current window is a modal window. - */ - isModal(): boolean; - /** - * Whether the window can be moved by user. - -On Linux always returns `true`. - * - * @platform darwin,win32 - */ - isMovable(): boolean; - /** - * Whether the window is in normal state (not maximized, not minimized, not in - * fullscreen mode). - */ - isNormal(): boolean; - /** - * Whether the window can be manually resized by the user. - */ - isResizable(): boolean; - /** - * Whether the window is in simple (pre-Lion) fullscreen mode. - * - * @platform darwin - */ - isSimpleFullScreen(): boolean; - /** - * Whether the window is in Windows 10 tablet mode. - * - * Since Windows 10 users can use their PC as tablet, under this mode apps can - * choose to optimize their UI for tablets, such as enlarging the titlebar and - * hiding titlebar buttons. - * - * This API returns whether the window is in tablet mode, and the `resize` event - * can be be used to listen to changes to tablet mode. - * - * @platform win32 - */ - isTabletMode(): boolean; - /** - * Whether the window is visible to the user. - */ - isVisible(): boolean; - /** - * Whether the window is visible on all workspaces. - * -**Note:** This API always returns false on Windows. - */ - isVisibleOnAllWorkspaces(): boolean; - /** - * `true` or `false` depending on whether the message is hooked. - * - * @platform win32 - */ - isWindowMessageHooked(message: number): boolean; - /** - * the promise will resolve when the page has finished loading (see - * `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`). - * - * Same as `webContents.loadFile`, `filePath` should be a path to an HTML file - * relative to the root of your application. See the `webContents` docs for more - * information. - */ - loadFile(filePath: string, options?: LoadFileOptions): Promise; - /** - * the promise will resolve when the page has finished loading (see - * `did-finish-load`), and rejects if the page fails to load (see `did-fail-load`). - * - * Same as `webContents.loadURL(url[, options])`. - * - * The `url` can be a remote address (e.g. `http://`) or a path to a local HTML - * file using the `file://` protocol. - * - * To ensure that file URLs are properly formatted, it is recommended to use Node's - * `url.format` method: - * - * You can load a URL using a `POST` request with URL-encoded data by doing the - * following: - */ - loadURL(url: string, options?: LoadURLOptions): Promise; - /** - * Maximizes the window. This will also show (but not focus) the window if it isn't - * being displayed already. - */ - maximize(): void; - /** - * Merges all windows into one window with multiple tabs when native tabs are - * enabled and there is more than one open window. - * - * @platform darwin - */ - mergeAllWindows(): void; - /** - * Minimizes the window. On some platforms the minimized window will be shown in - * the Dock. - */ - minimize(): void; - /** - * Moves window above the source window in the sense of z-order. If the - * `mediaSourceId` is not of type window or if the window does not exist then this - * method throws an error. - */ - moveAbove(mediaSourceId: string): void; - /** - * Moves the current tab into a new window if native tabs are enabled and there is - * more than one tab in the current window. - * - * @platform darwin - */ - moveTabToNewWindow(): void; - /** - * Moves window to top(z-order) regardless of focus - */ - moveTop(): void; - /** - * Uses Quick Look to preview a file at a given path. - * - * @platform darwin - */ - previewFile(path: string, displayName?: string): void; - /** - * Same as `webContents.reload`. - */ - reload(): void; - removeBrowserView(browserView: BrowserView): void; - /** - * Remove the window's menu bar. - * - * @platform linux,win32 - */ - removeMenu(): void; - /** - * Restores the window from minimized state to its previous state. - */ - restore(): void; - /** - * Selects the next tab when native tabs are enabled and there are other tabs in - * the window. - * - * @platform darwin - */ - selectNextTab(): void; - /** - * Selects the previous tab when native tabs are enabled and there are other tabs - * in the window. - * - * @platform darwin - */ - selectPreviousTab(): void; - /** - * Sets whether the window should show always on top of other windows. After - * setting this, the window is still a normal window, not a toolbox window which - * can not be focused on. - */ - setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver', relativeLevel?: number): void; - /** - * Sets the properties for the window's taskbar button. - * - * **Note:** `relaunchCommand` and `relaunchDisplayName` must always be set - * together. If one of those properties is not set, then neither will be used. - * - * @platform win32 - */ - setAppDetails(options: AppDetailsOptions): void; - /** - * This will make a window maintain an aspect ratio. The extra size allows a - * developer to have space, specified in pixels, not included within the aspect - * ratio calculations. This API already takes into account the difference between a - * window's size and its content size. - * - * Consider a normal window with an HD video player and associated controls. - * Perhaps there are 15 pixels of controls on the left edge, 25 pixels of controls - * on the right edge and 50 pixels of controls below the player. In order to - * maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within - * the player itself we would call this function with arguments of 16/9 and { - * width: 40, height: 50 }. The second argument doesn't care where the extra width - * and height are within the content view--only that they exist. Sum any extra - * width and height areas you have within the overall content view. - * - * The aspect ratio is not respected when window is resized programmingly with APIs - * like `win.setSize`. - */ - setAspectRatio(aspectRatio: number, extraSize?: Size): void; - /** - * Controls whether to hide cursor when typing. - * - * @platform darwin - */ - setAutoHideCursor(autoHide: boolean): void; - /** - * Sets whether the window menu bar should hide itself automatically. Once set the - * menu bar will only show when users press the single `Alt` key. - * - * If the menu bar is already visible, calling `setAutoHideMenuBar(true)` won't - * hide it immediately. - */ - setAutoHideMenuBar(hide: boolean): void; - /** - * Sets the background color of the window. See Setting `backgroundColor`. - */ - setBackgroundColor(backgroundColor: string): void; - /** - * Resizes and moves the window to the supplied bounds. Any properties that are not - * supplied will default to their current values. - */ - setBounds(bounds: Partial, animate?: boolean): void; - setBrowserView(browserView: (BrowserView) | (null)): void; - /** - * Sets whether the window can be manually closed by user. On Linux does nothing. - * - * @platform darwin,win32 - */ - setClosable(closable: boolean): void; - /** - * Resizes and moves the window's client area (e.g. the web page) to the supplied - * bounds. - */ - setContentBounds(bounds: Rectangle, animate?: boolean): void; - /** - * Prevents the window contents from being captured by other apps. - * - * On macOS it sets the NSWindow's sharingType to NSWindowSharingNone. On Windows - * it calls SetWindowDisplayAffinity with `WDA_EXCLUDEFROMCAPTURE`. For Windows 10 - * version 2004 and up the window will be removed from capture entirely, older - * Windows versions behave as if `WDA_MONITOR` is applied capturing a black window. - * - * @platform darwin,win32 - */ - setContentProtection(enable: boolean): void; - /** - * Resizes the window's client area (e.g. the web page) to `width` and `height`. - */ - setContentSize(width: number, height: number, animate?: boolean): void; - /** - * Specifies whether the windowโ€™s document has been edited, and the icon in title - * bar will become gray when set to `true`. - * - * @platform darwin - */ - setDocumentEdited(edited: boolean): void; - /** - * Disable or enable the window. - */ - setEnabled(enable: boolean): void; - /** - * Changes whether the window can be focused. - * -On macOS it does not remove the focus from the window. - * - * @platform darwin,win32 - */ - setFocusable(focusable: boolean): void; - /** - * Sets whether the window should be in fullscreen mode. - */ - setFullScreen(flag: boolean): void; - /** - * Sets whether the maximize/zoom window button toggles fullscreen mode or - * maximizes the window. - */ - setFullScreenable(fullscreenable: boolean): void; - /** - * Sets whether the window should have a shadow. - */ - setHasShadow(hasShadow: boolean): void; - /** - * Changes window icon. - * - * @platform win32,linux - */ - setIcon(icon: (NativeImage) | (string)): void; - /** - * Makes the window ignore all mouse events. - * - * All mouse events happened in this window will be passed to the window below this - * window, but if this window has focus, it will still receive keyboard events. - */ - setIgnoreMouseEvents(ignore: boolean, options?: IgnoreMouseEventsOptions): void; - /** - * Enters or leaves kiosk mode. - */ - setKiosk(flag: boolean): void; - /** - * Sets whether the window can be manually maximized by user. On Linux does - * nothing. - * - * @platform darwin,win32 - */ - setMaximizable(maximizable: boolean): void; - /** - * Sets the maximum size of window to `width` and `height`. - */ - setMaximumSize(width: number, height: number): void; - /** - * Sets the `menu` as the window's menu bar. - * - * @platform linux,win32 - */ - setMenu(menu: (Menu) | (null)): void; - /** - * Sets whether the menu bar should be visible. If the menu bar is auto-hide, users - * can still bring up the menu bar by pressing the single `Alt` key. - * - * @platform win32,linux - */ - setMenuBarVisibility(visible: boolean): void; - /** - * Sets whether the window can be manually minimized by user. On Linux does - * nothing. - * - * @platform darwin,win32 - */ - setMinimizable(minimizable: boolean): void; - /** - * Sets the minimum size of window to `width` and `height`. - */ - setMinimumSize(width: number, height: number): void; - /** - * Sets whether the window can be moved by user. On Linux does nothing. - * - * @platform darwin,win32 - */ - setMovable(movable: boolean): void; - /** - * Sets the opacity of the window. On Linux, does nothing. Out of bound number - * values are clamped to the [0, 1] range. - * - * @platform win32,darwin - */ - setOpacity(opacity: number): void; - /** - * Sets a 16 x 16 pixel overlay onto the current taskbar icon, usually used to - * convey some sort of application status or to passively notify the user. - * - * @platform win32 - */ - setOverlayIcon(overlay: (NativeImage) | (null), description: string): void; - /** - * Sets `parent` as current window's parent window, passing `null` will turn - * current window into a top-level window. - */ - setParentWindow(parent: (BrowserWindow) | (null)): void; - /** - * Moves window to `x` and `y`. - */ - setPosition(x: number, y: number, animate?: boolean): void; - /** - * Sets progress value in progress bar. Valid range is [0, 1.0]. - * - * Remove progress bar when progress < 0; Change to indeterminate mode when - * progress > 1. - * - * On Linux platform, only supports Unity desktop environment, you need to specify - * the `*.desktop` file name to `desktopName` field in `package.json`. By default, - * it will assume `{app.name}.desktop`. - * - * On Windows, a mode can be passed. Accepted values are `none`, `normal`, - * `indeterminate`, `error`, and `paused`. If you call `setProgressBar` without a - * mode set (but with a value within the valid range), `normal` will be assumed. - */ - setProgressBar(progress: number, options?: ProgressBarOptions): void; - /** - * Sets the pathname of the file the window represents, and the icon of the file - * will show in window's title bar. - * - * @platform darwin - */ - setRepresentedFilename(filename: string): void; - /** - * Sets whether the window can be manually resized by the user. - */ - setResizable(resizable: boolean): void; - /** - * Setting a window shape determines the area within the window where the system - * permits drawing and user interaction. Outside of the given region, no pixels - * will be drawn and no mouse events will be registered. Mouse events outside of - * the region will not be received by that window, but will fall through to - * whatever is behind the window. - * - * @experimental - * @platform win32,linux - */ - setShape(rects: Rectangle[]): void; - /** - * Changes the attachment point for sheets on macOS. By default, sheets are - * attached just below the window frame, but you may want to display them beneath a - * HTML-rendered toolbar. For example: - * - * @platform darwin - */ - setSheetOffset(offsetY: number, offsetX?: number): void; - /** - * Enters or leaves simple fullscreen mode. - * - * Simple fullscreen mode emulates the native fullscreen behavior found in versions - * of macOS prior to Lion (10.7). - * - * @platform darwin - */ - setSimpleFullScreen(flag: boolean): void; - /** - * Resizes the window to `width` and `height`. If `width` or `height` are below any - * set minimum size constraints the window will snap to its minimum size. - */ - setSize(width: number, height: number, animate?: boolean): void; - /** - * Makes the window not show in the taskbar. - */ - setSkipTaskbar(skip: boolean): void; - /** - * Whether the buttons were added successfully - * - * Add a thumbnail toolbar with a specified set of buttons to the thumbnail image - * of a window in a taskbar button layout. Returns a `Boolean` object indicates - * whether the thumbnail has been added successfully. - * - * The number of buttons in thumbnail toolbar should be no greater than 7 due to - * the limited room. Once you setup the thumbnail toolbar, the toolbar cannot be - * removed due to the platform's limitation. But you can call the API with an empty - * array to clean the buttons. - * - * The `buttons` is an array of `Button` objects: - * - * * `Button` Object - * * `icon` NativeImage - The icon showing in thumbnail toolbar. - * * `click` Function - * * `tooltip` String (optional) - The text of the button's tooltip. - * * `flags` String[] (optional) - Control specific states and behaviors of the - * button. By default, it is `['enabled']`. - * - * The `flags` is an array that can include following `String`s: - * - * * `enabled` - The button is active and available to the user. - * * `disabled` - The button is disabled. It is present, but has a visual state - * indicating it will not respond to user action. - * * `dismissonclick` - When the button is clicked, the thumbnail window closes - * immediately. - * * `nobackground` - Do not draw a button border, use only the image. - * * `hidden` - The button is not shown to the user. - * * `noninteractive` - The button is enabled but not interactive; no pressed - * button state is drawn. This value is intended for instances where the button is - * used in a notification. - * - * @platform win32 - */ - setThumbarButtons(buttons: ThumbarButton[]): boolean; - /** - * Sets the region of the window to show as the thumbnail image displayed when - * hovering over the window in the taskbar. You can reset the thumbnail to be the - * entire window by specifying an empty region: `{ x: 0, y: 0, width: 0, height: 0 - * }`. - * - * @platform win32 - */ - setThumbnailClip(region: Rectangle): void; - /** - * Sets the toolTip that is displayed when hovering over the window thumbnail in - * the taskbar. - * - * @platform win32 - */ - setThumbnailToolTip(toolTip: string): void; - /** - * Changes the title of native window to `title`. - */ - setTitle(title: string): void; - /** - * Raises `browserView` above other `BrowserView`s attached to `win`. Throws an - * error if `browserView` is not attached to `win`. - * - * @experimental - */ - setTopBrowserView(browserView: BrowserView): void; - /** - * Sets the touchBar layout for the current window. Specifying `null` or - * `undefined` clears the touch bar. This method only has an effect if the machine - * has a touch bar and is running on macOS 10.12.1+. - * - * **Note:** The TouchBar API is currently experimental and may change or be - * removed in future Electron releases. - * - * @platform darwin - */ - setTouchBar(touchBar: (TouchBar) | (null)): void; - /** - * Set a custom position for the traffic light buttons. Can only be used with - * `titleBarStyle` set to `hidden`. - * - * @platform darwin - */ - setTrafficLightPosition(position: Point): void; - /** - * Adds a vibrancy effect to the browser window. Passing `null` or an empty string - * will remove the vibrancy effect on the window. - * - * Note that `appearance-based`, `light`, `dark`, `medium-light`, and `ultra-dark` - * have been deprecated and will be removed in an upcoming version of macOS. - * - * @platform darwin - */ - setVibrancy(type: (('appearance-based' | 'light' | 'dark' | 'titlebar' | 'selection' | 'menu' | 'popover' | 'sidebar' | 'medium-light' | 'ultra-dark' | 'header' | 'sheet' | 'window' | 'hud' | 'fullscreen-ui' | 'tooltip' | 'content' | 'under-window' | 'under-page')) | (null)): void; - /** - * Sets whether the window should be visible on all workspaces. - * -**Note:** This API does nothing on Windows. - */ - setVisibleOnAllWorkspaces(visible: boolean, options?: VisibleOnAllWorkspacesOptions): void; - /** - * Sets whether the window traffic light buttons should be visible. - * -This cannot be called when `titleBarStyle` is set to `customButtonsOnHover`. - * - * @platform darwin - */ - setWindowButtonVisibility(visible: boolean): void; - /** - * Shows and gives focus to the window. - */ - show(): void; - /** - * Same as `webContents.showDefinitionForSelection()`. - * - * @platform darwin - */ - showDefinitionForSelection(): void; - /** - * Shows the window but doesn't focus on it. - */ - showInactive(): void; - /** - * Toggles the visibility of the tab bar if native tabs are enabled and there is - * only one tab in the current window. - * - * @platform darwin - */ - toggleTabBar(): void; - /** - * Unhooks all of the window messages. - * - * @platform win32 - */ - unhookAllWindowMessages(): void; - /** - * Unhook the window message. - * - * @platform win32 - */ - unhookWindowMessage(message: number): void; - /** - * Unmaximizes the window. - */ - unmaximize(): void; - accessibleTitle: string; - autoHideMenuBar: boolean; - closable: boolean; - documentEdited: boolean; - excludedFromShownWindowsMenu: boolean; - fullScreen: boolean; - fullScreenable: boolean; - readonly id: number; - kiosk: boolean; - maximizable: boolean; - menuBarVisible: boolean; - minimizable: boolean; - movable: boolean; - representedFilename: string; - resizable: boolean; - shadow: boolean; - simpleFullScreen: boolean; - title: string; - visibleOnAllWorkspaces: boolean; - readonly webContents: WebContents; - } - - class BrowserWindowProxy { - - // Docs: https://electronjs.org/docs/api/browser-window-proxy - - /** - * Removes focus from the child window. - */ - blur(): void; - /** - * Forcefully closes the child window without calling its unload event. - */ - close(): void; - /** - * Evaluates the code in the child window. - */ - eval(code: string): void; - /** - * Focuses the child window (brings the window to front). - */ - focus(): void; - /** - * Sends a message to the child window with the specified origin or `*` for no - * origin preference. - * - * In addition to these methods, the child window implements `window.opener` object - * with no properties and a single method. - */ - postMessage(message: any, targetOrigin: string): void; - /** - * Invokes the print dialog on the child window. - */ - print(): void; - closed: boolean; - } - - interface Certificate { - - // Docs: https://electronjs.org/docs/api/structures/certificate - - /** - * PEM encoded data - */ - data: string; - /** - * Fingerprint of the certificate - */ - fingerprint: string; - /** - * Issuer principal - */ - issuer: CertificatePrincipal; - /** - * Issuer certificate (if not self-signed) - */ - issuerCert: Certificate; - /** - * Issuer's Common Name - */ - issuerName: string; - /** - * Hex value represented string - */ - serialNumber: string; - /** - * Subject principal - */ - subject: CertificatePrincipal; - /** - * Subject's Common Name - */ - subjectName: string; - /** - * End date of the certificate being valid in seconds - */ - validExpiry: number; - /** - * Start date of the certificate being valid in seconds - */ - validStart: number; - } - - interface CertificatePrincipal { - - // Docs: https://electronjs.org/docs/api/structures/certificate-principal - - /** - * Common Name. - */ - commonName: string; - /** - * Country or region. - */ - country: string; - /** - * Locality. - */ - locality: string; - /** - * Organization names. - */ - organizations: string[]; - /** - * Organization Unit names. - */ - organizationUnits: string[]; - /** - * State or province. - */ - state: string; - } - - class ClientRequest extends NodeEventEmitter { - - // Docs: https://electronjs.org/docs/api/client-request - - /** - * Emitted when the `request` is aborted. The `abort` event will not be fired if - * the `request` is already closed. - */ - on(event: 'abort', listener: Function): this; - once(event: 'abort', listener: Function): this; - addListener(event: 'abort', listener: Function): this; - removeListener(event: 'abort', listener: Function): this; - /** - * Emitted as the last event in the HTTP request-response transaction. The `close` - * event indicates that no more events will be emitted on either the `request` or - * `response` objects. - */ - on(event: 'close', listener: Function): this; - once(event: 'close', listener: Function): this; - addListener(event: 'close', listener: Function): this; - removeListener(event: 'close', listener: Function): this; - /** - * Emitted when the `net` module fails to issue a network request. Typically when - * the `request` object emits an `error` event, a `close` event will subsequently - * follow and no response object will be provided. - */ - on(event: 'error', listener: ( - /** - * an error object providing some information about the failure. - */ - error: Error) => void): this; - once(event: 'error', listener: ( - /** - * an error object providing some information about the failure. - */ - error: Error) => void): this; - addListener(event: 'error', listener: ( - /** - * an error object providing some information about the failure. - */ - error: Error) => void): this; - removeListener(event: 'error', listener: ( - /** - * an error object providing some information about the failure. - */ - error: Error) => void): this; - /** - * Emitted just after the last chunk of the `request`'s data has been written into - * the `request` object. - */ - on(event: 'finish', listener: Function): this; - once(event: 'finish', listener: Function): this; - addListener(event: 'finish', listener: Function): this; - removeListener(event: 'finish', listener: Function): this; - /** - * Emitted when an authenticating proxy is asking for user credentials. - * - * The `callback` function is expected to be called back with user credentials: - * - * * `username` String - * * `password` String - * - * Providing empty credentials will cancel the request and report an authentication - * error on the response object: - */ - on(event: 'login', listener: (authInfo: AuthInfo, - callback: (username?: string, password?: string) => void) => void): this; - once(event: 'login', listener: (authInfo: AuthInfo, - callback: (username?: string, password?: string) => void) => void): this; - addListener(event: 'login', listener: (authInfo: AuthInfo, - callback: (username?: string, password?: string) => void) => void): this; - removeListener(event: 'login', listener: (authInfo: AuthInfo, - callback: (username?: string, password?: string) => void) => void): this; - /** - * Emitted when the server returns a redirect response (e.g. 301 Moved - * Permanently). Calling `request.followRedirect` will continue with the - * redirection. If this event is handled, `request.followRedirect` must be called - * **synchronously**, otherwise the request will be cancelled. - */ - on(event: 'redirect', listener: (statusCode: number, - method: string, - redirectUrl: string, - responseHeaders: Record) => void): this; - once(event: 'redirect', listener: (statusCode: number, - method: string, - redirectUrl: string, - responseHeaders: Record) => void): this; - addListener(event: 'redirect', listener: (statusCode: number, - method: string, - redirectUrl: string, - responseHeaders: Record) => void): this; - removeListener(event: 'redirect', listener: (statusCode: number, - method: string, - redirectUrl: string, - responseHeaders: Record) => void): this; - on(event: 'response', listener: ( - /** - * An object representing the HTTP response message. - */ - response: IncomingMessage) => void): this; - once(event: 'response', listener: ( - /** - * An object representing the HTTP response message. - */ - response: IncomingMessage) => void): this; - addListener(event: 'response', listener: ( - /** - * An object representing the HTTP response message. - */ - response: IncomingMessage) => void): this; - removeListener(event: 'response', listener: ( - /** - * An object representing the HTTP response message. - */ - response: IncomingMessage) => void): this; - /** - * ClientRequest - */ - constructor(options: (ClientRequestConstructorOptions) | (string)); - /** - * Cancels an ongoing HTTP transaction. If the request has already emitted the - * `close` event, the abort operation will have no effect. Otherwise an ongoing - * event will emit `abort` and `close` events. Additionally, if there is an ongoing - * response object,it will emit the `aborted` event. - */ - abort(): void; - /** - * Sends the last chunk of the request data. Subsequent write or end operations - * will not be allowed. The `finish` event is emitted just after the end operation. - */ - end(chunk?: (string) | (Buffer), encoding?: string, callback?: () => void): void; - /** - * Continues any pending redirection. Can only be called during a `'redirect'` - * event. - */ - followRedirect(): void; - /** - * The value of a previously set extra header name. - */ - getHeader(name: string): string; - /** - * * `active` Boolean - Whether the request is currently active. If this is false - * no other properties will be set - * * `started` Boolean - Whether the upload has started. If this is false both - * `current` and `total` will be set to 0. - * * `current` Integer - The number of bytes that have been uploaded so far - * * `total` Integer - The number of bytes that will be uploaded this request - * - * You can use this method in conjunction with `POST` requests to get the progress - * of a file upload or other data transfer. - */ - getUploadProgress(): UploadProgress; - /** - * Removes a previously set extra header name. This method can be called only - * before first write. Trying to call it after the first write will throw an error. - */ - removeHeader(name: string): void; - /** - * Adds an extra HTTP header. The header name will be issued as-is without - * lowercasing. It can be called only before first write. Calling this method after - * the first write will throw an error. If the passed value is not a `String`, its - * `toString()` method will be called to obtain the final value. - * - * Certain headers are restricted from being set by apps. These headers are listed - * below. More information on restricted headers can be found in Chromium's header - * utils. - * - * * `Content-Length` - * * `Host` - * * `Trailer` or `Te` - * * `Upgrade` - * * `Cookie2` - * * `Keep-Alive` - * * `Transfer-Encoding` - * - * Additionally, setting the `Connection` header to the value `upgrade` is also - * disallowed. - */ - setHeader(name: string, value: string): void; - /** - * `callback` is essentially a dummy function introduced in the purpose of keeping - * similarity with the Node.js API. It is called asynchronously in the next tick - * after `chunk` content have been delivered to the Chromium networking layer. - * Contrary to the Node.js implementation, it is not guaranteed that `chunk` - * content have been flushed on the wire before `callback` is called. - * - * Adds a chunk of data to the request body. The first write operation may cause - * the request headers to be issued on the wire. After the first write operation, - * it is not allowed to add or remove a custom header. - */ - write(chunk: (string) | (Buffer), encoding?: string, callback?: () => void): void; - chunkedEncoding: boolean; - } - - interface Clipboard { - - // Docs: https://electronjs.org/docs/api/clipboard - - /** - * An array of supported formats for the clipboard `type`. - */ - availableFormats(type?: 'selection' | 'clipboard'): string[]; - /** - * Clears the clipboard content. - */ - clear(type?: 'selection' | 'clipboard'): void; - /** - * Whether the clipboard supports the specified `format`. - * - * @experimental - */ - has(format: string, type?: 'selection' | 'clipboard'): boolean; - /** - * Reads `format` type from the clipboard. - * - * @experimental - */ - read(format: string): string; - /** - * * `title` String - * * `url` String - * - * Returns an Object containing `title` and `url` keys representing the bookmark in - * the clipboard. The `title` and `url` values will be empty strings when the - * bookmark is unavailable. - * - * @platform darwin,win32 - */ - readBookmark(): ReadBookmark; - /** - * Reads `format` type from the clipboard. - * - * @experimental - */ - readBuffer(format: string): Buffer; - /** - * The text on the find pasteboard, which is the pasteboard that holds information - * about the current state of the active applicationโ€™s find panel. - * - * This method uses synchronous IPC when called from the renderer process. The - * cached value is reread from the find pasteboard whenever the application is - * activated. - * - * @platform darwin - */ - readFindText(): string; - /** - * The content in the clipboard as markup. - */ - readHTML(type?: 'selection' | 'clipboard'): string; - /** - * The image content in the clipboard. - */ - readImage(type?: 'selection' | 'clipboard'): NativeImage; - /** - * The content in the clipboard as RTF. - */ - readRTF(type?: 'selection' | 'clipboard'): string; - /** - * The content in the clipboard as plain text. - */ - readText(type?: 'selection' | 'clipboard'): string; - /** - * Writes `data` to the clipboard. - */ - write(data: Data, type?: 'selection' | 'clipboard'): void; - /** - * Writes the `title` and `url` into the clipboard as a bookmark. - * - * **Note:** Most apps on Windows don't support pasting bookmarks into them so you - * can use `clipboard.write` to write both a bookmark and fallback text to the - * clipboard. - * - * @platform darwin,win32 - */ - writeBookmark(title: string, url: string, type?: 'selection' | 'clipboard'): void; - /** - * Writes the `buffer` into the clipboard as `format`. - * - * @experimental - */ - writeBuffer(format: string, buffer: Buffer, type?: 'selection' | 'clipboard'): void; - /** - * Writes the `text` into the find pasteboard (the pasteboard that holds - * information about the current state of the active applicationโ€™s find panel) as - * plain text. This method uses synchronous IPC when called from the renderer - * process. - * - * @platform darwin - */ - writeFindText(text: string): void; - /** - * Writes `markup` to the clipboard. - */ - writeHTML(markup: string, type?: 'selection' | 'clipboard'): void; - /** - * Writes `image` to the clipboard. - */ - writeImage(image: NativeImage, type?: 'selection' | 'clipboard'): void; - /** - * Writes the `text` into the clipboard in RTF. - */ - writeRTF(text: string, type?: 'selection' | 'clipboard'): void; - /** - * Writes the `text` into the clipboard as plain text. - */ - writeText(text: string, type?: 'selection' | 'clipboard'): void; - } - - class CommandLine { - - // Docs: https://electronjs.org/docs/api/command-line - - /** - * Append an argument to Chromium's command line. The argument will be quoted - * correctly. Switches will precede arguments regardless of appending order. - * - * If you're appending an argument like `--switch=value`, consider using - * `appendSwitch('switch', 'value')` instead. - * - * **Note:** This will not affect `process.argv`. The intended usage of this - * function is to control Chromium's behavior. - */ - appendArgument(value: string): void; - /** - * Append a switch (with optional `value`) to Chromium's command line. - * - * **Note:** This will not affect `process.argv`. The intended usage of this - * function is to control Chromium's behavior. - */ - appendSwitch(the_switch: string, value?: string): void; - /** - * The command-line switch value. - * - * **Note:** When the switch is not present or has no value, it returns empty - * string. - */ - getSwitchValue(the_switch: string): string; - /** - * Whether the command-line switch is present. - */ - hasSwitch(the_switch: string): boolean; - } - - interface ContentTracing { - - // Docs: https://electronjs.org/docs/api/content-tracing - - /** - * resolves with an array of category groups once all child processes have - * acknowledged the `getCategories` request - * - * Get a set of category groups. The category groups can change as new code paths - * are reached. See also the list of built-in tracing categories. - * - * > **NOTE:** Electron adds a non-default tracing category called `"electron"`. - * This category can be used to capture Electron-specific tracing events. - */ - getCategories(): Promise; - /** - * Resolves with an object containing the `value` and `percentage` of trace buffer - * maximum usage - * - * * `value` Number - * * `percentage` Number - * - * Get the maximum usage across processes of trace buffer as a percentage of the - * full state. - */ - getTraceBufferUsage(): Promise; - /** - * resolved once all child processes have acknowledged the `startRecording` - * request. - * - * Start recording on all processes. - * - * Recording begins immediately locally and asynchronously on child processes as - * soon as they receive the EnableRecording request. - * - * If a recording is already running, the promise will be immediately resolved, as - * only one trace operation can be in progress at a time. - */ - startRecording(options: (TraceConfig) | (TraceCategoriesAndOptions)): Promise; - /** - * resolves with a path to a file that contains the traced data once all child - * processes have acknowledged the `stopRecording` request - * - * Stop recording on all processes. - * - * Child processes typically cache trace data and only rarely flush and send trace - * data back to the main process. This helps to minimize the runtime overhead of - * tracing since sending trace data over IPC can be an expensive operation. So, to - * end tracing, Chromium asynchronously asks all child processes to flush any - * pending trace data. - * - * Trace data will be written into `resultFilePath`. If `resultFilePath` is empty - * or not provided, trace data will be written to a temporary file, and the path - * will be returned in the promise. - */ - stopRecording(resultFilePath?: string): Promise; - } - - interface ContextBridge { - - // Docs: https://electronjs.org/docs/api/context-bridge - - exposeInMainWorld(apiKey: string, api: any): void; - } - - interface Cookie { - - // Docs: https://electronjs.org/docs/api/structures/cookie - - /** - * The domain of the cookie; this will be normalized with a preceding dot so that - * it's also valid for subdomains. - */ - domain?: string; - /** - * The expiration date of the cookie as the number of seconds since the UNIX epoch. - * Not provided for session cookies. - */ - expirationDate?: number; - /** - * Whether the cookie is a host-only cookie; this will only be `true` if no domain - * was passed. - */ - hostOnly?: boolean; - /** - * Whether the cookie is marked as HTTP only. - */ - httpOnly?: boolean; - /** - * The name of the cookie. - */ - name: string; - /** - * The path of the cookie. - */ - path?: string; - /** - * The Same Site policy applied to this cookie. Can be `unspecified`, - * `no_restriction`, `lax` or `strict`. - */ - sameSite: ('unspecified' | 'no_restriction' | 'lax' | 'strict'); - /** - * Whether the cookie is marked as secure. - */ - secure?: boolean; - /** - * Whether the cookie is a session cookie or a persistent cookie with an expiration - * date. - */ - session?: boolean; - /** - * The value of the cookie. - */ - value: string; - } - - class Cookies extends NodeEventEmitter { - - // Docs: https://electronjs.org/docs/api/cookies - - /** - * Emitted when a cookie is changed because it was added, edited, removed, or - * expired. - */ - on(event: 'changed', listener: (event: Event, - /** - * The cookie that was changed. - */ - cookie: Cookie, - /** - * The cause of the change with one of the following values: - */ - cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'), - /** - * `true` if the cookie was removed, `false` otherwise. - */ - removed: boolean) => void): this; - once(event: 'changed', listener: (event: Event, - /** - * The cookie that was changed. - */ - cookie: Cookie, - /** - * The cause of the change with one of the following values: - */ - cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'), - /** - * `true` if the cookie was removed, `false` otherwise. - */ - removed: boolean) => void): this; - addListener(event: 'changed', listener: (event: Event, - /** - * The cookie that was changed. - */ - cookie: Cookie, - /** - * The cause of the change with one of the following values: - */ - cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'), - /** - * `true` if the cookie was removed, `false` otherwise. - */ - removed: boolean) => void): this; - removeListener(event: 'changed', listener: (event: Event, - /** - * The cookie that was changed. - */ - cookie: Cookie, - /** - * The cause of the change with one of the following values: - */ - cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'), - /** - * `true` if the cookie was removed, `false` otherwise. - */ - removed: boolean) => void): this; - /** - * A promise which resolves when the cookie store has been flushed - * -Writes any unwritten cookies data to disk. - */ - flushStore(): Promise; - /** - * A promise which resolves an array of cookie objects. - * - * Sends a request to get all cookies matching `filter`, and resolves a promise - * with the response. - */ - get(filter: CookiesGetFilter): Promise; - /** - * A promise which resolves when the cookie has been removed - * -Removes the cookies matching `url` and `name` - */ - remove(url: string, name: string): Promise; - /** - * A promise which resolves when the cookie has been set - * -Sets a cookie with `details`. - */ - set(details: CookiesSetDetails): Promise; - } - - interface CPUUsage { - - // Docs: https://electronjs.org/docs/api/structures/cpu-usage - - /** - * The number of average idle CPU wakeups per second since the last call to - * getCPUUsage. First call returns 0. Will always return 0 on Windows. - */ - idleWakeupsPerSecond: number; - /** - * Percentage of CPU used since the last call to getCPUUsage. First call returns 0. - */ - percentCPUUsage: number; - } - - interface CrashReport { - - // Docs: https://electronjs.org/docs/api/structures/crash-report - - date: Date; - id: string; - } - - interface CrashReporter { - - // Docs: https://electronjs.org/docs/api/crash-reporter - - /** - * Set an extra parameter to be sent with the crash report. The values specified - * here will be sent in addition to any values set via the `extra` option when - * `start` was called. - * - * Parameters added in this fashion (or via the `extra` parameter to - * `crashReporter.start`) are specific to the calling process. Adding extra - * parameters in the main process will not cause those parameters to be sent along - * with crashes from renderer or other child processes. Similarly, adding extra - * parameters in a renderer process will not result in those parameters being sent - * with crashes that occur in other renderer processes or in the main process. - * - * **Note:** Parameters have limits on the length of the keys and values. Key names - * must be no longer than 39 bytes, and values must be no longer than 20320 bytes. - * Keys with names longer than the maximum will be silently ignored. Key values - * longer than the maximum length will be truncated. - * - * **Note:** On linux values that are longer than 127 bytes will be chunked into - * multiple keys, each 127 bytes in length. E.g. `addExtraParameter('foo', - * 'a'.repeat(130))` will result in two chunked keys `foo__1` and `foo__2`, the - * first will contain the first 127 bytes and the second will contain the remaining - * 3 bytes. On your crash reporting backend you should stitch together keys in - * this format. - */ - addExtraParameter(key: string, value: string): void; - /** - * The date and ID of the last crash report. Only crash reports that have been - * uploaded will be returned; even if a crash report is present on disk it will not - * be returned until it is uploaded. In the case that there are no uploaded - * reports, `null` is returned. - * -**Note:** This method is only available in the main process. - */ - getLastCrashReport(): CrashReport; - /** - * The current 'extra' parameters of the crash reporter. - */ - getParameters(): Record; - /** - * Returns all uploaded crash reports. Each report contains the date and uploaded - * ID. - -**Note:** This method is only available in the main process. - */ - getUploadedReports(): CrashReport[]; - /** - * Whether reports should be submitted to the server. Set through the `start` - * method or `setUploadToServer`. - * -**Note:** This method is only available in the main process. - */ - getUploadToServer(): boolean; - /** - * Remove an extra parameter from the current set of parameters. Future crashes - * will not include this parameter. - */ - removeExtraParameter(key: string): void; - /** - * This would normally be controlled by user preferences. This has no effect if - * called before `start` is called. - * -**Note:** This method is only available in the main process. - */ - setUploadToServer(uploadToServer: boolean): void; - /** - * This method must be called before using any other `crashReporter` APIs. Once - * initialized this way, the crashpad handler collects crashes from all - * subsequently created processes. The crash reporter cannot be disabled once - * started. - * - * This method should be called as early as possible in app startup, preferably - * before `app.on('ready')`. If the crash reporter is not initialized at the time a - * renderer process is created, then that renderer process will not be monitored by - * the crash reporter. - * - * **Note:** You can test out the crash reporter by generating a crash using - * `process.crash()`. - * - * **Note:** If you need to send additional/updated `extra` parameters after your - * first call `start` you can call `addExtraParameter`. - * - * **Note:** Parameters passed in `extra`, `globalExtra` or set with - * `addExtraParameter` have limits on the length of the keys and values. Key names - * must be at most 39 bytes long, and values must be no longer than 127 bytes. Keys - * with names longer than the maximum will be silently ignored. Key values longer - * than the maximum length will be truncated. - * -**Note:** This method is only available in the main process. - */ - start(options: CrashReporterStartOptions): void; - } - - interface CustomScheme { - - // Docs: https://electronjs.org/docs/api/structures/custom-scheme - - privileges?: Privileges; - /** - * Custom schemes to be registered with options. - */ - scheme: string; - } - - class Debugger extends NodeEventEmitter { - - // Docs: https://electronjs.org/docs/api/debugger - - /** - * Emitted when the debugging session is terminated. This happens either when - * `webContents` is closed or devtools is invoked for the attached `webContents`. - */ - on(event: 'detach', listener: (event: Event, - /** - * Reason for detaching debugger. - */ - reason: string) => void): this; - once(event: 'detach', listener: (event: Event, - /** - * Reason for detaching debugger. - */ - reason: string) => void): this; - addListener(event: 'detach', listener: (event: Event, - /** - * Reason for detaching debugger. - */ - reason: string) => void): this; - removeListener(event: 'detach', listener: (event: Event, - /** - * Reason for detaching debugger. - */ - reason: string) => void): this; - /** - * Emitted whenever the debugging target issues an instrumentation event. - */ - on(event: 'message', listener: (event: Event, - /** - * Method name. - */ - method: string, - /** - * Event parameters defined by the 'parameters' attribute in the remote debugging - * protocol. - */ - params: any, - /** - * Unique identifier of attached debugging session, will match the value sent from - * `debugger.sendCommand`. - */ - sessionId: string) => void): this; - once(event: 'message', listener: (event: Event, - /** - * Method name. - */ - method: string, - /** - * Event parameters defined by the 'parameters' attribute in the remote debugging - * protocol. - */ - params: any, - /** - * Unique identifier of attached debugging session, will match the value sent from - * `debugger.sendCommand`. - */ - sessionId: string) => void): this; - addListener(event: 'message', listener: (event: Event, - /** - * Method name. - */ - method: string, - /** - * Event parameters defined by the 'parameters' attribute in the remote debugging - * protocol. - */ - params: any, - /** - * Unique identifier of attached debugging session, will match the value sent from - * `debugger.sendCommand`. - */ - sessionId: string) => void): this; - removeListener(event: 'message', listener: (event: Event, - /** - * Method name. - */ - method: string, - /** - * Event parameters defined by the 'parameters' attribute in the remote debugging - * protocol. - */ - params: any, - /** - * Unique identifier of attached debugging session, will match the value sent from - * `debugger.sendCommand`. - */ - sessionId: string) => void): this; - /** - * Attaches the debugger to the `webContents`. - */ - attach(protocolVersion?: string): void; - /** - * Detaches the debugger from the `webContents`. - */ - detach(): void; - /** - * Whether a debugger is attached to the `webContents`. - */ - isAttached(): boolean; - /** - * A promise that resolves with the response defined by the 'returns' attribute of - * the command description in the remote debugging protocol or is rejected - * indicating the failure of the command. - * -Send given command to the debugging target. - */ - sendCommand(method: string, commandParams?: any, sessionId?: string): Promise; - } - - interface DesktopCapturer { - - // Docs: https://electronjs.org/docs/api/desktop-capturer - - /** - * Resolves with an array of `DesktopCapturerSource` objects, each - * `DesktopCapturerSource` represents a screen or an individual window that can be - * captured. - * - * **Note** Capturing the screen contents requires user consent on macOS 10.15 - * Catalina or higher, which can detected by - * `systemPreferences.getMediaAccessStatus`. - */ - getSources(options: SourcesOptions): Promise; - } - - interface DesktopCapturerSource { - - // Docs: https://electronjs.org/docs/api/structures/desktop-capturer-source - - /** - * An icon image of the application that owns the window or null if the source has - * a type screen. The size of the icon is not known in advance and depends on what - * the application provides. - */ - appIcon: NativeImage; - /** - * A unique identifier that will correspond to the `id` of the matching Display - * returned by the Screen API. On some platforms, this is equivalent to the `XX` - * portion of the `id` field above and on others it will differ. It will be an - * empty string if not available. - */ - display_id: string; - /** - * The identifier of a window or screen that can be used as a `chromeMediaSourceId` - * constraint when calling [`navigator.webkitGetUserMedia`]. The format of the - * identifier will be `window:XX` or `screen:XX`, where `XX` is a random generated - * number. - */ - id: string; - /** - * A screen source will be named either `Entire Screen` or `Screen `, while - * the name of a window source will match the window title. - */ - name: string; - /** - * A thumbnail image. **Note:** There is no guarantee that the size of the - * thumbnail is the same as the `thumbnailSize` specified in the `options` passed - * to `desktopCapturer.getSources`. The actual size depends on the scale of the - * screen or window. - */ - thumbnail: NativeImage; - } - - interface Dialog { - - // Docs: https://electronjs.org/docs/api/dialog - - /** - * resolves when the certificate trust dialog is shown. - * - * On macOS, this displays a modal dialog that shows a message and certificate - * information, and gives the user the option of trusting/importing the - * certificate. If you provide a `browserWindow` argument the dialog will be - * attached to the parent window, making it modal. - * - * On Windows the options are more limited, due to the Win32 APIs used: - * - * * The `message` argument is not used, as the OS provides its own confirmation - * dialog. - * * The `browserWindow` argument is ignored since it is not possible to make this - * confirmation dialog modal. - * - * @platform darwin,win32 - */ - showCertificateTrustDialog(browserWindow: BrowserWindow, options: CertificateTrustDialogOptions): Promise; - /** - * resolves when the certificate trust dialog is shown. - * - * On macOS, this displays a modal dialog that shows a message and certificate - * information, and gives the user the option of trusting/importing the - * certificate. If you provide a `browserWindow` argument the dialog will be - * attached to the parent window, making it modal. - * - * On Windows the options are more limited, due to the Win32 APIs used: - * - * * The `message` argument is not used, as the OS provides its own confirmation - * dialog. - * * The `browserWindow` argument is ignored since it is not possible to make this - * confirmation dialog modal. - * - * @platform darwin,win32 - */ - showCertificateTrustDialog(options: CertificateTrustDialogOptions): Promise; - /** - * Displays a modal dialog that shows an error message. - * - * This API can be called safely before the `ready` event the `app` module emits, - * it is usually used to report errors in early stage of startup. If called before - * the app `ready`event on Linux, the message will be emitted to stderr, and no GUI - * dialog will appear. - */ - showErrorBox(title: string, content: string): void; - /** - * resolves with a promise containing the following properties: - * - * * `response` Number - The index of the clicked button. - * * `checkboxChecked` Boolean - The checked state of the checkbox if - * `checkboxLabel` was set. Otherwise `false`. - * - * Shows a message box. - * - * The `browserWindow` argument allows the dialog to attach itself to a parent - * window, making it modal. - */ - showMessageBox(browserWindow: BrowserWindow, options: MessageBoxOptions): Promise; - /** - * resolves with a promise containing the following properties: - * - * * `response` Number - The index of the clicked button. - * * `checkboxChecked` Boolean - The checked state of the checkbox if - * `checkboxLabel` was set. Otherwise `false`. - * - * Shows a message box. - * - * The `browserWindow` argument allows the dialog to attach itself to a parent - * window, making it modal. - */ - showMessageBox(options: MessageBoxOptions): Promise; - /** - * the index of the clicked button. - * - * Shows a message box, it will block the process until the message box is closed. - * It returns the index of the clicked button. - * - * The `browserWindow` argument allows the dialog to attach itself to a parent - * window, making it modal. If `browserWindow` is not shown dialog will not be - * attached to it. In such case it will be displayed as an independent window. - */ - showMessageBoxSync(browserWindow: BrowserWindow, options: MessageBoxSyncOptions): number; - /** - * the index of the clicked button. - * - * Shows a message box, it will block the process until the message box is closed. - * It returns the index of the clicked button. - * - * The `browserWindow` argument allows the dialog to attach itself to a parent - * window, making it modal. If `browserWindow` is not shown dialog will not be - * attached to it. In such case it will be displayed as an independent window. - */ - showMessageBoxSync(options: MessageBoxSyncOptions): number; - /** - * Resolve with an object containing the following: - * - * * `canceled` Boolean - whether or not the dialog was canceled. - * * `filePaths` String[] - An array of file paths chosen by the user. If the - * dialog is cancelled this will be an empty array. - * * `bookmarks` String[] (optional) _macOS_ _mas_ - An array matching the - * `filePaths` array of base64 encoded strings which contains security scoped - * bookmark data. `securityScopedBookmarks` must be enabled for this to be - * populated. (For return values, see table here.) - * - * The `browserWindow` argument allows the dialog to attach itself to a parent - * window, making it modal. - * - * The `filters` specifies an array of file types that can be displayed or selected - * when you want to limit the user to a specific type. For example: - * - * The `extensions` array should contain extensions without wildcards or dots (e.g. - * `'png'` is good but `'.png'` and `'*.png'` are bad). To show all files, use the - * `'*'` wildcard (no other wildcard is supported). - * - * **Note:** On Windows and Linux an open dialog can not be both a file selector - * and a directory selector, so if you set `properties` to `['openFile', - * 'openDirectory']` on these platforms, a directory selector will be shown. - */ - showOpenDialog(browserWindow: BrowserWindow, options: OpenDialogOptions): Promise; - /** - * Resolve with an object containing the following: - * - * * `canceled` Boolean - whether or not the dialog was canceled. - * * `filePaths` String[] - An array of file paths chosen by the user. If the - * dialog is cancelled this will be an empty array. - * * `bookmarks` String[] (optional) _macOS_ _mas_ - An array matching the - * `filePaths` array of base64 encoded strings which contains security scoped - * bookmark data. `securityScopedBookmarks` must be enabled for this to be - * populated. (For return values, see table here.) - * - * The `browserWindow` argument allows the dialog to attach itself to a parent - * window, making it modal. - * - * The `filters` specifies an array of file types that can be displayed or selected - * when you want to limit the user to a specific type. For example: - * - * The `extensions` array should contain extensions without wildcards or dots (e.g. - * `'png'` is good but `'.png'` and `'*.png'` are bad). To show all files, use the - * `'*'` wildcard (no other wildcard is supported). - * - * **Note:** On Windows and Linux an open dialog can not be both a file selector - * and a directory selector, so if you set `properties` to `['openFile', - * 'openDirectory']` on these platforms, a directory selector will be shown. - */ - showOpenDialog(options: OpenDialogOptions): Promise; - /** - * the file paths chosen by the user; if the dialog is cancelled it returns - * `undefined`. - * - * The `browserWindow` argument allows the dialog to attach itself to a parent - * window, making it modal. - * - * The `filters` specifies an array of file types that can be displayed or selected - * when you want to limit the user to a specific type. For example: - * - * The `extensions` array should contain extensions without wildcards or dots (e.g. - * `'png'` is good but `'.png'` and `'*.png'` are bad). To show all files, use the - * `'*'` wildcard (no other wildcard is supported). - * - * **Note:** On Windows and Linux an open dialog can not be both a file selector - * and a directory selector, so if you set `properties` to `['openFile', - * 'openDirectory']` on these platforms, a directory selector will be shown. - */ - showOpenDialogSync(browserWindow: BrowserWindow, options: OpenDialogSyncOptions): (string[]) | (undefined); - /** - * the file paths chosen by the user; if the dialog is cancelled it returns - * `undefined`. - * - * The `browserWindow` argument allows the dialog to attach itself to a parent - * window, making it modal. - * - * The `filters` specifies an array of file types that can be displayed or selected - * when you want to limit the user to a specific type. For example: - * - * The `extensions` array should contain extensions without wildcards or dots (e.g. - * `'png'` is good but `'.png'` and `'*.png'` are bad). To show all files, use the - * `'*'` wildcard (no other wildcard is supported). - * - * **Note:** On Windows and Linux an open dialog can not be both a file selector - * and a directory selector, so if you set `properties` to `['openFile', - * 'openDirectory']` on these platforms, a directory selector will be shown. - */ - showOpenDialogSync(options: OpenDialogSyncOptions): (string[]) | (undefined); - /** - * Resolve with an object containing the following: - * - * * `canceled` Boolean - whether or not the dialog was canceled. - * * `filePath` String (optional) - If the dialog is canceled, this will be - * `undefined`. - * * `bookmark` String (optional) _macOS_ _mas_ - Base64 encoded string which - * contains the security scoped bookmark data for the saved file. - * `securityScopedBookmarks` must be enabled for this to be present. (For return - * values, see table here.) - * - * The `browserWindow` argument allows the dialog to attach itself to a parent - * window, making it modal. - * - * The `filters` specifies an array of file types that can be displayed, see - * `dialog.showOpenDialog` for an example. - * - * **Note:** On macOS, using the asynchronous version is recommended to avoid - * issues when expanding and collapsing the dialog. - */ - showSaveDialog(browserWindow: BrowserWindow, options: SaveDialogOptions): Promise; - /** - * Resolve with an object containing the following: - * - * * `canceled` Boolean - whether or not the dialog was canceled. - * * `filePath` String (optional) - If the dialog is canceled, this will be - * `undefined`. - * * `bookmark` String (optional) _macOS_ _mas_ - Base64 encoded string which - * contains the security scoped bookmark data for the saved file. - * `securityScopedBookmarks` must be enabled for this to be present. (For return - * values, see table here.) - * - * The `browserWindow` argument allows the dialog to attach itself to a parent - * window, making it modal. - * - * The `filters` specifies an array of file types that can be displayed, see - * `dialog.showOpenDialog` for an example. - * - * **Note:** On macOS, using the asynchronous version is recommended to avoid - * issues when expanding and collapsing the dialog. - */ - showSaveDialog(options: SaveDialogOptions): Promise; - /** - * the path of the file chosen by the user; if the dialog is cancelled it returns - * `undefined`. - * - * The `browserWindow` argument allows the dialog to attach itself to a parent - * window, making it modal. - * - * The `filters` specifies an array of file types that can be displayed, see - * `dialog.showOpenDialog` for an example. - */ - showSaveDialogSync(browserWindow: BrowserWindow, options: SaveDialogSyncOptions): (string) | (undefined); - /** - * the path of the file chosen by the user; if the dialog is cancelled it returns - * `undefined`. - * - * The `browserWindow` argument allows the dialog to attach itself to a parent - * window, making it modal. - * - * The `filters` specifies an array of file types that can be displayed, see - * `dialog.showOpenDialog` for an example. - */ - showSaveDialogSync(options: SaveDialogSyncOptions): (string) | (undefined); - } - - interface Display { - - // Docs: https://electronjs.org/docs/api/structures/display - - /** - * Can be `available`, `unavailable`, `unknown`. - */ - accelerometerSupport: ('available' | 'unavailable' | 'unknown'); - bounds: Rectangle; - /** - * The number of bits per pixel. - */ - colorDepth: number; - /** - * represent a color space (three-dimensional object which contains all realizable - * color combinations) for the purpose of color conversions - */ - colorSpace: string; - /** - * The number of bits per color component. - */ - depthPerComponent: number; - /** - * The display refresh rate. - */ - displayFrequency: number; - /** - * Unique identifier associated with the display. - */ - id: number; - /** - * `true` for an internal display and `false` for an external display - */ - internal: boolean; - /** - * Whether or not the display is a monochrome display. - */ - monochrome: boolean; - /** - * Can be 0, 90, 180, 270, represents screen rotation in clock-wise degrees. - */ - rotation: number; - /** - * Output device's pixel scale factor. - */ - scaleFactor: number; - size: Size; - /** - * Can be `available`, `unavailable`, `unknown`. - */ - touchSupport: ('available' | 'unavailable' | 'unknown'); - workArea: Rectangle; - workAreaSize: Size; - } - - class Dock { - - // Docs: https://electronjs.org/docs/api/dock - - /** - * an ID representing the request. - * - * When `critical` is passed, the dock icon will bounce until either the - * application becomes active or the request is canceled. - * - * When `informational` is passed, the dock icon will bounce for one second. - * However, the request remains active until either the application becomes active - * or the request is canceled. - * - * **Nota Bene:** This method can only be used while the app is not focused; when - * the app is focused it will return -1. - * - * @platform darwin - */ - bounce(type?: 'critical' | 'informational'): number; - /** - * Cancel the bounce of `id`. - * - * @platform darwin - */ - cancelBounce(id: number): void; - /** - * Bounces the Downloads stack if the filePath is inside the Downloads folder. - * - * @platform darwin - */ - downloadFinished(filePath: string): void; - /** - * The badge string of the dock. - * - * @platform darwin - */ - getBadge(): string; - /** - * The application's [dock menu][dock-menu]. - * - * @platform darwin - */ - getMenu(): (Menu) | (null); - /** - * Hides the dock icon. - * - * @platform darwin - */ - hide(): void; - /** - * Whether the dock icon is visible. - * - * @platform darwin - */ - isVisible(): boolean; - /** - * Sets the string to be displayed in the dockโ€™s badging area. - * - * @platform darwin - */ - setBadge(text: string): void; - /** - * Sets the `image` associated with this dock icon. - * - * @platform darwin - */ - setIcon(image: (NativeImage) | (string)): void; - /** - * Sets the application's [dock menu][dock-menu]. - * - * @platform darwin - */ - setMenu(menu: Menu): void; - /** - * Resolves when the dock icon is shown. - * - * @platform darwin - */ - show(): Promise; - } - - class DownloadItem extends NodeEventEmitter { - - // Docs: https://electronjs.org/docs/api/download-item - - /** - * Emitted when the download is in a terminal state. This includes a completed - * download, a cancelled download (via `downloadItem.cancel()`), and interrupted - * download that can't be resumed. - * - * The `state` can be one of following: - * - * * `completed` - The download completed successfully. - * * `cancelled` - The download has been cancelled. - * * `interrupted` - The download has interrupted and can not resume. - */ - on(event: 'done', listener: (event: Event, - /** - * Can be `completed`, `cancelled` or `interrupted`. - */ - state: ('completed' | 'cancelled' | 'interrupted')) => void): this; - once(event: 'done', listener: (event: Event, - /** - * Can be `completed`, `cancelled` or `interrupted`. - */ - state: ('completed' | 'cancelled' | 'interrupted')) => void): this; - addListener(event: 'done', listener: (event: Event, - /** - * Can be `completed`, `cancelled` or `interrupted`. - */ - state: ('completed' | 'cancelled' | 'interrupted')) => void): this; - removeListener(event: 'done', listener: (event: Event, - /** - * Can be `completed`, `cancelled` or `interrupted`. - */ - state: ('completed' | 'cancelled' | 'interrupted')) => void): this; - /** - * Emitted when the download has been updated and is not done. - * - * The `state` can be one of following: - * - * * `progressing` - The download is in-progress. - * * `interrupted` - The download has interrupted and can be resumed. - */ - on(event: 'updated', listener: (event: Event, - /** - * Can be `progressing` or `interrupted`. - */ - state: ('progressing' | 'interrupted')) => void): this; - once(event: 'updated', listener: (event: Event, - /** - * Can be `progressing` or `interrupted`. - */ - state: ('progressing' | 'interrupted')) => void): this; - addListener(event: 'updated', listener: (event: Event, - /** - * Can be `progressing` or `interrupted`. - */ - state: ('progressing' | 'interrupted')) => void): this; - removeListener(event: 'updated', listener: (event: Event, - /** - * Can be `progressing` or `interrupted`. - */ - state: ('progressing' | 'interrupted')) => void): this; - /** - * Cancels the download operation. - */ - cancel(): void; - /** - * Whether the download can resume. - */ - canResume(): boolean; - /** - * The Content-Disposition field from the response header. - */ - getContentDisposition(): string; - /** - * ETag header value. - */ - getETag(): string; - /** - * The file name of the download item. - * - * **Note:** The file name is not always the same as the actual one saved in local - * disk. If user changes the file name in a prompted download saving dialog, the - * actual name of saved file will be different. - */ - getFilename(): string; - /** - * Last-Modified header value. - */ - getLastModifiedTime(): string; - /** - * The files mime type. - */ - getMimeType(): string; - /** - * The received bytes of the download item. - */ - getReceivedBytes(): number; - /** - * Returns the object previously set by - * `downloadItem.setSaveDialogOptions(options)`. - */ - getSaveDialogOptions(): SaveDialogOptions; - /** - * The save path of the download item. This will be either the path set via - * `downloadItem.setSavePath(path)` or the path selected from the shown save - * dialog. - */ - getSavePath(): string; - /** - * Number of seconds since the UNIX epoch when the download was started. - */ - getStartTime(): number; - /** - * The current state. Can be `progressing`, `completed`, `cancelled` or - * `interrupted`. - * - * **Note:** The following methods are useful specifically to resume a `cancelled` - * item when session is restarted. - */ - getState(): ('progressing' | 'completed' | 'cancelled' | 'interrupted'); - /** - * The total size in bytes of the download item. - * -If the size is unknown, it returns 0. - */ - getTotalBytes(): number; - /** - * The origin URL where the item is downloaded from. - */ - getURL(): string; - /** - * The complete URL chain of the item including any redirects. - */ - getURLChain(): string[]; - /** - * Whether the download has user gesture. - */ - hasUserGesture(): boolean; - /** - * Whether the download is paused. - */ - isPaused(): boolean; - /** - * Pauses the download. - */ - pause(): void; - /** - * Resumes the download that has been paused. - * - * **Note:** To enable resumable downloads the server you are downloading from must - * support range requests and provide both `Last-Modified` and `ETag` header - * values. Otherwise `resume()` will dismiss previously received bytes and restart - * the download from the beginning. - */ - resume(): void; - /** - * This API allows the user to set custom options for the save dialog that opens - * for the download item by default. The API is only available in session's - * `will-download` callback function. - */ - setSaveDialogOptions(options: SaveDialogOptions): void; - /** - * The API is only available in session's `will-download` callback function. If - * `path` doesn't exist, Electron will try to make the directory recursively. If - * user doesn't set the save path via the API, Electron will use the original - * routine to determine the save path; this usually prompts a save dialog. - */ - setSavePath(path: string): void; - savePath: string; - } - - interface Event extends GlobalEvent { - - // Docs: https://electronjs.org/docs/api/structures/event - - preventDefault: (() => void); - } - - interface Extension { - - // Docs: https://electronjs.org/docs/api/structures/extension - - id: string; - /** - * Copy of the extension's manifest data. - */ - manifest: any; - name: string; - /** - * The extension's file path. - */ - path: string; - /** - * The extension's `chrome-extension://` URL. - */ - url: string; - version: string; - } - - interface ExtensionInfo { - - // Docs: https://electronjs.org/docs/api/structures/extension-info - - name: string; - version: string; - } - - interface FileFilter { - - // Docs: https://electronjs.org/docs/api/structures/file-filter - - extensions: string[]; - name: string; - } - - interface FilePathWithHeaders { - - // Docs: https://electronjs.org/docs/api/structures/file-path-with-headers - - /** - * Additional headers to be sent. - */ - headers?: Record; - /** - * The path to the file to send. - */ - path: string; - } - - interface GlobalShortcut { - - // Docs: https://electronjs.org/docs/api/global-shortcut - - /** - * Whether this application has registered `accelerator`. - * - * When the accelerator is already taken by other applications, this call will - * still return `false`. This behavior is intended by operating systems, since they - * don't want applications to fight for global shortcuts. - */ - isRegistered(accelerator: Accelerator): boolean; - /** - * Whether or not the shortcut was registered successfully. - * - * Registers a global shortcut of `accelerator`. The `callback` is called when the - * registered shortcut is pressed by the user. - * - * When the accelerator is already taken by other applications, this call will - * silently fail. This behavior is intended by operating systems, since they don't - * want applications to fight for global shortcuts. - * - * The following accelerators will not be registered successfully on macOS 10.14 - * Mojave unless the app has been authorized as a trusted accessibility client: - * - * * "Media Play/Pause" - * * "Media Next Track" -* "Media Previous Track" -* "Media Stop" - */ - register(accelerator: Accelerator, callback: () => void): boolean; - /** - * Registers a global shortcut of all `accelerator` items in `accelerators`. The - * `callback` is called when any of the registered shortcuts are pressed by the - * user. - * - * When a given accelerator is already taken by other applications, this call will - * silently fail. This behavior is intended by operating systems, since they don't - * want applications to fight for global shortcuts. - * - * The following accelerators will not be registered successfully on macOS 10.14 - * Mojave unless the app has been authorized as a trusted accessibility client: - * - * * "Media Play/Pause" - * * "Media Next Track" -* "Media Previous Track" -* "Media Stop" - */ - registerAll(accelerators: string[], callback: () => void): void; - /** - * Unregisters the global shortcut of `accelerator`. - */ - unregister(accelerator: Accelerator): void; - /** - * Unregisters all of the global shortcuts. - */ - unregisterAll(): void; - } - - interface GPUFeatureStatus { - - // Docs: https://electronjs.org/docs/api/structures/gpu-feature-status - - /** - * Canvas. - */ - '2d_canvas': string; - /** - * Flash. - */ - flash_3d: string; - /** - * Flash Stage3D. - */ - flash_stage3d: string; - /** - * Flash Stage3D Baseline profile. - */ - flash_stage3d_baseline: string; - /** - * Compositing. - */ - gpu_compositing: string; - /** - * Multiple Raster Threads. - */ - multiple_raster_threads: string; - /** - * Native GpuMemoryBuffers. - */ - native_gpu_memory_buffers: string; - /** - * Rasterization. - */ - rasterization: string; - /** - * Video Decode. - */ - video_decode: string; - /** - * Video Encode. - */ - video_encode: string; - /** - * VPx Video Decode. - */ - vpx_decode: string; - /** - * WebGL. - */ - webgl: string; - /** - * WebGL2. - */ - webgl2: string; - } - - interface InAppPurchase extends NodeJS.EventEmitter { - - // Docs: https://electronjs.org/docs/api/in-app-purchase - - on(event: 'transactions-updated', listener: Function): this; - once(event: 'transactions-updated', listener: Function): this; - addListener(event: 'transactions-updated', listener: Function): this; - removeListener(event: 'transactions-updated', listener: Function): this; - /** - * whether a user can make a payment. - */ - canMakePayments(): boolean; - /** - * Completes all pending transactions. - */ - finishAllTransactions(): void; - /** - * Completes the pending transactions corresponding to the date. - */ - finishTransactionByDate(date: string): void; - /** - * Resolves with an array of `Product` objects. - * -Retrieves the product descriptions. - */ - getProducts(productIDs: string[]): Promise; - /** - * the path to the receipt. - */ - getReceiptURL(): string; - /** - * Returns `true` if the product is valid and added to the payment queue. - * - * You should listen for the `transactions-updated` event as soon as possible and - * certainly before you call `purchaseProduct`. - */ - purchaseProduct(productID: string, quantity?: number): Promise; - /** - * Restores finished transactions. This method can be called either to install - * purchases on additional devices, or to restore purchases for an application that - * the user deleted and reinstalled. - * - * The payment queue delivers a new transaction for each previously completed - * transaction that can be restored. Each transaction includes a copy of the - * original transaction. - */ - restoreCompletedTransactions(): void; - } - - class IncomingMessage extends NodeEventEmitter { - - // Docs: https://electronjs.org/docs/api/incoming-message - - /** - * Emitted when a request has been canceled during an ongoing HTTP transaction. - */ - on(event: 'aborted', listener: Function): this; - once(event: 'aborted', listener: Function): this; - addListener(event: 'aborted', listener: Function): this; - removeListener(event: 'aborted', listener: Function): this; - /** - * The `data` event is the usual method of transferring response data into - * applicative code. - */ - on(event: 'data', listener: ( - /** - * A chunk of response body's data. - */ - chunk: Buffer) => void): this; - once(event: 'data', listener: ( - /** - * A chunk of response body's data. - */ - chunk: Buffer) => void): this; - addListener(event: 'data', listener: ( - /** - * A chunk of response body's data. - */ - chunk: Buffer) => void): this; - removeListener(event: 'data', listener: ( - /** - * A chunk of response body's data. - */ - chunk: Buffer) => void): this; - /** - * Indicates that response body has ended. Must be placed before 'data' event. - */ - on(event: 'end', listener: Function): this; - once(event: 'end', listener: Function): this; - addListener(event: 'end', listener: Function): this; - removeListener(event: 'end', listener: Function): this; - /** - * Returns: - * - * `error` Error - Typically holds an error string identifying failure root cause. - * - * Emitted when an error was encountered while streaming response data events. For - * instance, if the server closes the underlying while the response is still - * streaming, an `error` event will be emitted on the response object and a `close` - * event will subsequently follow on the request object. - */ - on(event: 'error', listener: Function): this; - once(event: 'error', listener: Function): this; - addListener(event: 'error', listener: Function): this; - removeListener(event: 'error', listener: Function): this; - headers: Record; - httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - statusCode: number; - statusMessage: string; - } - - interface InputEvent { - - // Docs: https://electronjs.org/docs/api/structures/input-event - - /** - * An array of modifiers of the event, can be `shift`, `control`, `ctrl`, `alt`, - * `meta`, `command`, `cmd`, `isKeypad`, `isAutoRepeat`, `leftButtonDown`, - * `middleButtonDown`, `rightButtonDown`, `capsLock`, `numLock`, `left`, `right`. - */ - modifiers?: Array<'shift' | 'control' | 'ctrl' | 'alt' | 'meta' | 'command' | 'cmd' | 'isKeypad' | 'isAutoRepeat' | 'leftButtonDown' | 'middleButtonDown' | 'rightButtonDown' | 'capsLock' | 'numLock' | 'left' | 'right'>; - } - - interface IOCounters { - - // Docs: https://electronjs.org/docs/api/structures/io-counters - - /** - * Then number of I/O other operations. - */ - otherOperationCount: number; - /** - * Then number of I/O other transfers. - */ - otherTransferCount: number; - /** - * The number of I/O read operations. - */ - readOperationCount: number; - /** - * The number of I/O read transfers. - */ - readTransferCount: number; - /** - * The number of I/O write operations. - */ - writeOperationCount: number; - /** - * The number of I/O write transfers. - */ - writeTransferCount: number; - } - - interface IpcMain extends NodeJS.EventEmitter { - - // Docs: https://electronjs.org/docs/api/ipc-main - - /** - * Adds a handler for an `invoke`able IPC. This handler will be called whenever a - * renderer calls `ipcRenderer.invoke(channel, ...args)`. - * - * If `listener` returns a Promise, the eventual result of the promise will be - * returned as a reply to the remote caller. Otherwise, the return value of the - * listener will be used as the value of the reply. - * - * The `event` that is passed as the first argument to the handler is the same as - * that passed to a regular event listener. It includes information about which - * WebContents is the source of the invoke request. - */ - handle(channel: string, listener: (event: IpcMainInvokeEvent, ...args: any[]) => (Promise) | (any)): void; - /** - * Handles a single `invoke`able IPC message, then removes the listener. See - * `ipcMain.handle(channel, listener)`. - */ - handleOnce(channel: string, listener: (event: IpcMainInvokeEvent, ...args: any[]) => (Promise) | (any)): void; - /** - * Listens to `channel`, when a new message arrives `listener` would be called with - * `listener(event, args...)`. - */ - on(channel: string, listener: (event: IpcMainEvent, ...args: any[]) => void): this; - /** - * Adds a one time `listener` function for the event. This `listener` is invoked - * only the next time a message is sent to `channel`, after which it is removed. - */ - once(channel: string, listener: (event: IpcMainEvent, ...args: any[]) => void): this; - /** - * Removes listeners of the specified `channel`. - */ - removeAllListeners(channel?: string): this; - /** - * Removes any handler for `channel`, if present. - */ - removeHandler(channel: string): void; - /** - * Removes the specified `listener` from the listener array for the specified - * `channel`. - */ - removeListener(channel: string, listener: (...args: any[]) => void): this; - } - - interface IpcMainEvent extends Event { - - // Docs: https://electronjs.org/docs/api/structures/ipc-main-event - - /** - * The ID of the renderer frame that sent this message - */ - frameId: number; - /** - * A list of MessagePorts that were transferred with this message - */ - ports: MessagePortMain[]; - /** - * The internal ID of the renderer process that sent this message - */ - processId: number; - /** - * A function that will send an IPC message to the renderer frame that sent the - * original message that you are currently handling. You should use this method to - * "reply" to the sent message in order to guarantee the reply will go to the - * correct process and frame. - */ - reply: Function; - /** - * Set this to the value to be returned in a synchronous message - */ - returnValue: any; - /** - * Returns the `webContents` that sent the message - */ - sender: WebContents; - /** - * The frame that sent this message - * - */ - readonly senderFrame: WebFrameMain; - } - - interface IpcMainInvokeEvent extends Event { - - // Docs: https://electronjs.org/docs/api/structures/ipc-main-invoke-event - - /** - * The ID of the renderer frame that sent this message - */ - frameId: number; - /** - * The internal ID of the renderer process that sent this message - */ - processId: number; - /** - * Returns the `webContents` that sent the message - */ - sender: WebContents; - /** - * The frame that sent this message - * - */ - readonly senderFrame: WebFrameMain; - } - - interface IpcRenderer extends NodeJS.EventEmitter { - - // Docs: https://electronjs.org/docs/api/ipc-renderer - - /** - * Resolves with the response from the main process. - * - * Send a message to the main process via `channel` and expect a result - * asynchronously. Arguments will be serialized with the Structured Clone - * Algorithm, just like `window.postMessage`, so prototype chains will not be - * included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will throw - * an exception. - * - * > **NOTE:** Sending non-standard JavaScript types such as DOM objects or special - * Electron objects will throw an exception. - * - * Since the main process does not have support for DOM objects such as - * `ImageBitmap`, `File`, `DOMMatrix` and so on, such objects cannot be sent over - * Electron's IPC to the main process, as the main process would have no way to - * decode them. Attempting to send such objects over IPC will result in an error. - * - * The main process should listen for `channel` with `ipcMain.handle()`. - * - * For example: - * - * If you need to transfer a `MessagePort` to the main process, use - * `ipcRenderer.postMessage`. - * - * If you do not need a response to the message, consider using `ipcRenderer.send`. - */ - invoke(channel: string, ...args: any[]): Promise; - /** - * Listens to `channel`, when a new message arrives `listener` would be called with - * `listener(event, args...)`. - */ - on(channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void): this; - /** - * Adds a one time `listener` function for the event. This `listener` is invoked - * only the next time a message is sent to `channel`, after which it is removed. - */ - once(channel: string, listener: (event: IpcRendererEvent, ...args: any[]) => void): this; - /** - * Send a message to the main process, optionally transferring ownership of zero or - * more `MessagePort` objects. - * - * The transferred `MessagePort` objects will be available in the main process as - * `MessagePortMain` objects by accessing the `ports` property of the emitted - * event. - * - * For example: - * - * For more information on using `MessagePort` and `MessageChannel`, see the MDN - * documentation. - */ - postMessage(channel: string, message: any, transfer?: MessagePort[]): void; - /** - * Removes all listeners, or those of the specified `channel`. - */ - removeAllListeners(channel: string): this; - /** - * Removes the specified `listener` from the listener array for the specified - * `channel`. - */ - removeListener(channel: string, listener: (...args: any[]) => void): this; - /** - * Send an asynchronous message to the main process via `channel`, along with - * arguments. Arguments will be serialized with the Structured Clone Algorithm, - * just like `window.postMessage`, so prototype chains will not be included. - * Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will throw an - * exception. - * - * > **NOTE:** Sending non-standard JavaScript types such as DOM objects or special - * Electron objects will throw an exception. - * - * Since the main process does not have support for DOM objects such as - * `ImageBitmap`, `File`, `DOMMatrix` and so on, such objects cannot be sent over - * Electron's IPC to the main process, as the main process would have no way to - * decode them. Attempting to send such objects over IPC will result in an error. - * - * The main process handles it by listening for `channel` with the `ipcMain` - * module. - * - * If you need to transfer a `MessagePort` to the main process, use - * `ipcRenderer.postMessage`. - * - * If you want to receive a single response from the main process, like the result - * of a method call, consider using `ipcRenderer.invoke`. - */ - send(channel: string, ...args: any[]): void; - /** - * The value sent back by the `ipcMain` handler. - * - * Send a message to the main process via `channel` and expect a result - * synchronously. Arguments will be serialized with the Structured Clone Algorithm, - * just like `window.postMessage`, so prototype chains will not be included. - * Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will throw an - * exception. - * - * > **NOTE:** Sending non-standard JavaScript types such as DOM objects or special - * Electron objects will throw an exception. - * - * Since the main process does not have support for DOM objects such as - * `ImageBitmap`, `File`, `DOMMatrix` and so on, such objects cannot be sent over - * Electron's IPC to the main process, as the main process would have no way to - * decode them. Attempting to send such objects over IPC will result in an error. - * - * The main process handles it by listening for `channel` with `ipcMain` module, - * and replies by setting `event.returnValue`. - * - * > :warning: **WARNING**: Sending a synchronous message will block the whole - * renderer process until the reply is received, so use this method only as a last - * resort. It's much better to use the asynchronous version, `invoke()`. - */ - sendSync(channel: string, ...args: any[]): any; - /** - * Sends a message to a window with `webContentsId` via `channel`. - */ - sendTo(webContentsId: number, channel: string, ...args: any[]): void; - /** - * Like `ipcRenderer.send` but the event will be sent to the `` element in - * the host page instead of the main process. - */ - sendToHost(channel: string, ...args: any[]): void; - } - - interface IpcRendererEvent extends Event { - - // Docs: https://electronjs.org/docs/api/structures/ipc-renderer-event - - /** - * A list of MessagePorts that were transferred with this message - */ - ports: MessagePort[]; - /** - * The `IpcRenderer` instance that emitted the event originally - */ - sender: IpcRenderer; - /** - * The `webContents.id` that sent the message, you can call - * `event.sender.sendTo(event.senderId, ...)` to reply to the message, see - * ipcRenderer.sendTo for more information. This only applies to messages sent from - * a different renderer. Messages sent directly from the main process set - * `event.senderId` to `0`. - */ - senderId: number; - } - - interface JumpListCategory { - - // Docs: https://electronjs.org/docs/api/structures/jump-list-category - - /** - * Array of `JumpListItem` objects if `type` is `tasks` or `custom`, otherwise it - * should be omitted. - */ - items?: JumpListItem[]; - /** - * Must be set if `type` is `custom`, otherwise it should be omitted. - */ - name?: string; - /** - * One of the following: - */ - type?: ('tasks' | 'frequent' | 'recent' | 'custom'); - } - - interface JumpListItem { - - // Docs: https://electronjs.org/docs/api/structures/jump-list-item - - /** - * The command line arguments when `program` is executed. Should only be set if - * `type` is `task`. - */ - args?: string; - /** - * Description of the task (displayed in a tooltip). Should only be set if `type` - * is `task`. Maximum length 260 characters. - */ - description?: string; - /** - * The index of the icon in the resource file. If a resource file contains multiple - * icons this value can be used to specify the zero-based index of the icon that - * should be displayed for this task. If a resource file contains only one icon, - * this property should be set to zero. - */ - iconIndex?: number; - /** - * The absolute path to an icon to be displayed in a Jump List, which can be an - * arbitrary resource file that contains an icon (e.g. `.ico`, `.exe`, `.dll`). You - * can usually specify `process.execPath` to show the program icon. - */ - iconPath?: string; - /** - * Path of the file to open, should only be set if `type` is `file`. - */ - path?: string; - /** - * Path of the program to execute, usually you should specify `process.execPath` - * which opens the current program. Should only be set if `type` is `task`. - */ - program?: string; - /** - * The text to be displayed for the item in the Jump List. Should only be set if - * `type` is `task`. - */ - title?: string; - /** - * One of the following: - */ - type?: ('task' | 'separator' | 'file'); - /** - * The working directory. Default is empty. - */ - workingDirectory?: string; - } - - interface KeyboardEvent { - - // Docs: https://electronjs.org/docs/api/structures/keyboard-event - - /** - * whether an Alt key was used in an accelerator to trigger the Event - */ - altKey?: boolean; - /** - * whether the Control key was used in an accelerator to trigger the Event - */ - ctrlKey?: boolean; - /** - * whether a meta key was used in an accelerator to trigger the Event - */ - metaKey?: boolean; - /** - * whether a Shift key was used in an accelerator to trigger the Event - */ - shiftKey?: boolean; - /** - * whether an accelerator was used to trigger the event as opposed to another user - * gesture like mouse click - */ - triggeredByAccelerator?: boolean; - } - - interface KeyboardInputEvent extends InputEvent { - - // Docs: https://electronjs.org/docs/api/structures/keyboard-input-event - - /** - * The character that will be sent as the keyboard event. Should only use the valid - * key codes in Accelerator. - */ - keyCode: string; - /** - * The type of the event, can be `keyDown`, `keyUp` or `char`. - */ - type: ('keyDown' | 'keyUp' | 'char'); - } - - interface MemoryInfo { - - // Docs: https://electronjs.org/docs/api/structures/memory-info - - /** - * The maximum amount of memory that has ever been pinned to actual physical RAM. - */ - peakWorkingSetSize: number; - /** - * The amount of memory not shared by other processes, such as JS heap or HTML - * content. - * - * @platform win32 - */ - privateBytes?: number; - /** - * The amount of memory currently pinned to actual physical RAM. - */ - workingSetSize: number; - } - - interface MemoryUsageDetails { - - // Docs: https://electronjs.org/docs/api/structures/memory-usage-details - - count: number; - liveSize: number; - size: number; - } - - class Menu { - - // Docs: https://electronjs.org/docs/api/menu - - /** - * Emitted when a popup is closed either manually or with `menu.closePopup()`. - */ - on(event: 'menu-will-close', listener: (event: Event) => void): this; - once(event: 'menu-will-close', listener: (event: Event) => void): this; - addListener(event: 'menu-will-close', listener: (event: Event) => void): this; - removeListener(event: 'menu-will-close', listener: (event: Event) => void): this; - /** - * Emitted when `menu.popup()` is called. - */ - on(event: 'menu-will-show', listener: (event: Event) => void): this; - once(event: 'menu-will-show', listener: (event: Event) => void): this; - addListener(event: 'menu-will-show', listener: (event: Event) => void): this; - removeListener(event: 'menu-will-show', listener: (event: Event) => void): this; - /** - * Menu - */ - constructor(); - /** - * Generally, the `template` is an array of `options` for constructing a MenuItem. - * The usage can be referenced above. - * - * You can also attach other fields to the element of the `template` and they will - * become properties of the constructed menu items. - */ - static buildFromTemplate(template: Array<(MenuItemConstructorOptions) | (MenuItem)>): Menu; - /** - * The application menu, if set, or `null`, if not set. - * - * **Note:** The returned `Menu` instance doesn't support dynamic addition or - * removal of menu items. Instance properties can still be dynamically modified. - */ - static getApplicationMenu(): (Menu) | (null); - /** - * Sends the `action` to the first responder of application. This is used for - * emulating default macOS menu behaviors. Usually you would use the `role` - * property of a `MenuItem`. - * - * See the macOS Cocoa Event Handling Guide for more information on macOS' native - * actions. - * - * @platform darwin - */ - static sendActionToFirstResponder(action: string): void; - /** - * Sets `menu` as the application menu on macOS. On Windows and Linux, the `menu` - * will be set as each window's top menu. - * - * Also on Windows and Linux, you can use a `&` in the top-level item name to - * indicate which letter should get a generated accelerator. For example, using - * `&File` for the file menu would result in a generated `Alt-F` accelerator that - * opens the associated menu. The indicated character in the button label gets an - * underline. The `&` character is not displayed on the button label. - * - * Passing `null` will suppress the default menu. On Windows and Linux, this has - * the additional effect of removing the menu bar from the window. - * - * **Note:** The default menu will be created automatically if the app does not set - * one. It contains standard items such as `File`, `Edit`, `View`, `Window` and - * `Help`. - */ - static setApplicationMenu(menu: (Menu) | (null)): void; - /** - * Appends the `menuItem` to the menu. - */ - append(menuItem: MenuItem): void; - /** - * Closes the context menu in the `browserWindow`. - */ - closePopup(browserWindow?: BrowserWindow): void; - /** - * the item with the specified `id` - */ - getMenuItemById(id: string): (MenuItem) | (null); - /** - * Inserts the `menuItem` to the `pos` position of the menu. - */ - insert(pos: number, menuItem: MenuItem): void; - /** - * Pops up this menu as a context menu in the `BrowserWindow`. - */ - popup(options?: PopupOptions): void; - items: MenuItem[]; - } - - class MenuItem { - - // Docs: https://electronjs.org/docs/api/menu-item - - /** - * MenuItem - */ - constructor(options: MenuItemConstructorOptions); - accelerator?: Accelerator; - checked: boolean; - click: Function; - commandId: number; - enabled: boolean; - icon?: (NativeImage) | (string); - id: string; - label: string; - menu: Menu; - registerAccelerator: boolean; - role?: ('undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'pasteAndMatchStyle' | 'delete' | 'selectAll' | 'reload' | 'forceReload' | 'toggleDevTools' | 'resetZoom' | 'zoomIn' | 'zoomOut' | 'togglefullscreen' | 'window' | 'minimize' | 'close' | 'help' | 'about' | 'services' | 'hide' | 'hideOthers' | 'unhide' | 'quit' | 'startSpeaking' | 'stopSpeaking' | 'zoom' | 'front' | 'appMenu' | 'fileMenu' | 'editMenu' | 'viewMenu' | 'recentDocuments' | 'toggleTabBar' | 'selectNextTab' | 'selectPreviousTab' | 'mergeAllWindows' | 'clearRecentDocuments' | 'moveTabToNewWindow' | 'windowMenu'); - sharingItem: SharingItem; - sublabel: string; - submenu?: Menu; - toolTip: string; - type: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio'); - visible: boolean; - } - - class MessageChannelMain extends NodeEventEmitter { - - // Docs: https://electronjs.org/docs/api/message-channel-main - - port1: MessagePortMain; - port2: MessagePortMain; - } - - class MessagePortMain extends NodeEventEmitter { - - // Docs: https://electronjs.org/docs/api/message-port-main - - /** - * Emitted when the remote end of a MessagePortMain object becomes disconnected. - */ - on(event: 'close', listener: Function): this; - once(event: 'close', listener: Function): this; - addListener(event: 'close', listener: Function): this; - removeListener(event: 'close', listener: Function): this; - /** - * Emitted when a MessagePortMain object receives a message. - */ - on(event: 'message', listener: (messageEvent: MessageEvent) => void): this; - once(event: 'message', listener: (messageEvent: MessageEvent) => void): this; - addListener(event: 'message', listener: (messageEvent: MessageEvent) => void): this; - removeListener(event: 'message', listener: (messageEvent: MessageEvent) => void): this; - /** - * Disconnects the port, so it is no longer active. - */ - close(): void; - /** - * Sends a message from the port, and optionally, transfers ownership of objects to - * other browsing contexts. - */ - postMessage(message: any, transfer?: MessagePortMain[]): void; - /** - * Starts the sending of messages queued on the port. Messages will be queued until - * this method is called. - */ - start(): void; - } - - interface MimeTypedBuffer { - - // Docs: https://electronjs.org/docs/api/structures/mime-typed-buffer - - /** - * Charset of the buffer. - */ - charset?: string; - /** - * The actual Buffer content. - */ - data: Buffer; - /** - * MIME type of the buffer. - */ - mimeType?: string; - } - - interface MouseInputEvent extends InputEvent { - - // Docs: https://electronjs.org/docs/api/structures/mouse-input-event - - /** - * The button pressed, can be `left`, `middle`, `right`. - */ - button?: ('left' | 'middle' | 'right'); - clickCount?: number; - globalX?: number; - globalY?: number; - movementX?: number; - movementY?: number; - /** - * The type of the event, can be `mouseDown`, `mouseUp`, `mouseEnter`, - * `mouseLeave`, `contextMenu`, `mouseWheel` or `mouseMove`. - */ - type: ('mouseDown' | 'mouseUp' | 'mouseEnter' | 'mouseLeave' | 'contextMenu' | 'mouseWheel' | 'mouseMove'); - x: number; - y: number; - } - - interface MouseWheelInputEvent extends MouseInputEvent { - - // Docs: https://electronjs.org/docs/api/structures/mouse-wheel-input-event - - accelerationRatioX?: number; - accelerationRatioY?: number; - canScroll?: boolean; - deltaX?: number; - deltaY?: number; - hasPreciseScrollingDeltas?: boolean; - /** - * The type of the event, can be `mouseWheel`. - */ - type: ('mouseWheel'); - wheelTicksX?: number; - wheelTicksY?: number; - } - - class NativeImage { - - // Docs: https://electronjs.org/docs/api/native-image - - /** - * Creates an empty `NativeImage` instance. - */ - static createEmpty(): NativeImage; - /** - * Creates a new `NativeImage` instance from `buffer` that contains the raw bitmap - * pixel data returned by `toBitmap()`. The specific format is platform-dependent. - */ - static createFromBitmap(buffer: Buffer, options: CreateFromBitmapOptions): NativeImage; - /** - * Creates a new `NativeImage` instance from `buffer`. Tries to decode as PNG or - * JPEG first. - */ - static createFromBuffer(buffer: Buffer, options?: CreateFromBufferOptions): NativeImage; - /** - * Creates a new `NativeImage` instance from `dataURL`. - */ - static createFromDataURL(dataURL: string): NativeImage; - /** - * Creates a new `NativeImage` instance from the NSImage that maps to the given - * image name. See `System Icons` for a list of possible values. - * - * The `hslShift` is applied to the image with the following rules: - * - * * `hsl_shift[0]` (hue): The absolute hue value for the image - 0 and 1 map to 0 - * and 360 on the hue color wheel (red). - * * `hsl_shift[1]` (saturation): A saturation shift for the image, with the - * following key values: 0 = remove all color. 0.5 = leave unchanged. 1 = fully - * saturate the image. - * * `hsl_shift[2]` (lightness): A lightness shift for the image, with the - * following key values: 0 = remove all lightness (make all pixels black). 0.5 = - * leave unchanged. 1 = full lightness (make all pixels white). - * - * This means that `[-1, 0, 1]` will make the image completely white and `[-1, 1, - * 0]` will make the image completely black. - * - * In some cases, the `NSImageName` doesn't match its string representation; one - * example of this is `NSFolderImageName`, whose string representation would - * actually be `NSFolder`. Therefore, you'll need to determine the correct string - * representation for your image before passing it in. This can be done with the - * following: - * - * `echo -e '#import \nint main() { NSLog(@"%@", SYSTEM_IMAGE_NAME); - * }' | clang -otest -x objective-c -framework Cocoa - && ./test` - * -where `SYSTEM_IMAGE_NAME` should be replaced with any value from this list. - * - * @platform darwin - */ - static createFromNamedImage(imageName: string, hslShift?: number[]): NativeImage; - /** - * Creates a new `NativeImage` instance from a file located at `path`. This method - * returns an empty image if the `path` does not exist, cannot be read, or is not a - * valid image. - */ - static createFromPath(path: string): NativeImage; - /** - * fulfilled with the file's thumbnail preview image, which is a NativeImage. - * - * @platform darwin,win32 - */ - static createThumbnailFromPath(path: string, maxSize: Size): Promise; - /** - * Add an image representation for a specific scale factor. This can be used to - * explicitly add different scale factor representations to an image. This can be - * called on empty images. - */ - addRepresentation(options: AddRepresentationOptions): void; - /** - * The cropped image. - */ - crop(rect: Rectangle): NativeImage; - /** - * The image's aspect ratio. - * - * If `scaleFactor` is passed, this will return the aspect ratio corresponding to - * the image representation most closely matching the passed value. - */ - getAspectRatio(scaleFactor?: number): number; - /** - * A Buffer that contains the image's raw bitmap pixel data. - * - * The difference between `getBitmap()` and `toBitmap()` is that `getBitmap()` does - * not copy the bitmap data, so you have to use the returned Buffer immediately in - * current event loop tick; otherwise the data might be changed or destroyed. - */ - getBitmap(options?: BitmapOptions): Buffer; - /** - * A Buffer that stores C pointer to underlying native handle of the image. On - * macOS, a pointer to `NSImage` instance would be returned. - * - * Notice that the returned pointer is a weak pointer to the underlying native - * image instead of a copy, so you _must_ ensure that the associated `nativeImage` - * instance is kept around. - * - * @platform darwin - */ - getNativeHandle(): Buffer; - /** - * An array of all scale factors corresponding to representations for a given - * nativeImage. - */ - getScaleFactors(): number[]; - /** - * If `scaleFactor` is passed, this will return the size corresponding to the image - * representation most closely matching the passed value. - */ - getSize(scaleFactor?: number): Size; - /** - * Whether the image is empty. - */ - isEmpty(): boolean; - /** - * Whether the image is a template image. - */ - isTemplateImage(): boolean; - /** - * The resized image. - * - * If only the `height` or the `width` are specified then the current aspect ratio - * will be preserved in the resized image. - */ - resize(options: ResizeOptions): NativeImage; - /** - * Marks the image as a template image. - */ - setTemplateImage(option: boolean): void; - /** - * A Buffer that contains a copy of the image's raw bitmap pixel data. - */ - toBitmap(options?: ToBitmapOptions): Buffer; - /** - * The data URL of the image. - */ - toDataURL(options?: ToDataURLOptions): string; - /** - * A Buffer that contains the image's `JPEG` encoded data. - */ - toJPEG(quality: number): Buffer; - /** - * A Buffer that contains the image's `PNG` encoded data. - */ - toPNG(options?: ToPNGOptions): Buffer; - isMacTemplateImage: boolean; - } - - interface NativeTheme extends NodeJS.EventEmitter { - - // Docs: https://electronjs.org/docs/api/native-theme - - /** - * Emitted when something in the underlying NativeTheme has changed. This normally - * means that either the value of `shouldUseDarkColors`, - * `shouldUseHighContrastColors` or `shouldUseInvertedColorScheme` has changed. You - * will have to check them to determine which one has changed. - */ - on(event: 'updated', listener: Function): this; - once(event: 'updated', listener: Function): this; - addListener(event: 'updated', listener: Function): this; - removeListener(event: 'updated', listener: Function): this; - /** - * A `Boolean` for if the OS / Chromium currently has a dark mode enabled or is - * being instructed to show a dark-style UI. If you want to modify this value you - * should use `themeSource` below. - * - */ - readonly shouldUseDarkColors: boolean; - /** - * A `Boolean` for if the OS / Chromium currently has high-contrast mode enabled or - * is being instructed to show a high-contrast UI. - * - * @platform darwin,win32 - */ - readonly shouldUseHighContrastColors: boolean; - /** - * A `Boolean` for if the OS / Chromium currently has an inverted color scheme or - * is being instructed to use an inverted color scheme. - * - * @platform darwin,win32 - */ - readonly shouldUseInvertedColorScheme: boolean; - /** - * A `String` property that can be `system`, `light` or `dark`. It is used to - * override and supersede the value that Chromium has chosen to use internally. - * - * Setting this property to `system` will remove the override and everything will - * be reset to the OS default. By default `themeSource` is `system`. - * - * Settings this property to `dark` will have the following effects: - * - * * `nativeTheme.shouldUseDarkColors` will be `true` when accessed - * * Any UI Electron renders on Linux and Windows including context menus, - * devtools, etc. will use the dark UI. - * * Any UI the OS renders on macOS including menus, window frames, etc. will use - * the dark UI. - * * The `prefers-color-scheme` CSS query will match `dark` mode. - * * The `updated` event will be emitted - * - * Settings this property to `light` will have the following effects: - * - * * `nativeTheme.shouldUseDarkColors` will be `false` when accessed - * * Any UI Electron renders on Linux and Windows including context menus, - * devtools, etc. will use the light UI. - * * Any UI the OS renders on macOS including menus, window frames, etc. will use - * the light UI. - * * The `prefers-color-scheme` CSS query will match `light` mode. - * * The `updated` event will be emitted - * - * The usage of this property should align with a classic "dark mode" state machine - * in your application where the user has three options. - * - * * `Follow OS` --> `themeSource = 'system'` - * * `Dark Mode` --> `themeSource = 'dark'` - * * `Light Mode` --> `themeSource = 'light'` - * - * Your application should then always use `shouldUseDarkColors` to determine what - * CSS to apply. - */ - themeSource: ('system' | 'light' | 'dark'); - } - - interface Net { - - // Docs: https://electronjs.org/docs/api/net - - /** - * Whether there is currently internet connection. - * - * A return value of `false` is a pretty strong indicator that the user won't be - * able to connect to remote sites. However, a return value of `true` is - * inconclusive; even if some link is up, it is uncertain whether a particular - * connection attempt to a particular remote site will be successful. - */ - isOnline(): boolean; - /** - * Creates a `ClientRequest` instance using the provided `options` which are - * directly forwarded to the `ClientRequest` constructor. The `net.request` method - * would be used to issue both secure and insecure HTTP requests according to the - * specified protocol scheme in the `options` object. - */ - request(options: (ClientRequestConstructorOptions) | (string)): ClientRequest; - /** - * A `Boolean` property. Whether there is currently internet connection. - * - * A return value of `false` is a pretty strong indicator that the user won't be - * able to connect to remote sites. However, a return value of `true` is - * inconclusive; even if some link is up, it is uncertain whether a particular - * connection attempt to a particular remote site will be successful. - * - */ - readonly online: boolean; - } - - interface NetLog { - - // Docs: https://electronjs.org/docs/api/net-log - - /** - * resolves when the net log has begun recording. - * -Starts recording network events to `path`. - */ - startLogging(path: string, options?: StartLoggingOptions): Promise; - /** - * resolves when the net log has been flushed to disk. - * - * Stops recording network events. If not called, net logging will automatically - * end when app quits. - */ - stopLogging(): Promise; - /** - * A `Boolean` property that indicates whether network logs are currently being - * recorded. - * - */ - readonly currentlyLogging: boolean; - } - - interface NewWindowWebContentsEvent extends Event { - - // Docs: https://electronjs.org/docs/api/structures/new-window-web-contents-event - - newGuest?: BrowserWindow; - } - - class Notification extends NodeEventEmitter { - - // Docs: https://electronjs.org/docs/api/notification - - on(event: 'action', listener: (event: Event, - /** - * The index of the action that was activated. - */ - index: number) => void): this; - once(event: 'action', listener: (event: Event, - /** - * The index of the action that was activated. - */ - index: number) => void): this; - addListener(event: 'action', listener: (event: Event, - /** - * The index of the action that was activated. - */ - index: number) => void): this; - removeListener(event: 'action', listener: (event: Event, - /** - * The index of the action that was activated. - */ - index: number) => void): this; - /** - * Emitted when the notification is clicked by the user. - */ - on(event: 'click', listener: (event: Event) => void): this; - once(event: 'click', listener: (event: Event) => void): this; - addListener(event: 'click', listener: (event: Event) => void): this; - removeListener(event: 'click', listener: (event: Event) => void): this; - /** - * Emitted when the notification is closed by manual intervention from the user. - * - * This event is not guaranteed to be emitted in all cases where the notification - * is closed. - */ - on(event: 'close', listener: (event: Event) => void): this; - once(event: 'close', listener: (event: Event) => void): this; - addListener(event: 'close', listener: (event: Event) => void): this; - removeListener(event: 'close', listener: (event: Event) => void): this; - /** - * Emitted when an error is encountered while creating and showing the native - * notification. - * - * @platform win32 - */ - on(event: 'failed', listener: (event: Event, - /** - * The error encountered during execution of the `show()` method. - */ - error: string) => void): this; - once(event: 'failed', listener: (event: Event, - /** - * The error encountered during execution of the `show()` method. - */ - error: string) => void): this; - addListener(event: 'failed', listener: (event: Event, - /** - * The error encountered during execution of the `show()` method. - */ - error: string) => void): this; - removeListener(event: 'failed', listener: (event: Event, - /** - * The error encountered during execution of the `show()` method. - */ - error: string) => void): this; - /** - * Emitted when the user clicks the "Reply" button on a notification with - * `hasReply: true`. - * - * @platform darwin - */ - on(event: 'reply', listener: (event: Event, - /** - * The string the user entered into the inline reply field. - */ - reply: string) => void): this; - once(event: 'reply', listener: (event: Event, - /** - * The string the user entered into the inline reply field. - */ - reply: string) => void): this; - addListener(event: 'reply', listener: (event: Event, - /** - * The string the user entered into the inline reply field. - */ - reply: string) => void): this; - removeListener(event: 'reply', listener: (event: Event, - /** - * The string the user entered into the inline reply field. - */ - reply: string) => void): this; - /** - * Emitted when the notification is shown to the user, note this could be fired - * multiple times as a notification can be shown multiple times through the - * `show()` method. - */ - on(event: 'show', listener: (event: Event) => void): this; - once(event: 'show', listener: (event: Event) => void): this; - addListener(event: 'show', listener: (event: Event) => void): this; - removeListener(event: 'show', listener: (event: Event) => void): this; - /** - * Notification - */ - constructor(options?: NotificationConstructorOptions); - /** - * Whether or not desktop notifications are supported on the current system - */ - static isSupported(): boolean; - /** - * Dismisses the notification. - */ - close(): void; - /** - * Immediately shows the notification to the user, please note this means unlike - * the HTML5 Notification implementation, instantiating a `new Notification` does - * not immediately show it to the user, you need to call this method before the OS - * will display it. - * - * If the notification has been shown before, this method will dismiss the - * previously shown notification and create a new one with identical properties. - */ - show(): void; - actions: NotificationAction[]; - body: string; - closeButtonText: string; - hasReply: boolean; - replyPlaceholder: string; - silent: boolean; - sound: string; - subtitle: string; - timeoutType: ('default' | 'never'); - title: string; - toastXml: string; - urgency: ('normal' | 'critical' | 'low'); - } - - interface NotificationAction { - - // Docs: https://electronjs.org/docs/api/structures/notification-action - - /** - * The label for the given action. - */ - text?: string; - /** - * The type of action, can be `button`. - */ - type: ('button'); - } - - interface NotificationResponse { - - // Docs: https://electronjs.org/docs/api/structures/notification-response - - /** - * The identifier string of the action that the user selected. - */ - actionIdentifier: string; - /** - * The delivery date of the notification. - */ - date: number; - /** - * The unique identifier for this notification request. - */ - identifier: string; - /** - * A dictionary of custom information associated with the notification. - */ - userInfo: Record; - /** - * The text entered or chosen by the user. - */ - userText?: string; - } - - interface Point { - - // Docs: https://electronjs.org/docs/api/structures/point - - x: number; - y: number; - } - - interface PostBody { - - // Docs: https://electronjs.org/docs/api/structures/post-body - - /** - * The boundary used to separate multiple parts of the message. Only valid when - * `contentType` is `multipart/form-data`. - */ - boundary?: string; - /** - * The `content-type` header used for the data. One of - * `application/x-www-form-urlencoded` or `multipart/form-data`. Corresponds to the - * `enctype` attribute of the submitted HTML form. - */ - contentType: string; - /** - * The post data to be sent to the new window. - */ - data: Array; - } - - interface PostData { - - // Docs: https://electronjs.org/docs/api/structures/post-data - - /** - * The `UUID` of the `Blob` being uploaded. Required for the `blob` type. - */ - blobUUID?: string; - /** - * The raw bytes of the post data in a `Buffer`. Required for the `rawData` type. - */ - bytes?: string; - /** - * The path of the file being uploaded. Required for the `file` type. - */ - filePath?: string; - /** - * The length of the file being uploaded, in bytes. If set to `-1`, the whole file - * will be uploaded. Only valid for `file` types. - */ - length?: number; - /** - * The modification time of the file represented by a double, which is the number - * of seconds since the `UNIX Epoch` (Jan 1, 1970). Only valid for `file` types. - */ - modificationTime?: number; - /** - * The offset from the beginning of the file being uploaded, in bytes. Only valid - * for `file` types. - */ - offset?: number; - /** - * One of the following: - */ - type: ('rawData' | 'file' | 'blob'); - } - - interface PowerMonitor extends NodeJS.EventEmitter { - - // Docs: https://electronjs.org/docs/api/power-monitor - - /** - * Emitted when the system is about to lock the screen. - * - * @platform darwin,win32 - */ - on(event: 'lock-screen', listener: Function): this; - once(event: 'lock-screen', listener: Function): this; - addListener(event: 'lock-screen', listener: Function): this; - removeListener(event: 'lock-screen', listener: Function): this; - /** - * Emitted when the system changes to AC power. - * - * @platform darwin,win32 - */ - on(event: 'on-ac', listener: Function): this; - once(event: 'on-ac', listener: Function): this; - addListener(event: 'on-ac', listener: Function): this; - removeListener(event: 'on-ac', listener: Function): this; - /** - * Emitted when system changes to battery power. - * - * @platform darwin - */ - on(event: 'on-battery', listener: Function): this; - once(event: 'on-battery', listener: Function): this; - addListener(event: 'on-battery', listener: Function): this; - removeListener(event: 'on-battery', listener: Function): this; - /** - * Emitted when system is resuming. - * - * @platform darwin,win32 - */ - on(event: 'resume', listener: Function): this; - once(event: 'resume', listener: Function): this; - addListener(event: 'resume', listener: Function): this; - removeListener(event: 'resume', listener: Function): this; - /** - * Emitted when the system is about to reboot or shut down. If the event handler - * invokes `e.preventDefault()`, Electron will attempt to delay system shutdown in - * order for the app to exit cleanly. If `e.preventDefault()` is called, the app - * should exit as soon as possible by calling something like `app.quit()`. - * - * @platform linux,darwin - */ - on(event: 'shutdown', listener: Function): this; - once(event: 'shutdown', listener: Function): this; - addListener(event: 'shutdown', listener: Function): this; - removeListener(event: 'shutdown', listener: Function): this; - /** - * Emitted when the system is suspending. - * - * @platform darwin,win32 - */ - on(event: 'suspend', listener: Function): this; - once(event: 'suspend', listener: Function): this; - addListener(event: 'suspend', listener: Function): this; - removeListener(event: 'suspend', listener: Function): this; - /** - * Emitted as soon as the systems screen is unlocked. - * - * @platform darwin,win32 - */ - on(event: 'unlock-screen', listener: Function): this; - once(event: 'unlock-screen', listener: Function): this; - addListener(event: 'unlock-screen', listener: Function): this; - removeListener(event: 'unlock-screen', listener: Function): this; - /** - * Emitted when a login session is activated. See documentation for more - * information. - * - * @platform darwin - */ - on(event: 'user-did-become-active', listener: Function): this; - once(event: 'user-did-become-active', listener: Function): this; - addListener(event: 'user-did-become-active', listener: Function): this; - removeListener(event: 'user-did-become-active', listener: Function): this; - /** - * Emitted when a login session is deactivated. See documentation for more - * information. - * - * @platform darwin - */ - on(event: 'user-did-resign-active', listener: Function): this; - once(event: 'user-did-resign-active', listener: Function): this; - addListener(event: 'user-did-resign-active', listener: Function): this; - removeListener(event: 'user-did-resign-active', listener: Function): this; - /** - * The system's current state. Can be `active`, `idle`, `locked` or `unknown`. - * - * Calculate the system idle state. `idleThreshold` is the amount of time (in - * seconds) before considered idle. `locked` is available on supported systems - * only. - */ - getSystemIdleState(idleThreshold: number): ('active' | 'idle' | 'locked' | 'unknown'); - /** - * Idle time in seconds - -Calculate system idle time in seconds. - */ - getSystemIdleTime(): number; - /** - * Whether the system is on battery power. - * - * To monitor for changes in this property, use the `on-battery` and `on-ac` - * events. - */ - isOnBatteryPower(): boolean; - /** - * A `Boolean` property. True if the system is on battery power. - * -See `powerMonitor.isOnBatteryPower()`. - */ - onBatteryPower: boolean; - } - - interface PowerSaveBlocker { - - // Docs: https://electronjs.org/docs/api/power-save-blocker - - /** - * Whether the corresponding `powerSaveBlocker` has started. - */ - isStarted(id: number): boolean; - /** - * The blocker ID that is assigned to this power blocker. - * - * Starts preventing the system from entering lower-power mode. Returns an integer - * identifying the power save blocker. - * - * **Note:** `prevent-display-sleep` has higher precedence over - * `prevent-app-suspension`. Only the highest precedence type takes effect. In - * other words, `prevent-display-sleep` always takes precedence over - * `prevent-app-suspension`. - * - * For example, an API calling A requests for `prevent-app-suspension`, and another - * calling B requests for `prevent-display-sleep`. `prevent-display-sleep` will be - * used until B stops its request. After that, `prevent-app-suspension` is used. - */ - start(type: 'prevent-app-suspension' | 'prevent-display-sleep'): number; - /** - * Stops the specified power save blocker. - */ - stop(id: number): void; - } - - interface PrinterInfo { - - // Docs: https://electronjs.org/docs/api/structures/printer-info - - /** - * a longer description of the printer's type. - */ - description: string; - /** - * the name of the printer as shown in Print Preview. - */ - displayName: string; - /** - * whether or not a given printer is set as the default printer on the OS. - */ - isDefault: boolean; - /** - * the name of the printer as understood by the OS. - */ - name: string; - /** - * an object containing a variable number of platform-specific printer information. - */ - options: Options; - /** - * the current status of the printer. - */ - status: number; - } - - interface ProcessMemoryInfo { - - // Docs: https://electronjs.org/docs/api/structures/process-memory-info - - /** - * The amount of memory not shared by other processes, such as JS heap or HTML - * content in Kilobytes. - */ - private: number; - /** - * The amount of memory currently pinned to actual physical RAM in Kilobytes. - * - * @platform linux,win32 - */ - residentSet: number; - /** - * The amount of memory shared between processes, typically memory consumed by the - * Electron code itself in Kilobytes. - */ - shared: number; - } - - interface ProcessMetric { - - // Docs: https://electronjs.org/docs/api/structures/process-metric - - /** - * CPU usage of the process. - */ - cpu: CPUUsage; - /** - * Creation time for this process. The time is represented as number of - * milliseconds since epoch. Since the `pid` can be reused after a process dies, it - * is useful to use both the `pid` and the `creationTime` to uniquely identify a - * process. - */ - creationTime: number; - /** - * One of the following values: - * - * @platform win32 - */ - integrityLevel?: ('untrusted' | 'low' | 'medium' | 'high' | 'unknown'); - /** - * Memory information for the process. - */ - memory: MemoryInfo; - /** - * The name of the process. Examples for utility: `Audio Service`, `Content - * Decryption Module Service`, `Network Service`, `Video Capture`, etc. - */ - name?: string; - /** - * Process id of the process. - */ - pid: number; - /** - * Whether the process is sandboxed on OS level. - * - * @platform darwin,win32 - */ - sandboxed?: boolean; - /** - * The non-localized name of the process. - */ - serviceName?: string; - /** - * Process type. One of the following values: - */ - type: ('Browser' | 'Tab' | 'Utility' | 'Zygote' | 'Sandbox helper' | 'GPU' | 'Pepper Plugin' | 'Pepper Plugin Broker' | 'Unknown'); - } - - interface Product { - - // Docs: https://electronjs.org/docs/api/structures/product - - /** - * The total size of the content, in bytes. - */ - contentLengths: number[]; - /** - * A string that identifies the version of the content. - */ - contentVersion: string; - /** - * 3 character code presenting a product's currency based on the ISO 4217 standard. - */ - currencyCode: string; - /** - * The locale formatted price of the product. - */ - formattedPrice: string; - /** - * A Boolean value that indicates whether the App Store has downloadable content - * for this product. `true` if at least one file has been associated with the - * product. - */ - isDownloadable: boolean; - /** - * A description of the product. - */ - localizedDescription: string; - /** - * The name of the product. - */ - localizedTitle: string; - /** - * The cost of the product in the local currency. - */ - price: number; - /** - * The string that identifies the product to the Apple App Store. - */ - productIdentifier: string; - } - - interface Protocol { - - // Docs: https://electronjs.org/docs/api/protocol - - /** - * Whether the protocol was successfully intercepted - * - * Intercepts `scheme` protocol and uses `handler` as the protocol's new handler - * which sends a `Buffer` as a response. - */ - interceptBufferProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (Buffer) | (ProtocolResponse)) => void) => void): boolean; - /** - * Whether the protocol was successfully intercepted - * - * Intercepts `scheme` protocol and uses `handler` as the protocol's new handler - * which sends a file as a response. - */ - interceptFileProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (string) | (ProtocolResponse)) => void) => void): boolean; - /** - * Whether the protocol was successfully intercepted - * - * Intercepts `scheme` protocol and uses `handler` as the protocol's new handler - * which sends a new HTTP request as a response. - */ - interceptHttpProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: ProtocolResponse) => void) => void): boolean; - /** - * Whether the protocol was successfully intercepted - * - * Same as `protocol.registerStreamProtocol`, except that it replaces an existing - * protocol handler. - */ - interceptStreamProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (NodeJS.ReadableStream) | (ProtocolResponse)) => void) => void): boolean; - /** - * Whether the protocol was successfully intercepted - * - * Intercepts `scheme` protocol and uses `handler` as the protocol's new handler - * which sends a `String` as a response. - */ - interceptStringProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (string) | (ProtocolResponse)) => void) => void): boolean; - /** - * Whether `scheme` is already intercepted. - */ - isProtocolIntercepted(scheme: string): boolean; - /** - * Whether `scheme` is already registered. - */ - isProtocolRegistered(scheme: string): boolean; - /** - * Whether the protocol was successfully registered - * - * Registers a protocol of `scheme` that will send a `Buffer` as a response. - * - * The usage is the same with `registerFileProtocol`, except that the `callback` - * should be called with either a `Buffer` object or an object that has the `data` - * property. - -Example: - */ - registerBufferProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (Buffer) | (ProtocolResponse)) => void) => void): boolean; - /** - * Whether the protocol was successfully registered - * - * Registers a protocol of `scheme` that will send a file as the response. The - * `handler` will be called with `request` and `callback` where `request` is an - * incoming request for the `scheme`. - * - * To handle the `request`, the `callback` should be called with either the file's - * path or an object that has a `path` property, e.g. `callback(filePath)` or - * `callback({ path: filePath })`. The `filePath` must be an absolute path. - * - * By default the `scheme` is treated like `http:`, which is parsed differently - * from protocols that follow the "generic URI syntax" like `file:`. - */ - registerFileProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: (string) | (ProtocolResponse)) => void) => void): boolean; - /** - * Whether the protocol was successfully registered - * - * Registers a protocol of `scheme` that will send an HTTP request as a response. - * - * The usage is the same with `registerFileProtocol`, except that the `callback` - * should be called with an object that has the `url` property. - */ - registerHttpProtocol(scheme: string, handler: (request: ProtocolRequest, callback: (response: ProtocolResponse) => void) => void): boolean; - /** - * **Note:** This method can only be used before the `ready` event of the `app` - * module gets emitted and can be called only once. - * - * Registers the `scheme` as standard, secure, bypasses content security policy for - * resources, allows registering ServiceWorker, supports fetch API, and streaming - * video/audio. Specify a privilege with the value of `true` to enable the - * capability. - * - * An example of registering a privileged scheme, that bypasses Content Security - * Policy: - * - * A standard scheme adheres to what RFC 3986 calls generic URI syntax. For example - * `http` and `https` are standard schemes, while `file` is not. - * - * Registering a scheme as standard allows relative and absolute resources to be - * resolved correctly when served. Otherwise the scheme will behave like the `file` - * protocol, but without the ability to resolve relative URLs. - * - * For example when you load following page with custom protocol without - * registering it as standard scheme, the image will not be loaded because - * non-standard schemes can not recognize relative URLs: - * - * Registering a scheme as standard will allow access to files through the - * FileSystem API. Otherwise the renderer will throw a security error for the - * scheme. - * - * By default web storage apis (localStorage, sessionStorage, webSQL, indexedDB, - * cookies) are disabled for non standard schemes. So in general if you want to - * register a custom protocol to replace the `http` protocol, you have to register - * it as a standard scheme. - * - * Protocols that use streams (http and stream protocols) should set `stream: - * true`. The `