├── .circleci ├── config.pkl └── config.yml ├── .gitignore ├── .gitmodules ├── .npmrc ├── .prettierrc.yml ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── .vscodeignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.adoc ├── DEVELOPMENT.md ├── LICENSE ├── MAINTAINERS.adoc ├── README.md ├── SECURITY.md ├── docs ├── antora.yml ├── modules │ └── ROOT │ │ └── pages │ │ ├── changelog.adoc │ │ ├── features.adoc │ │ ├── index.adoc │ │ └── installation.adoc └── nav.adoc ├── img ├── icon.png └── icon.svg ├── language-configuration.json ├── licenserc.toml ├── package-lock.json ├── package.json ├── queries ├── folds.scm └── highlights.scm ├── scripts ├── check-grammar.sh ├── custom-header-style.toml ├── download-lsp-jar.ts └── license-header.txt ├── src ├── pkl │ ├── index.pkl │ └── pkl.tmLanguage.pkl └── ts │ ├── Semver.ts │ ├── clients │ ├── logger.ts │ └── maven.ts │ ├── config.ts │ ├── consts.ts │ ├── extension.ts │ ├── javaDistribution.ts │ ├── notifications.ts │ ├── pklLspDistribution.ts │ ├── pklLspDistributionUpdater.ts │ ├── providers │ ├── PklSemanticTokensProvider.ts │ └── PklTextDocumentContentProvider.ts │ ├── requests.ts │ └── utils.ts ├── tsconfig.json └── tslint.json /.circleci/config.pkl: -------------------------------------------------------------------------------- 1 | amends "package://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.circleci@1.2.0#/PklCI.pkl" 2 | 3 | local emsdkVersion = "2.0.24" 4 | 5 | prb = buildWorkflow 6 | 7 | main = buildWorkflow 8 | 9 | triggerDocsBuild = "release" 10 | 11 | release = (buildWorkflow) { 12 | jobs { 13 | new { 14 | ["do-release"] { 15 | requires { 16 | "test-license-headers" 17 | "build" 18 | } 19 | context = "pkl-github-release" 20 | } 21 | } 22 | } 23 | } 24 | 25 | jobs { 26 | ["test-license-headers"] { 27 | docker { 28 | new { 29 | image = "ghcr.io/korandoru/hawkeye" 30 | } 31 | } 32 | steps { 33 | "checkout" 34 | new RunStep { 35 | command = "/bin/hawkeye check --fail-if-unknown" 36 | } 37 | } 38 | } 39 | ["build"] { 40 | docker { 41 | new { 42 | image = "cimg/node:18.19.0" 43 | } 44 | } 45 | steps { 46 | "checkout" 47 | new RunStep { 48 | name = "Install emsdk" 49 | command = #""" 50 | git clone https://github.com/emscripten-core/emsdk 51 | cd emsdk 52 | ./emsdk install \#(emsdkVersion) 53 | ./emsdk activate \#(emsdkVersion) 54 | echo 'export PATH=${PWD}/emsdk:${PWD}/emsdk/upstream/emscripten:${PATH}' >> $BASH_ENV 55 | """# 56 | } 57 | new RunStep { 58 | name = "Download Pkl" 59 | command = #""" 60 | mkdir /tmp/pkl 61 | curl -L "https://github.com/apple/pkl/releases/download/0.25.1/pkl-linux-amd64" > /tmp/pkl/pkl 62 | chmod +x /tmp/pkl/pkl 63 | echo 'export PATH=/tmp/pkl:${PATH}' >> $BASH_ENV 64 | """# 65 | } 66 | new RunStep { command = "git submodule update --init --recursive" } 67 | new RunStep { command = "npm ci" } 68 | new RunStep { command = "npm run build" } 69 | new RunStep { command = "npm test" } 70 | new RunStep { command = "npm run lint" } 71 | new RunStep { command = "npm run package-only" } 72 | new PersistToWorkspaceStep { 73 | root = "." 74 | paths { 75 | ".dist/vscode/*.*" 76 | } 77 | } 78 | } 79 | } 80 | ["do-release"] { 81 | docker { 82 | new { image = "maniator/gh:v2.40.1" } 83 | } 84 | steps { 85 | new AttachWorkspaceStep { at = "." } 86 | new RunStep { 87 | name = "gh release" 88 | //language=bash 89 | command = #""" 90 | echo "Creating release" 91 | gh release create ${CIRCLE_TAG} \ 92 | --title "${CIRCLE_TAG}" \ 93 | --target "${CIRCLE_SHA1}" \ 94 | --verify-tag \ 95 | --notes "Release notes: https://pkl-lang.org/vscode/current/changelog.html#release-${CIRCLE_TAG}" \ 96 | --repo "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" \ 97 | .dist/vscode/*.vsix 98 | """# 99 | } 100 | } 101 | } 102 | } 103 | 104 | local buildWorkflow = new Workflow { 105 | jobs { 106 | "test-license-headers" 107 | "build" 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # Generated from CircleCI.pkl. DO NOT EDIT. 2 | version: '2.1' 3 | orbs: 4 | pr-approval: apple/pr-approval@0.1.0 5 | jobs: 6 | test-license-headers: 7 | steps: 8 | - checkout 9 | - run: 10 | command: /bin/hawkeye check --fail-if-unknown 11 | docker: 12 | - image: ghcr.io/korandoru/hawkeye 13 | build: 14 | steps: 15 | - checkout 16 | - run: 17 | command: |- 18 | git clone https://github.com/emscripten-core/emsdk 19 | cd emsdk 20 | ./emsdk install 2.0.24 21 | ./emsdk activate 2.0.24 22 | echo 'export PATH=${PWD}/emsdk:${PWD}/emsdk/upstream/emscripten:${PATH}' >> $BASH_ENV 23 | name: Install emsdk 24 | - run: 25 | command: |- 26 | mkdir /tmp/pkl 27 | curl -L "https://github.com/apple/pkl/releases/download/0.25.1/pkl-linux-amd64" > /tmp/pkl/pkl 28 | chmod +x /tmp/pkl/pkl 29 | echo 'export PATH=/tmp/pkl:${PATH}' >> $BASH_ENV 30 | name: Download Pkl 31 | - run: 32 | command: git submodule update --init --recursive 33 | - run: 34 | command: npm ci 35 | - run: 36 | command: npm run build 37 | - run: 38 | command: npm test 39 | - run: 40 | command: npm run lint 41 | - run: 42 | command: npm run package-only 43 | - persist_to_workspace: 44 | root: '.' 45 | paths: 46 | - .dist/vscode/*.* 47 | docker: 48 | - image: cimg/node:18.19.0 49 | do-release: 50 | steps: 51 | - attach_workspace: 52 | at: '.' 53 | - run: 54 | command: |- 55 | echo "Creating release" 56 | gh release create ${CIRCLE_TAG} \ 57 | --title "${CIRCLE_TAG}" \ 58 | --target "${CIRCLE_SHA1}" \ 59 | --verify-tag \ 60 | --notes "Release notes: https://pkl-lang.org/vscode/current/changelog.html#release-${CIRCLE_TAG}" \ 61 | --repo "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" \ 62 | .dist/vscode/*.vsix 63 | name: gh release 64 | docker: 65 | - image: maniator/gh:v2.40.1 66 | trigger-docsite-build: 67 | steps: 68 | - run: 69 | command: |- 70 | curl --location \ 71 | --request POST \ 72 | --header "Content-Type: application/json" \ 73 | -u "${CIRCLE_TOKEN}:" \ 74 | --data '{ "branch": "main" }' \ 75 | "https://circleci.com/api/v2/project/github/apple/pkl-lang.org/pipeline" 76 | name: Triggering docsite build 77 | docker: 78 | - image: cimg/base:current 79 | workflows: 80 | prb: 81 | jobs: 82 | - hold: 83 | type: approval 84 | - pr-approval/authenticate: 85 | context: pkl-pr-approval 86 | - test-license-headers: 87 | requires: 88 | - hold 89 | - build: 90 | requires: 91 | - hold 92 | when: 93 | matches: 94 | value: << pipeline.git.branch >> 95 | pattern: ^pull/\d+(/head)?$ 96 | main: 97 | jobs: 98 | - test-license-headers 99 | - build 100 | when: 101 | equal: 102 | - main 103 | - << pipeline.git.branch >> 104 | release: 105 | jobs: 106 | - test-license-headers: 107 | filters: 108 | branches: 109 | ignore: /.*/ 110 | tags: 111 | only: /^v?\d+\.\d+\.\d+$/ 112 | - build: 113 | filters: 114 | branches: 115 | ignore: /.*/ 116 | tags: 117 | only: /^v?\d+\.\d+\.\d+$/ 118 | - do-release: 119 | requires: 120 | - test-license-headers 121 | - build 122 | context: pkl-github-release 123 | filters: 124 | branches: 125 | ignore: /.*/ 126 | tags: 127 | only: /^v?\d+\.\d+\.\d+$/ 128 | - trigger-docsite-build: 129 | requires: 130 | - do-release 131 | context: 132 | - pkl-pr-approval 133 | filters: 134 | branches: 135 | ignore: /.*/ 136 | tags: 137 | only: /^v?\d+\.\d+\.\d+$/ 138 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | /node_modules 4 | /.vscode-test 5 | 6 | /out 7 | /.out 8 | /.dist 9 | /.gradle 10 | 11 | /.idea 12 | /*.iml 13 | /*.ipr 14 | /*.iws 15 | 16 | emsdk-* -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "textmate-bundle"] 2 | path = textmate-bundle 3 | url = https://github.com/apple/pkl.tmbundle.git 4 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmjs.org -------------------------------------------------------------------------------- /.prettierrc.yml: -------------------------------------------------------------------------------- 1 | printWidth: 100 -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1.0", 3 | "configurations": [ 4 | { 5 | "name": "Launch Extension", 6 | "type": "extensionHost", 7 | "request": "launch", 8 | "runtimeExecutable": "${execPath}", 9 | "args": ["--extensionDevelopmentPath=${workspaceFolder}" ], 10 | "sourceMaps": true, 11 | "outFiles": [ "${workspaceFolder}/out/**/*.js" ], 12 | "preLaunchTask": "build", 13 | "trace": true 14 | }, 15 | { 16 | "name": "Launch Tests", 17 | "type": "extensionHost", 18 | "request": "launch", 19 | "runtimeExecutable": "${execPath}", 20 | "args": ["--extensionDevelopmentPath=${workspaceFolder}", "--extensionTestsPath=${workspaceFolder}/out/test" ], 21 | "sourceMaps": true, 22 | "outFiles": [ "${workspaceFolder}/out/test/**/*.js" ], 23 | "preLaunchTask": "npm: watch" 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "bin": true 5 | }, 6 | "search.exclude": { 7 | "out": true, 8 | "bin": true 9 | }, 10 | "files.trimTrailingWhitespace": true, 11 | "editor.insertSpaces": true, 12 | "editor.tabSize": 2, 13 | "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, 14 | "editor.formatOnSave": false 15 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // A task runner that calls a custom npm script that compiles the extension. 2 | { 3 | "version": "2.0.0", 4 | "tasks": [ 5 | { 6 | "label": "npm-build-code", 7 | "type": "npm", 8 | "script": "build:code", 9 | "isBackground": false, 10 | "presentation": { 11 | "reveal": "never" 12 | }, 13 | "group": { 14 | "kind": "build", 15 | "isDefault": true 16 | } 17 | }, 18 | { 19 | "label": "build-lsp", 20 | "type": "shell", 21 | "options": { 22 | "cwd": "../pkl-lsp" 23 | }, 24 | "command": "./gradlew", 25 | "args": ["shadowJar"], 26 | }, 27 | { 28 | "label": "build", 29 | "dependsOn": [ 30 | "npm-build-code", 31 | "build-lsp" 32 | ] 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | **/* 2 | 3 | !CHANGELOG.md 4 | !README.md 5 | !language-configuration.json 6 | !package.json 7 | !package-lock.json 8 | !out/** 9 | !queries/* 10 | !img/* 11 | !LICENSE 12 | 13 | # Ensure that prod dependencies are included. 14 | # 15 | # This is computed from: 16 | # `cat package-lock.json | jq -r '.packages | map_values(select(.dev != true)) | keys[] | select(. != "")'` 17 | !node_modules/balanced-match 18 | !node_modules/brace-expansion 19 | !node_modules/minimatch 20 | !node_modules/semver 21 | !node_modules/vscode-jsonrpc 22 | !node_modules/vscode-languageclient 23 | !node_modules/vscode-languageserver-protocol 24 | !node_modules/vscode-languageserver-types 25 | !node_modules/web-tree-sitter 26 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | 3 | ### Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our 7 | project and our community a harassment-free experience for everyone, 8 | regardless of age, body size, disability, ethnicity, sex 9 | characteristics, gender identity and expression, level of experience, 10 | education, socio-economic status, nationality, personal appearance, 11 | race, religion, or sexual identity and orientation. 12 | 13 | ### Our Standards 14 | 15 | Examples of behavior that contributes to creating a positive environment 16 | include: 17 | 18 | * Using welcoming and inclusive language 19 | * Being respectful of differing viewpoints and experiences 20 | * Gracefully accepting constructive criticism 21 | * Focusing on what is best for the community 22 | * Showing empathy towards other community members 23 | 24 | Examples of unacceptable behavior by participants include: 25 | 26 | * The use of sexualized language or imagery and unwelcome sexual 27 | attention or advances 28 | * Trolling, insulting/derogatory comments, and personal or political 29 | attacks 30 | * Public or private harassment 31 | * Publishing others’ private information, such as a physical or 32 | electronic address, without explicit permission 33 | * Other conduct which could reasonably be considered inappropriate in a 34 | professional setting 35 | 36 | ### Our Responsibilities 37 | 38 | Project maintainers are responsible for clarifying the standards of 39 | acceptable behavior and are expected to take appropriate and fair 40 | corrective action in response to any instances of unacceptable behavior. 41 | 42 | Project maintainers have the right and responsibility to remove, edit, 43 | or reject comments, commits, code, wiki edits, issues, and other 44 | contributions that are not aligned to this Code of Conduct, or to ban 45 | temporarily or permanently any contributor for other behaviors that they 46 | deem inappropriate, threatening, offensive, or harmful. 47 | 48 | ### Scope 49 | 50 | This Code of Conduct applies within all project spaces, and it also 51 | applies when an individual is representing the project or its community 52 | in public spaces. Examples of representing a project or community 53 | include using an official project e-mail address, posting via an 54 | official social media account, or acting as an appointed representative 55 | at an online or offline event. Representation of a project may be 56 | further defined and clarified by project maintainers. 57 | 58 | ### Enforcement 59 | 60 | Instances of abusive, harassing, or otherwise unacceptable behavior may 61 | be reported by contacting the open source team at 62 | opensource-conduct@group.apple.com. All complaints will be reviewed and 63 | investigated and will result in a response that is deemed necessary and 64 | appropriate to the circumstances. The project team is obligated to 65 | maintain confidentiality with regard to the reporter of an incident. 66 | Further details of specific enforcement policies may be posted 67 | separately. 68 | 69 | Project maintainers who do not follow or enforce the Code of Conduct in 70 | good faith may face temporary or permanent repercussions as determined 71 | by other members of the project’s leadership. 72 | 73 | ### Attribution 74 | 75 | This Code of Conduct is adapted from the 76 | [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, 77 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 78 | -------------------------------------------------------------------------------- /CONTRIBUTING.adoc: -------------------------------------------------------------------------------- 1 | :uri-github-issue-pkl-vscode: https://github.com/apple/pkl-vscode/issues/new 2 | :uri-seven-rules: https://cbea.ms/git-commit/#seven-rules 3 | 4 | = Pkl VSCode Contributors Guide 5 | 6 | Welcome to the Pkl community, and thank you for contributing! 7 | This guide explains how to get involved. 8 | 9 | * <> 10 | * <> 11 | * <> 12 | 13 | == Licensing 14 | 15 | Pkl VSCode is released under the Apache 2.0 license. 16 | This is why we require that, by submitting a pull request, you acknowledge that you have the right to license your contribution to Apple and the community, and agree that your contribution is licensed under the Apache 2.0 license. 17 | 18 | == Issue Tracking 19 | 20 | To file a bug or feature request, use {uri-github-issue-pkl-vscode}[GitHub]. 21 | Be sure to include the following information: 22 | 23 | * Context 24 | ** What are/were you trying to achieve? 25 | ** What's the impact of this bug/feature? 26 | 27 | == Pull Requests 28 | 29 | When preparing a pull request, follow this checklist: 30 | 31 | * Imitate the conventions of surrounding code. 32 | * Follow the {uri-seven-rules}[seven rules] of great Git commit messages: 33 | ** Separate subject from body with a blank line. 34 | ** Limit the subject line to 50 characters. 35 | ** Capitalize the subject line. 36 | ** Do not end the subject line with a period. 37 | ** Use the imperative mood in the subject line. 38 | ** Wrap the body at 72 characters. 39 | ** Use the body to explain what and why vs. how. 40 | 41 | == Maintainers 42 | 43 | The project’s maintainers (those with write access to the upstream repository) are listed in link:MAINTAINERS.adoc[]. 44 | -------------------------------------------------------------------------------- /DEVELOPMENT.md: -------------------------------------------------------------------------------- 1 | # Development 2 | 3 | ## Building locally 4 | 5 | ### Emscripten 6 | 7 | At the moment, we require emscripten version 2.0.24 to build the project, because tree-sitter-pkl 8 | is incompatible with `.wasm` modules built using newer versions. 9 | 10 | The easiest way to set up emscripten is through [emsdk](https://github.com/emscripten-core/emsdk). 11 | Clone the project down, and within the repo, run `./emsdk install 2.0.24 && ./emsdk activate 2.0.24`. 12 | 13 | ### Building the extension 14 | 15 | To install all NPM dependencies, run `npm install`. 16 | 17 | To build the extension, run `npm run package`. This will build a `.vsix` bundle and place it into `.dist/vscode/pkl-vscode`. 18 | 19 | To install the extension locally, run `npm run installextension`. 20 | 21 | ## Developing locally 22 | 23 | To develop locally, there is a "Launch Extension" task. In VSCode, navigate to the "Run and Debug" pane, and select "Launch Extension" to launch an extension host instance of VSCode. 24 | 25 | Prior to launching, ensure the project environment is set up by running `npm run build:local`. 26 | 27 | The local development environment requires that the [esbuild Problem Matchers](https://marketplace.visualstudio.com/items?itemName=connor4312.esbuild-problem-matchers) plugin is installed into VSCode. 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /MAINTAINERS.adoc: -------------------------------------------------------------------------------- 1 | = MAINTAINERS 2 | 3 | This page lists all active Maintainers of this repository. 4 | 5 | See link:CONTRIBUTING.adoc[] for general contribution guidelines. 6 | 7 | == Maintainers (in alphabetical order) 8 | 9 | * https://github.com/bioball[Daniel Chao] 10 | * https://github.com/stackoverflow[Islon Scherer] 11 | * https://github.com/holzensp[Philip Hölzenspies] 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pkl-vscode 2 | 3 | Pkl language support for [Visual Studio Code](https://code.visualstudio.com). 4 | 5 | ## Documentation 6 | 7 | The [user documentation](https://pkl-lang.org/vscode/current/index.html) provides [installation instructions](https://pkl-lang.org/vscode/current/installation.html) and a [feature overview](https://pkl-lang.org/vscode/current/features.html). 8 | 9 | ## Community 10 | 11 | We'd love to hear from you! 12 | 13 | * Report an [Issue](https://github.com/apple/pkl-vscode/issues/new/choose) 14 | * Submit topics on [GitHub Discussions](https://github.com/apple/pkl/discussions) 15 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security 2 | 3 | For the protection of our community, the Pkl team does not disclose, discuss, or confirm security issues until our investigation is complete and any necessary updates are generally available. 4 | 5 | ## Reporting a security vulnerability 6 | 7 | If you have discovered a security vulnerability within the Pkl VSCode project, please report it to us. 8 | We welcome reports from everyone, including security researchers, developers, and users. 9 | 10 | Security vulnerabilities may be reported on the [Report a vulnerability](https://security.apple.com/submit) form. 11 | When submitting a vulnerability, select "Apple Devices and Software" as the affected platform, and "Open Source" as the affected area. 12 | 13 | For more information, see https://pkl-lang.org/security.html. 14 | -------------------------------------------------------------------------------- /docs/antora.yml: -------------------------------------------------------------------------------- 1 | name: vscode 2 | title: VS Code Extension 3 | version: 0.19.0 4 | nav: 5 | - nav.adoc -------------------------------------------------------------------------------- /docs/modules/ROOT/pages/changelog.adoc: -------------------------------------------------------------------------------- 1 | = Changelog 2 | 3 | [[release-0.19.0]] 4 | == 0.19.0 (2025-04-24) 5 | 6 | === Additions 7 | 8 | * Add configuration options to configure the LSP socket port and host (https://github.com/apple/pkl-vscode/pull/49[#49]). 9 | 10 | === Changes 11 | 12 | * Bump bundled version of pkl-lsp to 0.3.0 (https://github.com/apple/pkl-vscode/pull/54[#54]). 13 | * Consider any 0.x version of pkl-lsp as compatible (https://github.com/apple/pkl-vscode/pull/54[#54]). 14 | + 15 | This change means that pkl-vscode will auto-discover newer versions of pkl-lsp that are greater than version 0.3. 16 | * Improve syntax highlighting (https://github.com/apple/pkl-vscode/pull/50[#50]). 17 | 18 | === Miscellaneous 19 | 20 | * Change build to use vanilla `tsc` instead of `esbuild` (https://github.com/apple/pkl-vscode/pull/50[#50], https://github.com/apple/pkl-vscode/pull/52[#52]). 21 | * Use hawkeye to format/check license headers (https://github.com/apple/pkl-vscode/pull/48[#48]). 22 | * Documentation improvements (https://github.com/apple/pkl-vscode/pull/46[#46]). 23 | 24 | === Contributors ❤️ 25 | 26 | Thank you to all of our contributors! 27 | 28 | * https://github.com/KushalP[@KushalP] 29 | 30 | [[release-0.18.2]] 31 | == 0.18.2 (2024-12-20) 32 | 33 | === Fixes 34 | 35 | * Fix compatbility issues when running on Windows (https://github.com/apple/pkl-vscode/pull/41[#41]). 36 | 37 | === Contributors ❤️ 38 | 39 | Thank you to all of our contributors! 40 | 41 | * link:https://github.com/riccardopiola[@riccardopiola] 42 | 43 | [[release-0.18.1]] 44 | == 0.18.1 (2024-10-14) 45 | 46 | === Fixes 47 | 48 | * Fixes an issue where the extension incorrectly tells users about misconfigured settings (https://github.com/apple/pkl-vscode/pull/35[#35]). 49 | * Fixes an issue where the extension swallows errors coming from starting Pkl Language Server (https://github.com/apple/pkl-vscode/pull/38[#38]). 50 | 51 | [[release-0.18.0]] 52 | == 0.18.0 (2024-10-10) 53 | 54 | === Additions 55 | 56 | * Add support for xref:lsp:ROOT:index.adoc[pkl-lsp]. The editor now ships with a version of pkl-lsp, and queries for updates when the extension starts up. The LSP currently requires Java 22 to run. This requirement will go away when pkl-lsp ships native executables. By default, pkl-vscode will look for Java in `$PATH`, and will prompt if it cannot be found, or is lower than 22 (https://github.com/apple/pkl-vscode/pull/19[#19], https://github.com/apple/pkl-vscode/pull/21[#21], https://github.com/apple/pkl-vscode/pull/22[#22], https://github.com/apple/pkl-vscode/pull/23[#23], https://github.com/apple/pkl-vscode/pull/24[#24], https://github.com/apple/pkl-vscode/pull/25[#25], https://github.com/apple/pkl-vscode/pull/27[#27], https://github.com/apple/pkl-vscode/pull/28[#28], https://github.com/apple/pkl-vscode/pull/32[#32]). 57 | + 58 | These are the initial support features, and the list will grow over time as the LSP improves: 59 | 60 | ** Hover-over documentation 61 | ** Go-to-definition 62 | ** Project syncing 63 | ** Autocompletion 64 | ** Viewing stdlib, https, and package sources 65 | ** Resolving imports 66 | 67 | * Add command "Pkl: Sync projects". 68 | * Add new configuration items: 69 | ** `pkl.cli.path` 70 | ** `pkl.lsp.path` 71 | ** `pkl.lsp.java.path` 72 | ** `pkl.lsp.debug.port` 73 | 74 | === Changes 75 | 76 | * Improve syntax highlighting (https://github.com/apple/pkl-vscode/pull/30[#30]). 77 | 78 | === Miscellaneous 79 | 80 | * Change snippets from textmate snippets to pkl-lsp (https://github.com/apple/pkl-vscode/pull/25[#25]). 81 | * Rename some internal files (https://github.com/apple/pkl-vscode/pull/26[#26]). 82 | * Change some files to markdown (https://github.com/apple/pkl-vscode/pull/20[#20]). 83 | 84 | [[release-0.17.0]] 85 | == 0.17.0 (2024-03-12) 86 | 87 | === Miscellaneous 88 | 89 | * Changes Pkl TextMate grammar to link:https://github.com/apple/pkl.tmbundle[pkl.tmBundle] 90 | 91 | [[release-0.16.0]] 92 | == 0.16.0 (2024-02-28) 93 | 94 | === Fixes 95 | 96 | * Fixes folding ranges (link:https://github.com/apple/pkl-vscode/pull/6[#6]) 97 | * Fixes brace token matching (link:https://github.com/apple/pkl-vscode/pull/8[#8]) 98 | 99 | === Miscellaneous 100 | 101 | * Changes Pkl download link to GitHub (CI) (link:https://github.com/apple/pkl-vscode/pull/3[#3]) 102 | 103 | === Contributors ❤️ 104 | 105 | Thank you to all the contributors for this release! 106 | 107 | * link:https://github.com/RedCMD[@RedCMD] 108 | 109 | [[release-0.15.0]] 110 | == 0.15.0 (2024-02-02) 111 | 112 | Initial release -------------------------------------------------------------------------------- /docs/modules/ROOT/pages/features.adoc: -------------------------------------------------------------------------------- 1 | = Features 2 | 3 | This plugin integrates with xref:lsp:ROOT:index.adoc[pkl-lsp] to provide code completion, hover-over documentation, project support, and more! 4 | 5 | == Supported features 6 | 7 | * Brace matching 8 | * Syntax highlighting 9 | * Code snippets 10 | * Go-to-definition 11 | * Hover-over documentation 12 | * Static code analysis 13 | 14 | The feature set grows as pkl-lsp improves over time. -------------------------------------------------------------------------------- /docs/modules/ROOT/pages/index.adoc: -------------------------------------------------------------------------------- 1 | = VS Code Extension 2 | 3 | The VS Code extension provides Pkl language support for https://code.visualstudio.com[Visual Studio Code]. 4 | 5 | Follow xref:installation.adoc[installation instructions] and check out the xref:features.adoc[feature overview]. 6 | 7 | Review the xref:changelog.adoc[changelog] for the latest changes. 8 | -------------------------------------------------------------------------------- /docs/modules/ROOT/pages/installation.adoc: -------------------------------------------------------------------------------- 1 | = Installation 2 | 3 | The extension is distributed as a Visual Studio Extension (_.vsix_) file. 4 | To install the extension, 5 | 6 | 1. download the latest version of the _.vsix_ file from https://github.com/apple/pkl-vscode/releases/latest/ 7 | 2. follow https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix[Install from a VSIX] in the VS Code docs. 8 | 9 | To confirm that the installation succeeded, open a _.pkl_ file and verify that syntax highlighting works. 10 | 11 | == Java requirement 12 | 13 | The extension currently requires Java 22+ in order to run the xref:lsp:ROOT:index.adoc[Pkl Language Server]. 14 | 15 | By default, it will look for the Java either in `PATH`, or in `JAVA_HOME`. 16 | 17 | The path to the Java executable can also be set via the `pkl.lsp.java.path` setting. 18 | 19 | The Java requirement will be removed when the Pkl Language Server is published as a native executable. For more details, see https://github.com/apple/pkl-lsp/issues/60. 20 | -------------------------------------------------------------------------------- /docs/nav.adoc: -------------------------------------------------------------------------------- 1 | * xref:ROOT:installation.adoc[Installation] 2 | * xref:ROOT:features.adoc[Features] 3 | * xref:ROOT:changelog.adoc[Changelog] -------------------------------------------------------------------------------- /img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apple/pkl-vscode/6c4c9da6c80d43b291bac41d563770a3ac9bf679/img/icon.png -------------------------------------------------------------------------------- /img/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 9 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 20 | 22 | 23 | -------------------------------------------------------------------------------- /language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | "lineComment": "//", 4 | "blockComment": [ "/*", "*/" ] 5 | }, 6 | "brackets": [ 7 | ["{", "}"], 8 | ["[", "]"], 9 | ["(", ")"] 10 | ], 11 | "autoClosingPairs": [ 12 | { "open": "{", "close": "}" }, 13 | { "open": "[", "close": "]" }, 14 | { "open": "(", "close": ")" }, 15 | { "open": "\"", "close": "\"", "notIn": ["string"] }, 16 | { "open": "#\"", "close": "\"#", "notIn": ["string"] }, 17 | { "open": "##\"", "close": "\"##", "notIn": ["string"] }, 18 | { "open": "###\"", "close": "\"###", "notIn": ["string"] }, 19 | { "open": "\"\"\"", "close": "\"\"\"", "notIn": ["string"] }, 20 | { "open": "#\"\"\"", "close": "\"\"\"#", "notIn": ["string"] }, 21 | { "open": "##\"\"\"", "close": "\"\"\"##", "notIn": ["string"] }, 22 | { "open": "###\"\"\"", "close": "\"\"\"###", "notIn": ["string"] }, 23 | { "open": "`", "close": "`", "notIn": ["string", "comment"] } 24 | ], 25 | "surroundingPairs": [ 26 | ["{", "}"], 27 | ["[", "]"], 28 | ["(", ")"], 29 | ["\"", "\""], 30 | ["#\"", "\"#"], 31 | ["##\"", "\"##"], 32 | ["\"\"\"", "\"\"\""], 33 | ["#\"\"\"", "\"\"\"#"], 34 | ["##\"\"\"", "\"\"\"##"], 35 | ["`", "`"] 36 | ], 37 | "folding": { 38 | "offSide": false, 39 | "markers": { 40 | "start": "^\\s*//#region", 41 | "end": "^\\s*//#endregion" 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /licenserc.toml: -------------------------------------------------------------------------------- 1 | additionalHeaders = ["scripts/custom-header-style.toml"] 2 | 3 | headerPath = "scripts/license-header.txt" 4 | 5 | includes = [ 6 | "*.pkl", 7 | "*.scm", 8 | "*.sh", 9 | "*.ts", 10 | ] 11 | 12 | excludes = [ 13 | "docs", 14 | "textmate-bundle" 15 | ] 16 | 17 | [git] 18 | attrs = 'auto' 19 | ignore = 'auto' 20 | 21 | [properties] 22 | copyrightOwner = "Apple Inc. and the Pkl project authors" 23 | 24 | [mapping.SCHEME_STYLE] 25 | extensions = ["scm"] 26 | 27 | #[mapping.PKL_STYLE] 28 | #extensions = ["ts"] 29 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pkl-vscode", 3 | "version": "0.19.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "pkl-vscode", 9 | "version": "0.19.0", 10 | "license": "Apache-2.0", 11 | "dependencies": { 12 | "vscode-languageclient": "^9.0.1", 13 | "web-tree-sitter": "^0.25.3" 14 | }, 15 | "devDependencies": { 16 | "@apple/tree-sitter-pkl": "^0.18.0", 17 | "@types/node": "^16.11.38", 18 | "@types/vscode": "^1.59.0", 19 | "prettier": "^2.6.2", 20 | "shx": "^0.3.4", 21 | "tree-sitter": "^0.20.0", 22 | "tree-sitter-cli": "^0.20.8", 23 | "ts-node": "^10.9.2", 24 | "tslint": "^5.8.0", 25 | "typescript": "^4.7.3", 26 | "vsce": "2.9", 27 | "vscode-test": "^1.6.1" 28 | }, 29 | "engines": { 30 | "vscode": "^1.59.0" 31 | } 32 | }, 33 | "node_modules/@apple/tree-sitter-pkl": { 34 | "version": "0.18.0", 35 | "resolved": "https://registry.npmjs.org/@apple/tree-sitter-pkl/-/tree-sitter-pkl-0.18.0.tgz", 36 | "integrity": "sha512-U8rLNdWnULpyFAlKj6q2EElxWMZddZvU0PEnC4bYSK8u9ZulQ2Ti/WDtz1pGDfsS8LkpO1zcNBq1XZRbOQk/UQ==", 37 | "dev": true, 38 | "hasInstallScript": true, 39 | "dependencies": { 40 | "nan": "^2.17.0" 41 | }, 42 | "engines": { 43 | "node": "18.17.0", 44 | "npm": "9.6.0" 45 | } 46 | }, 47 | "node_modules/@babel/code-frame": { 48 | "version": "7.25.7", 49 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.7.tgz", 50 | "integrity": "sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==", 51 | "dev": true, 52 | "dependencies": { 53 | "@babel/highlight": "^7.25.7", 54 | "picocolors": "^1.0.0" 55 | }, 56 | "engines": { 57 | "node": ">=6.9.0" 58 | } 59 | }, 60 | "node_modules/@babel/helper-validator-identifier": { 61 | "version": "7.25.7", 62 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", 63 | "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", 64 | "dev": true, 65 | "engines": { 66 | "node": ">=6.9.0" 67 | } 68 | }, 69 | "node_modules/@babel/highlight": { 70 | "version": "7.25.7", 71 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", 72 | "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", 73 | "dev": true, 74 | "dependencies": { 75 | "@babel/helper-validator-identifier": "^7.25.7", 76 | "chalk": "^2.4.2", 77 | "js-tokens": "^4.0.0", 78 | "picocolors": "^1.0.0" 79 | }, 80 | "engines": { 81 | "node": ">=6.9.0" 82 | } 83 | }, 84 | "node_modules/@cspotcode/source-map-support": { 85 | "version": "0.8.1", 86 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", 87 | "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", 88 | "dev": true, 89 | "dependencies": { 90 | "@jridgewell/trace-mapping": "0.3.9" 91 | }, 92 | "engines": { 93 | "node": ">=12" 94 | } 95 | }, 96 | "node_modules/@jridgewell/resolve-uri": { 97 | "version": "3.1.2", 98 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", 99 | "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", 100 | "dev": true, 101 | "engines": { 102 | "node": ">=6.0.0" 103 | } 104 | }, 105 | "node_modules/@jridgewell/sourcemap-codec": { 106 | "version": "1.5.0", 107 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", 108 | "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", 109 | "dev": true 110 | }, 111 | "node_modules/@jridgewell/trace-mapping": { 112 | "version": "0.3.9", 113 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", 114 | "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", 115 | "dev": true, 116 | "dependencies": { 117 | "@jridgewell/resolve-uri": "^3.0.3", 118 | "@jridgewell/sourcemap-codec": "^1.4.10" 119 | } 120 | }, 121 | "node_modules/@tootallnate/once": { 122 | "version": "1.1.2", 123 | "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", 124 | "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", 125 | "dev": true, 126 | "engines": { 127 | "node": ">= 6" 128 | } 129 | }, 130 | "node_modules/@tsconfig/node10": { 131 | "version": "1.0.11", 132 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", 133 | "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", 134 | "dev": true 135 | }, 136 | "node_modules/@tsconfig/node12": { 137 | "version": "1.0.11", 138 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", 139 | "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", 140 | "dev": true 141 | }, 142 | "node_modules/@tsconfig/node14": { 143 | "version": "1.0.3", 144 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", 145 | "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", 146 | "dev": true 147 | }, 148 | "node_modules/@tsconfig/node16": { 149 | "version": "1.0.4", 150 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", 151 | "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", 152 | "dev": true 153 | }, 154 | "node_modules/@types/node": { 155 | "version": "16.18.112", 156 | "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.112.tgz", 157 | "integrity": "sha512-EKrbKUGJROm17+dY/gMi31aJlGLJ75e1IkTojt9n6u+hnaTBDs+M1bIdOawpk2m6YUAXq/R2W0SxCng1tndHCg==", 158 | "dev": true 159 | }, 160 | "node_modules/@types/vscode": { 161 | "version": "1.93.0", 162 | "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.93.0.tgz", 163 | "integrity": "sha512-kUK6jAHSR5zY8ps42xuW89NLcBpw1kOabah7yv38J8MyiYuOHxLQBi0e7zeXbQgVefDy/mZZetqEFC+Fl5eIEQ==", 164 | "dev": true 165 | }, 166 | "node_modules/acorn": { 167 | "version": "8.14.1", 168 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", 169 | "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", 170 | "dev": true, 171 | "bin": { 172 | "acorn": "bin/acorn" 173 | }, 174 | "engines": { 175 | "node": ">=0.4.0" 176 | } 177 | }, 178 | "node_modules/acorn-walk": { 179 | "version": "8.3.4", 180 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", 181 | "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", 182 | "dev": true, 183 | "dependencies": { 184 | "acorn": "^8.11.0" 185 | }, 186 | "engines": { 187 | "node": ">=0.4.0" 188 | } 189 | }, 190 | "node_modules/agent-base": { 191 | "version": "6.0.2", 192 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", 193 | "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", 194 | "dev": true, 195 | "dependencies": { 196 | "debug": "4" 197 | }, 198 | "engines": { 199 | "node": ">= 6.0.0" 200 | } 201 | }, 202 | "node_modules/ansi-styles": { 203 | "version": "3.2.1", 204 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 205 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 206 | "dev": true, 207 | "dependencies": { 208 | "color-convert": "^1.9.0" 209 | }, 210 | "engines": { 211 | "node": ">=4" 212 | } 213 | }, 214 | "node_modules/arg": { 215 | "version": "4.1.3", 216 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 217 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", 218 | "dev": true 219 | }, 220 | "node_modules/argparse": { 221 | "version": "1.0.10", 222 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 223 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 224 | "dev": true, 225 | "dependencies": { 226 | "sprintf-js": "~1.0.2" 227 | } 228 | }, 229 | "node_modules/azure-devops-node-api": { 230 | "version": "11.2.0", 231 | "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-11.2.0.tgz", 232 | "integrity": "sha512-XdiGPhrpaT5J8wdERRKs5g8E0Zy1pvOYTli7z9E8nmOn3YGp4FhtjhrOyFmX/8veWCwdI69mCHKJw6l+4J/bHA==", 233 | "dev": true, 234 | "dependencies": { 235 | "tunnel": "0.0.6", 236 | "typed-rest-client": "^1.8.4" 237 | } 238 | }, 239 | "node_modules/balanced-match": { 240 | "version": "1.0.2", 241 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 242 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" 243 | }, 244 | "node_modules/base64-js": { 245 | "version": "1.5.1", 246 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 247 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", 248 | "dev": true, 249 | "funding": [ 250 | { 251 | "type": "github", 252 | "url": "https://github.com/sponsors/feross" 253 | }, 254 | { 255 | "type": "patreon", 256 | "url": "https://www.patreon.com/feross" 257 | }, 258 | { 259 | "type": "consulting", 260 | "url": "https://feross.org/support" 261 | } 262 | ] 263 | }, 264 | "node_modules/big-integer": { 265 | "version": "1.6.52", 266 | "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", 267 | "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", 268 | "dev": true, 269 | "engines": { 270 | "node": ">=0.6" 271 | } 272 | }, 273 | "node_modules/binary": { 274 | "version": "0.3.0", 275 | "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", 276 | "integrity": "sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg==", 277 | "dev": true, 278 | "dependencies": { 279 | "buffers": "~0.1.1", 280 | "chainsaw": "~0.1.0" 281 | }, 282 | "engines": { 283 | "node": "*" 284 | } 285 | }, 286 | "node_modules/bl": { 287 | "version": "4.1.0", 288 | "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", 289 | "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", 290 | "dev": true, 291 | "dependencies": { 292 | "buffer": "^5.5.0", 293 | "inherits": "^2.0.4", 294 | "readable-stream": "^3.4.0" 295 | } 296 | }, 297 | "node_modules/bluebird": { 298 | "version": "3.4.7", 299 | "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", 300 | "integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==", 301 | "dev": true 302 | }, 303 | "node_modules/boolbase": { 304 | "version": "1.0.0", 305 | "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", 306 | "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", 307 | "dev": true 308 | }, 309 | "node_modules/brace-expansion": { 310 | "version": "2.0.1", 311 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 312 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 313 | "dependencies": { 314 | "balanced-match": "^1.0.0" 315 | } 316 | }, 317 | "node_modules/buffer": { 318 | "version": "5.7.1", 319 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 320 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 321 | "dev": true, 322 | "funding": [ 323 | { 324 | "type": "github", 325 | "url": "https://github.com/sponsors/feross" 326 | }, 327 | { 328 | "type": "patreon", 329 | "url": "https://www.patreon.com/feross" 330 | }, 331 | { 332 | "type": "consulting", 333 | "url": "https://feross.org/support" 334 | } 335 | ], 336 | "dependencies": { 337 | "base64-js": "^1.3.1", 338 | "ieee754": "^1.1.13" 339 | } 340 | }, 341 | "node_modules/buffer-crc32": { 342 | "version": "0.2.13", 343 | "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", 344 | "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", 345 | "dev": true, 346 | "engines": { 347 | "node": "*" 348 | } 349 | }, 350 | "node_modules/buffer-indexof-polyfill": { 351 | "version": "1.0.2", 352 | "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", 353 | "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==", 354 | "dev": true, 355 | "engines": { 356 | "node": ">=0.10" 357 | } 358 | }, 359 | "node_modules/buffers": { 360 | "version": "0.1.1", 361 | "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", 362 | "integrity": "sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ==", 363 | "dev": true, 364 | "engines": { 365 | "node": ">=0.2.0" 366 | } 367 | }, 368 | "node_modules/builtin-modules": { 369 | "version": "1.1.1", 370 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", 371 | "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", 372 | "dev": true, 373 | "engines": { 374 | "node": ">=0.10.0" 375 | } 376 | }, 377 | "node_modules/call-bind": { 378 | "version": "1.0.7", 379 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", 380 | "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", 381 | "dev": true, 382 | "dependencies": { 383 | "es-define-property": "^1.0.0", 384 | "es-errors": "^1.3.0", 385 | "function-bind": "^1.1.2", 386 | "get-intrinsic": "^1.2.4", 387 | "set-function-length": "^1.2.1" 388 | }, 389 | "engines": { 390 | "node": ">= 0.4" 391 | }, 392 | "funding": { 393 | "url": "https://github.com/sponsors/ljharb" 394 | } 395 | }, 396 | "node_modules/chainsaw": { 397 | "version": "0.1.0", 398 | "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", 399 | "integrity": "sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==", 400 | "dev": true, 401 | "dependencies": { 402 | "traverse": ">=0.3.0 <0.4" 403 | }, 404 | "engines": { 405 | "node": "*" 406 | } 407 | }, 408 | "node_modules/chalk": { 409 | "version": "2.4.2", 410 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 411 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 412 | "dev": true, 413 | "dependencies": { 414 | "ansi-styles": "^3.2.1", 415 | "escape-string-regexp": "^1.0.5", 416 | "supports-color": "^5.3.0" 417 | }, 418 | "engines": { 419 | "node": ">=4" 420 | } 421 | }, 422 | "node_modules/cheerio": { 423 | "version": "1.0.0", 424 | "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz", 425 | "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==", 426 | "dev": true, 427 | "dependencies": { 428 | "cheerio-select": "^2.1.0", 429 | "dom-serializer": "^2.0.0", 430 | "domhandler": "^5.0.3", 431 | "domutils": "^3.1.0", 432 | "encoding-sniffer": "^0.2.0", 433 | "htmlparser2": "^9.1.0", 434 | "parse5": "^7.1.2", 435 | "parse5-htmlparser2-tree-adapter": "^7.0.0", 436 | "parse5-parser-stream": "^7.1.2", 437 | "undici": "^6.19.5", 438 | "whatwg-mimetype": "^4.0.0" 439 | }, 440 | "engines": { 441 | "node": ">=18.17" 442 | }, 443 | "funding": { 444 | "url": "https://github.com/cheeriojs/cheerio?sponsor=1" 445 | } 446 | }, 447 | "node_modules/cheerio-select": { 448 | "version": "2.1.0", 449 | "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", 450 | "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", 451 | "dev": true, 452 | "dependencies": { 453 | "boolbase": "^1.0.0", 454 | "css-select": "^5.1.0", 455 | "css-what": "^6.1.0", 456 | "domelementtype": "^2.3.0", 457 | "domhandler": "^5.0.3", 458 | "domutils": "^3.0.1" 459 | }, 460 | "funding": { 461 | "url": "https://github.com/sponsors/fb55" 462 | } 463 | }, 464 | "node_modules/chownr": { 465 | "version": "1.1.4", 466 | "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", 467 | "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", 468 | "dev": true 469 | }, 470 | "node_modules/color-convert": { 471 | "version": "1.9.3", 472 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 473 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 474 | "dev": true, 475 | "dependencies": { 476 | "color-name": "1.1.3" 477 | } 478 | }, 479 | "node_modules/color-name": { 480 | "version": "1.1.3", 481 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 482 | "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", 483 | "dev": true 484 | }, 485 | "node_modules/commander": { 486 | "version": "2.20.3", 487 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 488 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", 489 | "dev": true 490 | }, 491 | "node_modules/concat-map": { 492 | "version": "0.0.1", 493 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 494 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", 495 | "dev": true 496 | }, 497 | "node_modules/core-util-is": { 498 | "version": "1.0.3", 499 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", 500 | "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", 501 | "dev": true 502 | }, 503 | "node_modules/create-require": { 504 | "version": "1.1.1", 505 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", 506 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", 507 | "dev": true 508 | }, 509 | "node_modules/css-select": { 510 | "version": "5.1.0", 511 | "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", 512 | "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", 513 | "dev": true, 514 | "dependencies": { 515 | "boolbase": "^1.0.0", 516 | "css-what": "^6.1.0", 517 | "domhandler": "^5.0.2", 518 | "domutils": "^3.0.1", 519 | "nth-check": "^2.0.1" 520 | }, 521 | "funding": { 522 | "url": "https://github.com/sponsors/fb55" 523 | } 524 | }, 525 | "node_modules/css-what": { 526 | "version": "6.1.0", 527 | "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", 528 | "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", 529 | "dev": true, 530 | "engines": { 531 | "node": ">= 6" 532 | }, 533 | "funding": { 534 | "url": "https://github.com/sponsors/fb55" 535 | } 536 | }, 537 | "node_modules/debug": { 538 | "version": "4.3.7", 539 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", 540 | "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", 541 | "dev": true, 542 | "dependencies": { 543 | "ms": "^2.1.3" 544 | }, 545 | "engines": { 546 | "node": ">=6.0" 547 | }, 548 | "peerDependenciesMeta": { 549 | "supports-color": { 550 | "optional": true 551 | } 552 | } 553 | }, 554 | "node_modules/decompress-response": { 555 | "version": "6.0.0", 556 | "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", 557 | "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", 558 | "dev": true, 559 | "dependencies": { 560 | "mimic-response": "^3.1.0" 561 | }, 562 | "engines": { 563 | "node": ">=10" 564 | }, 565 | "funding": { 566 | "url": "https://github.com/sponsors/sindresorhus" 567 | } 568 | }, 569 | "node_modules/deep-extend": { 570 | "version": "0.6.0", 571 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", 572 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", 573 | "dev": true, 574 | "engines": { 575 | "node": ">=4.0.0" 576 | } 577 | }, 578 | "node_modules/define-data-property": { 579 | "version": "1.1.4", 580 | "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", 581 | "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", 582 | "dev": true, 583 | "dependencies": { 584 | "es-define-property": "^1.0.0", 585 | "es-errors": "^1.3.0", 586 | "gopd": "^1.0.1" 587 | }, 588 | "engines": { 589 | "node": ">= 0.4" 590 | }, 591 | "funding": { 592 | "url": "https://github.com/sponsors/ljharb" 593 | } 594 | }, 595 | "node_modules/detect-libc": { 596 | "version": "2.0.3", 597 | "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", 598 | "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", 599 | "dev": true, 600 | "engines": { 601 | "node": ">=8" 602 | } 603 | }, 604 | "node_modules/diff": { 605 | "version": "4.0.2", 606 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 607 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 608 | "dev": true, 609 | "engines": { 610 | "node": ">=0.3.1" 611 | } 612 | }, 613 | "node_modules/dom-serializer": { 614 | "version": "2.0.0", 615 | "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", 616 | "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", 617 | "dev": true, 618 | "dependencies": { 619 | "domelementtype": "^2.3.0", 620 | "domhandler": "^5.0.2", 621 | "entities": "^4.2.0" 622 | }, 623 | "funding": { 624 | "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" 625 | } 626 | }, 627 | "node_modules/domelementtype": { 628 | "version": "2.3.0", 629 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", 630 | "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", 631 | "dev": true, 632 | "funding": [ 633 | { 634 | "type": "github", 635 | "url": "https://github.com/sponsors/fb55" 636 | } 637 | ] 638 | }, 639 | "node_modules/domhandler": { 640 | "version": "5.0.3", 641 | "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", 642 | "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", 643 | "dev": true, 644 | "dependencies": { 645 | "domelementtype": "^2.3.0" 646 | }, 647 | "engines": { 648 | "node": ">= 4" 649 | }, 650 | "funding": { 651 | "url": "https://github.com/fb55/domhandler?sponsor=1" 652 | } 653 | }, 654 | "node_modules/domutils": { 655 | "version": "3.1.0", 656 | "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", 657 | "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", 658 | "dev": true, 659 | "dependencies": { 660 | "dom-serializer": "^2.0.0", 661 | "domelementtype": "^2.3.0", 662 | "domhandler": "^5.0.3" 663 | }, 664 | "funding": { 665 | "url": "https://github.com/fb55/domutils?sponsor=1" 666 | } 667 | }, 668 | "node_modules/duplexer2": { 669 | "version": "0.1.4", 670 | "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", 671 | "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", 672 | "dev": true, 673 | "dependencies": { 674 | "readable-stream": "^2.0.2" 675 | } 676 | }, 677 | "node_modules/duplexer2/node_modules/readable-stream": { 678 | "version": "2.3.8", 679 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", 680 | "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", 681 | "dev": true, 682 | "dependencies": { 683 | "core-util-is": "~1.0.0", 684 | "inherits": "~2.0.3", 685 | "isarray": "~1.0.0", 686 | "process-nextick-args": "~2.0.0", 687 | "safe-buffer": "~5.1.1", 688 | "string_decoder": "~1.1.1", 689 | "util-deprecate": "~1.0.1" 690 | } 691 | }, 692 | "node_modules/duplexer2/node_modules/safe-buffer": { 693 | "version": "5.1.2", 694 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 695 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 696 | "dev": true 697 | }, 698 | "node_modules/duplexer2/node_modules/string_decoder": { 699 | "version": "1.1.1", 700 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 701 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 702 | "dev": true, 703 | "dependencies": { 704 | "safe-buffer": "~5.1.0" 705 | } 706 | }, 707 | "node_modules/encoding-sniffer": { 708 | "version": "0.2.0", 709 | "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz", 710 | "integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==", 711 | "dev": true, 712 | "dependencies": { 713 | "iconv-lite": "^0.6.3", 714 | "whatwg-encoding": "^3.1.1" 715 | }, 716 | "funding": { 717 | "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" 718 | } 719 | }, 720 | "node_modules/end-of-stream": { 721 | "version": "1.4.4", 722 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 723 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 724 | "dev": true, 725 | "dependencies": { 726 | "once": "^1.4.0" 727 | } 728 | }, 729 | "node_modules/entities": { 730 | "version": "4.5.0", 731 | "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", 732 | "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", 733 | "dev": true, 734 | "engines": { 735 | "node": ">=0.12" 736 | }, 737 | "funding": { 738 | "url": "https://github.com/fb55/entities?sponsor=1" 739 | } 740 | }, 741 | "node_modules/es-define-property": { 742 | "version": "1.0.0", 743 | "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", 744 | "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", 745 | "dev": true, 746 | "dependencies": { 747 | "get-intrinsic": "^1.2.4" 748 | }, 749 | "engines": { 750 | "node": ">= 0.4" 751 | } 752 | }, 753 | "node_modules/es-errors": { 754 | "version": "1.3.0", 755 | "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", 756 | "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", 757 | "dev": true, 758 | "engines": { 759 | "node": ">= 0.4" 760 | } 761 | }, 762 | "node_modules/escape-string-regexp": { 763 | "version": "1.0.5", 764 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 765 | "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", 766 | "dev": true, 767 | "engines": { 768 | "node": ">=0.8.0" 769 | } 770 | }, 771 | "node_modules/esprima": { 772 | "version": "4.0.1", 773 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 774 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 775 | "dev": true, 776 | "bin": { 777 | "esparse": "bin/esparse.js", 778 | "esvalidate": "bin/esvalidate.js" 779 | }, 780 | "engines": { 781 | "node": ">=4" 782 | } 783 | }, 784 | "node_modules/expand-template": { 785 | "version": "2.0.3", 786 | "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", 787 | "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", 788 | "dev": true, 789 | "engines": { 790 | "node": ">=6" 791 | } 792 | }, 793 | "node_modules/fd-slicer": { 794 | "version": "1.1.0", 795 | "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", 796 | "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", 797 | "dev": true, 798 | "dependencies": { 799 | "pend": "~1.2.0" 800 | } 801 | }, 802 | "node_modules/fs-constants": { 803 | "version": "1.0.0", 804 | "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", 805 | "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", 806 | "dev": true 807 | }, 808 | "node_modules/fs.realpath": { 809 | "version": "1.0.0", 810 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 811 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", 812 | "dev": true 813 | }, 814 | "node_modules/fstream": { 815 | "version": "1.0.12", 816 | "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", 817 | "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", 818 | "deprecated": "This package is no longer supported.", 819 | "dev": true, 820 | "dependencies": { 821 | "graceful-fs": "^4.1.2", 822 | "inherits": "~2.0.0", 823 | "mkdirp": ">=0.5 0", 824 | "rimraf": "2" 825 | }, 826 | "engines": { 827 | "node": ">=0.6" 828 | } 829 | }, 830 | "node_modules/fstream/node_modules/rimraf": { 831 | "version": "2.7.1", 832 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", 833 | "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", 834 | "deprecated": "Rimraf versions prior to v4 are no longer supported", 835 | "dev": true, 836 | "dependencies": { 837 | "glob": "^7.1.3" 838 | }, 839 | "bin": { 840 | "rimraf": "bin.js" 841 | } 842 | }, 843 | "node_modules/function-bind": { 844 | "version": "1.1.2", 845 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 846 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 847 | "dev": true, 848 | "funding": { 849 | "url": "https://github.com/sponsors/ljharb" 850 | } 851 | }, 852 | "node_modules/get-intrinsic": { 853 | "version": "1.2.4", 854 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", 855 | "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", 856 | "dev": true, 857 | "dependencies": { 858 | "es-errors": "^1.3.0", 859 | "function-bind": "^1.1.2", 860 | "has-proto": "^1.0.1", 861 | "has-symbols": "^1.0.3", 862 | "hasown": "^2.0.0" 863 | }, 864 | "engines": { 865 | "node": ">= 0.4" 866 | }, 867 | "funding": { 868 | "url": "https://github.com/sponsors/ljharb" 869 | } 870 | }, 871 | "node_modules/github-from-package": { 872 | "version": "0.0.0", 873 | "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", 874 | "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", 875 | "dev": true 876 | }, 877 | "node_modules/glob": { 878 | "version": "7.2.3", 879 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", 880 | "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", 881 | "deprecated": "Glob versions prior to v9 are no longer supported", 882 | "dev": true, 883 | "dependencies": { 884 | "fs.realpath": "^1.0.0", 885 | "inflight": "^1.0.4", 886 | "inherits": "2", 887 | "minimatch": "^3.1.1", 888 | "once": "^1.3.0", 889 | "path-is-absolute": "^1.0.0" 890 | }, 891 | "engines": { 892 | "node": "*" 893 | }, 894 | "funding": { 895 | "url": "https://github.com/sponsors/isaacs" 896 | } 897 | }, 898 | "node_modules/glob/node_modules/brace-expansion": { 899 | "version": "1.1.11", 900 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 901 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 902 | "dev": true, 903 | "dependencies": { 904 | "balanced-match": "^1.0.0", 905 | "concat-map": "0.0.1" 906 | } 907 | }, 908 | "node_modules/glob/node_modules/minimatch": { 909 | "version": "3.1.2", 910 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 911 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 912 | "dev": true, 913 | "dependencies": { 914 | "brace-expansion": "^1.1.7" 915 | }, 916 | "engines": { 917 | "node": "*" 918 | } 919 | }, 920 | "node_modules/gopd": { 921 | "version": "1.0.1", 922 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", 923 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 924 | "dev": true, 925 | "dependencies": { 926 | "get-intrinsic": "^1.1.3" 927 | }, 928 | "funding": { 929 | "url": "https://github.com/sponsors/ljharb" 930 | } 931 | }, 932 | "node_modules/graceful-fs": { 933 | "version": "4.2.11", 934 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", 935 | "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", 936 | "dev": true 937 | }, 938 | "node_modules/has-flag": { 939 | "version": "3.0.0", 940 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 941 | "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", 942 | "dev": true, 943 | "engines": { 944 | "node": ">=4" 945 | } 946 | }, 947 | "node_modules/has-property-descriptors": { 948 | "version": "1.0.2", 949 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", 950 | "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", 951 | "dev": true, 952 | "dependencies": { 953 | "es-define-property": "^1.0.0" 954 | }, 955 | "funding": { 956 | "url": "https://github.com/sponsors/ljharb" 957 | } 958 | }, 959 | "node_modules/has-proto": { 960 | "version": "1.0.3", 961 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", 962 | "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", 963 | "dev": true, 964 | "engines": { 965 | "node": ">= 0.4" 966 | }, 967 | "funding": { 968 | "url": "https://github.com/sponsors/ljharb" 969 | } 970 | }, 971 | "node_modules/has-symbols": { 972 | "version": "1.0.3", 973 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 974 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 975 | "dev": true, 976 | "engines": { 977 | "node": ">= 0.4" 978 | }, 979 | "funding": { 980 | "url": "https://github.com/sponsors/ljharb" 981 | } 982 | }, 983 | "node_modules/hasown": { 984 | "version": "2.0.2", 985 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", 986 | "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 987 | "dev": true, 988 | "dependencies": { 989 | "function-bind": "^1.1.2" 990 | }, 991 | "engines": { 992 | "node": ">= 0.4" 993 | } 994 | }, 995 | "node_modules/hosted-git-info": { 996 | "version": "4.1.0", 997 | "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", 998 | "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", 999 | "dev": true, 1000 | "dependencies": { 1001 | "lru-cache": "^6.0.0" 1002 | }, 1003 | "engines": { 1004 | "node": ">=10" 1005 | } 1006 | }, 1007 | "node_modules/htmlparser2": { 1008 | "version": "9.1.0", 1009 | "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", 1010 | "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", 1011 | "dev": true, 1012 | "funding": [ 1013 | "https://github.com/fb55/htmlparser2?sponsor=1", 1014 | { 1015 | "type": "github", 1016 | "url": "https://github.com/sponsors/fb55" 1017 | } 1018 | ], 1019 | "dependencies": { 1020 | "domelementtype": "^2.3.0", 1021 | "domhandler": "^5.0.3", 1022 | "domutils": "^3.1.0", 1023 | "entities": "^4.5.0" 1024 | } 1025 | }, 1026 | "node_modules/http-proxy-agent": { 1027 | "version": "4.0.1", 1028 | "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", 1029 | "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", 1030 | "dev": true, 1031 | "dependencies": { 1032 | "@tootallnate/once": "1", 1033 | "agent-base": "6", 1034 | "debug": "4" 1035 | }, 1036 | "engines": { 1037 | "node": ">= 6" 1038 | } 1039 | }, 1040 | "node_modules/https-proxy-agent": { 1041 | "version": "5.0.1", 1042 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", 1043 | "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", 1044 | "dev": true, 1045 | "dependencies": { 1046 | "agent-base": "6", 1047 | "debug": "4" 1048 | }, 1049 | "engines": { 1050 | "node": ">= 6" 1051 | } 1052 | }, 1053 | "node_modules/iconv-lite": { 1054 | "version": "0.6.3", 1055 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", 1056 | "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", 1057 | "dev": true, 1058 | "dependencies": { 1059 | "safer-buffer": ">= 2.1.2 < 3.0.0" 1060 | }, 1061 | "engines": { 1062 | "node": ">=0.10.0" 1063 | } 1064 | }, 1065 | "node_modules/ieee754": { 1066 | "version": "1.2.1", 1067 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 1068 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", 1069 | "dev": true, 1070 | "funding": [ 1071 | { 1072 | "type": "github", 1073 | "url": "https://github.com/sponsors/feross" 1074 | }, 1075 | { 1076 | "type": "patreon", 1077 | "url": "https://www.patreon.com/feross" 1078 | }, 1079 | { 1080 | "type": "consulting", 1081 | "url": "https://feross.org/support" 1082 | } 1083 | ] 1084 | }, 1085 | "node_modules/inflight": { 1086 | "version": "1.0.6", 1087 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1088 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 1089 | "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", 1090 | "dev": true, 1091 | "dependencies": { 1092 | "once": "^1.3.0", 1093 | "wrappy": "1" 1094 | } 1095 | }, 1096 | "node_modules/inherits": { 1097 | "version": "2.0.4", 1098 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1099 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1100 | "dev": true 1101 | }, 1102 | "node_modules/ini": { 1103 | "version": "1.3.8", 1104 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", 1105 | "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", 1106 | "dev": true 1107 | }, 1108 | "node_modules/interpret": { 1109 | "version": "1.4.0", 1110 | "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", 1111 | "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", 1112 | "dev": true, 1113 | "engines": { 1114 | "node": ">= 0.10" 1115 | } 1116 | }, 1117 | "node_modules/is-core-module": { 1118 | "version": "2.15.1", 1119 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", 1120 | "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", 1121 | "dev": true, 1122 | "dependencies": { 1123 | "hasown": "^2.0.2" 1124 | }, 1125 | "engines": { 1126 | "node": ">= 0.4" 1127 | }, 1128 | "funding": { 1129 | "url": "https://github.com/sponsors/ljharb" 1130 | } 1131 | }, 1132 | "node_modules/isarray": { 1133 | "version": "1.0.0", 1134 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 1135 | "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", 1136 | "dev": true 1137 | }, 1138 | "node_modules/js-tokens": { 1139 | "version": "4.0.0", 1140 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 1141 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 1142 | "dev": true 1143 | }, 1144 | "node_modules/js-yaml": { 1145 | "version": "3.14.1", 1146 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", 1147 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", 1148 | "dev": true, 1149 | "dependencies": { 1150 | "argparse": "^1.0.7", 1151 | "esprima": "^4.0.0" 1152 | }, 1153 | "bin": { 1154 | "js-yaml": "bin/js-yaml.js" 1155 | } 1156 | }, 1157 | "node_modules/keytar": { 1158 | "version": "7.9.0", 1159 | "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.9.0.tgz", 1160 | "integrity": "sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==", 1161 | "dev": true, 1162 | "hasInstallScript": true, 1163 | "dependencies": { 1164 | "node-addon-api": "^4.3.0", 1165 | "prebuild-install": "^7.0.1" 1166 | } 1167 | }, 1168 | "node_modules/leven": { 1169 | "version": "3.1.0", 1170 | "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", 1171 | "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", 1172 | "dev": true, 1173 | "engines": { 1174 | "node": ">=6" 1175 | } 1176 | }, 1177 | "node_modules/linkify-it": { 1178 | "version": "3.0.3", 1179 | "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", 1180 | "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", 1181 | "dev": true, 1182 | "dependencies": { 1183 | "uc.micro": "^1.0.1" 1184 | } 1185 | }, 1186 | "node_modules/listenercount": { 1187 | "version": "1.0.1", 1188 | "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", 1189 | "integrity": "sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ==", 1190 | "dev": true 1191 | }, 1192 | "node_modules/lru-cache": { 1193 | "version": "6.0.0", 1194 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 1195 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 1196 | "dev": true, 1197 | "dependencies": { 1198 | "yallist": "^4.0.0" 1199 | }, 1200 | "engines": { 1201 | "node": ">=10" 1202 | } 1203 | }, 1204 | "node_modules/make-error": { 1205 | "version": "1.3.6", 1206 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 1207 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", 1208 | "dev": true 1209 | }, 1210 | "node_modules/markdown-it": { 1211 | "version": "12.3.2", 1212 | "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", 1213 | "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", 1214 | "dev": true, 1215 | "dependencies": { 1216 | "argparse": "^2.0.1", 1217 | "entities": "~2.1.0", 1218 | "linkify-it": "^3.0.1", 1219 | "mdurl": "^1.0.1", 1220 | "uc.micro": "^1.0.5" 1221 | }, 1222 | "bin": { 1223 | "markdown-it": "bin/markdown-it.js" 1224 | } 1225 | }, 1226 | "node_modules/markdown-it/node_modules/argparse": { 1227 | "version": "2.0.1", 1228 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 1229 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 1230 | "dev": true 1231 | }, 1232 | "node_modules/markdown-it/node_modules/entities": { 1233 | "version": "2.1.0", 1234 | "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", 1235 | "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", 1236 | "dev": true, 1237 | "funding": { 1238 | "url": "https://github.com/fb55/entities?sponsor=1" 1239 | } 1240 | }, 1241 | "node_modules/mdurl": { 1242 | "version": "1.0.1", 1243 | "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", 1244 | "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", 1245 | "dev": true 1246 | }, 1247 | "node_modules/mime": { 1248 | "version": "1.6.0", 1249 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 1250 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 1251 | "dev": true, 1252 | "bin": { 1253 | "mime": "cli.js" 1254 | }, 1255 | "engines": { 1256 | "node": ">=4" 1257 | } 1258 | }, 1259 | "node_modules/mimic-response": { 1260 | "version": "3.1.0", 1261 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", 1262 | "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", 1263 | "dev": true, 1264 | "engines": { 1265 | "node": ">=10" 1266 | }, 1267 | "funding": { 1268 | "url": "https://github.com/sponsors/sindresorhus" 1269 | } 1270 | }, 1271 | "node_modules/minimatch": { 1272 | "version": "5.1.6", 1273 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", 1274 | "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", 1275 | "dependencies": { 1276 | "brace-expansion": "^2.0.1" 1277 | }, 1278 | "engines": { 1279 | "node": ">=10" 1280 | } 1281 | }, 1282 | "node_modules/minimist": { 1283 | "version": "1.2.8", 1284 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", 1285 | "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", 1286 | "dev": true, 1287 | "funding": { 1288 | "url": "https://github.com/sponsors/ljharb" 1289 | } 1290 | }, 1291 | "node_modules/mkdirp": { 1292 | "version": "0.5.6", 1293 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", 1294 | "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", 1295 | "dev": true, 1296 | "dependencies": { 1297 | "minimist": "^1.2.6" 1298 | }, 1299 | "bin": { 1300 | "mkdirp": "bin/cmd.js" 1301 | } 1302 | }, 1303 | "node_modules/mkdirp-classic": { 1304 | "version": "0.5.3", 1305 | "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", 1306 | "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", 1307 | "dev": true 1308 | }, 1309 | "node_modules/ms": { 1310 | "version": "2.1.3", 1311 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1312 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1313 | "dev": true 1314 | }, 1315 | "node_modules/mute-stream": { 1316 | "version": "0.0.8", 1317 | "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", 1318 | "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", 1319 | "dev": true 1320 | }, 1321 | "node_modules/nan": { 1322 | "version": "2.20.0", 1323 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.20.0.tgz", 1324 | "integrity": "sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==", 1325 | "dev": true 1326 | }, 1327 | "node_modules/napi-build-utils": { 1328 | "version": "1.0.2", 1329 | "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", 1330 | "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", 1331 | "dev": true 1332 | }, 1333 | "node_modules/node-abi": { 1334 | "version": "3.68.0", 1335 | "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.68.0.tgz", 1336 | "integrity": "sha512-7vbj10trelExNjFSBm5kTvZXXa7pZyKWx9RCKIyqe6I9Ev3IzGpQoqBP3a+cOdxY+pWj6VkP28n/2wWysBHD/A==", 1337 | "dev": true, 1338 | "dependencies": { 1339 | "semver": "^7.3.5" 1340 | }, 1341 | "engines": { 1342 | "node": ">=10" 1343 | } 1344 | }, 1345 | "node_modules/node-addon-api": { 1346 | "version": "4.3.0", 1347 | "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", 1348 | "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", 1349 | "dev": true 1350 | }, 1351 | "node_modules/nth-check": { 1352 | "version": "2.1.1", 1353 | "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", 1354 | "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", 1355 | "dev": true, 1356 | "dependencies": { 1357 | "boolbase": "^1.0.0" 1358 | }, 1359 | "funding": { 1360 | "url": "https://github.com/fb55/nth-check?sponsor=1" 1361 | } 1362 | }, 1363 | "node_modules/object-inspect": { 1364 | "version": "1.13.2", 1365 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", 1366 | "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", 1367 | "dev": true, 1368 | "engines": { 1369 | "node": ">= 0.4" 1370 | }, 1371 | "funding": { 1372 | "url": "https://github.com/sponsors/ljharb" 1373 | } 1374 | }, 1375 | "node_modules/once": { 1376 | "version": "1.4.0", 1377 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1378 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 1379 | "dev": true, 1380 | "dependencies": { 1381 | "wrappy": "1" 1382 | } 1383 | }, 1384 | "node_modules/parse-semver": { 1385 | "version": "1.1.1", 1386 | "resolved": "https://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz", 1387 | "integrity": "sha512-Eg1OuNntBMH0ojvEKSrvDSnwLmvVuUOSdylH/pSCPNMIspLlweJyIWXCE+k/5hm3cj/EBUYwmWkjhBALNP4LXQ==", 1388 | "dev": true, 1389 | "dependencies": { 1390 | "semver": "^5.1.0" 1391 | } 1392 | }, 1393 | "node_modules/parse-semver/node_modules/semver": { 1394 | "version": "5.7.2", 1395 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", 1396 | "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", 1397 | "dev": true, 1398 | "bin": { 1399 | "semver": "bin/semver" 1400 | } 1401 | }, 1402 | "node_modules/parse5": { 1403 | "version": "7.1.2", 1404 | "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", 1405 | "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", 1406 | "dev": true, 1407 | "dependencies": { 1408 | "entities": "^4.4.0" 1409 | }, 1410 | "funding": { 1411 | "url": "https://github.com/inikulin/parse5?sponsor=1" 1412 | } 1413 | }, 1414 | "node_modules/parse5-htmlparser2-tree-adapter": { 1415 | "version": "7.0.0", 1416 | "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", 1417 | "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", 1418 | "dev": true, 1419 | "dependencies": { 1420 | "domhandler": "^5.0.2", 1421 | "parse5": "^7.0.0" 1422 | }, 1423 | "funding": { 1424 | "url": "https://github.com/inikulin/parse5?sponsor=1" 1425 | } 1426 | }, 1427 | "node_modules/parse5-parser-stream": { 1428 | "version": "7.1.2", 1429 | "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", 1430 | "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", 1431 | "dev": true, 1432 | "dependencies": { 1433 | "parse5": "^7.0.0" 1434 | }, 1435 | "funding": { 1436 | "url": "https://github.com/inikulin/parse5?sponsor=1" 1437 | } 1438 | }, 1439 | "node_modules/path-is-absolute": { 1440 | "version": "1.0.1", 1441 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1442 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", 1443 | "dev": true, 1444 | "engines": { 1445 | "node": ">=0.10.0" 1446 | } 1447 | }, 1448 | "node_modules/path-parse": { 1449 | "version": "1.0.7", 1450 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 1451 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 1452 | "dev": true 1453 | }, 1454 | "node_modules/pend": { 1455 | "version": "1.2.0", 1456 | "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", 1457 | "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", 1458 | "dev": true 1459 | }, 1460 | "node_modules/picocolors": { 1461 | "version": "1.1.1", 1462 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", 1463 | "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", 1464 | "dev": true 1465 | }, 1466 | "node_modules/prebuild-install": { 1467 | "version": "7.1.2", 1468 | "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz", 1469 | "integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==", 1470 | "dev": true, 1471 | "dependencies": { 1472 | "detect-libc": "^2.0.0", 1473 | "expand-template": "^2.0.3", 1474 | "github-from-package": "0.0.0", 1475 | "minimist": "^1.2.3", 1476 | "mkdirp-classic": "^0.5.3", 1477 | "napi-build-utils": "^1.0.1", 1478 | "node-abi": "^3.3.0", 1479 | "pump": "^3.0.0", 1480 | "rc": "^1.2.7", 1481 | "simple-get": "^4.0.0", 1482 | "tar-fs": "^2.0.0", 1483 | "tunnel-agent": "^0.6.0" 1484 | }, 1485 | "bin": { 1486 | "prebuild-install": "bin.js" 1487 | }, 1488 | "engines": { 1489 | "node": ">=10" 1490 | } 1491 | }, 1492 | "node_modules/prettier": { 1493 | "version": "2.8.8", 1494 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", 1495 | "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", 1496 | "dev": true, 1497 | "bin": { 1498 | "prettier": "bin-prettier.js" 1499 | }, 1500 | "engines": { 1501 | "node": ">=10.13.0" 1502 | }, 1503 | "funding": { 1504 | "url": "https://github.com/prettier/prettier?sponsor=1" 1505 | } 1506 | }, 1507 | "node_modules/process-nextick-args": { 1508 | "version": "2.0.1", 1509 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 1510 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", 1511 | "dev": true 1512 | }, 1513 | "node_modules/pump": { 1514 | "version": "3.0.2", 1515 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", 1516 | "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", 1517 | "dev": true, 1518 | "dependencies": { 1519 | "end-of-stream": "^1.1.0", 1520 | "once": "^1.3.1" 1521 | } 1522 | }, 1523 | "node_modules/qs": { 1524 | "version": "6.13.0", 1525 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", 1526 | "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", 1527 | "dev": true, 1528 | "dependencies": { 1529 | "side-channel": "^1.0.6" 1530 | }, 1531 | "engines": { 1532 | "node": ">=0.6" 1533 | }, 1534 | "funding": { 1535 | "url": "https://github.com/sponsors/ljharb" 1536 | } 1537 | }, 1538 | "node_modules/rc": { 1539 | "version": "1.2.8", 1540 | "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", 1541 | "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", 1542 | "dev": true, 1543 | "dependencies": { 1544 | "deep-extend": "^0.6.0", 1545 | "ini": "~1.3.0", 1546 | "minimist": "^1.2.0", 1547 | "strip-json-comments": "~2.0.1" 1548 | }, 1549 | "bin": { 1550 | "rc": "cli.js" 1551 | } 1552 | }, 1553 | "node_modules/read": { 1554 | "version": "1.0.7", 1555 | "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", 1556 | "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==", 1557 | "dev": true, 1558 | "dependencies": { 1559 | "mute-stream": "~0.0.4" 1560 | }, 1561 | "engines": { 1562 | "node": ">=0.8" 1563 | } 1564 | }, 1565 | "node_modules/readable-stream": { 1566 | "version": "3.6.2", 1567 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", 1568 | "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", 1569 | "dev": true, 1570 | "dependencies": { 1571 | "inherits": "^2.0.3", 1572 | "string_decoder": "^1.1.1", 1573 | "util-deprecate": "^1.0.1" 1574 | }, 1575 | "engines": { 1576 | "node": ">= 6" 1577 | } 1578 | }, 1579 | "node_modules/rechoir": { 1580 | "version": "0.6.2", 1581 | "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", 1582 | "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", 1583 | "dev": true, 1584 | "dependencies": { 1585 | "resolve": "^1.1.6" 1586 | }, 1587 | "engines": { 1588 | "node": ">= 0.10" 1589 | } 1590 | }, 1591 | "node_modules/resolve": { 1592 | "version": "1.22.8", 1593 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", 1594 | "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", 1595 | "dev": true, 1596 | "dependencies": { 1597 | "is-core-module": "^2.13.0", 1598 | "path-parse": "^1.0.7", 1599 | "supports-preserve-symlinks-flag": "^1.0.0" 1600 | }, 1601 | "bin": { 1602 | "resolve": "bin/resolve" 1603 | }, 1604 | "funding": { 1605 | "url": "https://github.com/sponsors/ljharb" 1606 | } 1607 | }, 1608 | "node_modules/rimraf": { 1609 | "version": "3.0.2", 1610 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", 1611 | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", 1612 | "deprecated": "Rimraf versions prior to v4 are no longer supported", 1613 | "dev": true, 1614 | "dependencies": { 1615 | "glob": "^7.1.3" 1616 | }, 1617 | "bin": { 1618 | "rimraf": "bin.js" 1619 | }, 1620 | "funding": { 1621 | "url": "https://github.com/sponsors/isaacs" 1622 | } 1623 | }, 1624 | "node_modules/safe-buffer": { 1625 | "version": "5.2.1", 1626 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1627 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1628 | "dev": true, 1629 | "funding": [ 1630 | { 1631 | "type": "github", 1632 | "url": "https://github.com/sponsors/feross" 1633 | }, 1634 | { 1635 | "type": "patreon", 1636 | "url": "https://www.patreon.com/feross" 1637 | }, 1638 | { 1639 | "type": "consulting", 1640 | "url": "https://feross.org/support" 1641 | } 1642 | ] 1643 | }, 1644 | "node_modules/safer-buffer": { 1645 | "version": "2.1.2", 1646 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1647 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 1648 | "dev": true 1649 | }, 1650 | "node_modules/sax": { 1651 | "version": "1.4.1", 1652 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", 1653 | "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", 1654 | "dev": true 1655 | }, 1656 | "node_modules/semver": { 1657 | "version": "7.6.3", 1658 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", 1659 | "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", 1660 | "bin": { 1661 | "semver": "bin/semver.js" 1662 | }, 1663 | "engines": { 1664 | "node": ">=10" 1665 | } 1666 | }, 1667 | "node_modules/set-function-length": { 1668 | "version": "1.2.2", 1669 | "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", 1670 | "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", 1671 | "dev": true, 1672 | "dependencies": { 1673 | "define-data-property": "^1.1.4", 1674 | "es-errors": "^1.3.0", 1675 | "function-bind": "^1.1.2", 1676 | "get-intrinsic": "^1.2.4", 1677 | "gopd": "^1.0.1", 1678 | "has-property-descriptors": "^1.0.2" 1679 | }, 1680 | "engines": { 1681 | "node": ">= 0.4" 1682 | } 1683 | }, 1684 | "node_modules/setimmediate": { 1685 | "version": "1.0.5", 1686 | "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", 1687 | "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", 1688 | "dev": true 1689 | }, 1690 | "node_modules/shelljs": { 1691 | "version": "0.8.5", 1692 | "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", 1693 | "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", 1694 | "dev": true, 1695 | "dependencies": { 1696 | "glob": "^7.0.0", 1697 | "interpret": "^1.0.0", 1698 | "rechoir": "^0.6.2" 1699 | }, 1700 | "bin": { 1701 | "shjs": "bin/shjs" 1702 | }, 1703 | "engines": { 1704 | "node": ">=4" 1705 | } 1706 | }, 1707 | "node_modules/shx": { 1708 | "version": "0.3.4", 1709 | "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", 1710 | "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==", 1711 | "dev": true, 1712 | "dependencies": { 1713 | "minimist": "^1.2.3", 1714 | "shelljs": "^0.8.5" 1715 | }, 1716 | "bin": { 1717 | "shx": "lib/cli.js" 1718 | }, 1719 | "engines": { 1720 | "node": ">=6" 1721 | } 1722 | }, 1723 | "node_modules/side-channel": { 1724 | "version": "1.0.6", 1725 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", 1726 | "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", 1727 | "dev": true, 1728 | "dependencies": { 1729 | "call-bind": "^1.0.7", 1730 | "es-errors": "^1.3.0", 1731 | "get-intrinsic": "^1.2.4", 1732 | "object-inspect": "^1.13.1" 1733 | }, 1734 | "engines": { 1735 | "node": ">= 0.4" 1736 | }, 1737 | "funding": { 1738 | "url": "https://github.com/sponsors/ljharb" 1739 | } 1740 | }, 1741 | "node_modules/simple-concat": { 1742 | "version": "1.0.1", 1743 | "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", 1744 | "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", 1745 | "dev": true, 1746 | "funding": [ 1747 | { 1748 | "type": "github", 1749 | "url": "https://github.com/sponsors/feross" 1750 | }, 1751 | { 1752 | "type": "patreon", 1753 | "url": "https://www.patreon.com/feross" 1754 | }, 1755 | { 1756 | "type": "consulting", 1757 | "url": "https://feross.org/support" 1758 | } 1759 | ] 1760 | }, 1761 | "node_modules/simple-get": { 1762 | "version": "4.0.1", 1763 | "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", 1764 | "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", 1765 | "dev": true, 1766 | "funding": [ 1767 | { 1768 | "type": "github", 1769 | "url": "https://github.com/sponsors/feross" 1770 | }, 1771 | { 1772 | "type": "patreon", 1773 | "url": "https://www.patreon.com/feross" 1774 | }, 1775 | { 1776 | "type": "consulting", 1777 | "url": "https://feross.org/support" 1778 | } 1779 | ], 1780 | "dependencies": { 1781 | "decompress-response": "^6.0.0", 1782 | "once": "^1.3.1", 1783 | "simple-concat": "^1.0.0" 1784 | } 1785 | }, 1786 | "node_modules/sprintf-js": { 1787 | "version": "1.0.3", 1788 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 1789 | "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", 1790 | "dev": true 1791 | }, 1792 | "node_modules/string_decoder": { 1793 | "version": "1.3.0", 1794 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", 1795 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", 1796 | "dev": true, 1797 | "dependencies": { 1798 | "safe-buffer": "~5.2.0" 1799 | } 1800 | }, 1801 | "node_modules/strip-json-comments": { 1802 | "version": "2.0.1", 1803 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 1804 | "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", 1805 | "dev": true, 1806 | "engines": { 1807 | "node": ">=0.10.0" 1808 | } 1809 | }, 1810 | "node_modules/supports-color": { 1811 | "version": "5.5.0", 1812 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1813 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1814 | "dev": true, 1815 | "dependencies": { 1816 | "has-flag": "^3.0.0" 1817 | }, 1818 | "engines": { 1819 | "node": ">=4" 1820 | } 1821 | }, 1822 | "node_modules/supports-preserve-symlinks-flag": { 1823 | "version": "1.0.0", 1824 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", 1825 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", 1826 | "dev": true, 1827 | "engines": { 1828 | "node": ">= 0.4" 1829 | }, 1830 | "funding": { 1831 | "url": "https://github.com/sponsors/ljharb" 1832 | } 1833 | }, 1834 | "node_modules/tar-fs": { 1835 | "version": "2.1.1", 1836 | "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", 1837 | "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", 1838 | "dev": true, 1839 | "dependencies": { 1840 | "chownr": "^1.1.1", 1841 | "mkdirp-classic": "^0.5.2", 1842 | "pump": "^3.0.0", 1843 | "tar-stream": "^2.1.4" 1844 | } 1845 | }, 1846 | "node_modules/tar-stream": { 1847 | "version": "2.2.0", 1848 | "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", 1849 | "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", 1850 | "dev": true, 1851 | "dependencies": { 1852 | "bl": "^4.0.3", 1853 | "end-of-stream": "^1.4.1", 1854 | "fs-constants": "^1.0.0", 1855 | "inherits": "^2.0.3", 1856 | "readable-stream": "^3.1.1" 1857 | }, 1858 | "engines": { 1859 | "node": ">=6" 1860 | } 1861 | }, 1862 | "node_modules/tmp": { 1863 | "version": "0.2.3", 1864 | "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", 1865 | "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", 1866 | "dev": true, 1867 | "engines": { 1868 | "node": ">=14.14" 1869 | } 1870 | }, 1871 | "node_modules/traverse": { 1872 | "version": "0.3.9", 1873 | "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", 1874 | "integrity": "sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==", 1875 | "dev": true, 1876 | "engines": { 1877 | "node": "*" 1878 | } 1879 | }, 1880 | "node_modules/tree-sitter": { 1881 | "version": "0.20.6", 1882 | "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.6.tgz", 1883 | "integrity": "sha512-GxJodajVpfgb3UREzzIbtA1hyRnTxVbWVXrbC6sk4xTMH5ERMBJk9HJNq4c8jOJeUaIOmLcwg+t6mez/PDvGqg==", 1884 | "dev": true, 1885 | "hasInstallScript": true, 1886 | "dependencies": { 1887 | "nan": "^2.18.0", 1888 | "prebuild-install": "^7.1.1" 1889 | } 1890 | }, 1891 | "node_modules/tree-sitter-cli": { 1892 | "version": "0.20.8", 1893 | "resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.20.8.tgz", 1894 | "integrity": "sha512-XjTcS3wdTy/2cc/ptMLc/WRyOLECRYcMTrSWyhZnj1oGSOWbHLTklgsgRICU3cPfb0vy+oZCC33M43u6R1HSCA==", 1895 | "dev": true, 1896 | "hasInstallScript": true, 1897 | "bin": { 1898 | "tree-sitter": "cli.js" 1899 | } 1900 | }, 1901 | "node_modules/ts-node": { 1902 | "version": "10.9.2", 1903 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", 1904 | "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", 1905 | "dev": true, 1906 | "dependencies": { 1907 | "@cspotcode/source-map-support": "^0.8.0", 1908 | "@tsconfig/node10": "^1.0.7", 1909 | "@tsconfig/node12": "^1.0.7", 1910 | "@tsconfig/node14": "^1.0.0", 1911 | "@tsconfig/node16": "^1.0.2", 1912 | "acorn": "^8.4.1", 1913 | "acorn-walk": "^8.1.1", 1914 | "arg": "^4.1.0", 1915 | "create-require": "^1.1.0", 1916 | "diff": "^4.0.1", 1917 | "make-error": "^1.1.1", 1918 | "v8-compile-cache-lib": "^3.0.1", 1919 | "yn": "3.1.1" 1920 | }, 1921 | "bin": { 1922 | "ts-node": "dist/bin.js", 1923 | "ts-node-cwd": "dist/bin-cwd.js", 1924 | "ts-node-esm": "dist/bin-esm.js", 1925 | "ts-node-script": "dist/bin-script.js", 1926 | "ts-node-transpile-only": "dist/bin-transpile.js", 1927 | "ts-script": "dist/bin-script-deprecated.js" 1928 | }, 1929 | "peerDependencies": { 1930 | "@swc/core": ">=1.2.50", 1931 | "@swc/wasm": ">=1.2.50", 1932 | "@types/node": "*", 1933 | "typescript": ">=2.7" 1934 | }, 1935 | "peerDependenciesMeta": { 1936 | "@swc/core": { 1937 | "optional": true 1938 | }, 1939 | "@swc/wasm": { 1940 | "optional": true 1941 | } 1942 | } 1943 | }, 1944 | "node_modules/tslib": { 1945 | "version": "1.14.1", 1946 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 1947 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", 1948 | "dev": true 1949 | }, 1950 | "node_modules/tslint": { 1951 | "version": "5.20.1", 1952 | "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz", 1953 | "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", 1954 | "dev": true, 1955 | "dependencies": { 1956 | "@babel/code-frame": "^7.0.0", 1957 | "builtin-modules": "^1.1.1", 1958 | "chalk": "^2.3.0", 1959 | "commander": "^2.12.1", 1960 | "diff": "^4.0.1", 1961 | "glob": "^7.1.1", 1962 | "js-yaml": "^3.13.1", 1963 | "minimatch": "^3.0.4", 1964 | "mkdirp": "^0.5.1", 1965 | "resolve": "^1.3.2", 1966 | "semver": "^5.3.0", 1967 | "tslib": "^1.8.0", 1968 | "tsutils": "^2.29.0" 1969 | }, 1970 | "bin": { 1971 | "tslint": "bin/tslint" 1972 | }, 1973 | "engines": { 1974 | "node": ">=4.8.0" 1975 | }, 1976 | "peerDependencies": { 1977 | "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev" 1978 | } 1979 | }, 1980 | "node_modules/tslint/node_modules/brace-expansion": { 1981 | "version": "1.1.11", 1982 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 1983 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 1984 | "dev": true, 1985 | "dependencies": { 1986 | "balanced-match": "^1.0.0", 1987 | "concat-map": "0.0.1" 1988 | } 1989 | }, 1990 | "node_modules/tslint/node_modules/minimatch": { 1991 | "version": "3.1.2", 1992 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 1993 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1994 | "dev": true, 1995 | "dependencies": { 1996 | "brace-expansion": "^1.1.7" 1997 | }, 1998 | "engines": { 1999 | "node": "*" 2000 | } 2001 | }, 2002 | "node_modules/tslint/node_modules/semver": { 2003 | "version": "5.7.2", 2004 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", 2005 | "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", 2006 | "dev": true, 2007 | "bin": { 2008 | "semver": "bin/semver" 2009 | } 2010 | }, 2011 | "node_modules/tsutils": { 2012 | "version": "2.29.0", 2013 | "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", 2014 | "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", 2015 | "dev": true, 2016 | "dependencies": { 2017 | "tslib": "^1.8.1" 2018 | }, 2019 | "peerDependencies": { 2020 | "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" 2021 | } 2022 | }, 2023 | "node_modules/tunnel": { 2024 | "version": "0.0.6", 2025 | "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", 2026 | "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", 2027 | "dev": true, 2028 | "engines": { 2029 | "node": ">=0.6.11 <=0.7.0 || >=0.7.3" 2030 | } 2031 | }, 2032 | "node_modules/tunnel-agent": { 2033 | "version": "0.6.0", 2034 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 2035 | "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", 2036 | "dev": true, 2037 | "dependencies": { 2038 | "safe-buffer": "^5.0.1" 2039 | }, 2040 | "engines": { 2041 | "node": "*" 2042 | } 2043 | }, 2044 | "node_modules/typed-rest-client": { 2045 | "version": "1.8.11", 2046 | "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", 2047 | "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", 2048 | "dev": true, 2049 | "dependencies": { 2050 | "qs": "^6.9.1", 2051 | "tunnel": "0.0.6", 2052 | "underscore": "^1.12.1" 2053 | } 2054 | }, 2055 | "node_modules/typescript": { 2056 | "version": "4.9.5", 2057 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", 2058 | "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", 2059 | "dev": true, 2060 | "bin": { 2061 | "tsc": "bin/tsc", 2062 | "tsserver": "bin/tsserver" 2063 | }, 2064 | "engines": { 2065 | "node": ">=4.2.0" 2066 | } 2067 | }, 2068 | "node_modules/uc.micro": { 2069 | "version": "1.0.6", 2070 | "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", 2071 | "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", 2072 | "dev": true 2073 | }, 2074 | "node_modules/underscore": { 2075 | "version": "1.13.7", 2076 | "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", 2077 | "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", 2078 | "dev": true 2079 | }, 2080 | "node_modules/undici": { 2081 | "version": "6.19.8", 2082 | "resolved": "https://registry.npmjs.org/undici/-/undici-6.19.8.tgz", 2083 | "integrity": "sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==", 2084 | "dev": true, 2085 | "engines": { 2086 | "node": ">=18.17" 2087 | } 2088 | }, 2089 | "node_modules/unzipper": { 2090 | "version": "0.10.14", 2091 | "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.14.tgz", 2092 | "integrity": "sha512-ti4wZj+0bQTiX2KmKWuwj7lhV+2n//uXEotUmGuQqrbVZSEGFMbI68+c6JCQ8aAmUWYvtHEz2A8K6wXvueR/6g==", 2093 | "dev": true, 2094 | "dependencies": { 2095 | "big-integer": "^1.6.17", 2096 | "binary": "~0.3.0", 2097 | "bluebird": "~3.4.1", 2098 | "buffer-indexof-polyfill": "~1.0.0", 2099 | "duplexer2": "~0.1.4", 2100 | "fstream": "^1.0.12", 2101 | "graceful-fs": "^4.2.2", 2102 | "listenercount": "~1.0.1", 2103 | "readable-stream": "~2.3.6", 2104 | "setimmediate": "~1.0.4" 2105 | } 2106 | }, 2107 | "node_modules/unzipper/node_modules/readable-stream": { 2108 | "version": "2.3.8", 2109 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", 2110 | "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", 2111 | "dev": true, 2112 | "dependencies": { 2113 | "core-util-is": "~1.0.0", 2114 | "inherits": "~2.0.3", 2115 | "isarray": "~1.0.0", 2116 | "process-nextick-args": "~2.0.0", 2117 | "safe-buffer": "~5.1.1", 2118 | "string_decoder": "~1.1.1", 2119 | "util-deprecate": "~1.0.1" 2120 | } 2121 | }, 2122 | "node_modules/unzipper/node_modules/safe-buffer": { 2123 | "version": "5.1.2", 2124 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 2125 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 2126 | "dev": true 2127 | }, 2128 | "node_modules/unzipper/node_modules/string_decoder": { 2129 | "version": "1.1.1", 2130 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 2131 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 2132 | "dev": true, 2133 | "dependencies": { 2134 | "safe-buffer": "~5.1.0" 2135 | } 2136 | }, 2137 | "node_modules/url-join": { 2138 | "version": "4.0.1", 2139 | "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", 2140 | "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", 2141 | "dev": true 2142 | }, 2143 | "node_modules/util-deprecate": { 2144 | "version": "1.0.2", 2145 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 2146 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", 2147 | "dev": true 2148 | }, 2149 | "node_modules/v8-compile-cache-lib": { 2150 | "version": "3.0.1", 2151 | "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", 2152 | "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", 2153 | "dev": true 2154 | }, 2155 | "node_modules/vsce": { 2156 | "version": "2.9.3", 2157 | "resolved": "https://registry.npmjs.org/vsce/-/vsce-2.9.3.tgz", 2158 | "integrity": "sha512-hOLsxbev7Khho+bzDV/TV3jeTClzt8gFfkJvE1c5HidrgFsyE5aEg+e7XssaEU7LYLXDnWnpMt298UP7P/4Ycw==", 2159 | "deprecated": "vsce has been renamed to @vscode/vsce. Install using @vscode/vsce instead.", 2160 | "dev": true, 2161 | "dependencies": { 2162 | "azure-devops-node-api": "^11.0.1", 2163 | "chalk": "^2.4.2", 2164 | "cheerio": "^1.0.0-rc.9", 2165 | "commander": "^6.1.0", 2166 | "glob": "^7.0.6", 2167 | "hosted-git-info": "^4.0.2", 2168 | "keytar": "^7.7.0", 2169 | "leven": "^3.1.0", 2170 | "markdown-it": "^12.3.2", 2171 | "mime": "^1.3.4", 2172 | "minimatch": "^3.0.3", 2173 | "parse-semver": "^1.1.1", 2174 | "read": "^1.0.7", 2175 | "semver": "^5.1.0", 2176 | "tmp": "^0.2.1", 2177 | "typed-rest-client": "^1.8.4", 2178 | "url-join": "^4.0.1", 2179 | "xml2js": "^0.4.23", 2180 | "yauzl": "^2.3.1", 2181 | "yazl": "^2.2.2" 2182 | }, 2183 | "bin": { 2184 | "vsce": "vsce" 2185 | }, 2186 | "engines": { 2187 | "node": ">= 14" 2188 | } 2189 | }, 2190 | "node_modules/vsce/node_modules/brace-expansion": { 2191 | "version": "1.1.11", 2192 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 2193 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 2194 | "dev": true, 2195 | "dependencies": { 2196 | "balanced-match": "^1.0.0", 2197 | "concat-map": "0.0.1" 2198 | } 2199 | }, 2200 | "node_modules/vsce/node_modules/commander": { 2201 | "version": "6.2.1", 2202 | "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", 2203 | "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", 2204 | "dev": true, 2205 | "engines": { 2206 | "node": ">= 6" 2207 | } 2208 | }, 2209 | "node_modules/vsce/node_modules/minimatch": { 2210 | "version": "3.1.2", 2211 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 2212 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 2213 | "dev": true, 2214 | "dependencies": { 2215 | "brace-expansion": "^1.1.7" 2216 | }, 2217 | "engines": { 2218 | "node": "*" 2219 | } 2220 | }, 2221 | "node_modules/vsce/node_modules/semver": { 2222 | "version": "5.7.2", 2223 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", 2224 | "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", 2225 | "dev": true, 2226 | "bin": { 2227 | "semver": "bin/semver" 2228 | } 2229 | }, 2230 | "node_modules/vscode-jsonrpc": { 2231 | "version": "8.2.0", 2232 | "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", 2233 | "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", 2234 | "engines": { 2235 | "node": ">=14.0.0" 2236 | } 2237 | }, 2238 | "node_modules/vscode-languageclient": { 2239 | "version": "9.0.1", 2240 | "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-9.0.1.tgz", 2241 | "integrity": "sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==", 2242 | "dependencies": { 2243 | "minimatch": "^5.1.0", 2244 | "semver": "^7.3.7", 2245 | "vscode-languageserver-protocol": "3.17.5" 2246 | }, 2247 | "engines": { 2248 | "vscode": "^1.82.0" 2249 | } 2250 | }, 2251 | "node_modules/vscode-languageserver-protocol": { 2252 | "version": "3.17.5", 2253 | "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", 2254 | "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", 2255 | "dependencies": { 2256 | "vscode-jsonrpc": "8.2.0", 2257 | "vscode-languageserver-types": "3.17.5" 2258 | } 2259 | }, 2260 | "node_modules/vscode-languageserver-types": { 2261 | "version": "3.17.5", 2262 | "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", 2263 | "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" 2264 | }, 2265 | "node_modules/vscode-test": { 2266 | "version": "1.6.1", 2267 | "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-1.6.1.tgz", 2268 | "integrity": "sha512-086q88T2ca1k95mUzffvbzb7esqQNvJgiwY4h29ukPhFo8u+vXOOmelUoU5EQUHs3Of8+JuQ3oGdbVCqaxuTXA==", 2269 | "deprecated": "This package has been renamed to @vscode/test-electron, please update to the new name", 2270 | "dev": true, 2271 | "dependencies": { 2272 | "http-proxy-agent": "^4.0.1", 2273 | "https-proxy-agent": "^5.0.0", 2274 | "rimraf": "^3.0.2", 2275 | "unzipper": "^0.10.11" 2276 | }, 2277 | "engines": { 2278 | "node": ">=8.9.3" 2279 | } 2280 | }, 2281 | "node_modules/web-tree-sitter": { 2282 | "version": "0.25.3", 2283 | "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.25.3.tgz", 2284 | "integrity": "sha512-e0hdXG+nJ18Zd/QJFhSx0DNTSMz7miwUjKyJ/lglTnZo6ke08++BQzXkaeaqnGJFi9qq+nPJg2L8hYAjduToHQ==" 2285 | }, 2286 | "node_modules/whatwg-encoding": { 2287 | "version": "3.1.1", 2288 | "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", 2289 | "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", 2290 | "dev": true, 2291 | "dependencies": { 2292 | "iconv-lite": "0.6.3" 2293 | }, 2294 | "engines": { 2295 | "node": ">=18" 2296 | } 2297 | }, 2298 | "node_modules/whatwg-mimetype": { 2299 | "version": "4.0.0", 2300 | "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", 2301 | "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", 2302 | "dev": true, 2303 | "engines": { 2304 | "node": ">=18" 2305 | } 2306 | }, 2307 | "node_modules/wrappy": { 2308 | "version": "1.0.2", 2309 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 2310 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 2311 | "dev": true 2312 | }, 2313 | "node_modules/xml2js": { 2314 | "version": "0.4.23", 2315 | "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", 2316 | "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", 2317 | "dev": true, 2318 | "dependencies": { 2319 | "sax": ">=0.6.0", 2320 | "xmlbuilder": "~11.0.0" 2321 | }, 2322 | "engines": { 2323 | "node": ">=4.0.0" 2324 | } 2325 | }, 2326 | "node_modules/xmlbuilder": { 2327 | "version": "11.0.1", 2328 | "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", 2329 | "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", 2330 | "dev": true, 2331 | "engines": { 2332 | "node": ">=4.0" 2333 | } 2334 | }, 2335 | "node_modules/yallist": { 2336 | "version": "4.0.0", 2337 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 2338 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", 2339 | "dev": true 2340 | }, 2341 | "node_modules/yauzl": { 2342 | "version": "2.10.0", 2343 | "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", 2344 | "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", 2345 | "dev": true, 2346 | "dependencies": { 2347 | "buffer-crc32": "~0.2.3", 2348 | "fd-slicer": "~1.1.0" 2349 | } 2350 | }, 2351 | "node_modules/yazl": { 2352 | "version": "2.5.1", 2353 | "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", 2354 | "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", 2355 | "dev": true, 2356 | "dependencies": { 2357 | "buffer-crc32": "~0.2.3" 2358 | } 2359 | }, 2360 | "node_modules/yn": { 2361 | "version": "3.1.1", 2362 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 2363 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 2364 | "dev": true, 2365 | "engines": { 2366 | "node": ">=6" 2367 | } 2368 | } 2369 | } 2370 | } 2371 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pkl-vscode", 3 | "displayName": "Pkl", 4 | "description": "Syntax highlighting, bracket matching, and code folding for Pkl files.", 5 | "icon": "img/icon.png", 6 | "version": "0.19.0", 7 | "publisher": "Pkl", 8 | "license": "Apache-2.0", 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/apple/pkl-vscode" 12 | }, 13 | "homepage": "https://github.com/apple/pkl-vscode", 14 | "bugs": { 15 | "url": "https://github.com/apple/pkl-vscode/issues" 16 | }, 17 | "//": "don't publish to npm", 18 | "private": true, 19 | "engines": { 20 | "vscode": "^1.59.0" 21 | }, 22 | "categories": [ 23 | "Programming Languages" 24 | ], 25 | "main": "./out/extension.js", 26 | "activationEvents": [ 27 | "onLanguage:pkl" 28 | ], 29 | "contributes": { 30 | "languages": [ 31 | { 32 | "id": "pkl", 33 | "extensions": [ 34 | ".pkl", 35 | ".pcf" 36 | ], 37 | "filenames": [ 38 | "PklProject" 39 | ], 40 | "aliases": [ 41 | "Pkl" 42 | ], 43 | "firstLine": "^#!/.*\\bpkl\\b", 44 | "configuration": "./language-configuration.json", 45 | "icon": { 46 | "light": "./img/icon.svg", 47 | "dark": "./img/icon.svg" 48 | } 49 | } 50 | ], 51 | "grammars": [ 52 | { 53 | "language": "pkl", 54 | "scopeName": "source.pkl", 55 | "path": "out/pkl.tmLanguage.json" 56 | } 57 | ], 58 | "semanticTokenTypes": [ 59 | { 60 | "id": "punctuation", 61 | "description": "Punctuation symbols" 62 | }, 63 | { 64 | "id": "string-escape", 65 | "description": "String escape characters" 66 | }, 67 | { 68 | "id": "constant", 69 | "description": "Constants built into the language, such as booleans or nulls" 70 | }, 71 | { 72 | "id": "error", 73 | "description": "Invalid parsing sequences" 74 | } 75 | ], 76 | "semanticTokenScopes": [ 77 | { 78 | "scopes": { 79 | "keyword": [ 80 | "keyword.pkl" 81 | ], 82 | "punctuation": [ 83 | "punctuation.pkl" 84 | ], 85 | "punctuationBracket": [ 86 | "punctuation.bracket.pkl" 87 | ], 88 | "control": [ 89 | "keyword.control.pkl" 90 | ], 91 | "error": [ 92 | "invalid.illegal.pkl" 93 | ], 94 | "stringEscape": [ 95 | "constant.character.escape.pkl" 96 | ], 97 | "constant": [ 98 | "constant.character.language.pkl" 99 | ] 100 | } 101 | } 102 | ], 103 | "configuration": { 104 | "title": "Pkl", 105 | "properties": { 106 | "pkl.lsp.path": { 107 | "type": "string", 108 | "default": null, 109 | "description": "Path to pkl-lsp jar file. This is an internal developer option." 110 | }, 111 | "pkl.lsp.debug.port": { 112 | "type": "integer", 113 | "default": 5005, 114 | "description": "Debug port to launch pkl-lsp. This is an internal developer option." 115 | }, 116 | "pkl.lsp.socket.port": { 117 | "type": "number", 118 | "description": "Port of the LSP socket to talk to. Setting this takes precedence over `pkl.lsp.path`. This is an internal developer option." 119 | }, 120 | "pkl.lsp.socket.host": { 121 | "type": "string", 122 | "description": "Host of the LSP socket to talk to. If unset or empty, defaults to localhost. This is an internal developer option." 123 | }, 124 | "pkl.cli.path": { 125 | "type": "string", 126 | "default": null, 127 | "description": "Path to pkl executable", 128 | "scope": "Pkl" 129 | }, 130 | "pkl.lsp.java.path": { 131 | "type": "string", 132 | "default": null, 133 | "description": "Path to java executable used to start pkl-lsp." 134 | } 135 | } 136 | }, 137 | "commands": [ 138 | { 139 | "category": "Pkl", 140 | "title": "Sync Projects", 141 | "command": "pkl.syncProjects" 142 | } 143 | ] 144 | }, 145 | "scripts": { 146 | "clean": "shx rm -rf out/", 147 | "build": "npm run clean && npm run build:pkl && npm run build:code && npm run build:tree-sitter && npm run build:download-lsp", 148 | "build:local": "npm run clean && npm run build:pkl && npm run build:code && npm run build:tree-sitter:local && npm run build:download-lsp", 149 | "build:pkl": "pkl eval -m . src/pkl/index.pkl", 150 | "build:download-lsp": "ts-node scripts/download-lsp-jar.ts", 151 | "build:tree-sitter": "shx mkdir -p out/grammar/ && cd node_modules/@apple/tree-sitter-pkl && tree-sitter build-wasm && shx mv tree-sitter-pkl.wasm ../../../out/pkl.wasm", 152 | "build:tree-sitter:local": "shx mkdir -p out/grammar/ && cd node_modules/@apple/tree-sitter-pkl && tree-sitter build-wasm --docker && cd - && mv node_modules/@apple/tree-sitter-pkl/tree-sitter-pkl.wasm out/pkl.wasm", 153 | "build:code": "shx mkdir -p out/ && shx cp node_modules/web-tree-sitter/tree-sitter.wasm out/ && tsc", 154 | "lint:fix": "prettier -w src/", 155 | "lint": "prettier -c src/", 156 | "watch": "tsc --watch", 157 | "test": "npm run test:grammar", 158 | "test:grammar": "sh scripts/check-grammar.sh", 159 | "prepackage": "npm run build", 160 | "package": "shx mkdir -p .dist/vscode && vsce package --out .dist/vscode/pkl-vscode-$npm_package_version.vsix", 161 | "package-only": "shx mkdir -p .dist/vscode && vsce package --out .dist/vscode/pkl-vscode-$npm_package_version.vsix", 162 | "preinstallextension": "npm run package", 163 | "installextension": "code --install-extension .dist/vscode/pkl-vscode-$npm_package_version.vsix", 164 | "clone-grammar": "git submodule update --init --recursive" 165 | }, 166 | "dependencies": { 167 | "vscode-languageclient": "^9.0.1", 168 | "web-tree-sitter": "^0.25.3" 169 | }, 170 | "devDependencies": { 171 | "@apple/tree-sitter-pkl": "^0.18.0", 172 | "@types/node": "^16.11.38", 173 | "@types/vscode": "^1.59.0", 174 | "prettier": "^2.6.2", 175 | "shx": "^0.3.4", 176 | "tree-sitter": "^0.20.0", 177 | "tree-sitter-cli": "^0.20.8", 178 | "ts-node": "^10.9.2", 179 | "tslint": "^5.8.0", 180 | "typescript": "^4.7.3", 181 | "vsce": "2.9", 182 | "vscode-test": "^1.6.1" 183 | } 184 | } 185 | -------------------------------------------------------------------------------- /queries/folds.scm: -------------------------------------------------------------------------------- 1 | ; Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 2 | ; 3 | ; Licensed under the Apache License, Version 2.0 (the "License"); 4 | ; you may not use this file except in compliance with the License. 5 | ; You may obtain a copy of the License at 6 | ; 7 | ; https://www.apache.org/licenses/LICENSE-2.0 8 | ; 9 | ; Unless required by applicable law or agreed to in writing, software 10 | ; distributed under the License is distributed on an "AS IS" BASIS, 11 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | ; See the License for the specific language governing permissions and 13 | ; limitations under the License. 14 | 15 | [ 16 | (objectBody) 17 | (classBody) 18 | ] @fold 19 | -------------------------------------------------------------------------------- /queries/highlights.scm: -------------------------------------------------------------------------------- 1 | ; Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 2 | ; 3 | ; Licensed under the Apache License, Version 2.0 (the "License"); 4 | ; you may not use this file except in compliance with the License. 5 | ; You may obtain a copy of the License at 6 | ; 7 | ; https://www.apache.org/licenses/LICENSE-2.0 8 | ; 9 | ; Unless required by applicable law or agreed to in writing, software 10 | ; distributed under the License is distributed on an "AS IS" BASIS, 11 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | ; See the License for the specific language governing permissions and 13 | ; limitations under the License. 14 | 15 | (clazz (identifier) @class) 16 | (typeAlias (identifier) @type) 17 | (declaredType (qualifiedIdentifier (identifier) @type)) 18 | (moduleClause (qualifiedIdentifier (identifier) @type)) 19 | (annotation "@" @decorator (qualifiedIdentifier) @decorator) 20 | (typeArgumentList 21 | "<" @bracket 22 | ">" @bracket) 23 | 24 | (typeParameter (identifier) @type) 25 | 26 | (unqualifiedAccessExpr 27 | (identifier) @method (argumentList)) 28 | 29 | (unqualifiedAccessExpr 30 | (identifier) @property) 31 | 32 | (qualifiedAccessExpr 33 | (identifier) @method (argumentList)) 34 | 35 | (qualifiedAccessExpr 36 | (identifier) @property) 37 | 38 | (classMethod (methodHeader (identifier) @method)) 39 | (objectMethod (methodHeader (identifier) @method)) 40 | 41 | (classProperty (identifier) @property) 42 | (objectProperty (identifier) @property) 43 | 44 | (typedIdentifier (identifier) @parameter) 45 | 46 | (forGenerator (typedIdentifier (identifier) @variable)) 47 | (letExpr (typedIdentifier (identifier) @variable)) 48 | 49 | (importClause (identifier) @variable) 50 | (importGlobClause (identifier) @variable) 51 | 52 | (stringConstant) @string 53 | (slStringLiteralPart) @string 54 | (mlStringLiteralPart) @string 55 | 56 | (stringInterpolation 57 | "\\(" @stringEscape 58 | ")" @stringEscape) @none 59 | 60 | (stringInterpolation 61 | "\\#(" @stringEscape 62 | ")" @stringEscape) @none 63 | 64 | (stringInterpolation 65 | "\\##(" @stringEscape 66 | ")" @stringEscape) @none 67 | 68 | "\"" @string 69 | "#\"" @string 70 | "##\"" @string 71 | "###\"" @string 72 | "####\"" @string 73 | "#####\"" @string 74 | "\"#" @string 75 | "\"##" @string 76 | "\"###" @string 77 | "\"####" @string 78 | "\"#####" @string 79 | 80 | (escapeSequence) @stringEscape 81 | 82 | (intLiteralExpr) @number 83 | (floatLiteralExpr) @number 84 | 85 | 86 | "??" @operator 87 | "=" @operator 88 | "<" @operator 89 | ">" @operator 90 | "!" @operator 91 | "==" @operator 92 | "!=" @operator 93 | "<=" @operator 94 | ">=" @operator 95 | "&&" @operator 96 | "||" @operator 97 | "+" @operator 98 | "-" @operator 99 | "**" @operator 100 | "*" @operator 101 | "/" @operator 102 | "~/" @operator 103 | "%" @operator 104 | "|>" @operator 105 | 106 | 107 | "|" @operator 108 | "->" @operator 109 | 110 | "," @punctuation 111 | ":" @punctuation 112 | "." @punctuation 113 | "?." @punctuation 114 | "...?" @punctuation 115 | "..." @punctuation 116 | 117 | "(" @bracket 118 | ")" @bracket 119 | "]" @bracket 120 | "{" @bracket 121 | "}" @bracket 122 | 123 | 124 | "amends" @keyword 125 | "as" @keyword 126 | "extends" @keyword 127 | "class" @keyword 128 | "typealias" @keyword 129 | "function" @keyword 130 | "module" @keyword 131 | (trueLiteralExpr) @constant 132 | (falseLiteralExpr) @constant 133 | (nullLiteralExpr) @constant 134 | "new" @control 135 | "if" @control 136 | "else" @control 137 | "import*" @keyword 138 | "import" @keyword 139 | (importExpr "import" @keyword) 140 | (importExpr "import*" @keyword) 141 | (readExpr "read" @keyword) 142 | (readExpr "read*" @keyword) 143 | (readExpr "read?" @keyword) 144 | (traceExpr "trace" @keyword) 145 | (throwExpr "throw" @keyword) 146 | (moduleExpr "module" @type.defaultLibrary) 147 | (unknownType) @type.defaultLibrary 148 | (nothingType) @type.defaultLibrary 149 | (moduleType) @type.defaultLibrary 150 | (outerExpr) @variable.defaultLibrary 151 | "super" @variable.defaultLibrary 152 | (thisExpr) @variable.builtin 153 | (ERROR) @error 154 | -------------------------------------------------------------------------------- /scripts/check-grammar.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright © 2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | if [ -e "textmate-bundle/Syntaxes/pkl.tmLanguage" ]; then 17 | exit 0 18 | else 19 | echo "Could not find grammar file." 20 | exit 1 21 | fi 22 | -------------------------------------------------------------------------------- /scripts/custom-header-style.toml: -------------------------------------------------------------------------------- 1 | [SCHEME_STYLE] 2 | firstLine = '' 3 | endLine = "\n" 4 | beforeEachLine = '; ' 5 | afterEachLine = '' 6 | allowBlankLines = false 7 | multipleLines = false 8 | padLines = false 9 | skipLinePattern = '^;!.*$' 10 | firstLineDetectionPattern = ';.*$' 11 | lastLineDetectionPattern = ';.*$' 12 | 13 | [VIM_STYLE] 14 | firstLine = '' 15 | endLine = "\n" 16 | beforeEachLine = '" ' 17 | afterEachLine = '' 18 | allowBlankLines = false 19 | multipleLines = false 20 | padLines = false 21 | skipLinePattern = '^\"!.*$' 22 | firstLineDetectionPattern = '\".*$' 23 | lastLineDetectionPattern = '\".*$' 24 | -------------------------------------------------------------------------------- /scripts/download-lsp-jar.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import path from "node:path"; 18 | import { downloadArtifact } from "../src/ts/clients/maven"; 19 | import { BUNDLED_LSP_VERSION } from "../src/ts/consts"; 20 | 21 | /** 22 | * Downloads the pkl lsp, and places it into `out`. 23 | */ 24 | (async () => { 25 | await downloadArtifact( 26 | { 27 | group: "org.pkl-lang", 28 | artifact: "pkl-lsp", 29 | version: BUNDLED_LSP_VERSION 30 | }, 31 | path.join(__dirname, "../out/pkl-lsp.jar") 32 | ); 33 | })(); 34 | -------------------------------------------------------------------------------- /scripts/license-header.txt: -------------------------------------------------------------------------------- 1 | Copyright ©{{ " " }}{%- if attrs.git_file_modified_year != attrs.git_file_created_year -%}{{ attrs.git_file_created_year }}-{{ attrs.git_file_modified_year }}{%- else -%}{{ attrs.git_file_created_year }}{%- endif -%}{{ " " }}{{ props["copyrightOwner"] }}. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | https://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /src/pkl/index.pkl: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | //===----------------------------------------------------------------------===// 16 | 17 | output { 18 | files { 19 | ["out/pkl.tmLanguage.json"] = import("pkl.tmLanguage.pkl").output 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/pkl/pkl.tmLanguage.pkl: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // https://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | //===----------------------------------------------------------------------===// 16 | 17 | amends "../../textmate-bundle/pkl/pkl.tmLanguage.pkl" 18 | 19 | output { 20 | renderer = new JsonRenderer {} 21 | } -------------------------------------------------------------------------------- /src/ts/Semver.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | export default class Semver { 18 | major: number; 19 | minor: number; 20 | patch: number; 21 | preRelease?: string; 22 | build?: string; 23 | 24 | static parse(versionStr: string): Semver | undefined { 25 | const parsed = versionStr.match(SEMVER_REGEXP); 26 | if (parsed === null) { 27 | return; 28 | } 29 | const [, major, minor, patch, preRelease, build] = parsed; 30 | return new Semver(parseInt(major), parseInt(minor), parseInt(patch), preRelease, build); 31 | } 32 | 33 | constructor(major: number, minor: number, patch: number, preRelease?: string, build?: string) { 34 | this.major = major; 35 | this.minor = minor; 36 | this.patch = patch; 37 | this.preRelease = preRelease; 38 | this.build = build; 39 | } 40 | 41 | toString(): string { 42 | let ret = `${this.major}.${this.minor}.${this.patch}`; 43 | if (this.preRelease !== undefined) { 44 | ret += `-${this.preRelease}`; 45 | if (this.build !== undefined) { 46 | ret += `+${this.build}`; 47 | } 48 | } 49 | return ret; 50 | } 51 | 52 | /** 53 | * Returns `1` if this is greater than `other`, `-1` if this is less than `other`, and `0` otherwise. 54 | * 55 | * Doesn't handle prerelease identifiers. 56 | */ 57 | compareTo(other: Semver) { 58 | if (this.major !== other.major) { 59 | return this.major > other.major ? 1 : -1; 60 | } 61 | if (this.minor !== other.minor) { 62 | return this.minor > other.minor ? 1 : -1; 63 | } 64 | if (this.patch !== other.patch) { 65 | return this.patch > other.patch ? 1 : -1; 66 | } 67 | return 0; 68 | } 69 | 70 | isGreaterThan(other: Semver) { 71 | return this.compareTo(other) === 1; 72 | } 73 | 74 | isGreaterThanOrEqualTo(other: Semver) { 75 | return this.compareTo(other) >= 0; 76 | } 77 | 78 | isLessThan(other: Semver) { 79 | return this.compareTo(other) === -1; 80 | } 81 | 82 | isLessThanOrEqualTo(other: Semver) { 83 | return this.compareTo(other) <= 0; 84 | } 85 | 86 | isCompatibleWith(other: Semver) { 87 | return this.major === other.major && this.minor >= other.minor; 88 | } 89 | } 90 | 91 | const SEMVER_REGEXP = 92 | /^(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-]+)*))?$/; 93 | -------------------------------------------------------------------------------- /src/ts/clients/logger.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import * as vscode from "vscode"; 18 | 19 | const channel = vscode.window.createOutputChannel("pkl-vscode"); 20 | 21 | const logger = { 22 | log(message: string) { 23 | channel.appendLine(`[LOG] ${message}`); 24 | }, 25 | warn(message: string) { 26 | channel.appendLine(`[WARN] ${message}`); 27 | }, 28 | error(message: string) { 29 | channel.appendLine(`[ERROR] ${message}`); 30 | }, 31 | }; 32 | 33 | export default logger; 34 | -------------------------------------------------------------------------------- /src/ts/clients/maven.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { httpsDownload, httpsGetJson, httpsGetText } from "../utils"; 18 | import path from "node:path"; 19 | import Semver from "../Semver"; 20 | 21 | export type MavenSolrResponse = { 22 | response: { 23 | numFound: number; 24 | start: number; 25 | docs: MavenSolrResponseDocs[]; 26 | }; 27 | }; 28 | 29 | export type MavenSolrResponseDocs = { 30 | id: string; 31 | g: string; 32 | a: string; 33 | latestVersion: string; 34 | repositoryId: string; 35 | }; 36 | 37 | export const getLatestVersion = async (query: { 38 | group: string; 39 | artifact: string; 40 | }): Promise => { 41 | const response = await httpsGetJson( 42 | `https://search.maven.org/solrsearch/select?q=g:${query.group}+AND+a:${query.artifact}&wt=json` 43 | ); 44 | const versionString = response.response.docs[0]?.latestVersion; 45 | const version = Semver.parse(versionString); 46 | if (version == null) { 47 | throw new Error(`Got an artifact from Maven that is not valid semver: ${versionString}`); 48 | } 49 | return version; 50 | }; 51 | 52 | export const downloadArtifact = async ( 53 | coordinates: { group: string; artifact: string; version: string }, 54 | destination: string 55 | ) => { 56 | const jarPath = path.join( 57 | coordinates.group.replace(/\./g, "/"), 58 | coordinates.artifact, 59 | coordinates.version, 60 | `${coordinates.artifact}-${coordinates.version}.jar` 61 | ); 62 | const checksumPath = `${jarPath}.sha256`; 63 | const checksum = await httpsGetText(`https://repo1.maven.org/maven2/${checksumPath}`); 64 | await httpsDownload(`https://repo1.maven.org/maven2/${jarPath}`, destination, checksum); 65 | }; 66 | -------------------------------------------------------------------------------- /src/ts/config.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { workspace } from "vscode"; 18 | import { 19 | CONFIG_JAVA_PATH, 20 | CONFIG_LSP_DEBUG_PORT, 21 | CONFIG_LSP_PATH, 22 | CONFIG_LSP_SOCKET_HOST, 23 | CONFIG_LSP_SOCKET_PORT, 24 | } from "./consts"; 25 | 26 | const getConfig = (configName: string): T | undefined => { 27 | const value = workspace.getConfiguration().get(configName); 28 | if (value === "" || value === null) { 29 | return undefined; 30 | } 31 | return value; 32 | }; 33 | 34 | const config = { 35 | get javaPath() { 36 | return getConfig(CONFIG_JAVA_PATH); 37 | }, 38 | 39 | get lspPath() { 40 | return getConfig(CONFIG_LSP_PATH); 41 | }, 42 | 43 | get lspDebugPort() { 44 | return getConfig(CONFIG_LSP_DEBUG_PORT); 45 | }, 46 | 47 | get lspSocketPort() { 48 | return getConfig(CONFIG_LSP_SOCKET_PORT); 49 | }, 50 | 51 | get lspSocketHost() { 52 | return getConfig(CONFIG_LSP_SOCKET_HOST); 53 | }, 54 | }; 55 | 56 | export default config; 57 | -------------------------------------------------------------------------------- /src/ts/consts.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import path from "node:path"; 18 | import os from "node:os"; 19 | 20 | export const CONFIG_JAVA_PATH = "pkl.lsp.java.path"; 21 | 22 | export const CONFIG_LSP_PATH = "pkl.lsp.path"; 23 | 24 | export const CONFIG_LSP_SOCKET_PORT = "pkl.lsp.socket.port"; 25 | 26 | export const CONFIG_LSP_SOCKET_HOST = "pkl.lsp.socket.host"; 27 | 28 | export const CONFIG_LSP_DEBUG_PORT = "pkl.lsp.debug.port"; 29 | 30 | // only used by the LSP server 31 | export const CONFIG_CLI_PATH = "pkl.cli.path"; 32 | 33 | export const COMMAND_DOWNLOAD_PACKAGE = "pkl.downloadPackage"; 34 | 35 | export const COMMAND_PKL_OPEN_FILE = "pkl.open.file"; 36 | 37 | export const COMMAND_SYNC_PROJECTS = "pkl.syncProjects"; 38 | 39 | export const COMMAND_PKL_CONFIGURE = "pkl.configure"; 40 | 41 | export const COMMAND_OPEN_WORKSPACE_SETTINGS = "workbench.action.openSettings"; 42 | 43 | export const COMMAND_RELOAD_WORKSPACE_WINDOW = "workbench.action.reloadWindow"; 44 | 45 | export const BUNDLED_LSP_VERSION = "0.3.1"; 46 | 47 | /** 48 | * The directory that pkl-lsp distributions get saved to. 49 | * 50 | * Structure: `~/.pkl/editor-support/lsp-distributions//pkl-lsp-.jar` 51 | */ 52 | export const LSP_DISTRIBUTIONS_DIR = path.join( 53 | os.homedir(), 54 | ".pkl/editor-support/lsp-distributions/" 55 | ); 56 | -------------------------------------------------------------------------------- /src/ts/extension.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import * as vscode from "vscode"; 18 | import { newPklSemanticTokenProvider } from "./providers/PklSemanticTokensProvider"; 19 | import { 20 | LanguageClient, 21 | LanguageClientOptions, 22 | ServerOptions, 23 | StreamInfo, 24 | } from "vscode-languageclient/node"; 25 | import { registerNotificationHandlers } from "./notifications"; 26 | import { 27 | COMMAND_DOWNLOAD_PACKAGE, 28 | COMMAND_OPEN_WORKSPACE_SETTINGS, 29 | COMMAND_PKL_CONFIGURE, 30 | COMMAND_PKL_OPEN_FILE, 31 | COMMAND_RELOAD_WORKSPACE_WINDOW, 32 | COMMAND_SYNC_PROJECTS, 33 | CONFIG_JAVA_PATH, 34 | CONFIG_LSP_PATH, 35 | } from "./consts"; 36 | import config from "./config"; 37 | import { pklDownloadPackageRequest, pklSyncProjectsRequest } from "./requests"; 38 | import PklTextDocumentContentProvider from "./providers/PklTextDocumentContentProvider"; 39 | import { getJavaDistribution, onDidChangeJavaDistribution } from "./javaDistribution"; 40 | import { getLspDistribution, onDidChangeLspDistribution } from "./pklLspDistribution"; 41 | import { queryForLatestLspDistribution } from "./pklLspDistributionUpdater"; 42 | import logger from "./clients/logger"; 43 | import net from "net"; 44 | 45 | export type LanguageClientRef = { 46 | client?: LanguageClient; 47 | }; 48 | 49 | let languageClientRef: LanguageClientRef = {}; 50 | 51 | async function getStreamInfo(): Promise { 52 | const socketPort = config.lspSocketPort!!; 53 | const socketHost = config.lspSocketHost || "localhost"; 54 | logger.log(`Connecting to socket ${socketHost}:${socketPort}`); 55 | const socket = net.createConnection(socketPort, config.lspSocketHost); 56 | await new Promise((resolve) => socket.once("connect", resolve)); 57 | logger.log(`Connected to socket ${socketHost}:${socketPort}`); 58 | return { 59 | reader: socket, 60 | writer: socket, 61 | detached: true, 62 | }; 63 | } 64 | 65 | async function getServerOptions(): Promise { 66 | if (config.lspSocketPort) { 67 | return getStreamInfo; 68 | } 69 | const [javaDistribution, lspDistribution] = await Promise.all([ 70 | getJavaDistribution(), 71 | getLspDistribution(), 72 | ]); 73 | return { 74 | run: { 75 | command: javaDistribution.path, 76 | args: ["-jar", lspDistribution.path], 77 | options: {}, 78 | }, 79 | debug: { 80 | command: javaDistribution.path, 81 | args: [ 82 | `-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,quiet=y,address=*:${config.lspDebugPort}`, 83 | "-jar", 84 | lspDistribution.path, 85 | "--verbose", 86 | ], 87 | options: {}, 88 | }, 89 | }; 90 | } 91 | 92 | async function createLanguageClient() { 93 | const serverOptions = await getServerOptions(); 94 | const clientOptions: LanguageClientOptions = { 95 | documentSelector: [ 96 | { scheme: "file", language: "pkl" }, 97 | { scheme: "pkl-lsp", language: "pkl" }, 98 | ], 99 | markdown: { 100 | isTrusted: true, 101 | }, 102 | initializationOptions: { 103 | renderOpenFileCommandInDocs: true, 104 | extendedClientCapabilities: { 105 | actionableRuntimeNotifications: true, 106 | pklConfigureCommand: true, 107 | }, 108 | }, 109 | }; 110 | return new LanguageClient("Pkl", "Pkl Language Server", serverOptions, clientOptions); 111 | } 112 | 113 | async function nofityReloadNeeded() { 114 | const response = await vscode.window.showInformationMessage( 115 | "The java path has changed, and the VSCode window needs to be reloaded to take effect.", 116 | "Reload Window" 117 | ); 118 | if (response === "Reload Window") { 119 | vscode.commands.executeCommand(COMMAND_RELOAD_WORKSPACE_WINDOW); 120 | } 121 | } 122 | 123 | async function startLspServer() { 124 | if (languageClientRef.client?.needsStop() === true) { 125 | // Calling `LanguageClient#stop()` causes all sorts of havoc for some reason, so we'll just ask users to reload the window. 126 | nofityReloadNeeded(); 127 | return; 128 | } 129 | logger.log("Starting language server"); 130 | const client = await createLanguageClient(); 131 | languageClientRef.client = client; 132 | await client.start(); 133 | registerNotificationHandlers(client); 134 | } 135 | 136 | async function registerSubscriptions(context: vscode.ExtensionContext) { 137 | const semanticTokensProvider = await newPklSemanticTokenProvider(); 138 | 139 | context.subscriptions.push( 140 | vscode.languages.registerDocumentSemanticTokensProvider( 141 | { language: "pkl" }, 142 | semanticTokensProvider, 143 | semanticTokensProvider.legend 144 | ), 145 | vscode.languages.registerFoldingRangeProvider({ language: "pkl" }, semanticTokensProvider) 146 | ); 147 | 148 | context.subscriptions.push( 149 | vscode.workspace.registerTextDocumentContentProvider( 150 | "pkl-lsp", 151 | new PklTextDocumentContentProvider(languageClientRef) 152 | ) 153 | ); 154 | 155 | context.subscriptions.push( 156 | vscode.commands.registerCommand( 157 | COMMAND_PKL_OPEN_FILE, 158 | async (path: string, maybeLine: number | undefined, maybeCol: number | undefined) => { 159 | const parsedUri = vscode.Uri.parse(path); 160 | const editor = await vscode.window.showTextDocument(parsedUri); 161 | 162 | let line = maybeLine ?? 0; 163 | if (Number.isNaN(line)) { 164 | line = 1; 165 | } 166 | let col = maybeCol ?? 0; 167 | if (Number.isNaN(col)) { 168 | col = 1; 169 | } 170 | const pos = new vscode.Position(line - 1, col - 1); 171 | 172 | const range = new vscode.Range(pos, pos); 173 | editor.revealRange(range, vscode.TextEditorRevealType.AtTop); 174 | editor.selections = [new vscode.Selection(pos, pos)]; 175 | } 176 | ) 177 | ); 178 | 179 | context.subscriptions.push( 180 | vscode.commands.registerCommand(COMMAND_DOWNLOAD_PACKAGE, async (packageUri: string) => { 181 | if (languageClientRef.client === undefined) { 182 | return; 183 | } 184 | await languageClientRef.client.sendRequest(pklDownloadPackageRequest, packageUri); 185 | }) 186 | ); 187 | 188 | context.subscriptions.push( 189 | vscode.commands.registerCommand(COMMAND_SYNC_PROJECTS, async () => { 190 | if (languageClientRef.client === undefined) { 191 | return; 192 | } 193 | await languageClientRef.client.sendRequest(pklSyncProjectsRequest, null); 194 | }) 195 | ); 196 | 197 | context.subscriptions.push( 198 | vscode.commands.registerCommand(COMMAND_PKL_CONFIGURE, async (configurationPath: string) => { 199 | await vscode.commands.executeCommand(COMMAND_OPEN_WORKSPACE_SETTINGS, configurationPath); 200 | }) 201 | ); 202 | } 203 | 204 | const showRestartMessage = (configPath: string) => async () => { 205 | if (languageClientRef.client?.needsStop() === true) { 206 | const response = await vscode.window.showInformationMessage( 207 | `The configuration value "${configPath}" has changed, and the VSCode window needs to be reloaded to take effect.`, 208 | "Reload Window" 209 | ); 210 | // Calling `LanguageClient#stop()` causes all sorts of havoc for some reason. 211 | if (response === "Reload Window") { 212 | vscode.commands.executeCommand(COMMAND_RELOAD_WORKSPACE_WINDOW); 213 | return; 214 | } 215 | } 216 | }; 217 | 218 | export async function activate(context: vscode.ExtensionContext) { 219 | await registerSubscriptions(context); 220 | await startLspServer(); 221 | onDidChangeJavaDistribution(showRestartMessage(CONFIG_JAVA_PATH)); 222 | onDidChangeLspDistribution(showRestartMessage(CONFIG_LSP_PATH)); 223 | queryForLatestLspDistribution(); 224 | } 225 | 226 | export function deactivate(): Thenable | undefined { 227 | if (languageClientRef.client?.needsStop() === true) { 228 | return languageClientRef.client.stop(); 229 | } 230 | } 231 | -------------------------------------------------------------------------------- /src/ts/javaDistribution.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import fs from "node:fs/promises"; 18 | import path from "node:path"; 19 | import * as vscode from "vscode"; 20 | import { debounce, execFile } from "./utils"; 21 | import { COMMAND_OPEN_WORKSPACE_SETTINGS, CONFIG_JAVA_PATH } from "./consts"; 22 | import config from "./config"; 23 | import logger from "./clients/logger"; 24 | 25 | const emitter = new vscode.EventEmitter(); 26 | 27 | const MINIMUM_JAVA_VERSION = 22; 28 | 29 | /** 30 | * The currently configured Java distribution, if any. 31 | */ 32 | export let currentJavaDistribution: JavaDistribution | undefined = undefined; 33 | 34 | /** 35 | * Fires when the java distribution changes due to users changing it in workspace/user settings. 36 | * 37 | * Also fires on startup if there is a suitable Java distribution. 38 | * 39 | * Excludes Java versions that are incompatible. 40 | */ 41 | export const onDidChangeJavaDistribution = emitter.event; 42 | 43 | export const getJavaDistribution = (): Promise => { 44 | return new Promise((resolve) => { 45 | if (currentJavaDistribution !== undefined) { 46 | resolve(currentJavaDistribution); 47 | return; 48 | } 49 | const disposables: vscode.Disposable[] = []; 50 | onDidChangeJavaDistribution( 51 | (distribution) => { 52 | resolve(distribution); 53 | disposables.every((it) => it.dispose()); 54 | }, 55 | null, 56 | disposables 57 | ); 58 | }); 59 | }; 60 | 61 | export type JavaDistribution = { 62 | path: string; 63 | version: number; 64 | }; 65 | 66 | const resolveJava = async (path: string): Promise => { 67 | try { 68 | const stats = await fs.stat(path); 69 | if (!stats.isFile()) { 70 | return null; 71 | } 72 | const result = await execFile(path, ["-version"]); 73 | const { stderr } = result; 74 | const versionStr = stderr.split('"')[1]; 75 | if (versionStr == null) { 76 | logger.warn(`Unexpected version string: ${stderr}`); 77 | return null; 78 | } 79 | const majorVersion = versionStr.split(".")[0]; 80 | if (majorVersion == null) { 81 | logger.warn(`Malformed version: ${versionStr}`); 82 | return null; 83 | } 84 | var version = parseInt(majorVersion); 85 | return { path, version }; 86 | } catch (err: any) { 87 | if (err.code !== "ENOENT") { 88 | logger.warn(`Received unexpected error when spawning java: ${err}`); 89 | } 90 | return null; 91 | } 92 | }; 93 | 94 | const extEnvVar = process.env.PATHEXT ?? ""; 95 | const possibleJavaFilenames = extEnvVar.split(path.delimiter).map((it) => `java${it}`); 96 | 97 | const findJavaInDir = async (dir: string) => { 98 | for (const filename of possibleJavaFilenames) { 99 | const candidate = path.join(dir, filename); 100 | const java = await resolveJava(candidate); 101 | if (java != null) { 102 | return java; 103 | } 104 | } 105 | return null; 106 | }; 107 | 108 | const CTA_CONFIGURE_JAVA_PATH = "Configure path to Java"; 109 | 110 | /** 111 | * Find Java from either `$JAVA_HOME`, or `$PATH`. 112 | */ 113 | const findJavaFromSystem = async () => { 114 | const javaHome = process.env.JAVA_HOME; 115 | if (javaHome != null) { 116 | var distro = await findJavaInDir(path.join(javaHome, "bin")); 117 | if (distro != null && distro.version >= MINIMUM_JAVA_VERSION) { 118 | emitter.fire(distro); 119 | return; 120 | } 121 | } 122 | const pathEnvVar = process.env.PATH; 123 | if (pathEnvVar != null) { 124 | for (const pathStr of pathEnvVar.split(path.delimiter)) { 125 | const distro = await findJavaInDir(pathStr); 126 | if (distro != null && distro.version >= MINIMUM_JAVA_VERSION) { 127 | emitter.fire(distro); 128 | return; 129 | } 130 | } 131 | } 132 | const response = await vscode.window.showWarningMessage( 133 | `Cannot find suitable Java in $PATH or $JAVA_HOME. pkl-vscode requires Java ${MINIMUM_JAVA_VERSION} or higher.`, 134 | CTA_CONFIGURE_JAVA_PATH 135 | ); 136 | if (response === CTA_CONFIGURE_JAVA_PATH) { 137 | vscode.commands.executeCommand(COMMAND_OPEN_WORKSPACE_SETTINGS, CONFIG_JAVA_PATH); 138 | } 139 | }; 140 | 141 | const handleConfiguredJavaPath = async (path: string) => { 142 | const distribution = await resolveJava(path); 143 | if (distribution === null) { 144 | vscode.window 145 | .showWarningMessage( 146 | `Could not resolve Java version information from ${config.javaPath}. Ensure it is the path to the Java executable.`, 147 | CTA_CONFIGURE_JAVA_PATH 148 | ) 149 | .then((response) => { 150 | if (response === CTA_CONFIGURE_JAVA_PATH) { 151 | vscode.commands.executeCommand(COMMAND_OPEN_WORKSPACE_SETTINGS, CONFIG_JAVA_PATH); 152 | } 153 | }); 154 | return; 155 | } 156 | if (distribution.version < MINIMUM_JAVA_VERSION) { 157 | vscode.window 158 | .showWarningMessage( 159 | `pkl-vscode requires Java ${MINIMUM_JAVA_VERSION} or higher, but was configured to use version ${distribution.version} in ${CONFIG_JAVA_PATH}`, 160 | CTA_CONFIGURE_JAVA_PATH 161 | ) 162 | .then((response) => { 163 | if (response === CTA_CONFIGURE_JAVA_PATH) { 164 | vscode.commands.executeCommand(COMMAND_OPEN_WORKSPACE_SETTINGS, CONFIG_JAVA_PATH); 165 | } 166 | }); 167 | return; 168 | } 169 | currentJavaDistribution = distribution; 170 | emitter.fire(distribution); 171 | }; 172 | 173 | if (config.javaPath === undefined) { 174 | findJavaFromSystem(); 175 | } else { 176 | handleConfiguredJavaPath(config.javaPath); 177 | } 178 | 179 | vscode.workspace.onDidChangeConfiguration( 180 | // debounce because vscode fires configuration changes _as_ users are typing. 181 | debounce(async (event: vscode.ConfigurationChangeEvent) => { 182 | if (!event.affectsConfiguration(CONFIG_JAVA_PATH) || config.javaPath === undefined) { 183 | return; 184 | } 185 | handleConfiguredJavaPath(config.javaPath); 186 | }, 5000) 187 | ); 188 | -------------------------------------------------------------------------------- /src/ts/notifications.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import * as vscode from "vscode"; 18 | import { 19 | NotificationType, 20 | MessageType, 21 | Command, 22 | NotificationHandler, 23 | LanguageClient, 24 | } from "vscode-languageclient/node"; 25 | 26 | export interface ActionableNotification { 27 | type: MessageType; 28 | message: string; 29 | data?: any; 30 | commands: Command[]; 31 | } 32 | 33 | export const actionableNotificationType: NotificationType = 34 | new NotificationType("pkl/actionableNotification"); 35 | 36 | export const actionableNotificationHandler: NotificationHandler = async ( 37 | notification 38 | ) => { 39 | let response: string | undefined = undefined; 40 | const titles = notification.commands.map((it) => it.title); 41 | switch (notification.type) { 42 | case MessageType.Info: 43 | case MessageType.Log: { 44 | response = await vscode.window.showInformationMessage(notification.message, ...titles); 45 | break; 46 | } 47 | case MessageType.Error: { 48 | response = await vscode.window.showErrorMessage(notification.message, ...titles); 49 | break; 50 | } 51 | case MessageType.Warning: { 52 | response = await vscode.window.showWarningMessage(notification.message, ...titles); 53 | break; 54 | } 55 | } 56 | if (response != null) { 57 | var command = notification.commands.find((it) => it.title == response)!!; 58 | vscode.commands.executeCommand(command.command, ...(command.arguments ?? [])); 59 | } 60 | }; 61 | 62 | export async function registerNotificationHandlers(client: LanguageClient) { 63 | client.onNotification(actionableNotificationType, actionableNotificationHandler); 64 | } 65 | -------------------------------------------------------------------------------- /src/ts/pklLspDistribution.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import path from "node:path"; 18 | import config from "./config"; 19 | import { getJavaDistribution } from "./javaDistribution"; 20 | import { debounce, execFile, isRegularFile } from "./utils"; 21 | import Semver from "./Semver"; 22 | import * as vscode from "vscode"; 23 | import fs from "fs/promises"; 24 | import { 25 | BUNDLED_LSP_VERSION, 26 | COMMAND_OPEN_WORKSPACE_SETTINGS, 27 | CONFIG_LSP_PATH, 28 | LSP_DISTRIBUTIONS_DIR, 29 | } from "./consts"; 30 | import logger from "./clients/logger"; 31 | 32 | const emitter = new vscode.EventEmitter(); 33 | 34 | export const onDidChangeLspDistribution = emitter.event; 35 | 36 | export let currentLspDistribution: LspDistribution | undefined = undefined; 37 | 38 | export type LspDistribution = { 39 | path: string; 40 | version: Semver; 41 | }; 42 | 43 | export const getLspDistribution = (): Promise => { 44 | return new Promise((resolve) => { 45 | if (currentLspDistribution !== undefined) { 46 | resolve(currentLspDistribution); 47 | return; 48 | } 49 | const disposables: vscode.Disposable[] = []; 50 | onDidChangeLspDistribution( 51 | (distribution) => { 52 | resolve(distribution); 53 | disposables.every((it) => it.dispose()); 54 | }, 55 | null, 56 | disposables 57 | ); 58 | }); 59 | }; 60 | 61 | export const bundledDistribution: LspDistribution = { 62 | path: path.join(__dirname, "pkl-lsp.jar"), 63 | version: Semver.parse(BUNDLED_LSP_VERSION)!!, 64 | }; 65 | 66 | const getLspVersion = async (jarPath: string): Promise => { 67 | const javaDistribution = await getJavaDistribution(); 68 | const { stdout } = await execFile(javaDistribution.path, ["-jar", jarPath, "--version"]); 69 | const stdoutParts = stdout.replace(/\r?\n$/, "").split(" version "); 70 | const versionStr = stdoutParts[stdoutParts.length - 1]; 71 | if (versionStr === undefined) { 72 | logger.log( 73 | `Got malformed version output from jar file at ${jarPath}: ${stdout}. Expected "pkl-lsp version "` 74 | ); 75 | return; 76 | } 77 | const semver = Semver.parse(versionStr); 78 | if (semver === undefined) { 79 | logger.log(`Got malformed semver string from jar file at ${jarPath}: ${versionStr}`); 80 | return; 81 | } 82 | return semver; 83 | }; 84 | 85 | const CTA_CONFIGURE_LSP_PATH = "Configure path to pkl-lsp"; 86 | 87 | const tellInvalidConfiguredLspPath = async () => { 88 | const response = await vscode.window.showWarningMessage( 89 | `Configured path ${config.lspPath} is not a valid lsp jar.`, 90 | CTA_CONFIGURE_LSP_PATH 91 | ); 92 | if (response === CTA_CONFIGURE_LSP_PATH) { 93 | vscode.commands.executeCommand(COMMAND_OPEN_WORKSPACE_SETTINGS, CONFIG_LSP_PATH); 94 | } 95 | }; 96 | 97 | const handleConfiguredLspDistribution = async (lspPath: string) => { 98 | try { 99 | const version = await getLspVersion(lspPath); 100 | if (version === undefined) { 101 | tellInvalidConfiguredLspPath(); 102 | return; 103 | } 104 | // permit a higher version if it exists, but warn users about it. 105 | if (!version.isCompatibleWith(bundledDistribution.version)) { 106 | vscode.window.showWarningMessage( 107 | `This version of pkl-vscode is not compatible with pkl-lsp version ${version}. Features are not guaranteed to work.` 108 | ); 109 | } else if (version.isLessThan(bundledDistribution.version)) { 110 | vscode.window.showWarningMessage( 111 | `The configured pkl-lsp distribution version (${version}) is lower than the bundled version (${BUNDLED_LSP_VERSION}). Features are not guaranteed to work.` 112 | ); 113 | } 114 | const distro = { path: lspPath, version }; 115 | logger.log(`Using pkl-lsp.jar from configured ${CONFIG_LSP_PATH}`); 116 | currentLspDistribution = distro; 117 | emitter.fire(distro); 118 | } catch (err) { 119 | tellInvalidConfiguredLspPath(); 120 | } 121 | }; 122 | 123 | /** 124 | * Get the highest supported pkl-lsp distribution. 125 | */ 126 | const getDownloadedDistribution = async (): Promise => { 127 | try { 128 | const distroFolders = await fs.readdir(LSP_DISTRIBUTIONS_DIR); 129 | const versions = distroFolders 130 | .map(Semver.parse) 131 | .filter( 132 | (it): it is Semver => it !== undefined && it.isCompatibleWith(bundledDistribution.version) 133 | ) 134 | .sort((a, b) => -a.compareTo(b)); 135 | for (const version of versions) { 136 | const lspJar = path.join(LSP_DISTRIBUTIONS_DIR, version.toString(), `pkl-lsp-${version}.jar`); 137 | if (await isRegularFile(lspJar)) { 138 | return { path: lspJar, version }; 139 | } 140 | } 141 | } catch (err) { 142 | return; 143 | } 144 | }; 145 | 146 | vscode.workspace.onDidChangeConfiguration( 147 | // debounce because vscode fires configuration changes _as_ users are typing. 148 | debounce(async (event: vscode.ConfigurationChangeEvent) => { 149 | if (!event.affectsConfiguration(CONFIG_LSP_PATH) || config.lspPath === undefined) { 150 | return; 151 | } 152 | handleConfiguredLspDistribution(config.lspPath); 153 | }, 5000) 154 | ); 155 | 156 | (async () => { 157 | if (config.lspPath !== undefined) { 158 | await handleConfiguredLspDistribution(config.lspPath); 159 | // currentLspDistribution only gets set if it was a valid distribution. 160 | if (currentLspDistribution !== undefined) { 161 | return; 162 | } 163 | } 164 | let distro = await getDownloadedDistribution(); 165 | if (distro !== undefined && distro.version.isGreaterThan(bundledDistribution.version)) { 166 | logger.log(`Using downloaded pkl-lsp.jar at ${distro.path}`); 167 | } else { 168 | distro = bundledDistribution; 169 | logger.log(`Using built-in pkl-lsp.jar`); 170 | } 171 | currentLspDistribution = distro; 172 | emitter.fire(distro); 173 | })(); 174 | -------------------------------------------------------------------------------- /src/ts/pklLspDistributionUpdater.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import path from "node:path"; 18 | import { COMMAND_RELOAD_WORKSPACE_WINDOW, LSP_DISTRIBUTIONS_DIR } from "./consts"; 19 | import { downloadArtifact, getLatestVersion } from "./clients/maven"; 20 | import { isRegularFile } from "./utils"; 21 | import * as vscode from "vscode"; 22 | import logger from "./clients/logger"; 23 | import { bundledDistribution } from "./pklLspDistribution"; 24 | 25 | export const queryForLatestLspDistribution = async () => { 26 | try { 27 | const latestVersion = await getLatestVersion({ group: "org.pkl-lang", artifact: "pkl-lsp" }); 28 | if (!latestVersion.isCompatibleWith(bundledDistribution.version)) { 29 | logger.log(`Latest version is ${latestVersion}, which I am not compatible with.`); 30 | return; 31 | } 32 | const pathOnDisk = path.join( 33 | LSP_DISTRIBUTIONS_DIR, 34 | latestVersion.toString(), 35 | `pkl-lsp-${latestVersion}.jar` 36 | ); 37 | const isFile = await isRegularFile(pathOnDisk); 38 | if (isFile) { 39 | // is already downloaded 40 | logger.log(`Latest version of pkl-lsp is ${latestVersion}, and it is already downloaded.`); 41 | return; 42 | } 43 | if (bundledDistribution.version.isGreaterThanOrEqualTo(latestVersion)) { 44 | logger.log( 45 | `Latest version of pkl-lsp is ${latestVersion}, which is less than or equal to my built-in version.` 46 | ); 47 | return; 48 | } 49 | const callToAction = "Download and reload VSCode"; 50 | const response = await vscode.window.showInformationMessage( 51 | `A new version of pkl-lsp (${latestVersion}) is available.`, 52 | callToAction, 53 | "Later" 54 | ); 55 | if (response !== callToAction) { 56 | return; 57 | } 58 | await downloadArtifact( 59 | { group: "org.pkl-lang", artifact: "pkl-lsp", version: latestVersion.toString() }, 60 | pathOnDisk 61 | ); 62 | vscode.commands.executeCommand(COMMAND_RELOAD_WORKSPACE_WINDOW); 63 | } catch (err) { 64 | logger.error(`Failed to handle query for latest distribution: ${err}`); 65 | } 66 | }; 67 | -------------------------------------------------------------------------------- /src/ts/providers/PklSemanticTokensProvider.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | //===----------------------------------------------------------------------===// 18 | // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved. 19 | // 20 | // Licensed under the Apache License, Version 2.0 (the "License"); 21 | // you may not use this file except in compliance with the License. 22 | // You may obtain a copy of the License at 23 | // 24 | // https://www.apache.org/licenses/LICENSE-2.0 25 | // 26 | // Unless required by applicable law or agreed to in writing, software 27 | // distributed under the License is distributed on an "AS IS" BASIS, 28 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 29 | // See the License for the specific language governing permissions and 30 | // limitations under the License. 31 | //===----------------------------------------------------------------------===// 32 | 33 | import vscode from "vscode"; 34 | import { Parser, Query, Tree, Language } from "web-tree-sitter"; 35 | import fs from "fs/promises"; 36 | import { readFileSync } from "fs"; 37 | import path from "path"; 38 | 39 | const foldsQueries = readFileSync(path.join(__dirname, "../../queries/folds.scm"), { 40 | encoding: "utf-8", 41 | }); 42 | 43 | const highlightsQueries = readFileSync(path.join(__dirname, "../../queries/highlights.scm"), { 44 | encoding: "utf-8", 45 | }); 46 | 47 | export class PklSemanticTokensProvider 48 | implements vscode.DocumentSemanticTokensProvider, vscode.FoldingRangeProvider 49 | { 50 | #previousTrees: Map = new Map(); 51 | 52 | #parser: Parser; 53 | 54 | #highlightsQuery: Query; 55 | 56 | #foldsQuery: Query; 57 | 58 | legend: vscode.SemanticTokensLegend; 59 | 60 | constructor(parser: Parser) { 61 | this.#parser = parser; 62 | this.#highlightsQuery = new Query(parser.language!!, highlightsQueries); 63 | this.#foldsQuery = new Query(parser.language!!, foldsQueries); 64 | this.legend = this.#buildLegend(); 65 | } 66 | 67 | #buildLegend() { 68 | const tokenTypes: string[] = []; 69 | const tokenModifiers: string[] = []; 70 | for (const capture of this.#highlightsQuery.captureNames) { 71 | const [type, ...modifiers] = capture.split("."); 72 | if (!tokenTypes.includes(type)) { 73 | tokenTypes.push(type); 74 | } 75 | for (const modifier of modifiers) { 76 | if (!tokenModifiers.includes(modifier)) { 77 | tokenModifiers.push(modifier); 78 | } 79 | } 80 | } 81 | return new vscode.SemanticTokensLegend(tokenTypes, tokenModifiers); 82 | } 83 | 84 | #parse(document: vscode.TextDocument): Tree | null { 85 | const previousParse = this.#previousTrees.get(document); 86 | if (previousParse && previousParse.version === document.version) { 87 | return previousParse.tree; 88 | } 89 | const tree = this.#parser.parse(document.getText()); 90 | if (tree == null) { 91 | return null; 92 | } 93 | this.#previousTrees.set(document, { version: document.version, tree }); 94 | return tree; 95 | } 96 | 97 | provideDocumentSemanticTokens( 98 | document: vscode.TextDocument, 99 | _: vscode.CancellationToken 100 | ): vscode.ProviderResult { 101 | const tree = this.#parse(document); 102 | if (tree == null) { 103 | return null; 104 | } 105 | const captures = this.#highlightsQuery.captures(tree.rootNode); 106 | const builder = new vscode.SemanticTokensBuilder(this.legend); 107 | 108 | for (const capture of captures) { 109 | const [term, ...modifiers] = capture.name.split("."); 110 | const node = capture.node; 111 | // A token can't span multiple lines. 112 | // We'll have to rely on our textmate grammar here. 113 | if (node.endPosition.row > node.startPosition.row) { 114 | continue; 115 | } 116 | const range = new vscode.Range( 117 | new vscode.Position(node.startPosition.row, node.startPosition.column), 118 | new vscode.Position(node.endPosition.row, node.endPosition.column) 119 | ); 120 | builder.push(range, term, modifiers); 121 | } 122 | const tokens = builder.build(); 123 | return tokens; 124 | } 125 | 126 | provideFoldingRanges( 127 | document: vscode.TextDocument, 128 | context: vscode.FoldingContext, 129 | token: vscode.CancellationToken 130 | ): vscode.ProviderResult { 131 | const tree = this.#parse(document); 132 | if (tree == null) { 133 | return null; 134 | } 135 | const captures = this.#foldsQuery.captures(tree.rootNode); 136 | return captures 137 | .filter((it) => it.node.endPosition.row > it.node.startPosition.row) 138 | .map((it) => { 139 | return new vscode.FoldingRange(it.node.startPosition.row, it.node.endPosition.row); 140 | }); 141 | } 142 | } 143 | 144 | export async function newPklSemanticTokenProvider(): Promise { 145 | await Parser.init(); 146 | const parser = new Parser(); 147 | const wasmBytes = await fs.readFile(path.join(__dirname, "../pkl.wasm")); 148 | const language = await Language.load(wasmBytes); 149 | parser.setLanguage(language); 150 | return new PklSemanticTokensProvider(parser); 151 | } 152 | -------------------------------------------------------------------------------- /src/ts/providers/PklTextDocumentContentProvider.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | //===----------------------------------------------------------------------===// 18 | // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved. 19 | // 20 | // Licensed under the Apache License, Version 2.0 (the "License"); 21 | // you may not use this file except in compliance with the License. 22 | // You may obtain a copy of the License at 23 | // 24 | // https://www.apache.org/licenses/LICENSE-2.0 25 | // 26 | // Unless required by applicable law or agreed to in writing, software 27 | // distributed under the License is distributed on an "AS IS" BASIS, 28 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 29 | // See the License for the specific language governing permissions and 30 | // limitations under the License. 31 | //===----------------------------------------------------------------------===// 32 | 33 | import * as vscode from "vscode"; 34 | import { pklFileContentRequest } from "../requests"; 35 | import { LanguageClientRef } from "../extension"; 36 | 37 | export default class PklTextDocumentContentProvider implements vscode.TextDocumentContentProvider { 38 | #languageClientBox: LanguageClientRef; 39 | 40 | #eventEmitter: vscode.EventEmitter; 41 | 42 | onDidChange: vscode.Event; 43 | 44 | constructor(languageClientBox: LanguageClientRef) { 45 | this.#languageClientBox = languageClientBox; 46 | this.#eventEmitter = new vscode.EventEmitter(); 47 | this.onDidChange = this.#eventEmitter.event; 48 | } 49 | 50 | async provideTextDocumentContent( 51 | uri: vscode.Uri, 52 | token: vscode.CancellationToken 53 | ): Promise { 54 | const content = await this.#languageClientBox.client?.sendRequest( 55 | pklFileContentRequest, 56 | { uri: uri.toString() }, 57 | token 58 | ); 59 | return content ?? ""; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/ts/requests.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { RequestType, TextDocumentIdentifier } from "vscode-languageclient/node"; 18 | 19 | export const pklFileContentRequest = new RequestType( 20 | "pkl/fileContents" 21 | ); 22 | 23 | export const pklDownloadPackageRequest = new RequestType("pkl/downloadPackage"); 24 | 25 | export const pklSyncProjectsRequest = new RequestType("pkl/syncProjects"); 26 | -------------------------------------------------------------------------------- /src/ts/utils.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { promisify } from "node:util"; 18 | import { execFile as _execFile } from "node:child_process"; 19 | import fs from "node:fs/promises"; 20 | import { createWriteStream } from "node:fs"; 21 | import https from "node:https"; 22 | import crypto from "node:crypto"; 23 | import os from "node:os"; 24 | import path from "node:path"; 25 | 26 | export const execFile = promisify(_execFile); 27 | 28 | export const debounce = ( 29 | f: (...args: A) => any, 30 | wait: number 31 | ): ((...args: A) => void) => { 32 | let timeout: NodeJS.Timeout | undefined = undefined; 33 | return (...args: A) => { 34 | if (timeout != null) { 35 | clearTimeout(timeout); 36 | } 37 | timeout = setTimeout(() => f(...args), wait); 38 | }; 39 | }; 40 | 41 | /** 42 | * Tells if the file exists, and is a file (and not a directory). 43 | */ 44 | export const isRegularFile = async (filepath: string) => { 45 | try { 46 | const stats = await fs.stat(filepath); 47 | return stats.isFile(); 48 | } catch (err: any) { 49 | if (err.code !== "ENOENT") { 50 | throw err; 51 | } 52 | return false; 53 | } 54 | }; 55 | 56 | /** 57 | * Make an HTTPS GET request to the provided URL, parsing the response body as UTF-8 encoded text. 58 | */ 59 | export const httpsGetText = (url: string): Promise => { 60 | return new Promise((resolve, reject) => { 61 | https.get(url, { headers: { accept: "*/*", "user-agent": "pkl-vscode" } }, (response) => { 62 | response.setEncoding("utf-8"); 63 | let body = ""; 64 | response.on("data", (chunk) => { 65 | body += chunk; 66 | }); 67 | response.on("end", () => { 68 | if (response.statusCode !== 200) { 69 | reject(new Error(body)); 70 | } else { 71 | resolve(body); 72 | } 73 | }); 74 | response.on("error", (err) => { 75 | reject(err); 76 | }); 77 | }); 78 | }); 79 | }; 80 | 81 | /** 82 | * Make an HTTPS GET request to the provided URL and parse the response as JSON. 83 | */ 84 | export const httpsGetJson = async (url: string): Promise => { 85 | const text = await httpsGetText(url); 86 | return JSON.parse(text) as T; 87 | }; 88 | 89 | const downloadAndComputeChecksum = async (url: string, dest: string): Promise => { 90 | const writeStream = createWriteStream(dest, { mode: 0o755 }); 91 | const hash = crypto.createHash("sha256"); 92 | return new Promise((resolve, reject) => { 93 | https.get(url, (response) => { 94 | response 95 | .on("data", (chunk) => { 96 | hash.update(chunk); 97 | writeStream.write(chunk); 98 | }) 99 | .on("end", () => { 100 | const computedChecksum = hash.digest().toString("hex"); 101 | writeStream.end(); 102 | resolve(computedChecksum); 103 | }) 104 | .on("error", (err) => { 105 | writeStream.destroy(err); 106 | reject(err); 107 | }); 108 | }); 109 | }); 110 | }; 111 | 112 | /** 113 | * Downloads the file at the specified URL, verifying its contents against the provided checksum. 114 | */ 115 | export const httpsDownload = async (url: string, dest: string, checksum: string): Promise => { 116 | const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "pkl-vscode-")); 117 | const tempFile = `${tempDir}/contents.download`; 118 | const computedChecksum = await downloadAndComputeChecksum(url, tempFile); 119 | if (computedChecksum === checksum) { 120 | await fs.mkdir(path.resolve(dest, ".."), { recursive: true }); 121 | await fs.rename(tempFile, dest); 122 | } else { 123 | throw new Error(`Failed to download ${url}: expected ${checksum}, but got ${computedChecksum}`); 124 | } 125 | }; 126 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "esnext", 5 | "outDir": "out", 6 | "lib": [ 7 | "esnext" 8 | ], 9 | "skipLibCheck": true, 10 | "sourceMap": true, 11 | "rootDir": "src/ts", 12 | "resolveJsonModule": true, 13 | "esModuleInterop": true, 14 | /* Strict Type-Checking Option */ 15 | "strict": true, /* enable all strict type-checking options */ 16 | /* Additional Checks */ 17 | "noUnusedLocals": true /* Report errors on unused locals. */ 18 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 19 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 20 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 21 | }, 22 | "exclude": [ 23 | "node_modules", 24 | ".vscode-test", 25 | "scripts" 26 | ] 27 | } -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-string-throw": true, 4 | "no-unused-expression": true, 5 | "no-duplicate-variable": true, 6 | "curly": true, 7 | "class-name": true, 8 | "semicolon": [ 9 | true, 10 | "always" 11 | ], 12 | "triple-equals": true 13 | }, 14 | "defaultSeverity": "warning" 15 | } --------------------------------------------------------------------------------