├── .github ├── dependabot.yml └── workflows │ └── versions.yml ├── .gitignore ├── .prettierrc.json ├── LICENSE ├── README.md ├── __tests__ └── verify-bazelisk.sh ├── action.yml ├── dist └── index.js ├── package-lock.json ├── package.json ├── src ├── installer.ts ├── main.ts └── setup-bazelisk.ts └── tsconfig.json /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | 8 | updates: 9 | - package-ecosystem: "github-actions" 10 | directory: "/" 11 | schedule: 12 | interval: weekly 13 | - package-ecosystem: "npm" 14 | directory: "/" 15 | schedule: 16 | interval: weekly 17 | -------------------------------------------------------------------------------- /.github/workflows/versions.yml: -------------------------------------------------------------------------------- 1 | name: Validate 'setup-bazelisk' 2 | on: 3 | push: 4 | branches: 5 | - main 6 | paths-ignore: 7 | - '**.md' 8 | pull_request: 9 | paths-ignore: 10 | - '**.md' 11 | 12 | jobs: 13 | setup-versions: 14 | runs-on: ${{ matrix.os }} 15 | strategy: 16 | fail-fast: false 17 | matrix: 18 | os: [macos-latest, windows-latest, ubuntu-latest] 19 | bazelisk: [1.7.4, 1.6, 1] 20 | bazel: [4.0.0, 3.7.2, 3.5.0, 5.1.0] 21 | steps: 22 | - uses: actions/checkout@v4 23 | 24 | - name: setup-bazelisk ${{ matrix.bazelisk }} 25 | uses: ./ 26 | with: 27 | bazelisk-version: ${{ matrix.bazelisk }} 28 | 29 | - name: verify bazelisk 30 | run: __tests__/verify-bazelisk.sh ${{ matrix.bazelisk }} 31 | shell: bash 32 | env: 33 | USE_BAZEL_VERSION: ${{ matrix.bazel }} 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | lib 3 | 4 | # Logs 5 | logs 6 | *.log 7 | npm-debug.log* 8 | yarn-debug.log* 9 | yarn-error.log* 10 | lerna-debug.log* 11 | 12 | # Diagnostic reports (https://nodejs.org/api/report.html) 13 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 14 | 15 | # Runtime data 16 | pids 17 | *.pid 18 | *.seed 19 | *.pid.lock 20 | 21 | # Directory for instrumented libs generated by jscoverage/JSCover 22 | lib-cov 23 | 24 | # Coverage directory used by tools like istanbul 25 | coverage 26 | *.lcov 27 | 28 | # nyc test coverage 29 | .nyc_output 30 | 31 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 32 | .grunt 33 | 34 | # Bower dependency directory (https://bower.io/) 35 | bower_components 36 | 37 | # node-waf configuration 38 | .lock-wscript 39 | 40 | # Compiled binary addons (https://nodejs.org/api/addons.html) 41 | build/Release 42 | 43 | # Dependency directories 44 | node_modules/ 45 | jspm_packages/ 46 | 47 | # TypeScript v1 declaration files 48 | typings/ 49 | 50 | # TypeScript cache 51 | *.tsbuildinfo 52 | 53 | # Optional npm cache directory 54 | .npm 55 | 56 | # Optional eslint cache 57 | .eslintcache 58 | 59 | # Microbundle cache 60 | .rpt2_cache/ 61 | .rts2_cache_cjs/ 62 | .rts2_cache_es/ 63 | .rts2_cache_umd/ 64 | 65 | # Optional REPL history 66 | .node_repl_history 67 | 68 | # Output of 'npm pack' 69 | *.tgz 70 | 71 | # Yarn Integrity file 72 | .yarn-integrity 73 | 74 | # dotenv environment variables file 75 | .env 76 | .env.test 77 | 78 | # parcel-bundler cache (https://parceljs.org/) 79 | .cache 80 | 81 | # Next.js build output 82 | .next 83 | 84 | # Nuxt.js build / generate output 85 | .nuxt 86 | dist 87 | 88 | # Gatsby files 89 | .cache/ 90 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 91 | # https://nextjs.org/blog/next-9-1#public-directory-support 92 | # public 93 | 94 | # vuepress build output 95 | .vuepress/dist 96 | 97 | # Serverless directories 98 | .serverless/ 99 | 100 | # FuseBox cache 101 | .fusebox/ 102 | 103 | # DynamoDB Local files 104 | .dynamodb/ 105 | 106 | # TernJS port file 107 | .tern-port 108 | 109 | # Vim temp files 110 | *.swp 111 | *.swo 112 | *.swn 113 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": true, 6 | "singleQuote": true, 7 | "trailingComma": "none", 8 | "bracketSpacing": false, 9 | "arrowParens": "avoid", 10 | "parser": "typescript" 11 | } 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Misha Seltzer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | > [!IMPORTANT] 2 | > setup-bazelisk has been superseded by 3 | > [setup-bazel](https://github.com/bazel-contrib/setup-bazel) and all 4 | > maintenance and support has ceased. setup-bazelisk will remain on GitHub 5 | > indefinitely, but will almost certainly stop working someday, so if your 6 | > GitHub Actions workflows use setup-bazelisk, please migrate them to 7 | > setup-bazel. 8 | 9 | # setup-bazelisk v3 10 | Set up your GitHub Actions workflow with a specific version of Bazelisk 11 | 12 | Note that GitHub Actions includes Bazelisk by default as of so this setup is not necessary unless you want to customize the Bazelisk version, or are running Bazel inside a container. 13 | 14 | ![Validate 'setup-bazelisk'](https://github.com/bazelbuild/setup-bazelisk/workflows/Validate%20'setup-bazelisk'/badge.svg) 15 | 16 | This action sets up Bazelisk for use in actions by: 17 | 18 | - optionally downloading and caching a version of Bazelisk by version and adding to PATH 19 | - setting up cache for downloaded Bazel versions 20 | 21 | # What's new 22 | 23 | - Updated to the node20 runtime by default 24 | - This requires a minimum [Actions Runner](https://github.com/actions/runner/releases/tag/v2.308.0) version of v2.308.0 to run. 25 | 26 | # Usage 27 | 28 | See [action.yml](action.yml) 29 | 30 | Basic: 31 | ```yaml 32 | steps: 33 | - uses: actions/checkout@v4 34 | - uses: bazelbuild/setup-bazelisk@v3 35 | - name: Mount bazel cache # Optional 36 | uses: actions/cache@v4 37 | with: 38 | path: "~/.cache/bazel" 39 | key: bazel 40 | - run: bazel build //... 41 | ``` 42 | 43 | # Known issues on Windows 44 | * This action doesn't work with PowerShell. Make sure to have `shell: bash` in you `run:` steps. ([#3](https://github.com/bazelbuild/setup-bazelisk/issues/3)) 45 | * Windows removes one of the slashes (`/`) when two are present (`bazel test //tests/...` becomes `bazel test /tests/...` and fails). ([#4](https://github.com/bazelbuild/setup-bazelisk/issues/4)) 46 | As a workaround, don't have any prefix `//`. Since all runs start at WORKSPACE dir, it should work all the same. 47 | 48 | Full workaround example on windows: 49 | ```yaml 50 | - name: Run tests 51 | run: bazel test tests/... 52 | shell: bash 53 | ``` 54 | 55 | # License 56 | 57 | The scripts and documentation in this project are released under the [MIT License](LICENSE) 58 | -------------------------------------------------------------------------------- /__tests__/verify-bazelisk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -z "$1" ]; then 4 | echo "Must supply bazelisk version argument" 5 | exit 1 6 | fi 7 | 8 | full_bazel_version="$(bazel version)" 9 | bazelisk_version=$(echo "$full_bazel_version" | grep 'Bazelisk version:') 10 | bazel_version=$(echo "$full_bazel_version" | grep 'Build label:') 11 | echo "Found bazelisk version '$bazelisk_version'" 12 | echo "Found bazel version '$bazel_version'" 13 | 14 | if [ -z "$(echo $bazelisk_version | grep $1)" ]; then 15 | echo "Unexpected bazelisk version" 16 | exit 1 17 | fi 18 | 19 | expected_bazel_version="${USE_BAZEL_VERSION:-xxx}" 20 | if [ -z "$(echo $bazel_version | grep $expected_bazel_version)" ]; then 21 | echo "Unexpected bazel version" 22 | exit 1 23 | fi 24 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Setup Bazelisk' 2 | description: 'Set up Bazelisk and add it to the PATH.' 3 | author: 'Misha Seltzer' 4 | inputs: 5 | bazelisk-version: 6 | description: 'The Bazelisk version to download (if necessary) and use. Supports semver spec and ranges.' 7 | default: '1.x' 8 | token: 9 | description: Used to query bazelisk releases. Since there's a default, this is typically not supplied by the user. 10 | default: ${{ github.token }} 11 | runs: 12 | using: 'node20' 13 | main: 'dist/index.js' 14 | branding: 15 | icon: 'box' 16 | color: 'green' 17 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "setup-bazelisk", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "setup-bazelisk", 9 | "version": "1.0.0", 10 | "license": "MIT", 11 | "dependencies": { 12 | "@actions/cache": "^3.2.3", 13 | "@actions/core": "^1.10.1", 14 | "@actions/github": "^6.0.0", 15 | "@actions/http-client": "^2.2.1", 16 | "@actions/tool-cache": "^2.0.1", 17 | "cachedir": "^2.4.0", 18 | "semver": "^7.6.0" 19 | }, 20 | "devDependencies": { 21 | "@types/semver": "^7.5.8", 22 | "@vercel/ncc": "^0.38.1", 23 | "prettier": "^3.2.5", 24 | "typescript": "^5.4.2" 25 | } 26 | }, 27 | "node_modules/@actions/cache": { 28 | "version": "3.2.4", 29 | "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.2.4.tgz", 30 | "integrity": "sha512-RuHnwfcDagtX+37s0ZWy7clbOfnZ7AlDJQ7k/9rzt2W4Gnwde3fa/qjSjVuz4vLcLIpc7fUob27CMrqiWZytYA==", 31 | "dependencies": { 32 | "@actions/core": "^1.10.0", 33 | "@actions/exec": "^1.0.1", 34 | "@actions/glob": "^0.1.0", 35 | "@actions/http-client": "^2.1.1", 36 | "@actions/io": "^1.0.1", 37 | "@azure/abort-controller": "^1.1.0", 38 | "@azure/ms-rest-js": "^2.6.0", 39 | "@azure/storage-blob": "^12.13.0", 40 | "semver": "^6.3.1", 41 | "uuid": "^3.3.3" 42 | } 43 | }, 44 | "node_modules/@actions/cache/node_modules/semver": { 45 | "version": "6.3.1", 46 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", 47 | "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", 48 | "bin": { 49 | "semver": "bin/semver.js" 50 | } 51 | }, 52 | "node_modules/@actions/core": { 53 | "version": "1.10.1", 54 | "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", 55 | "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", 56 | "dependencies": { 57 | "@actions/http-client": "^2.0.1", 58 | "uuid": "^8.3.2" 59 | } 60 | }, 61 | "node_modules/@actions/core/node_modules/uuid": { 62 | "version": "8.3.2", 63 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 64 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", 65 | "bin": { 66 | "uuid": "dist/bin/uuid" 67 | } 68 | }, 69 | "node_modules/@actions/exec": { 70 | "version": "1.1.1", 71 | "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", 72 | "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", 73 | "dependencies": { 74 | "@actions/io": "^1.0.1" 75 | } 76 | }, 77 | "node_modules/@actions/github": { 78 | "version": "6.0.0", 79 | "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz", 80 | "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==", 81 | "dependencies": { 82 | "@actions/http-client": "^2.2.0", 83 | "@octokit/core": "^5.0.1", 84 | "@octokit/plugin-paginate-rest": "^9.0.0", 85 | "@octokit/plugin-rest-endpoint-methods": "^10.0.0" 86 | } 87 | }, 88 | "node_modules/@actions/glob": { 89 | "version": "0.1.2", 90 | "resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.1.2.tgz", 91 | "integrity": "sha512-SclLR7Ia5sEqjkJTPs7Sd86maMDw43p769YxBOxvPvEWuPEhpAnBsQfENOpXjFYMmhCqd127bmf+YdvJqVqR4A==", 92 | "dependencies": { 93 | "@actions/core": "^1.2.6", 94 | "minimatch": "^3.0.4" 95 | } 96 | }, 97 | "node_modules/@actions/http-client": { 98 | "version": "2.2.1", 99 | "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.1.tgz", 100 | "integrity": "sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==", 101 | "dependencies": { 102 | "tunnel": "^0.0.6", 103 | "undici": "^5.25.4" 104 | } 105 | }, 106 | "node_modules/@actions/io": { 107 | "version": "1.1.3", 108 | "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz", 109 | "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==" 110 | }, 111 | "node_modules/@actions/tool-cache": { 112 | "version": "2.0.1", 113 | "resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-2.0.1.tgz", 114 | "integrity": "sha512-iPU+mNwrbA8jodY8eyo/0S/QqCKDajiR8OxWTnSk/SnYg0sj8Hp4QcUEVC1YFpHWXtrfbQrE13Jz4k4HXJQKcA==", 115 | "dependencies": { 116 | "@actions/core": "^1.2.6", 117 | "@actions/exec": "^1.0.0", 118 | "@actions/http-client": "^2.0.1", 119 | "@actions/io": "^1.1.1", 120 | "semver": "^6.1.0", 121 | "uuid": "^3.3.2" 122 | } 123 | }, 124 | "node_modules/@actions/tool-cache/node_modules/semver": { 125 | "version": "6.3.1", 126 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", 127 | "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", 128 | "bin": { 129 | "semver": "bin/semver.js" 130 | } 131 | }, 132 | "node_modules/@azure/abort-controller": { 133 | "version": "1.1.0", 134 | "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", 135 | "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", 136 | "dependencies": { 137 | "tslib": "^2.2.0" 138 | }, 139 | "engines": { 140 | "node": ">=12.0.0" 141 | } 142 | }, 143 | "node_modules/@azure/core-auth": { 144 | "version": "1.6.0", 145 | "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.6.0.tgz", 146 | "integrity": "sha512-3X9wzaaGgRaBCwhLQZDtFp5uLIXCPrGbwJNWPPugvL4xbIGgScv77YzzxToKGLAKvG9amDoofMoP+9hsH1vs1w==", 147 | "dependencies": { 148 | "@azure/abort-controller": "^2.0.0", 149 | "@azure/core-util": "^1.1.0", 150 | "tslib": "^2.2.0" 151 | }, 152 | "engines": { 153 | "node": ">=18.0.0" 154 | } 155 | }, 156 | "node_modules/@azure/core-auth/node_modules/@azure/abort-controller": { 157 | "version": "2.0.0", 158 | "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.0.0.tgz", 159 | "integrity": "sha512-RP/mR/WJchR+g+nQFJGOec+nzeN/VvjlwbinccoqfhTsTHbb8X5+mLDp48kHT0ueyum0BNSwGm0kX0UZuIqTGg==", 160 | "dependencies": { 161 | "tslib": "^2.2.0" 162 | }, 163 | "engines": { 164 | "node": ">=18.0.0" 165 | } 166 | }, 167 | "node_modules/@azure/core-http": { 168 | "version": "3.0.4", 169 | "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-3.0.4.tgz", 170 | "integrity": "sha512-Fok9VVhMdxAFOtqiiAtg74fL0UJkt0z3D+ouUUxcRLzZNBioPRAMJFVxiWoJljYpXsRi4GDQHzQHDc9AiYaIUQ==", 171 | "dependencies": { 172 | "@azure/abort-controller": "^1.0.0", 173 | "@azure/core-auth": "^1.3.0", 174 | "@azure/core-tracing": "1.0.0-preview.13", 175 | "@azure/core-util": "^1.1.1", 176 | "@azure/logger": "^1.0.0", 177 | "@types/node-fetch": "^2.5.0", 178 | "@types/tunnel": "^0.0.3", 179 | "form-data": "^4.0.0", 180 | "node-fetch": "^2.6.7", 181 | "process": "^0.11.10", 182 | "tslib": "^2.2.0", 183 | "tunnel": "^0.0.6", 184 | "uuid": "^8.3.0", 185 | "xml2js": "^0.5.0" 186 | }, 187 | "engines": { 188 | "node": ">=14.0.0" 189 | } 190 | }, 191 | "node_modules/@azure/core-http/node_modules/form-data": { 192 | "version": "4.0.0", 193 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 194 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 195 | "dependencies": { 196 | "asynckit": "^0.4.0", 197 | "combined-stream": "^1.0.8", 198 | "mime-types": "^2.1.12" 199 | }, 200 | "engines": { 201 | "node": ">= 6" 202 | } 203 | }, 204 | "node_modules/@azure/core-http/node_modules/uuid": { 205 | "version": "8.3.2", 206 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 207 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", 208 | "bin": { 209 | "uuid": "dist/bin/uuid" 210 | } 211 | }, 212 | "node_modules/@azure/core-lro": { 213 | "version": "2.6.0", 214 | "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.6.0.tgz", 215 | "integrity": "sha512-PyRNcaIOfMgoUC01/24NoG+k8O81VrKxYARnDlo+Q2xji0/0/j2nIt8BwQh294pb1c5QnXTDPbNR4KzoDKXEoQ==", 216 | "dependencies": { 217 | "@azure/abort-controller": "^2.0.0", 218 | "@azure/core-util": "^1.2.0", 219 | "@azure/logger": "^1.0.0", 220 | "tslib": "^2.2.0" 221 | }, 222 | "engines": { 223 | "node": ">=18.0.0" 224 | } 225 | }, 226 | "node_modules/@azure/core-lro/node_modules/@azure/abort-controller": { 227 | "version": "2.0.0", 228 | "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.0.0.tgz", 229 | "integrity": "sha512-RP/mR/WJchR+g+nQFJGOec+nzeN/VvjlwbinccoqfhTsTHbb8X5+mLDp48kHT0ueyum0BNSwGm0kX0UZuIqTGg==", 230 | "dependencies": { 231 | "tslib": "^2.2.0" 232 | }, 233 | "engines": { 234 | "node": ">=18.0.0" 235 | } 236 | }, 237 | "node_modules/@azure/core-paging": { 238 | "version": "1.5.0", 239 | "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.5.0.tgz", 240 | "integrity": "sha512-zqWdVIt+2Z+3wqxEOGzR5hXFZ8MGKK52x4vFLw8n58pR6ZfKRx3EXYTxTaYxYHc/PexPUTyimcTWFJbji9Z6Iw==", 241 | "dependencies": { 242 | "tslib": "^2.2.0" 243 | }, 244 | "engines": { 245 | "node": ">=14.0.0" 246 | } 247 | }, 248 | "node_modules/@azure/core-tracing": { 249 | "version": "1.0.0-preview.13", 250 | "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", 251 | "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", 252 | "dependencies": { 253 | "@opentelemetry/api": "^1.0.1", 254 | "tslib": "^2.2.0" 255 | }, 256 | "engines": { 257 | "node": ">=12.0.0" 258 | } 259 | }, 260 | "node_modules/@azure/core-util": { 261 | "version": "1.7.0", 262 | "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.7.0.tgz", 263 | "integrity": "sha512-Zq2i3QO6k9DA8vnm29mYM4G8IE9u1mhF1GUabVEqPNX8Lj833gdxQ2NAFxt2BZsfAL+e9cT8SyVN7dFVJ/Hf0g==", 264 | "dependencies": { 265 | "@azure/abort-controller": "^2.0.0", 266 | "tslib": "^2.2.0" 267 | }, 268 | "engines": { 269 | "node": ">=18.0.0" 270 | } 271 | }, 272 | "node_modules/@azure/core-util/node_modules/@azure/abort-controller": { 273 | "version": "2.0.0", 274 | "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.0.0.tgz", 275 | "integrity": "sha512-RP/mR/WJchR+g+nQFJGOec+nzeN/VvjlwbinccoqfhTsTHbb8X5+mLDp48kHT0ueyum0BNSwGm0kX0UZuIqTGg==", 276 | "dependencies": { 277 | "tslib": "^2.2.0" 278 | }, 279 | "engines": { 280 | "node": ">=18.0.0" 281 | } 282 | }, 283 | "node_modules/@azure/logger": { 284 | "version": "1.0.4", 285 | "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.4.tgz", 286 | "integrity": "sha512-ustrPY8MryhloQj7OWGe+HrYx+aoiOxzbXTtgblbV3xwCqpzUK36phH3XNHQKj3EPonyFUuDTfR3qFhTEAuZEg==", 287 | "dependencies": { 288 | "tslib": "^2.2.0" 289 | }, 290 | "engines": { 291 | "node": ">=14.0.0" 292 | } 293 | }, 294 | "node_modules/@azure/ms-rest-js": { 295 | "version": "2.7.0", 296 | "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.7.0.tgz", 297 | "integrity": "sha512-ngbzWbqF+NmztDOpLBVDxYM+XLcUj7nKhxGbSU9WtIsXfRB//cf2ZbAG5HkOrhU9/wd/ORRB6lM/d69RKVjiyA==", 298 | "dependencies": { 299 | "@azure/core-auth": "^1.1.4", 300 | "abort-controller": "^3.0.0", 301 | "form-data": "^2.5.0", 302 | "node-fetch": "^2.6.7", 303 | "tslib": "^1.10.0", 304 | "tunnel": "0.0.6", 305 | "uuid": "^8.3.2", 306 | "xml2js": "^0.5.0" 307 | } 308 | }, 309 | "node_modules/@azure/ms-rest-js/node_modules/tslib": { 310 | "version": "1.14.1", 311 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 312 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" 313 | }, 314 | "node_modules/@azure/ms-rest-js/node_modules/uuid": { 315 | "version": "8.3.2", 316 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 317 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", 318 | "bin": { 319 | "uuid": "dist/bin/uuid" 320 | } 321 | }, 322 | "node_modules/@azure/storage-blob": { 323 | "version": "12.17.0", 324 | "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.17.0.tgz", 325 | "integrity": "sha512-sM4vpsCpcCApagRW5UIjQNlNylo02my2opgp0Emi8x888hZUvJ3dN69Oq20cEGXkMUWnoCrBaB0zyS3yeB87sQ==", 326 | "dependencies": { 327 | "@azure/abort-controller": "^1.0.0", 328 | "@azure/core-http": "^3.0.0", 329 | "@azure/core-lro": "^2.2.0", 330 | "@azure/core-paging": "^1.1.1", 331 | "@azure/core-tracing": "1.0.0-preview.13", 332 | "@azure/logger": "^1.0.0", 333 | "events": "^3.0.0", 334 | "tslib": "^2.2.0" 335 | }, 336 | "engines": { 337 | "node": ">=14.0.0" 338 | } 339 | }, 340 | "node_modules/@fastify/busboy": { 341 | "version": "2.1.0", 342 | "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", 343 | "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==", 344 | "engines": { 345 | "node": ">=14" 346 | } 347 | }, 348 | "node_modules/@octokit/auth-token": { 349 | "version": "4.0.0", 350 | "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", 351 | "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", 352 | "engines": { 353 | "node": ">= 18" 354 | } 355 | }, 356 | "node_modules/@octokit/core": { 357 | "version": "5.1.0", 358 | "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.1.0.tgz", 359 | "integrity": "sha512-BDa2VAMLSh3otEiaMJ/3Y36GU4qf6GI+VivQ/P41NC6GHcdxpKlqV0ikSZ5gdQsmS3ojXeRx5vasgNTinF0Q4g==", 360 | "dependencies": { 361 | "@octokit/auth-token": "^4.0.0", 362 | "@octokit/graphql": "^7.0.0", 363 | "@octokit/request": "^8.0.2", 364 | "@octokit/request-error": "^5.0.0", 365 | "@octokit/types": "^12.0.0", 366 | "before-after-hook": "^2.2.0", 367 | "universal-user-agent": "^6.0.0" 368 | }, 369 | "engines": { 370 | "node": ">= 18" 371 | } 372 | }, 373 | "node_modules/@octokit/endpoint": { 374 | "version": "9.0.4", 375 | "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz", 376 | "integrity": "sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==", 377 | "dependencies": { 378 | "@octokit/types": "^12.0.0", 379 | "universal-user-agent": "^6.0.0" 380 | }, 381 | "engines": { 382 | "node": ">= 18" 383 | } 384 | }, 385 | "node_modules/@octokit/graphql": { 386 | "version": "7.0.2", 387 | "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz", 388 | "integrity": "sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==", 389 | "dependencies": { 390 | "@octokit/request": "^8.0.1", 391 | "@octokit/types": "^12.0.0", 392 | "universal-user-agent": "^6.0.0" 393 | }, 394 | "engines": { 395 | "node": ">= 18" 396 | } 397 | }, 398 | "node_modules/@octokit/openapi-types": { 399 | "version": "19.1.0", 400 | "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.1.0.tgz", 401 | "integrity": "sha512-6G+ywGClliGQwRsjvqVYpklIfa7oRPA0vyhPQG/1Feh+B+wU0vGH1JiJ5T25d3g1JZYBHzR2qefLi9x8Gt+cpw==" 402 | }, 403 | "node_modules/@octokit/plugin-paginate-rest": { 404 | "version": "9.1.5", 405 | "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.1.5.tgz", 406 | "integrity": "sha512-WKTQXxK+bu49qzwv4qKbMMRXej1DU2gq017euWyKVudA6MldaSSQuxtz+vGbhxV4CjxpUxjZu6rM2wfc1FiWVg==", 407 | "dependencies": { 408 | "@octokit/types": "^12.4.0" 409 | }, 410 | "engines": { 411 | "node": ">= 18" 412 | }, 413 | "peerDependencies": { 414 | "@octokit/core": ">=5" 415 | } 416 | }, 417 | "node_modules/@octokit/plugin-rest-endpoint-methods": { 418 | "version": "10.2.0", 419 | "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.2.0.tgz", 420 | "integrity": "sha512-ePbgBMYtGoRNXDyKGvr9cyHjQ163PbwD0y1MkDJCpkO2YH4OeXX40c4wYHKikHGZcpGPbcRLuy0unPUuafco8Q==", 421 | "dependencies": { 422 | "@octokit/types": "^12.3.0" 423 | }, 424 | "engines": { 425 | "node": ">= 18" 426 | }, 427 | "peerDependencies": { 428 | "@octokit/core": ">=5" 429 | } 430 | }, 431 | "node_modules/@octokit/request": { 432 | "version": "8.1.6", 433 | "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.6.tgz", 434 | "integrity": "sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ==", 435 | "dependencies": { 436 | "@octokit/endpoint": "^9.0.0", 437 | "@octokit/request-error": "^5.0.0", 438 | "@octokit/types": "^12.0.0", 439 | "universal-user-agent": "^6.0.0" 440 | }, 441 | "engines": { 442 | "node": ">= 18" 443 | } 444 | }, 445 | "node_modules/@octokit/request-error": { 446 | "version": "5.0.1", 447 | "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz", 448 | "integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==", 449 | "dependencies": { 450 | "@octokit/types": "^12.0.0", 451 | "deprecation": "^2.0.0", 452 | "once": "^1.4.0" 453 | }, 454 | "engines": { 455 | "node": ">= 18" 456 | } 457 | }, 458 | "node_modules/@octokit/types": { 459 | "version": "12.4.0", 460 | "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.4.0.tgz", 461 | "integrity": "sha512-FLWs/AvZllw/AGVs+nJ+ELCDZZJk+kY0zMen118xhL2zD0s1etIUHm1odgjP7epxYU1ln7SZxEUWYop5bhsdgQ==", 462 | "dependencies": { 463 | "@octokit/openapi-types": "^19.1.0" 464 | } 465 | }, 466 | "node_modules/@opentelemetry/api": { 467 | "version": "1.7.0", 468 | "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.7.0.tgz", 469 | "integrity": "sha512-AdY5wvN0P2vXBi3b29hxZgSFvdhdxPB9+f0B6s//P9Q8nibRWeA3cHm8UmLpio9ABigkVHJ5NMPk+Mz8VCCyrw==", 470 | "engines": { 471 | "node": ">=8.0.0" 472 | } 473 | }, 474 | "node_modules/@types/node": { 475 | "version": "20.11.16", 476 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", 477 | "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", 478 | "dependencies": { 479 | "undici-types": "~5.26.4" 480 | } 481 | }, 482 | "node_modules/@types/node-fetch": { 483 | "version": "2.6.11", 484 | "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz", 485 | "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==", 486 | "dependencies": { 487 | "@types/node": "*", 488 | "form-data": "^4.0.0" 489 | } 490 | }, 491 | "node_modules/@types/node-fetch/node_modules/form-data": { 492 | "version": "4.0.0", 493 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 494 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 495 | "dependencies": { 496 | "asynckit": "^0.4.0", 497 | "combined-stream": "^1.0.8", 498 | "mime-types": "^2.1.12" 499 | }, 500 | "engines": { 501 | "node": ">= 6" 502 | } 503 | }, 504 | "node_modules/@types/semver": { 505 | "version": "7.5.8", 506 | "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", 507 | "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", 508 | "dev": true 509 | }, 510 | "node_modules/@types/tunnel": { 511 | "version": "0.0.3", 512 | "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.3.tgz", 513 | "integrity": "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==", 514 | "dependencies": { 515 | "@types/node": "*" 516 | } 517 | }, 518 | "node_modules/@vercel/ncc": { 519 | "version": "0.38.1", 520 | "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.1.tgz", 521 | "integrity": "sha512-IBBb+iI2NLu4VQn3Vwldyi2QwaXt5+hTyh58ggAMoCGE6DJmPvwL3KPBWcJl1m9LYPChBLE980Jw+CS4Wokqxw==", 522 | "dev": true, 523 | "bin": { 524 | "ncc": "dist/ncc/cli.js" 525 | } 526 | }, 527 | "node_modules/abort-controller": { 528 | "version": "3.0.0", 529 | "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", 530 | "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", 531 | "dependencies": { 532 | "event-target-shim": "^5.0.0" 533 | }, 534 | "engines": { 535 | "node": ">=6.5" 536 | } 537 | }, 538 | "node_modules/asynckit": { 539 | "version": "0.4.0", 540 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 541 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 542 | }, 543 | "node_modules/balanced-match": { 544 | "version": "1.0.2", 545 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 546 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" 547 | }, 548 | "node_modules/before-after-hook": { 549 | "version": "2.2.3", 550 | "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", 551 | "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" 552 | }, 553 | "node_modules/brace-expansion": { 554 | "version": "1.1.11", 555 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 556 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 557 | "dependencies": { 558 | "balanced-match": "^1.0.0", 559 | "concat-map": "0.0.1" 560 | } 561 | }, 562 | "node_modules/cachedir": { 563 | "version": "2.4.0", 564 | "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.4.0.tgz", 565 | "integrity": "sha512-9EtFOZR8g22CL7BWjJ9BUx1+A/djkofnyW3aOXZORNW2kxoUpx2h+uN2cOqwPmFhnpVmxg+KW2OjOSgChTEvsQ==", 566 | "engines": { 567 | "node": ">=6" 568 | } 569 | }, 570 | "node_modules/combined-stream": { 571 | "version": "1.0.8", 572 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 573 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 574 | "dependencies": { 575 | "delayed-stream": "~1.0.0" 576 | }, 577 | "engines": { 578 | "node": ">= 0.8" 579 | } 580 | }, 581 | "node_modules/concat-map": { 582 | "version": "0.0.1", 583 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 584 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" 585 | }, 586 | "node_modules/delayed-stream": { 587 | "version": "1.0.0", 588 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 589 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 590 | "engines": { 591 | "node": ">=0.4.0" 592 | } 593 | }, 594 | "node_modules/deprecation": { 595 | "version": "2.3.1", 596 | "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", 597 | "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" 598 | }, 599 | "node_modules/event-target-shim": { 600 | "version": "5.0.1", 601 | "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", 602 | "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", 603 | "engines": { 604 | "node": ">=6" 605 | } 606 | }, 607 | "node_modules/events": { 608 | "version": "3.3.0", 609 | "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", 610 | "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", 611 | "engines": { 612 | "node": ">=0.8.x" 613 | } 614 | }, 615 | "node_modules/form-data": { 616 | "version": "2.5.1", 617 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", 618 | "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", 619 | "dependencies": { 620 | "asynckit": "^0.4.0", 621 | "combined-stream": "^1.0.6", 622 | "mime-types": "^2.1.12" 623 | }, 624 | "engines": { 625 | "node": ">= 0.12" 626 | } 627 | }, 628 | "node_modules/lru-cache": { 629 | "version": "6.0.0", 630 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 631 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 632 | "dependencies": { 633 | "yallist": "^4.0.0" 634 | }, 635 | "engines": { 636 | "node": ">=10" 637 | } 638 | }, 639 | "node_modules/mime-db": { 640 | "version": "1.52.0", 641 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 642 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 643 | "engines": { 644 | "node": ">= 0.6" 645 | } 646 | }, 647 | "node_modules/mime-types": { 648 | "version": "2.1.35", 649 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 650 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 651 | "dependencies": { 652 | "mime-db": "1.52.0" 653 | }, 654 | "engines": { 655 | "node": ">= 0.6" 656 | } 657 | }, 658 | "node_modules/minimatch": { 659 | "version": "3.1.2", 660 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 661 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 662 | "dependencies": { 663 | "brace-expansion": "^1.1.7" 664 | }, 665 | "engines": { 666 | "node": "*" 667 | } 668 | }, 669 | "node_modules/node-fetch": { 670 | "version": "2.7.0", 671 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", 672 | "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", 673 | "dependencies": { 674 | "whatwg-url": "^5.0.0" 675 | }, 676 | "engines": { 677 | "node": "4.x || >=6.0.0" 678 | }, 679 | "peerDependencies": { 680 | "encoding": "^0.1.0" 681 | }, 682 | "peerDependenciesMeta": { 683 | "encoding": { 684 | "optional": true 685 | } 686 | } 687 | }, 688 | "node_modules/once": { 689 | "version": "1.4.0", 690 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 691 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 692 | "dependencies": { 693 | "wrappy": "1" 694 | } 695 | }, 696 | "node_modules/prettier": { 697 | "version": "3.2.5", 698 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", 699 | "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", 700 | "dev": true, 701 | "bin": { 702 | "prettier": "bin/prettier.cjs" 703 | }, 704 | "engines": { 705 | "node": ">=14" 706 | }, 707 | "funding": { 708 | "url": "https://github.com/prettier/prettier?sponsor=1" 709 | } 710 | }, 711 | "node_modules/process": { 712 | "version": "0.11.10", 713 | "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", 714 | "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", 715 | "engines": { 716 | "node": ">= 0.6.0" 717 | } 718 | }, 719 | "node_modules/sax": { 720 | "version": "1.3.0", 721 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", 722 | "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" 723 | }, 724 | "node_modules/semver": { 725 | "version": "7.6.0", 726 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", 727 | "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", 728 | "dependencies": { 729 | "lru-cache": "^6.0.0" 730 | }, 731 | "bin": { 732 | "semver": "bin/semver.js" 733 | }, 734 | "engines": { 735 | "node": ">=10" 736 | } 737 | }, 738 | "node_modules/tr46": { 739 | "version": "0.0.3", 740 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", 741 | "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" 742 | }, 743 | "node_modules/tslib": { 744 | "version": "2.6.2", 745 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", 746 | "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" 747 | }, 748 | "node_modules/tunnel": { 749 | "version": "0.0.6", 750 | "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", 751 | "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", 752 | "engines": { 753 | "node": ">=0.6.11 <=0.7.0 || >=0.7.3" 754 | } 755 | }, 756 | "node_modules/typescript": { 757 | "version": "5.4.2", 758 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", 759 | "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", 760 | "dev": true, 761 | "bin": { 762 | "tsc": "bin/tsc", 763 | "tsserver": "bin/tsserver" 764 | }, 765 | "engines": { 766 | "node": ">=14.17" 767 | } 768 | }, 769 | "node_modules/undici": { 770 | "version": "5.28.3", 771 | "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", 772 | "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", 773 | "dependencies": { 774 | "@fastify/busboy": "^2.0.0" 775 | }, 776 | "engines": { 777 | "node": ">=14.0" 778 | } 779 | }, 780 | "node_modules/undici-types": { 781 | "version": "5.26.5", 782 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", 783 | "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" 784 | }, 785 | "node_modules/universal-user-agent": { 786 | "version": "6.0.1", 787 | "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz", 788 | "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==" 789 | }, 790 | "node_modules/uuid": { 791 | "version": "3.4.0", 792 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", 793 | "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", 794 | "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", 795 | "bin": { 796 | "uuid": "bin/uuid" 797 | } 798 | }, 799 | "node_modules/webidl-conversions": { 800 | "version": "3.0.1", 801 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", 802 | "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" 803 | }, 804 | "node_modules/whatwg-url": { 805 | "version": "5.0.0", 806 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", 807 | "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", 808 | "dependencies": { 809 | "tr46": "~0.0.3", 810 | "webidl-conversions": "^3.0.0" 811 | } 812 | }, 813 | "node_modules/wrappy": { 814 | "version": "1.0.2", 815 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 816 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" 817 | }, 818 | "node_modules/xml2js": { 819 | "version": "0.5.0", 820 | "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", 821 | "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", 822 | "dependencies": { 823 | "sax": ">=0.6.0", 824 | "xmlbuilder": "~11.0.0" 825 | }, 826 | "engines": { 827 | "node": ">=4.0.0" 828 | } 829 | }, 830 | "node_modules/xmlbuilder": { 831 | "version": "11.0.1", 832 | "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", 833 | "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", 834 | "engines": { 835 | "node": ">=4.0" 836 | } 837 | }, 838 | "node_modules/yallist": { 839 | "version": "4.0.0", 840 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 841 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" 842 | } 843 | } 844 | } 845 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "setup-bazelisk", 3 | "version": "1.0.0", 4 | "private": true, 5 | "description": "setup bazelisk action", 6 | "main": "lib/setup-bazelisk.js", 7 | "scripts": { 8 | "build": "tsc && ncc build", 9 | "format": "prettier --write **/*.ts", 10 | "format-check": "prettier --check **/*.ts", 11 | "pre-checkin": "npm run format && npm run build && npm test" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/mishas/setup-bazelisk-action.git" 16 | }, 17 | "keywords": [ 18 | "actions", 19 | "bazelisk", 20 | "setup" 21 | ], 22 | "author": "Misha Seltzer", 23 | "license": "MIT", 24 | "bugs": { 25 | "url": "https://github.com/mishas/setup-bazelisk-action/issues" 26 | }, 27 | "homepage": "https://github.com/mishas/setup-bazelisk-action#readme", 28 | "dependencies": { 29 | "@actions/cache": "^3.2.3", 30 | "@actions/core": "^1.10.1", 31 | "@actions/github": "^6.0.0", 32 | "@actions/http-client": "^2.2.1", 33 | "@actions/tool-cache": "^2.0.1", 34 | "cachedir": "^2.4.0", 35 | "semver": "^7.6.0" 36 | }, 37 | "devDependencies": { 38 | "@types/semver": "^7.5.8", 39 | "@vercel/ncc": "^0.38.1", 40 | "prettier": "^3.2.5", 41 | "typescript": "^5.4.2" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/installer.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core'; 2 | import * as github from '@actions/github'; 3 | import * as hc from '@actions/http-client'; 4 | import * as semver from 'semver'; 5 | import * as tc from '@actions/tool-cache'; 6 | import fs from 'fs'; 7 | import os from 'os'; 8 | 9 | export interface IBazeliskAsset { 10 | name: string; 11 | browser_download_url: string; 12 | } 13 | 14 | export interface IBazeliskVersion { 15 | tag_name: string; 16 | draft: boolean; 17 | prerelease: boolean; 18 | assets: IBazeliskAsset[]; 19 | } 20 | 21 | export async function getBazelisk( 22 | versionSpec: string, 23 | token: string 24 | ): Promise { 25 | const toolPath: string = tc.find('bazelisk', versionSpec); 26 | 27 | if (toolPath) { 28 | core.info(`Found in cache @ ${toolPath}`); 29 | return toolPath; 30 | } 31 | 32 | core.info(`Attempting to download ${versionSpec}...`); 33 | 34 | // Possible values are 'aix', 'darwin', 'freebsd', 'linux', 'openbsd', 'sunos' and 'win32'. 35 | // Bazelisk filenames use 'darwin', 'linux' and 'windows'. 36 | let osPlatform: string = os.platform(); 37 | // Possible values are 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390', 's390x' and 'x64'. 38 | // Bazelisk filenames use 'amd64' and 'arm64'. 39 | let osArch: string = os.arch(); 40 | if (osArch == 'x64') { 41 | osArch = 'amd64'; 42 | } 43 | let osFileName: string = `bazelisk-${osPlatform}-${osArch}`; 44 | if (osPlatform == 'win32') { 45 | osFileName = `bazelisk-windows-${osArch}.exe`; 46 | } 47 | 48 | const info = await findMatch(versionSpec, osFileName, token); 49 | if (!info) { 50 | throw new Error( 51 | `Unable to find Bazelisk version '${versionSpec}' for platform ${osPlatform} and arch ${osArch}.` 52 | ); 53 | } 54 | return await cacheBazelisk(info, osFileName, token); 55 | } 56 | 57 | async function cacheBazelisk( 58 | info: IBazeliskVersion, 59 | osFileName: string, 60 | token: string 61 | ): Promise { 62 | const downloadPrefix: string = 63 | 'https://github.com/bazelbuild/bazelisk/releases/download'; 64 | const downloadUrl: string = `${downloadPrefix}/${info.tag_name}/${osFileName}`; 65 | core.info(`Acquiring ${info.tag_name} from ${downloadUrl}`); 66 | const auth = `token ${token}`; 67 | const downloadPath: string = await tc.downloadTool( 68 | downloadUrl, 69 | undefined, 70 | auth 71 | ); 72 | 73 | core.info('Adding to the cache ...'); 74 | fs.chmodSync(downloadPath, '755'); 75 | const cachePath: string = await tc.cacheFile( 76 | downloadPath, 77 | 'bazel', 78 | 'bazelisk', 79 | info.tag_name 80 | ); 81 | core.info(`Successfully cached bazelisk to ${cachePath}`); 82 | return cachePath; 83 | } 84 | 85 | async function findMatch( 86 | versionSpec: string, 87 | osFileName: string, 88 | token: string 89 | ): Promise { 90 | let versions = new Map(); 91 | let bazeliskVersions = await getVersionsFromDist(token); 92 | 93 | bazeliskVersions.forEach((bazeliskVersion: IBazeliskVersion) => { 94 | const hasRelevantAsset: boolean = bazeliskVersion.assets.some( 95 | (asset: IBazeliskAsset) => { 96 | return asset.name == osFileName; 97 | } 98 | ); 99 | if (hasRelevantAsset) { 100 | const version: semver.SemVer | null = semver.coerce( 101 | bazeliskVersion.tag_name 102 | ); 103 | if (version) { 104 | versions.set(version.version, bazeliskVersion); 105 | } 106 | } 107 | }); 108 | 109 | // get the latest version that matches the version spec 110 | let version: string = evaluateVersions( 111 | Array.from(versions.keys()), 112 | versionSpec 113 | ); 114 | return versions.get(version); 115 | } 116 | 117 | async function getVersionsFromDist(token: string): Promise { 118 | const octokit = github.getOctokit(token); 119 | const {data: response} = await octokit.rest.repos.listReleases({ 120 | owner: 'bazelbuild', 121 | repo: 'bazelisk' 122 | }); 123 | return response || []; 124 | } 125 | 126 | // Copied from @actions/tool-cache. 127 | function evaluateVersions(versions: string[], versionSpec: string): string { 128 | let version = ''; 129 | core.debug(`evaluating ${versions.length} versions`); 130 | versions = versions.sort((a, b) => { 131 | if (semver.gt(a, b)) { 132 | return 1; 133 | } 134 | return -1; 135 | }); 136 | for (let i = versions.length - 1; i >= 0; i--) { 137 | const potential: string = versions[i]; 138 | const satisfied: boolean = semver.satisfies(potential, versionSpec); 139 | if (satisfied) { 140 | version = potential; 141 | break; 142 | } 143 | } 144 | 145 | if (version) { 146 | core.debug(`matched: ${version}`); 147 | } else { 148 | core.debug('match not found'); 149 | } 150 | 151 | return version; 152 | } 153 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import * as cache from '@actions/cache'; 2 | import * as core from '@actions/core'; 3 | import * as installer from './installer'; 4 | const cachedir = require('cachedir'); 5 | 6 | export async function run() { 7 | try { 8 | const versionSpec = core.getInput('bazelisk-version'); 9 | const token = core.getInput('token'); 10 | 11 | const installDir = await installer.getBazelisk(versionSpec, token); 12 | core.addPath(installDir); 13 | core.info('Added bazelisk to the path'); 14 | 15 | // Restore the cache area where bazelisk stores actual Bazel executables. 16 | const cacheDir: string = cachedir('bazelisk'); 17 | await cache.restoreCache([cacheDir], 'bazelisk'); 18 | core.info(`Restored bazelisk cache dir @ ${cacheDir}`); 19 | 20 | core.info(`Successfully setup bazelisk version ${versionSpec}`); 21 | } catch (error) { 22 | core.setFailed((error as Error).message); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/setup-bazelisk.ts: -------------------------------------------------------------------------------- 1 | import {run} from './main'; 2 | 3 | run(); 4 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ 4 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 5 | "lib": [ 6 | "es6", 7 | "dom" 8 | ], 9 | "outDir": "./lib", /* Redirect output structure to the directory. */ 10 | "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 11 | "strict": true, /* Enable all strict type-checking options. */ 12 | "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 13 | }, 14 | "exclude": ["node_modules", "**/*.test.ts"] 15 | } 16 | --------------------------------------------------------------------------------