├── .github └── workflows │ └── tests.yml ├── .gitignore ├── LICENSE ├── README.md ├── action.yml ├── dist ├── index.js └── package.json ├── package-lock.json ├── package.json ├── proxy ├── Dockerfile ├── go.mod ├── go.sum ├── proxy.go └── proxy_test.go ├── src └── action.ts └── tsconfig.json /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: tests 2 | on: 3 | push: 4 | branches: 5 | - master 6 | paths-ignore: 7 | - '**.md' 8 | pull_request: 9 | paths-ignore: 10 | - '**.md' 11 | 12 | jobs: 13 | test: 14 | runs-on: ubuntu-latest 15 | name: Test Proxy 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Proxy Integration Tests 19 | # Need it so ACTIONS_CACHE_URL and ACTIONS_RUNTIME_TOKEN are available 20 | uses: cedrickring/golang-action@1.6.0 21 | with: 22 | args: cd proxy && go test -v ./... 23 | - name: Push Image 24 | if: github.event_name == 'push' && github.ref == 'refs/heads/master' 25 | env: 26 | CR_PAT: ${{secrets.CR_PAT}} 27 | run: | 28 | echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin 29 | docker build proxy --tag ghcr.io/cirruslabs/actions-http-cache-proxy:latest 30 | docker push ghcr.io/cirruslabs/actions-http-cache-proxy:latest 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | node_modules/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Cirrus Labs 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 | # Action to run an HTTP Caching server 2 | 3 | Run a local server with an API compatible with build systems like Gradle, Bazel, Buck, Pants, etc. 4 | 5 | `/` endpoint supports `GET`, `POST`/`PUT` and `HEAD` methods for downloading, uploading and existence checking of a cache entry with `KEY` cache key. 6 | 7 | ## Inputs 8 | 9 | ### `port` 10 | 11 | **Optional** Port number to start the proxy on. By default, `12321` is used. 12 | 13 | ## Example usage 14 | 15 | ```yaml 16 | uses: cirruslabs/http-cache-action@master 17 | ``` 18 | 19 | After that you can reach the HTTP Caching Proxy via `http://localhost:12321/` 20 | 21 | ### Gradle Example 22 | 23 | ```yaml 24 | name: Tests 25 | on: [push, pull_request] 26 | 27 | jobs: 28 | test-gradle: 29 | runs-on: ubuntu-latest 30 | name: Gradle Check 31 | steps: 32 | - uses: actions/checkout@v2 33 | - uses: cirruslabs/http-cache-action@master 34 | - uses: actions/setup-java@v1 35 | with: 36 | java-version: 13 37 | - run: ./gradlew check 38 | ``` 39 | 40 | Don't forget to add the following to your `settings.gradle`: 41 | 42 | ```groovy 43 | ext.isCiServer = System.getenv().containsKey("CI") 44 | 45 | buildCache { 46 | local { 47 | enabled = !isCiServer 48 | } 49 | remote(HttpBuildCache) { 50 | url = 'http://' + System.getenv().getOrDefault("CIRRUS_HTTP_CACHE_HOST", "localhost:12321") + "/" 51 | enabled = isCiServer 52 | push = true 53 | } 54 | } 55 | ``` 56 | 57 | Or the following to your `settings.gradle.kts` if you are using Kotlin Script: 58 | 59 | 60 | ```kotlin 61 | val isCiServer = System.getenv().containsKey("CI") 62 | 63 | buildCache { 64 | local { 65 | isEnabled = !isCiServer 66 | } 67 | remote { 68 | val cacheHost = System.getenv().getOrDefault("CIRRUS_HTTP_CACHE_HOST", "localhost:12321") 69 | url = uri("http://$cacheHost/") 70 | isEnabled = isCiServer 71 | isPush = true 72 | } 73 | } 74 | ``` 75 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'HTTP Cache Proxy' 2 | description: 'Run HTTP Cache Proxy' 3 | branding: 4 | icon: 'box' 5 | color: gray-dark 6 | inputs: 7 | port: 8 | description: 'Port to run on' 9 | required: false 10 | default: '12321' 11 | 12 | runs: 13 | using: 'node12' 14 | main: 'dist/index.js' 15 | -------------------------------------------------------------------------------- /dist/index.js: -------------------------------------------------------------------------------- 1 | import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module"; 2 | /******/ var __webpack_modules__ = ({ 3 | 4 | /***/ 351: 5 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 6 | 7 | 8 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 9 | if (k2 === undefined) k2 = k; 10 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 11 | }) : (function(o, m, k, k2) { 12 | if (k2 === undefined) k2 = k; 13 | o[k2] = m[k]; 14 | })); 15 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 16 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 17 | }) : function(o, v) { 18 | o["default"] = v; 19 | }); 20 | var __importStar = (this && this.__importStar) || function (mod) { 21 | if (mod && mod.__esModule) return mod; 22 | var result = {}; 23 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 24 | __setModuleDefault(result, mod); 25 | return result; 26 | }; 27 | Object.defineProperty(exports, "__esModule", ({ value: true })); 28 | exports.issue = exports.issueCommand = void 0; 29 | const os = __importStar(__nccwpck_require__(37)); 30 | const utils_1 = __nccwpck_require__(278); 31 | /** 32 | * Commands 33 | * 34 | * Command Format: 35 | * ::name key=value,key=value::message 36 | * 37 | * Examples: 38 | * ::warning::This is the message 39 | * ::set-env name=MY_VAR::some value 40 | */ 41 | function issueCommand(command, properties, message) { 42 | const cmd = new Command(command, properties, message); 43 | process.stdout.write(cmd.toString() + os.EOL); 44 | } 45 | exports.issueCommand = issueCommand; 46 | function issue(name, message = '') { 47 | issueCommand(name, {}, message); 48 | } 49 | exports.issue = issue; 50 | const CMD_STRING = '::'; 51 | class Command { 52 | constructor(command, properties, message) { 53 | if (!command) { 54 | command = 'missing.command'; 55 | } 56 | this.command = command; 57 | this.properties = properties; 58 | this.message = message; 59 | } 60 | toString() { 61 | let cmdStr = CMD_STRING + this.command; 62 | if (this.properties && Object.keys(this.properties).length > 0) { 63 | cmdStr += ' '; 64 | let first = true; 65 | for (const key in this.properties) { 66 | if (this.properties.hasOwnProperty(key)) { 67 | const val = this.properties[key]; 68 | if (val) { 69 | if (first) { 70 | first = false; 71 | } 72 | else { 73 | cmdStr += ','; 74 | } 75 | cmdStr += `${key}=${escapeProperty(val)}`; 76 | } 77 | } 78 | } 79 | } 80 | cmdStr += `${CMD_STRING}${escapeData(this.message)}`; 81 | return cmdStr; 82 | } 83 | } 84 | function escapeData(s) { 85 | return utils_1.toCommandValue(s) 86 | .replace(/%/g, '%25') 87 | .replace(/\r/g, '%0D') 88 | .replace(/\n/g, '%0A'); 89 | } 90 | function escapeProperty(s) { 91 | return utils_1.toCommandValue(s) 92 | .replace(/%/g, '%25') 93 | .replace(/\r/g, '%0D') 94 | .replace(/\n/g, '%0A') 95 | .replace(/:/g, '%3A') 96 | .replace(/,/g, '%2C'); 97 | } 98 | //# sourceMappingURL=command.js.map 99 | 100 | /***/ }), 101 | 102 | /***/ 186: 103 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 104 | 105 | 106 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 107 | if (k2 === undefined) k2 = k; 108 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 109 | }) : (function(o, m, k, k2) { 110 | if (k2 === undefined) k2 = k; 111 | o[k2] = m[k]; 112 | })); 113 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 114 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 115 | }) : function(o, v) { 116 | o["default"] = v; 117 | }); 118 | var __importStar = (this && this.__importStar) || function (mod) { 119 | if (mod && mod.__esModule) return mod; 120 | var result = {}; 121 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 122 | __setModuleDefault(result, mod); 123 | return result; 124 | }; 125 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 126 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 127 | return new (P || (P = Promise))(function (resolve, reject) { 128 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 129 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 130 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 131 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 132 | }); 133 | }; 134 | Object.defineProperty(exports, "__esModule", ({ value: true })); 135 | exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; 136 | const command_1 = __nccwpck_require__(351); 137 | const file_command_1 = __nccwpck_require__(717); 138 | const utils_1 = __nccwpck_require__(278); 139 | const os = __importStar(__nccwpck_require__(37)); 140 | const path = __importStar(__nccwpck_require__(17)); 141 | const oidc_utils_1 = __nccwpck_require__(41); 142 | /** 143 | * The code to exit an action 144 | */ 145 | var ExitCode; 146 | (function (ExitCode) { 147 | /** 148 | * A code indicating that the action was successful 149 | */ 150 | ExitCode[ExitCode["Success"] = 0] = "Success"; 151 | /** 152 | * A code indicating that the action was a failure 153 | */ 154 | ExitCode[ExitCode["Failure"] = 1] = "Failure"; 155 | })(ExitCode = exports.ExitCode || (exports.ExitCode = {})); 156 | //----------------------------------------------------------------------- 157 | // Variables 158 | //----------------------------------------------------------------------- 159 | /** 160 | * Sets env variable for this action and future actions in the job 161 | * @param name the name of the variable to set 162 | * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify 163 | */ 164 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 165 | function exportVariable(name, val) { 166 | const convertedVal = utils_1.toCommandValue(val); 167 | process.env[name] = convertedVal; 168 | const filePath = process.env['GITHUB_ENV'] || ''; 169 | if (filePath) { 170 | const delimiter = '_GitHubActionsFileCommandDelimeter_'; 171 | const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; 172 | file_command_1.issueCommand('ENV', commandValue); 173 | } 174 | else { 175 | command_1.issueCommand('set-env', { name }, convertedVal); 176 | } 177 | } 178 | exports.exportVariable = exportVariable; 179 | /** 180 | * Registers a secret which will get masked from logs 181 | * @param secret value of the secret 182 | */ 183 | function setSecret(secret) { 184 | command_1.issueCommand('add-mask', {}, secret); 185 | } 186 | exports.setSecret = setSecret; 187 | /** 188 | * Prepends inputPath to the PATH (for this action and future actions) 189 | * @param inputPath 190 | */ 191 | function addPath(inputPath) { 192 | const filePath = process.env['GITHUB_PATH'] || ''; 193 | if (filePath) { 194 | file_command_1.issueCommand('PATH', inputPath); 195 | } 196 | else { 197 | command_1.issueCommand('add-path', {}, inputPath); 198 | } 199 | process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; 200 | } 201 | exports.addPath = addPath; 202 | /** 203 | * Gets the value of an input. 204 | * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. 205 | * Returns an empty string if the value is not defined. 206 | * 207 | * @param name name of the input to get 208 | * @param options optional. See InputOptions. 209 | * @returns string 210 | */ 211 | function getInput(name, options) { 212 | const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; 213 | if (options && options.required && !val) { 214 | throw new Error(`Input required and not supplied: ${name}`); 215 | } 216 | if (options && options.trimWhitespace === false) { 217 | return val; 218 | } 219 | return val.trim(); 220 | } 221 | exports.getInput = getInput; 222 | /** 223 | * Gets the values of an multiline input. Each value is also trimmed. 224 | * 225 | * @param name name of the input to get 226 | * @param options optional. See InputOptions. 227 | * @returns string[] 228 | * 229 | */ 230 | function getMultilineInput(name, options) { 231 | const inputs = getInput(name, options) 232 | .split('\n') 233 | .filter(x => x !== ''); 234 | return inputs; 235 | } 236 | exports.getMultilineInput = getMultilineInput; 237 | /** 238 | * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. 239 | * Support boolean input list: `true | True | TRUE | false | False | FALSE` . 240 | * The return value is also in boolean type. 241 | * ref: https://yaml.org/spec/1.2/spec.html#id2804923 242 | * 243 | * @param name name of the input to get 244 | * @param options optional. See InputOptions. 245 | * @returns boolean 246 | */ 247 | function getBooleanInput(name, options) { 248 | const trueValue = ['true', 'True', 'TRUE']; 249 | const falseValue = ['false', 'False', 'FALSE']; 250 | const val = getInput(name, options); 251 | if (trueValue.includes(val)) 252 | return true; 253 | if (falseValue.includes(val)) 254 | return false; 255 | throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + 256 | `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); 257 | } 258 | exports.getBooleanInput = getBooleanInput; 259 | /** 260 | * Sets the value of an output. 261 | * 262 | * @param name name of the output to set 263 | * @param value value to store. Non-string values will be converted to a string via JSON.stringify 264 | */ 265 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 266 | function setOutput(name, value) { 267 | process.stdout.write(os.EOL); 268 | command_1.issueCommand('set-output', { name }, value); 269 | } 270 | exports.setOutput = setOutput; 271 | /** 272 | * Enables or disables the echoing of commands into stdout for the rest of the step. 273 | * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. 274 | * 275 | */ 276 | function setCommandEcho(enabled) { 277 | command_1.issue('echo', enabled ? 'on' : 'off'); 278 | } 279 | exports.setCommandEcho = setCommandEcho; 280 | //----------------------------------------------------------------------- 281 | // Results 282 | //----------------------------------------------------------------------- 283 | /** 284 | * Sets the action status to failed. 285 | * When the action exits it will be with an exit code of 1 286 | * @param message add error issue message 287 | */ 288 | function setFailed(message) { 289 | process.exitCode = ExitCode.Failure; 290 | error(message); 291 | } 292 | exports.setFailed = setFailed; 293 | //----------------------------------------------------------------------- 294 | // Logging Commands 295 | //----------------------------------------------------------------------- 296 | /** 297 | * Gets whether Actions Step Debug is on or not 298 | */ 299 | function isDebug() { 300 | return process.env['RUNNER_DEBUG'] === '1'; 301 | } 302 | exports.isDebug = isDebug; 303 | /** 304 | * Writes debug message to user log 305 | * @param message debug message 306 | */ 307 | function debug(message) { 308 | command_1.issueCommand('debug', {}, message); 309 | } 310 | exports.debug = debug; 311 | /** 312 | * Adds an error issue 313 | * @param message error issue message. Errors will be converted to string via toString() 314 | * @param properties optional properties to add to the annotation. 315 | */ 316 | function error(message, properties = {}) { 317 | command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); 318 | } 319 | exports.error = error; 320 | /** 321 | * Adds a warning issue 322 | * @param message warning issue message. Errors will be converted to string via toString() 323 | * @param properties optional properties to add to the annotation. 324 | */ 325 | function warning(message, properties = {}) { 326 | command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); 327 | } 328 | exports.warning = warning; 329 | /** 330 | * Adds a notice issue 331 | * @param message notice issue message. Errors will be converted to string via toString() 332 | * @param properties optional properties to add to the annotation. 333 | */ 334 | function notice(message, properties = {}) { 335 | command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); 336 | } 337 | exports.notice = notice; 338 | /** 339 | * Writes info to log with console.log. 340 | * @param message info message 341 | */ 342 | function info(message) { 343 | process.stdout.write(message + os.EOL); 344 | } 345 | exports.info = info; 346 | /** 347 | * Begin an output group. 348 | * 349 | * Output until the next `groupEnd` will be foldable in this group 350 | * 351 | * @param name The name of the output group 352 | */ 353 | function startGroup(name) { 354 | command_1.issue('group', name); 355 | } 356 | exports.startGroup = startGroup; 357 | /** 358 | * End an output group. 359 | */ 360 | function endGroup() { 361 | command_1.issue('endgroup'); 362 | } 363 | exports.endGroup = endGroup; 364 | /** 365 | * Wrap an asynchronous function call in a group. 366 | * 367 | * Returns the same type as the function itself. 368 | * 369 | * @param name The name of the group 370 | * @param fn The function to wrap in the group 371 | */ 372 | function group(name, fn) { 373 | return __awaiter(this, void 0, void 0, function* () { 374 | startGroup(name); 375 | let result; 376 | try { 377 | result = yield fn(); 378 | } 379 | finally { 380 | endGroup(); 381 | } 382 | return result; 383 | }); 384 | } 385 | exports.group = group; 386 | //----------------------------------------------------------------------- 387 | // Wrapper action state 388 | //----------------------------------------------------------------------- 389 | /** 390 | * Saves state for current action, the state can only be retrieved by this action's post job execution. 391 | * 392 | * @param name name of the state to store 393 | * @param value value to store. Non-string values will be converted to a string via JSON.stringify 394 | */ 395 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 396 | function saveState(name, value) { 397 | command_1.issueCommand('save-state', { name }, value); 398 | } 399 | exports.saveState = saveState; 400 | /** 401 | * Gets the value of an state set by this action's main execution. 402 | * 403 | * @param name name of the state to get 404 | * @returns string 405 | */ 406 | function getState(name) { 407 | return process.env[`STATE_${name}`] || ''; 408 | } 409 | exports.getState = getState; 410 | function getIDToken(aud) { 411 | return __awaiter(this, void 0, void 0, function* () { 412 | return yield oidc_utils_1.OidcClient.getIDToken(aud); 413 | }); 414 | } 415 | exports.getIDToken = getIDToken; 416 | //# sourceMappingURL=core.js.map 417 | 418 | /***/ }), 419 | 420 | /***/ 717: 421 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 422 | 423 | 424 | // For internal use, subject to change. 425 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 426 | if (k2 === undefined) k2 = k; 427 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 428 | }) : (function(o, m, k, k2) { 429 | if (k2 === undefined) k2 = k; 430 | o[k2] = m[k]; 431 | })); 432 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 433 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 434 | }) : function(o, v) { 435 | o["default"] = v; 436 | }); 437 | var __importStar = (this && this.__importStar) || function (mod) { 438 | if (mod && mod.__esModule) return mod; 439 | var result = {}; 440 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 441 | __setModuleDefault(result, mod); 442 | return result; 443 | }; 444 | Object.defineProperty(exports, "__esModule", ({ value: true })); 445 | exports.issueCommand = void 0; 446 | // We use any as a valid input type 447 | /* eslint-disable @typescript-eslint/no-explicit-any */ 448 | const fs = __importStar(__nccwpck_require__(147)); 449 | const os = __importStar(__nccwpck_require__(37)); 450 | const utils_1 = __nccwpck_require__(278); 451 | function issueCommand(command, message) { 452 | const filePath = process.env[`GITHUB_${command}`]; 453 | if (!filePath) { 454 | throw new Error(`Unable to find environment variable for file command ${command}`); 455 | } 456 | if (!fs.existsSync(filePath)) { 457 | throw new Error(`Missing file at path: ${filePath}`); 458 | } 459 | fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { 460 | encoding: 'utf8' 461 | }); 462 | } 463 | exports.issueCommand = issueCommand; 464 | //# sourceMappingURL=file-command.js.map 465 | 466 | /***/ }), 467 | 468 | /***/ 41: 469 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 470 | 471 | 472 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 473 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 474 | return new (P || (P = Promise))(function (resolve, reject) { 475 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 476 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 477 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 478 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 479 | }); 480 | }; 481 | Object.defineProperty(exports, "__esModule", ({ value: true })); 482 | exports.OidcClient = void 0; 483 | const http_client_1 = __nccwpck_require__(925); 484 | const auth_1 = __nccwpck_require__(702); 485 | const core_1 = __nccwpck_require__(186); 486 | class OidcClient { 487 | static createHttpClient(allowRetry = true, maxRetry = 10) { 488 | const requestOptions = { 489 | allowRetries: allowRetry, 490 | maxRetries: maxRetry 491 | }; 492 | return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); 493 | } 494 | static getRequestToken() { 495 | const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; 496 | if (!token) { 497 | throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); 498 | } 499 | return token; 500 | } 501 | static getIDTokenUrl() { 502 | const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; 503 | if (!runtimeUrl) { 504 | throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); 505 | } 506 | return runtimeUrl; 507 | } 508 | static getCall(id_token_url) { 509 | var _a; 510 | return __awaiter(this, void 0, void 0, function* () { 511 | const httpclient = OidcClient.createHttpClient(); 512 | const res = yield httpclient 513 | .getJson(id_token_url) 514 | .catch(error => { 515 | throw new Error(`Failed to get ID Token. \n 516 | Error Code : ${error.statusCode}\n 517 | Error Message: ${error.result.message}`); 518 | }); 519 | const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; 520 | if (!id_token) { 521 | throw new Error('Response json body do not have ID Token field'); 522 | } 523 | return id_token; 524 | }); 525 | } 526 | static getIDToken(audience) { 527 | return __awaiter(this, void 0, void 0, function* () { 528 | try { 529 | // New ID Token is requested from action service 530 | let id_token_url = OidcClient.getIDTokenUrl(); 531 | if (audience) { 532 | const encodedAudience = encodeURIComponent(audience); 533 | id_token_url = `${id_token_url}&audience=${encodedAudience}`; 534 | } 535 | core_1.debug(`ID token url is ${id_token_url}`); 536 | const id_token = yield OidcClient.getCall(id_token_url); 537 | core_1.setSecret(id_token); 538 | return id_token; 539 | } 540 | catch (error) { 541 | throw new Error(`Error message: ${error.message}`); 542 | } 543 | }); 544 | } 545 | } 546 | exports.OidcClient = OidcClient; 547 | //# sourceMappingURL=oidc-utils.js.map 548 | 549 | /***/ }), 550 | 551 | /***/ 278: 552 | /***/ ((__unused_webpack_module, exports) => { 553 | 554 | 555 | // We use any as a valid input type 556 | /* eslint-disable @typescript-eslint/no-explicit-any */ 557 | Object.defineProperty(exports, "__esModule", ({ value: true })); 558 | exports.toCommandProperties = exports.toCommandValue = void 0; 559 | /** 560 | * Sanitizes an input into a string so it can be passed into issueCommand safely 561 | * @param input input to sanitize into a string 562 | */ 563 | function toCommandValue(input) { 564 | if (input === null || input === undefined) { 565 | return ''; 566 | } 567 | else if (typeof input === 'string' || input instanceof String) { 568 | return input; 569 | } 570 | return JSON.stringify(input); 571 | } 572 | exports.toCommandValue = toCommandValue; 573 | /** 574 | * 575 | * @param annotationProperties 576 | * @returns The command properties to send with the actual annotation command 577 | * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 578 | */ 579 | function toCommandProperties(annotationProperties) { 580 | if (!Object.keys(annotationProperties).length) { 581 | return {}; 582 | } 583 | return { 584 | title: annotationProperties.title, 585 | file: annotationProperties.file, 586 | line: annotationProperties.startLine, 587 | endLine: annotationProperties.endLine, 588 | col: annotationProperties.startColumn, 589 | endColumn: annotationProperties.endColumn 590 | }; 591 | } 592 | exports.toCommandProperties = toCommandProperties; 593 | //# sourceMappingURL=utils.js.map 594 | 595 | /***/ }), 596 | 597 | /***/ 514: 598 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 599 | 600 | 601 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 602 | if (k2 === undefined) k2 = k; 603 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 604 | }) : (function(o, m, k, k2) { 605 | if (k2 === undefined) k2 = k; 606 | o[k2] = m[k]; 607 | })); 608 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 609 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 610 | }) : function(o, v) { 611 | o["default"] = v; 612 | }); 613 | var __importStar = (this && this.__importStar) || function (mod) { 614 | if (mod && mod.__esModule) return mod; 615 | var result = {}; 616 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 617 | __setModuleDefault(result, mod); 618 | return result; 619 | }; 620 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 621 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 622 | return new (P || (P = Promise))(function (resolve, reject) { 623 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 624 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 625 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 626 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 627 | }); 628 | }; 629 | Object.defineProperty(exports, "__esModule", ({ value: true })); 630 | exports.getExecOutput = exports.exec = void 0; 631 | const string_decoder_1 = __nccwpck_require__(576); 632 | const tr = __importStar(__nccwpck_require__(159)); 633 | /** 634 | * Exec a command. 635 | * Output will be streamed to the live console. 636 | * Returns promise with return code 637 | * 638 | * @param commandLine command to execute (can include additional args). Must be correctly escaped. 639 | * @param args optional arguments for tool. Escaping is handled by the lib. 640 | * @param options optional exec options. See ExecOptions 641 | * @returns Promise exit code 642 | */ 643 | function exec(commandLine, args, options) { 644 | return __awaiter(this, void 0, void 0, function* () { 645 | const commandArgs = tr.argStringToArray(commandLine); 646 | if (commandArgs.length === 0) { 647 | throw new Error(`Parameter 'commandLine' cannot be null or empty.`); 648 | } 649 | // Path to tool to execute should be first arg 650 | const toolPath = commandArgs[0]; 651 | args = commandArgs.slice(1).concat(args || []); 652 | const runner = new tr.ToolRunner(toolPath, args, options); 653 | return runner.exec(); 654 | }); 655 | } 656 | exports.exec = exec; 657 | /** 658 | * Exec a command and get the output. 659 | * Output will be streamed to the live console. 660 | * Returns promise with the exit code and collected stdout and stderr 661 | * 662 | * @param commandLine command to execute (can include additional args). Must be correctly escaped. 663 | * @param args optional arguments for tool. Escaping is handled by the lib. 664 | * @param options optional exec options. See ExecOptions 665 | * @returns Promise exit code, stdout, and stderr 666 | */ 667 | function getExecOutput(commandLine, args, options) { 668 | var _a, _b; 669 | return __awaiter(this, void 0, void 0, function* () { 670 | let stdout = ''; 671 | let stderr = ''; 672 | //Using string decoder covers the case where a mult-byte character is split 673 | const stdoutDecoder = new string_decoder_1.StringDecoder('utf8'); 674 | const stderrDecoder = new string_decoder_1.StringDecoder('utf8'); 675 | const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; 676 | const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; 677 | const stdErrListener = (data) => { 678 | stderr += stderrDecoder.write(data); 679 | if (originalStdErrListener) { 680 | originalStdErrListener(data); 681 | } 682 | }; 683 | const stdOutListener = (data) => { 684 | stdout += stdoutDecoder.write(data); 685 | if (originalStdoutListener) { 686 | originalStdoutListener(data); 687 | } 688 | }; 689 | const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); 690 | const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); 691 | //flush any remaining characters 692 | stdout += stdoutDecoder.end(); 693 | stderr += stderrDecoder.end(); 694 | return { 695 | exitCode, 696 | stdout, 697 | stderr 698 | }; 699 | }); 700 | } 701 | exports.getExecOutput = getExecOutput; 702 | //# sourceMappingURL=exec.js.map 703 | 704 | /***/ }), 705 | 706 | /***/ 159: 707 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 708 | 709 | 710 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 711 | if (k2 === undefined) k2 = k; 712 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 713 | }) : (function(o, m, k, k2) { 714 | if (k2 === undefined) k2 = k; 715 | o[k2] = m[k]; 716 | })); 717 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 718 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 719 | }) : function(o, v) { 720 | o["default"] = v; 721 | }); 722 | var __importStar = (this && this.__importStar) || function (mod) { 723 | if (mod && mod.__esModule) return mod; 724 | var result = {}; 725 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 726 | __setModuleDefault(result, mod); 727 | return result; 728 | }; 729 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 730 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 731 | return new (P || (P = Promise))(function (resolve, reject) { 732 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 733 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 734 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 735 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 736 | }); 737 | }; 738 | Object.defineProperty(exports, "__esModule", ({ value: true })); 739 | exports.argStringToArray = exports.ToolRunner = void 0; 740 | const os = __importStar(__nccwpck_require__(37)); 741 | const events = __importStar(__nccwpck_require__(361)); 742 | const child = __importStar(__nccwpck_require__(81)); 743 | const path = __importStar(__nccwpck_require__(17)); 744 | const io = __importStar(__nccwpck_require__(436)); 745 | const ioUtil = __importStar(__nccwpck_require__(962)); 746 | const timers_1 = __nccwpck_require__(512); 747 | /* eslint-disable @typescript-eslint/unbound-method */ 748 | const IS_WINDOWS = process.platform === 'win32'; 749 | /* 750 | * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. 751 | */ 752 | class ToolRunner extends events.EventEmitter { 753 | constructor(toolPath, args, options) { 754 | super(); 755 | if (!toolPath) { 756 | throw new Error("Parameter 'toolPath' cannot be null or empty."); 757 | } 758 | this.toolPath = toolPath; 759 | this.args = args || []; 760 | this.options = options || {}; 761 | } 762 | _debug(message) { 763 | if (this.options.listeners && this.options.listeners.debug) { 764 | this.options.listeners.debug(message); 765 | } 766 | } 767 | _getCommandString(options, noPrefix) { 768 | const toolPath = this._getSpawnFileName(); 769 | const args = this._getSpawnArgs(options); 770 | let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool 771 | if (IS_WINDOWS) { 772 | // Windows + cmd file 773 | if (this._isCmdFile()) { 774 | cmd += toolPath; 775 | for (const a of args) { 776 | cmd += ` ${a}`; 777 | } 778 | } 779 | // Windows + verbatim 780 | else if (options.windowsVerbatimArguments) { 781 | cmd += `"${toolPath}"`; 782 | for (const a of args) { 783 | cmd += ` ${a}`; 784 | } 785 | } 786 | // Windows (regular) 787 | else { 788 | cmd += this._windowsQuoteCmdArg(toolPath); 789 | for (const a of args) { 790 | cmd += ` ${this._windowsQuoteCmdArg(a)}`; 791 | } 792 | } 793 | } 794 | else { 795 | // OSX/Linux - this can likely be improved with some form of quoting. 796 | // creating processes on Unix is fundamentally different than Windows. 797 | // on Unix, execvp() takes an arg array. 798 | cmd += toolPath; 799 | for (const a of args) { 800 | cmd += ` ${a}`; 801 | } 802 | } 803 | return cmd; 804 | } 805 | _processLineBuffer(data, strBuffer, onLine) { 806 | try { 807 | let s = strBuffer + data.toString(); 808 | let n = s.indexOf(os.EOL); 809 | while (n > -1) { 810 | const line = s.substring(0, n); 811 | onLine(line); 812 | // the rest of the string ... 813 | s = s.substring(n + os.EOL.length); 814 | n = s.indexOf(os.EOL); 815 | } 816 | return s; 817 | } 818 | catch (err) { 819 | // streaming lines to console is best effort. Don't fail a build. 820 | this._debug(`error processing line. Failed with error ${err}`); 821 | return ''; 822 | } 823 | } 824 | _getSpawnFileName() { 825 | if (IS_WINDOWS) { 826 | if (this._isCmdFile()) { 827 | return process.env['COMSPEC'] || 'cmd.exe'; 828 | } 829 | } 830 | return this.toolPath; 831 | } 832 | _getSpawnArgs(options) { 833 | if (IS_WINDOWS) { 834 | if (this._isCmdFile()) { 835 | let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; 836 | for (const a of this.args) { 837 | argline += ' '; 838 | argline += options.windowsVerbatimArguments 839 | ? a 840 | : this._windowsQuoteCmdArg(a); 841 | } 842 | argline += '"'; 843 | return [argline]; 844 | } 845 | } 846 | return this.args; 847 | } 848 | _endsWith(str, end) { 849 | return str.endsWith(end); 850 | } 851 | _isCmdFile() { 852 | const upperToolPath = this.toolPath.toUpperCase(); 853 | return (this._endsWith(upperToolPath, '.CMD') || 854 | this._endsWith(upperToolPath, '.BAT')); 855 | } 856 | _windowsQuoteCmdArg(arg) { 857 | // for .exe, apply the normal quoting rules that libuv applies 858 | if (!this._isCmdFile()) { 859 | return this._uvQuoteCmdArg(arg); 860 | } 861 | // otherwise apply quoting rules specific to the cmd.exe command line parser. 862 | // the libuv rules are generic and are not designed specifically for cmd.exe 863 | // command line parser. 864 | // 865 | // for a detailed description of the cmd.exe command line parser, refer to 866 | // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 867 | // need quotes for empty arg 868 | if (!arg) { 869 | return '""'; 870 | } 871 | // determine whether the arg needs to be quoted 872 | const cmdSpecialChars = [ 873 | ' ', 874 | '\t', 875 | '&', 876 | '(', 877 | ')', 878 | '[', 879 | ']', 880 | '{', 881 | '}', 882 | '^', 883 | '=', 884 | ';', 885 | '!', 886 | "'", 887 | '+', 888 | ',', 889 | '`', 890 | '~', 891 | '|', 892 | '<', 893 | '>', 894 | '"' 895 | ]; 896 | let needsQuotes = false; 897 | for (const char of arg) { 898 | if (cmdSpecialChars.some(x => x === char)) { 899 | needsQuotes = true; 900 | break; 901 | } 902 | } 903 | // short-circuit if quotes not needed 904 | if (!needsQuotes) { 905 | return arg; 906 | } 907 | // the following quoting rules are very similar to the rules that by libuv applies. 908 | // 909 | // 1) wrap the string in quotes 910 | // 911 | // 2) double-up quotes - i.e. " => "" 912 | // 913 | // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately 914 | // doesn't work well with a cmd.exe command line. 915 | // 916 | // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. 917 | // for example, the command line: 918 | // foo.exe "myarg:""my val""" 919 | // is parsed by a .NET console app into an arg array: 920 | // [ "myarg:\"my val\"" ] 921 | // which is the same end result when applying libuv quoting rules. although the actual 922 | // command line from libuv quoting rules would look like: 923 | // foo.exe "myarg:\"my val\"" 924 | // 925 | // 3) double-up slashes that precede a quote, 926 | // e.g. hello \world => "hello \world" 927 | // hello\"world => "hello\\""world" 928 | // hello\\"world => "hello\\\\""world" 929 | // hello world\ => "hello world\\" 930 | // 931 | // technically this is not required for a cmd.exe command line, or the batch argument parser. 932 | // the reasons for including this as a .cmd quoting rule are: 933 | // 934 | // a) this is optimized for the scenario where the argument is passed from the .cmd file to an 935 | // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. 936 | // 937 | // b) it's what we've been doing previously (by deferring to node default behavior) and we 938 | // haven't heard any complaints about that aspect. 939 | // 940 | // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be 941 | // escaped when used on the command line directly - even though within a .cmd file % can be escaped 942 | // by using %%. 943 | // 944 | // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts 945 | // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. 946 | // 947 | // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would 948 | // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the 949 | // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args 950 | // to an external program. 951 | // 952 | // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. 953 | // % can be escaped within a .cmd file. 954 | let reverse = '"'; 955 | let quoteHit = true; 956 | for (let i = arg.length; i > 0; i--) { 957 | // walk the string in reverse 958 | reverse += arg[i - 1]; 959 | if (quoteHit && arg[i - 1] === '\\') { 960 | reverse += '\\'; // double the slash 961 | } 962 | else if (arg[i - 1] === '"') { 963 | quoteHit = true; 964 | reverse += '"'; // double the quote 965 | } 966 | else { 967 | quoteHit = false; 968 | } 969 | } 970 | reverse += '"'; 971 | return reverse 972 | .split('') 973 | .reverse() 974 | .join(''); 975 | } 976 | _uvQuoteCmdArg(arg) { 977 | // Tool runner wraps child_process.spawn() and needs to apply the same quoting as 978 | // Node in certain cases where the undocumented spawn option windowsVerbatimArguments 979 | // is used. 980 | // 981 | // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, 982 | // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), 983 | // pasting copyright notice from Node within this function: 984 | // 985 | // Copyright Joyent, Inc. and other Node contributors. All rights reserved. 986 | // 987 | // Permission is hereby granted, free of charge, to any person obtaining a copy 988 | // of this software and associated documentation files (the "Software"), to 989 | // deal in the Software without restriction, including without limitation the 990 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 991 | // sell copies of the Software, and to permit persons to whom the Software is 992 | // furnished to do so, subject to the following conditions: 993 | // 994 | // The above copyright notice and this permission notice shall be included in 995 | // all copies or substantial portions of the Software. 996 | // 997 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 998 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 999 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1000 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1001 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1002 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 1003 | // IN THE SOFTWARE. 1004 | if (!arg) { 1005 | // Need double quotation for empty argument 1006 | return '""'; 1007 | } 1008 | if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) { 1009 | // No quotation needed 1010 | return arg; 1011 | } 1012 | if (!arg.includes('"') && !arg.includes('\\')) { 1013 | // No embedded double quotes or backslashes, so I can just wrap 1014 | // quote marks around the whole thing. 1015 | return `"${arg}"`; 1016 | } 1017 | // Expected input/output: 1018 | // input : hello"world 1019 | // output: "hello\"world" 1020 | // input : hello""world 1021 | // output: "hello\"\"world" 1022 | // input : hello\world 1023 | // output: hello\world 1024 | // input : hello\\world 1025 | // output: hello\\world 1026 | // input : hello\"world 1027 | // output: "hello\\\"world" 1028 | // input : hello\\"world 1029 | // output: "hello\\\\\"world" 1030 | // input : hello world\ 1031 | // output: "hello world\\" - note the comment in libuv actually reads "hello world\" 1032 | // but it appears the comment is wrong, it should be "hello world\\" 1033 | let reverse = '"'; 1034 | let quoteHit = true; 1035 | for (let i = arg.length; i > 0; i--) { 1036 | // walk the string in reverse 1037 | reverse += arg[i - 1]; 1038 | if (quoteHit && arg[i - 1] === '\\') { 1039 | reverse += '\\'; 1040 | } 1041 | else if (arg[i - 1] === '"') { 1042 | quoteHit = true; 1043 | reverse += '\\'; 1044 | } 1045 | else { 1046 | quoteHit = false; 1047 | } 1048 | } 1049 | reverse += '"'; 1050 | return reverse 1051 | .split('') 1052 | .reverse() 1053 | .join(''); 1054 | } 1055 | _cloneExecOptions(options) { 1056 | options = options || {}; 1057 | const result = { 1058 | cwd: options.cwd || process.cwd(), 1059 | env: options.env || process.env, 1060 | silent: options.silent || false, 1061 | windowsVerbatimArguments: options.windowsVerbatimArguments || false, 1062 | failOnStdErr: options.failOnStdErr || false, 1063 | ignoreReturnCode: options.ignoreReturnCode || false, 1064 | delay: options.delay || 10000 1065 | }; 1066 | result.outStream = options.outStream || process.stdout; 1067 | result.errStream = options.errStream || process.stderr; 1068 | return result; 1069 | } 1070 | _getSpawnOptions(options, toolPath) { 1071 | options = options || {}; 1072 | const result = {}; 1073 | result.cwd = options.cwd; 1074 | result.env = options.env; 1075 | result['windowsVerbatimArguments'] = 1076 | options.windowsVerbatimArguments || this._isCmdFile(); 1077 | if (options.windowsVerbatimArguments) { 1078 | result.argv0 = `"${toolPath}"`; 1079 | } 1080 | return result; 1081 | } 1082 | /** 1083 | * Exec a tool. 1084 | * Output will be streamed to the live console. 1085 | * Returns promise with return code 1086 | * 1087 | * @param tool path to tool to exec 1088 | * @param options optional exec options. See ExecOptions 1089 | * @returns number 1090 | */ 1091 | exec() { 1092 | return __awaiter(this, void 0, void 0, function* () { 1093 | // root the tool path if it is unrooted and contains relative pathing 1094 | if (!ioUtil.isRooted(this.toolPath) && 1095 | (this.toolPath.includes('/') || 1096 | (IS_WINDOWS && this.toolPath.includes('\\')))) { 1097 | // prefer options.cwd if it is specified, however options.cwd may also need to be rooted 1098 | this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); 1099 | } 1100 | // if the tool is only a file name, then resolve it from the PATH 1101 | // otherwise verify it exists (add extension on Windows if necessary) 1102 | this.toolPath = yield io.which(this.toolPath, true); 1103 | return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { 1104 | this._debug(`exec tool: ${this.toolPath}`); 1105 | this._debug('arguments:'); 1106 | for (const arg of this.args) { 1107 | this._debug(` ${arg}`); 1108 | } 1109 | const optionsNonNull = this._cloneExecOptions(this.options); 1110 | if (!optionsNonNull.silent && optionsNonNull.outStream) { 1111 | optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); 1112 | } 1113 | const state = new ExecState(optionsNonNull, this.toolPath); 1114 | state.on('debug', (message) => { 1115 | this._debug(message); 1116 | }); 1117 | if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { 1118 | return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); 1119 | } 1120 | const fileName = this._getSpawnFileName(); 1121 | const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); 1122 | let stdbuffer = ''; 1123 | if (cp.stdout) { 1124 | cp.stdout.on('data', (data) => { 1125 | if (this.options.listeners && this.options.listeners.stdout) { 1126 | this.options.listeners.stdout(data); 1127 | } 1128 | if (!optionsNonNull.silent && optionsNonNull.outStream) { 1129 | optionsNonNull.outStream.write(data); 1130 | } 1131 | stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { 1132 | if (this.options.listeners && this.options.listeners.stdline) { 1133 | this.options.listeners.stdline(line); 1134 | } 1135 | }); 1136 | }); 1137 | } 1138 | let errbuffer = ''; 1139 | if (cp.stderr) { 1140 | cp.stderr.on('data', (data) => { 1141 | state.processStderr = true; 1142 | if (this.options.listeners && this.options.listeners.stderr) { 1143 | this.options.listeners.stderr(data); 1144 | } 1145 | if (!optionsNonNull.silent && 1146 | optionsNonNull.errStream && 1147 | optionsNonNull.outStream) { 1148 | const s = optionsNonNull.failOnStdErr 1149 | ? optionsNonNull.errStream 1150 | : optionsNonNull.outStream; 1151 | s.write(data); 1152 | } 1153 | errbuffer = this._processLineBuffer(data, errbuffer, (line) => { 1154 | if (this.options.listeners && this.options.listeners.errline) { 1155 | this.options.listeners.errline(line); 1156 | } 1157 | }); 1158 | }); 1159 | } 1160 | cp.on('error', (err) => { 1161 | state.processError = err.message; 1162 | state.processExited = true; 1163 | state.processClosed = true; 1164 | state.CheckComplete(); 1165 | }); 1166 | cp.on('exit', (code) => { 1167 | state.processExitCode = code; 1168 | state.processExited = true; 1169 | this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); 1170 | state.CheckComplete(); 1171 | }); 1172 | cp.on('close', (code) => { 1173 | state.processExitCode = code; 1174 | state.processExited = true; 1175 | state.processClosed = true; 1176 | this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); 1177 | state.CheckComplete(); 1178 | }); 1179 | state.on('done', (error, exitCode) => { 1180 | if (stdbuffer.length > 0) { 1181 | this.emit('stdline', stdbuffer); 1182 | } 1183 | if (errbuffer.length > 0) { 1184 | this.emit('errline', errbuffer); 1185 | } 1186 | cp.removeAllListeners(); 1187 | if (error) { 1188 | reject(error); 1189 | } 1190 | else { 1191 | resolve(exitCode); 1192 | } 1193 | }); 1194 | if (this.options.input) { 1195 | if (!cp.stdin) { 1196 | throw new Error('child process missing stdin'); 1197 | } 1198 | cp.stdin.end(this.options.input); 1199 | } 1200 | })); 1201 | }); 1202 | } 1203 | } 1204 | exports.ToolRunner = ToolRunner; 1205 | /** 1206 | * Convert an arg string to an array of args. Handles escaping 1207 | * 1208 | * @param argString string of arguments 1209 | * @returns string[] array of arguments 1210 | */ 1211 | function argStringToArray(argString) { 1212 | const args = []; 1213 | let inQuotes = false; 1214 | let escaped = false; 1215 | let arg = ''; 1216 | function append(c) { 1217 | // we only escape double quotes. 1218 | if (escaped && c !== '"') { 1219 | arg += '\\'; 1220 | } 1221 | arg += c; 1222 | escaped = false; 1223 | } 1224 | for (let i = 0; i < argString.length; i++) { 1225 | const c = argString.charAt(i); 1226 | if (c === '"') { 1227 | if (!escaped) { 1228 | inQuotes = !inQuotes; 1229 | } 1230 | else { 1231 | append(c); 1232 | } 1233 | continue; 1234 | } 1235 | if (c === '\\' && escaped) { 1236 | append(c); 1237 | continue; 1238 | } 1239 | if (c === '\\' && inQuotes) { 1240 | escaped = true; 1241 | continue; 1242 | } 1243 | if (c === ' ' && !inQuotes) { 1244 | if (arg.length > 0) { 1245 | args.push(arg); 1246 | arg = ''; 1247 | } 1248 | continue; 1249 | } 1250 | append(c); 1251 | } 1252 | if (arg.length > 0) { 1253 | args.push(arg.trim()); 1254 | } 1255 | return args; 1256 | } 1257 | exports.argStringToArray = argStringToArray; 1258 | class ExecState extends events.EventEmitter { 1259 | constructor(options, toolPath) { 1260 | super(); 1261 | this.processClosed = false; // tracks whether the process has exited and stdio is closed 1262 | this.processError = ''; 1263 | this.processExitCode = 0; 1264 | this.processExited = false; // tracks whether the process has exited 1265 | this.processStderr = false; // tracks whether stderr was written to 1266 | this.delay = 10000; // 10 seconds 1267 | this.done = false; 1268 | this.timeout = null; 1269 | if (!toolPath) { 1270 | throw new Error('toolPath must not be empty'); 1271 | } 1272 | this.options = options; 1273 | this.toolPath = toolPath; 1274 | if (options.delay) { 1275 | this.delay = options.delay; 1276 | } 1277 | } 1278 | CheckComplete() { 1279 | if (this.done) { 1280 | return; 1281 | } 1282 | if (this.processClosed) { 1283 | this._setResult(); 1284 | } 1285 | else if (this.processExited) { 1286 | this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this); 1287 | } 1288 | } 1289 | _debug(message) { 1290 | this.emit('debug', message); 1291 | } 1292 | _setResult() { 1293 | // determine whether there is an error 1294 | let error; 1295 | if (this.processExited) { 1296 | if (this.processError) { 1297 | error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); 1298 | } 1299 | else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { 1300 | error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); 1301 | } 1302 | else if (this.processStderr && this.options.failOnStdErr) { 1303 | error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); 1304 | } 1305 | } 1306 | // clear the timeout 1307 | if (this.timeout) { 1308 | clearTimeout(this.timeout); 1309 | this.timeout = null; 1310 | } 1311 | this.done = true; 1312 | this.emit('done', error, this.processExitCode); 1313 | } 1314 | static HandleTimeout(state) { 1315 | if (state.done) { 1316 | return; 1317 | } 1318 | if (!state.processClosed && state.processExited) { 1319 | const message = `The STDIO streams did not close within ${state.delay / 1320 | 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; 1321 | state._debug(message); 1322 | } 1323 | state._setResult(); 1324 | } 1325 | } 1326 | //# sourceMappingURL=toolrunner.js.map 1327 | 1328 | /***/ }), 1329 | 1330 | /***/ 702: 1331 | /***/ ((__unused_webpack_module, exports) => { 1332 | 1333 | 1334 | Object.defineProperty(exports, "__esModule", ({ value: true })); 1335 | class BasicCredentialHandler { 1336 | constructor(username, password) { 1337 | this.username = username; 1338 | this.password = password; 1339 | } 1340 | prepareRequest(options) { 1341 | options.headers['Authorization'] = 1342 | 'Basic ' + 1343 | Buffer.from(this.username + ':' + this.password).toString('base64'); 1344 | } 1345 | // This handler cannot handle 401 1346 | canHandleAuthentication(response) { 1347 | return false; 1348 | } 1349 | handleAuthentication(httpClient, requestInfo, objs) { 1350 | return null; 1351 | } 1352 | } 1353 | exports.BasicCredentialHandler = BasicCredentialHandler; 1354 | class BearerCredentialHandler { 1355 | constructor(token) { 1356 | this.token = token; 1357 | } 1358 | // currently implements pre-authorization 1359 | // TODO: support preAuth = false where it hooks on 401 1360 | prepareRequest(options) { 1361 | options.headers['Authorization'] = 'Bearer ' + this.token; 1362 | } 1363 | // This handler cannot handle 401 1364 | canHandleAuthentication(response) { 1365 | return false; 1366 | } 1367 | handleAuthentication(httpClient, requestInfo, objs) { 1368 | return null; 1369 | } 1370 | } 1371 | exports.BearerCredentialHandler = BearerCredentialHandler; 1372 | class PersonalAccessTokenCredentialHandler { 1373 | constructor(token) { 1374 | this.token = token; 1375 | } 1376 | // currently implements pre-authorization 1377 | // TODO: support preAuth = false where it hooks on 401 1378 | prepareRequest(options) { 1379 | options.headers['Authorization'] = 1380 | 'Basic ' + Buffer.from('PAT:' + this.token).toString('base64'); 1381 | } 1382 | // This handler cannot handle 401 1383 | canHandleAuthentication(response) { 1384 | return false; 1385 | } 1386 | handleAuthentication(httpClient, requestInfo, objs) { 1387 | return null; 1388 | } 1389 | } 1390 | exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; 1391 | 1392 | 1393 | /***/ }), 1394 | 1395 | /***/ 925: 1396 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 1397 | 1398 | 1399 | Object.defineProperty(exports, "__esModule", ({ value: true })); 1400 | const http = __nccwpck_require__(685); 1401 | const https = __nccwpck_require__(687); 1402 | const pm = __nccwpck_require__(443); 1403 | let tunnel; 1404 | var HttpCodes; 1405 | (function (HttpCodes) { 1406 | HttpCodes[HttpCodes["OK"] = 200] = "OK"; 1407 | HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; 1408 | HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; 1409 | HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; 1410 | HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; 1411 | HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; 1412 | HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; 1413 | HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; 1414 | HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; 1415 | HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; 1416 | HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; 1417 | HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; 1418 | HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; 1419 | HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; 1420 | HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; 1421 | HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; 1422 | HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; 1423 | HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; 1424 | HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; 1425 | HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; 1426 | HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; 1427 | HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; 1428 | HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; 1429 | HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; 1430 | HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; 1431 | HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; 1432 | HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; 1433 | })(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); 1434 | var Headers; 1435 | (function (Headers) { 1436 | Headers["Accept"] = "accept"; 1437 | Headers["ContentType"] = "content-type"; 1438 | })(Headers = exports.Headers || (exports.Headers = {})); 1439 | var MediaTypes; 1440 | (function (MediaTypes) { 1441 | MediaTypes["ApplicationJson"] = "application/json"; 1442 | })(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); 1443 | /** 1444 | * Returns the proxy URL, depending upon the supplied url and proxy environment variables. 1445 | * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com 1446 | */ 1447 | function getProxyUrl(serverUrl) { 1448 | let proxyUrl = pm.getProxyUrl(new URL(serverUrl)); 1449 | return proxyUrl ? proxyUrl.href : ''; 1450 | } 1451 | exports.getProxyUrl = getProxyUrl; 1452 | const HttpRedirectCodes = [ 1453 | HttpCodes.MovedPermanently, 1454 | HttpCodes.ResourceMoved, 1455 | HttpCodes.SeeOther, 1456 | HttpCodes.TemporaryRedirect, 1457 | HttpCodes.PermanentRedirect 1458 | ]; 1459 | const HttpResponseRetryCodes = [ 1460 | HttpCodes.BadGateway, 1461 | HttpCodes.ServiceUnavailable, 1462 | HttpCodes.GatewayTimeout 1463 | ]; 1464 | const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; 1465 | const ExponentialBackoffCeiling = 10; 1466 | const ExponentialBackoffTimeSlice = 5; 1467 | class HttpClientError extends Error { 1468 | constructor(message, statusCode) { 1469 | super(message); 1470 | this.name = 'HttpClientError'; 1471 | this.statusCode = statusCode; 1472 | Object.setPrototypeOf(this, HttpClientError.prototype); 1473 | } 1474 | } 1475 | exports.HttpClientError = HttpClientError; 1476 | class HttpClientResponse { 1477 | constructor(message) { 1478 | this.message = message; 1479 | } 1480 | readBody() { 1481 | return new Promise(async (resolve, reject) => { 1482 | let output = Buffer.alloc(0); 1483 | this.message.on('data', (chunk) => { 1484 | output = Buffer.concat([output, chunk]); 1485 | }); 1486 | this.message.on('end', () => { 1487 | resolve(output.toString()); 1488 | }); 1489 | }); 1490 | } 1491 | } 1492 | exports.HttpClientResponse = HttpClientResponse; 1493 | function isHttps(requestUrl) { 1494 | let parsedUrl = new URL(requestUrl); 1495 | return parsedUrl.protocol === 'https:'; 1496 | } 1497 | exports.isHttps = isHttps; 1498 | class HttpClient { 1499 | constructor(userAgent, handlers, requestOptions) { 1500 | this._ignoreSslError = false; 1501 | this._allowRedirects = true; 1502 | this._allowRedirectDowngrade = false; 1503 | this._maxRedirects = 50; 1504 | this._allowRetries = false; 1505 | this._maxRetries = 1; 1506 | this._keepAlive = false; 1507 | this._disposed = false; 1508 | this.userAgent = userAgent; 1509 | this.handlers = handlers || []; 1510 | this.requestOptions = requestOptions; 1511 | if (requestOptions) { 1512 | if (requestOptions.ignoreSslError != null) { 1513 | this._ignoreSslError = requestOptions.ignoreSslError; 1514 | } 1515 | this._socketTimeout = requestOptions.socketTimeout; 1516 | if (requestOptions.allowRedirects != null) { 1517 | this._allowRedirects = requestOptions.allowRedirects; 1518 | } 1519 | if (requestOptions.allowRedirectDowngrade != null) { 1520 | this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; 1521 | } 1522 | if (requestOptions.maxRedirects != null) { 1523 | this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); 1524 | } 1525 | if (requestOptions.keepAlive != null) { 1526 | this._keepAlive = requestOptions.keepAlive; 1527 | } 1528 | if (requestOptions.allowRetries != null) { 1529 | this._allowRetries = requestOptions.allowRetries; 1530 | } 1531 | if (requestOptions.maxRetries != null) { 1532 | this._maxRetries = requestOptions.maxRetries; 1533 | } 1534 | } 1535 | } 1536 | options(requestUrl, additionalHeaders) { 1537 | return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); 1538 | } 1539 | get(requestUrl, additionalHeaders) { 1540 | return this.request('GET', requestUrl, null, additionalHeaders || {}); 1541 | } 1542 | del(requestUrl, additionalHeaders) { 1543 | return this.request('DELETE', requestUrl, null, additionalHeaders || {}); 1544 | } 1545 | post(requestUrl, data, additionalHeaders) { 1546 | return this.request('POST', requestUrl, data, additionalHeaders || {}); 1547 | } 1548 | patch(requestUrl, data, additionalHeaders) { 1549 | return this.request('PATCH', requestUrl, data, additionalHeaders || {}); 1550 | } 1551 | put(requestUrl, data, additionalHeaders) { 1552 | return this.request('PUT', requestUrl, data, additionalHeaders || {}); 1553 | } 1554 | head(requestUrl, additionalHeaders) { 1555 | return this.request('HEAD', requestUrl, null, additionalHeaders || {}); 1556 | } 1557 | sendStream(verb, requestUrl, stream, additionalHeaders) { 1558 | return this.request(verb, requestUrl, stream, additionalHeaders); 1559 | } 1560 | /** 1561 | * Gets a typed object from an endpoint 1562 | * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise 1563 | */ 1564 | async getJson(requestUrl, additionalHeaders = {}) { 1565 | additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); 1566 | let res = await this.get(requestUrl, additionalHeaders); 1567 | return this._processResponse(res, this.requestOptions); 1568 | } 1569 | async postJson(requestUrl, obj, additionalHeaders = {}) { 1570 | let data = JSON.stringify(obj, null, 2); 1571 | additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); 1572 | additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); 1573 | let res = await this.post(requestUrl, data, additionalHeaders); 1574 | return this._processResponse(res, this.requestOptions); 1575 | } 1576 | async putJson(requestUrl, obj, additionalHeaders = {}) { 1577 | let data = JSON.stringify(obj, null, 2); 1578 | additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); 1579 | additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); 1580 | let res = await this.put(requestUrl, data, additionalHeaders); 1581 | return this._processResponse(res, this.requestOptions); 1582 | } 1583 | async patchJson(requestUrl, obj, additionalHeaders = {}) { 1584 | let data = JSON.stringify(obj, null, 2); 1585 | additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); 1586 | additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); 1587 | let res = await this.patch(requestUrl, data, additionalHeaders); 1588 | return this._processResponse(res, this.requestOptions); 1589 | } 1590 | /** 1591 | * Makes a raw http request. 1592 | * All other methods such as get, post, patch, and request ultimately call this. 1593 | * Prefer get, del, post and patch 1594 | */ 1595 | async request(verb, requestUrl, data, headers) { 1596 | if (this._disposed) { 1597 | throw new Error('Client has already been disposed.'); 1598 | } 1599 | let parsedUrl = new URL(requestUrl); 1600 | let info = this._prepareRequest(verb, parsedUrl, headers); 1601 | // Only perform retries on reads since writes may not be idempotent. 1602 | let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 1603 | ? this._maxRetries + 1 1604 | : 1; 1605 | let numTries = 0; 1606 | let response; 1607 | while (numTries < maxTries) { 1608 | response = await this.requestRaw(info, data); 1609 | // Check if it's an authentication challenge 1610 | if (response && 1611 | response.message && 1612 | response.message.statusCode === HttpCodes.Unauthorized) { 1613 | let authenticationHandler; 1614 | for (let i = 0; i < this.handlers.length; i++) { 1615 | if (this.handlers[i].canHandleAuthentication(response)) { 1616 | authenticationHandler = this.handlers[i]; 1617 | break; 1618 | } 1619 | } 1620 | if (authenticationHandler) { 1621 | return authenticationHandler.handleAuthentication(this, info, data); 1622 | } 1623 | else { 1624 | // We have received an unauthorized response but have no handlers to handle it. 1625 | // Let the response return to the caller. 1626 | return response; 1627 | } 1628 | } 1629 | let redirectsRemaining = this._maxRedirects; 1630 | while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && 1631 | this._allowRedirects && 1632 | redirectsRemaining > 0) { 1633 | const redirectUrl = response.message.headers['location']; 1634 | if (!redirectUrl) { 1635 | // if there's no location to redirect to, we won't 1636 | break; 1637 | } 1638 | let parsedRedirectUrl = new URL(redirectUrl); 1639 | if (parsedUrl.protocol == 'https:' && 1640 | parsedUrl.protocol != parsedRedirectUrl.protocol && 1641 | !this._allowRedirectDowngrade) { 1642 | throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); 1643 | } 1644 | // we need to finish reading the response before reassigning response 1645 | // which will leak the open socket. 1646 | await response.readBody(); 1647 | // strip authorization header if redirected to a different hostname 1648 | if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { 1649 | for (let header in headers) { 1650 | // header names are case insensitive 1651 | if (header.toLowerCase() === 'authorization') { 1652 | delete headers[header]; 1653 | } 1654 | } 1655 | } 1656 | // let's make the request with the new redirectUrl 1657 | info = this._prepareRequest(verb, parsedRedirectUrl, headers); 1658 | response = await this.requestRaw(info, data); 1659 | redirectsRemaining--; 1660 | } 1661 | if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { 1662 | // If not a retry code, return immediately instead of retrying 1663 | return response; 1664 | } 1665 | numTries += 1; 1666 | if (numTries < maxTries) { 1667 | await response.readBody(); 1668 | await this._performExponentialBackoff(numTries); 1669 | } 1670 | } 1671 | return response; 1672 | } 1673 | /** 1674 | * Needs to be called if keepAlive is set to true in request options. 1675 | */ 1676 | dispose() { 1677 | if (this._agent) { 1678 | this._agent.destroy(); 1679 | } 1680 | this._disposed = true; 1681 | } 1682 | /** 1683 | * Raw request. 1684 | * @param info 1685 | * @param data 1686 | */ 1687 | requestRaw(info, data) { 1688 | return new Promise((resolve, reject) => { 1689 | let callbackForResult = function (err, res) { 1690 | if (err) { 1691 | reject(err); 1692 | } 1693 | resolve(res); 1694 | }; 1695 | this.requestRawWithCallback(info, data, callbackForResult); 1696 | }); 1697 | } 1698 | /** 1699 | * Raw request with callback. 1700 | * @param info 1701 | * @param data 1702 | * @param onResult 1703 | */ 1704 | requestRawWithCallback(info, data, onResult) { 1705 | let socket; 1706 | if (typeof data === 'string') { 1707 | info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); 1708 | } 1709 | let callbackCalled = false; 1710 | let handleResult = (err, res) => { 1711 | if (!callbackCalled) { 1712 | callbackCalled = true; 1713 | onResult(err, res); 1714 | } 1715 | }; 1716 | let req = info.httpModule.request(info.options, (msg) => { 1717 | let res = new HttpClientResponse(msg); 1718 | handleResult(null, res); 1719 | }); 1720 | req.on('socket', sock => { 1721 | socket = sock; 1722 | }); 1723 | // If we ever get disconnected, we want the socket to timeout eventually 1724 | req.setTimeout(this._socketTimeout || 3 * 60000, () => { 1725 | if (socket) { 1726 | socket.end(); 1727 | } 1728 | handleResult(new Error('Request timeout: ' + info.options.path), null); 1729 | }); 1730 | req.on('error', function (err) { 1731 | // err has statusCode property 1732 | // res should have headers 1733 | handleResult(err, null); 1734 | }); 1735 | if (data && typeof data === 'string') { 1736 | req.write(data, 'utf8'); 1737 | } 1738 | if (data && typeof data !== 'string') { 1739 | data.on('close', function () { 1740 | req.end(); 1741 | }); 1742 | data.pipe(req); 1743 | } 1744 | else { 1745 | req.end(); 1746 | } 1747 | } 1748 | /** 1749 | * Gets an http agent. This function is useful when you need an http agent that handles 1750 | * routing through a proxy server - depending upon the url and proxy environment variables. 1751 | * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com 1752 | */ 1753 | getAgent(serverUrl) { 1754 | let parsedUrl = new URL(serverUrl); 1755 | return this._getAgent(parsedUrl); 1756 | } 1757 | _prepareRequest(method, requestUrl, headers) { 1758 | const info = {}; 1759 | info.parsedUrl = requestUrl; 1760 | const usingSsl = info.parsedUrl.protocol === 'https:'; 1761 | info.httpModule = usingSsl ? https : http; 1762 | const defaultPort = usingSsl ? 443 : 80; 1763 | info.options = {}; 1764 | info.options.host = info.parsedUrl.hostname; 1765 | info.options.port = info.parsedUrl.port 1766 | ? parseInt(info.parsedUrl.port) 1767 | : defaultPort; 1768 | info.options.path = 1769 | (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); 1770 | info.options.method = method; 1771 | info.options.headers = this._mergeHeaders(headers); 1772 | if (this.userAgent != null) { 1773 | info.options.headers['user-agent'] = this.userAgent; 1774 | } 1775 | info.options.agent = this._getAgent(info.parsedUrl); 1776 | // gives handlers an opportunity to participate 1777 | if (this.handlers) { 1778 | this.handlers.forEach(handler => { 1779 | handler.prepareRequest(info.options); 1780 | }); 1781 | } 1782 | return info; 1783 | } 1784 | _mergeHeaders(headers) { 1785 | const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); 1786 | if (this.requestOptions && this.requestOptions.headers) { 1787 | return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); 1788 | } 1789 | return lowercaseKeys(headers || {}); 1790 | } 1791 | _getExistingOrDefaultHeader(additionalHeaders, header, _default) { 1792 | const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); 1793 | let clientHeader; 1794 | if (this.requestOptions && this.requestOptions.headers) { 1795 | clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; 1796 | } 1797 | return additionalHeaders[header] || clientHeader || _default; 1798 | } 1799 | _getAgent(parsedUrl) { 1800 | let agent; 1801 | let proxyUrl = pm.getProxyUrl(parsedUrl); 1802 | let useProxy = proxyUrl && proxyUrl.hostname; 1803 | if (this._keepAlive && useProxy) { 1804 | agent = this._proxyAgent; 1805 | } 1806 | if (this._keepAlive && !useProxy) { 1807 | agent = this._agent; 1808 | } 1809 | // if agent is already assigned use that agent. 1810 | if (!!agent) { 1811 | return agent; 1812 | } 1813 | const usingSsl = parsedUrl.protocol === 'https:'; 1814 | let maxSockets = 100; 1815 | if (!!this.requestOptions) { 1816 | maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; 1817 | } 1818 | if (useProxy) { 1819 | // If using proxy, need tunnel 1820 | if (!tunnel) { 1821 | tunnel = __nccwpck_require__(294); 1822 | } 1823 | const agentOptions = { 1824 | maxSockets: maxSockets, 1825 | keepAlive: this._keepAlive, 1826 | proxy: { 1827 | ...((proxyUrl.username || proxyUrl.password) && { 1828 | proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` 1829 | }), 1830 | host: proxyUrl.hostname, 1831 | port: proxyUrl.port 1832 | } 1833 | }; 1834 | let tunnelAgent; 1835 | const overHttps = proxyUrl.protocol === 'https:'; 1836 | if (usingSsl) { 1837 | tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; 1838 | } 1839 | else { 1840 | tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; 1841 | } 1842 | agent = tunnelAgent(agentOptions); 1843 | this._proxyAgent = agent; 1844 | } 1845 | // if reusing agent across request and tunneling agent isn't assigned create a new agent 1846 | if (this._keepAlive && !agent) { 1847 | const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; 1848 | agent = usingSsl ? new https.Agent(options) : new http.Agent(options); 1849 | this._agent = agent; 1850 | } 1851 | // if not using private agent and tunnel agent isn't setup then use global agent 1852 | if (!agent) { 1853 | agent = usingSsl ? https.globalAgent : http.globalAgent; 1854 | } 1855 | if (usingSsl && this._ignoreSslError) { 1856 | // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process 1857 | // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options 1858 | // we have to cast it to any and change it directly 1859 | agent.options = Object.assign(agent.options || {}, { 1860 | rejectUnauthorized: false 1861 | }); 1862 | } 1863 | return agent; 1864 | } 1865 | _performExponentialBackoff(retryNumber) { 1866 | retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); 1867 | const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); 1868 | return new Promise(resolve => setTimeout(() => resolve(), ms)); 1869 | } 1870 | static dateTimeDeserializer(key, value) { 1871 | if (typeof value === 'string') { 1872 | let a = new Date(value); 1873 | if (!isNaN(a.valueOf())) { 1874 | return a; 1875 | } 1876 | } 1877 | return value; 1878 | } 1879 | async _processResponse(res, options) { 1880 | return new Promise(async (resolve, reject) => { 1881 | const statusCode = res.message.statusCode; 1882 | const response = { 1883 | statusCode: statusCode, 1884 | result: null, 1885 | headers: {} 1886 | }; 1887 | // not found leads to null obj returned 1888 | if (statusCode == HttpCodes.NotFound) { 1889 | resolve(response); 1890 | } 1891 | let obj; 1892 | let contents; 1893 | // get the result from the body 1894 | try { 1895 | contents = await res.readBody(); 1896 | if (contents && contents.length > 0) { 1897 | if (options && options.deserializeDates) { 1898 | obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); 1899 | } 1900 | else { 1901 | obj = JSON.parse(contents); 1902 | } 1903 | response.result = obj; 1904 | } 1905 | response.headers = res.message.headers; 1906 | } 1907 | catch (err) { 1908 | // Invalid resource (contents not json); leaving result obj null 1909 | } 1910 | // note that 3xx redirects are handled by the http layer. 1911 | if (statusCode > 299) { 1912 | let msg; 1913 | // if exception/error in body, attempt to get better error 1914 | if (obj && obj.message) { 1915 | msg = obj.message; 1916 | } 1917 | else if (contents && contents.length > 0) { 1918 | // it may be the case that the exception is in the body message as string 1919 | msg = contents; 1920 | } 1921 | else { 1922 | msg = 'Failed request: (' + statusCode + ')'; 1923 | } 1924 | let err = new HttpClientError(msg, statusCode); 1925 | err.result = response.result; 1926 | reject(err); 1927 | } 1928 | else { 1929 | resolve(response); 1930 | } 1931 | }); 1932 | } 1933 | } 1934 | exports.HttpClient = HttpClient; 1935 | 1936 | 1937 | /***/ }), 1938 | 1939 | /***/ 443: 1940 | /***/ ((__unused_webpack_module, exports) => { 1941 | 1942 | 1943 | Object.defineProperty(exports, "__esModule", ({ value: true })); 1944 | function getProxyUrl(reqUrl) { 1945 | let usingSsl = reqUrl.protocol === 'https:'; 1946 | let proxyUrl; 1947 | if (checkBypass(reqUrl)) { 1948 | return proxyUrl; 1949 | } 1950 | let proxyVar; 1951 | if (usingSsl) { 1952 | proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY']; 1953 | } 1954 | else { 1955 | proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY']; 1956 | } 1957 | if (proxyVar) { 1958 | proxyUrl = new URL(proxyVar); 1959 | } 1960 | return proxyUrl; 1961 | } 1962 | exports.getProxyUrl = getProxyUrl; 1963 | function checkBypass(reqUrl) { 1964 | if (!reqUrl.hostname) { 1965 | return false; 1966 | } 1967 | let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; 1968 | if (!noProxy) { 1969 | return false; 1970 | } 1971 | // Determine the request port 1972 | let reqPort; 1973 | if (reqUrl.port) { 1974 | reqPort = Number(reqUrl.port); 1975 | } 1976 | else if (reqUrl.protocol === 'http:') { 1977 | reqPort = 80; 1978 | } 1979 | else if (reqUrl.protocol === 'https:') { 1980 | reqPort = 443; 1981 | } 1982 | // Format the request hostname and hostname with port 1983 | let upperReqHosts = [reqUrl.hostname.toUpperCase()]; 1984 | if (typeof reqPort === 'number') { 1985 | upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); 1986 | } 1987 | // Compare request host against noproxy 1988 | for (let upperNoProxyItem of noProxy 1989 | .split(',') 1990 | .map(x => x.trim().toUpperCase()) 1991 | .filter(x => x)) { 1992 | if (upperReqHosts.some(x => x === upperNoProxyItem)) { 1993 | return true; 1994 | } 1995 | } 1996 | return false; 1997 | } 1998 | exports.checkBypass = checkBypass; 1999 | 2000 | 2001 | /***/ }), 2002 | 2003 | /***/ 962: 2004 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 2005 | 2006 | 2007 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 2008 | if (k2 === undefined) k2 = k; 2009 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 2010 | }) : (function(o, m, k, k2) { 2011 | if (k2 === undefined) k2 = k; 2012 | o[k2] = m[k]; 2013 | })); 2014 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 2015 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 2016 | }) : function(o, v) { 2017 | o["default"] = v; 2018 | }); 2019 | var __importStar = (this && this.__importStar) || function (mod) { 2020 | if (mod && mod.__esModule) return mod; 2021 | var result = {}; 2022 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 2023 | __setModuleDefault(result, mod); 2024 | return result; 2025 | }; 2026 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 2027 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 2028 | return new (P || (P = Promise))(function (resolve, reject) { 2029 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 2030 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 2031 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 2032 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 2033 | }); 2034 | }; 2035 | var _a; 2036 | Object.defineProperty(exports, "__esModule", ({ value: true })); 2037 | exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; 2038 | const fs = __importStar(__nccwpck_require__(147)); 2039 | const path = __importStar(__nccwpck_require__(17)); 2040 | _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; 2041 | exports.IS_WINDOWS = process.platform === 'win32'; 2042 | function exists(fsPath) { 2043 | return __awaiter(this, void 0, void 0, function* () { 2044 | try { 2045 | yield exports.stat(fsPath); 2046 | } 2047 | catch (err) { 2048 | if (err.code === 'ENOENT') { 2049 | return false; 2050 | } 2051 | throw err; 2052 | } 2053 | return true; 2054 | }); 2055 | } 2056 | exports.exists = exists; 2057 | function isDirectory(fsPath, useStat = false) { 2058 | return __awaiter(this, void 0, void 0, function* () { 2059 | const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); 2060 | return stats.isDirectory(); 2061 | }); 2062 | } 2063 | exports.isDirectory = isDirectory; 2064 | /** 2065 | * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: 2066 | * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). 2067 | */ 2068 | function isRooted(p) { 2069 | p = normalizeSeparators(p); 2070 | if (!p) { 2071 | throw new Error('isRooted() parameter "p" cannot be empty'); 2072 | } 2073 | if (exports.IS_WINDOWS) { 2074 | return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello 2075 | ); // e.g. C: or C:\hello 2076 | } 2077 | return p.startsWith('/'); 2078 | } 2079 | exports.isRooted = isRooted; 2080 | /** 2081 | * Best effort attempt to determine whether a file exists and is executable. 2082 | * @param filePath file path to check 2083 | * @param extensions additional file extensions to try 2084 | * @return if file exists and is executable, returns the file path. otherwise empty string. 2085 | */ 2086 | function tryGetExecutablePath(filePath, extensions) { 2087 | return __awaiter(this, void 0, void 0, function* () { 2088 | let stats = undefined; 2089 | try { 2090 | // test file exists 2091 | stats = yield exports.stat(filePath); 2092 | } 2093 | catch (err) { 2094 | if (err.code !== 'ENOENT') { 2095 | // eslint-disable-next-line no-console 2096 | console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); 2097 | } 2098 | } 2099 | if (stats && stats.isFile()) { 2100 | if (exports.IS_WINDOWS) { 2101 | // on Windows, test for valid extension 2102 | const upperExt = path.extname(filePath).toUpperCase(); 2103 | if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { 2104 | return filePath; 2105 | } 2106 | } 2107 | else { 2108 | if (isUnixExecutable(stats)) { 2109 | return filePath; 2110 | } 2111 | } 2112 | } 2113 | // try each extension 2114 | const originalFilePath = filePath; 2115 | for (const extension of extensions) { 2116 | filePath = originalFilePath + extension; 2117 | stats = undefined; 2118 | try { 2119 | stats = yield exports.stat(filePath); 2120 | } 2121 | catch (err) { 2122 | if (err.code !== 'ENOENT') { 2123 | // eslint-disable-next-line no-console 2124 | console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); 2125 | } 2126 | } 2127 | if (stats && stats.isFile()) { 2128 | if (exports.IS_WINDOWS) { 2129 | // preserve the case of the actual file (since an extension was appended) 2130 | try { 2131 | const directory = path.dirname(filePath); 2132 | const upperName = path.basename(filePath).toUpperCase(); 2133 | for (const actualName of yield exports.readdir(directory)) { 2134 | if (upperName === actualName.toUpperCase()) { 2135 | filePath = path.join(directory, actualName); 2136 | break; 2137 | } 2138 | } 2139 | } 2140 | catch (err) { 2141 | // eslint-disable-next-line no-console 2142 | console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); 2143 | } 2144 | return filePath; 2145 | } 2146 | else { 2147 | if (isUnixExecutable(stats)) { 2148 | return filePath; 2149 | } 2150 | } 2151 | } 2152 | } 2153 | return ''; 2154 | }); 2155 | } 2156 | exports.tryGetExecutablePath = tryGetExecutablePath; 2157 | function normalizeSeparators(p) { 2158 | p = p || ''; 2159 | if (exports.IS_WINDOWS) { 2160 | // convert slashes on Windows 2161 | p = p.replace(/\//g, '\\'); 2162 | // remove redundant slashes 2163 | return p.replace(/\\\\+/g, '\\'); 2164 | } 2165 | // remove redundant slashes 2166 | return p.replace(/\/\/+/g, '/'); 2167 | } 2168 | // on Mac/Linux, test the execute bit 2169 | // R W X R W X R W X 2170 | // 256 128 64 32 16 8 4 2 1 2171 | function isUnixExecutable(stats) { 2172 | return ((stats.mode & 1) > 0 || 2173 | ((stats.mode & 8) > 0 && stats.gid === process.getgid()) || 2174 | ((stats.mode & 64) > 0 && stats.uid === process.getuid())); 2175 | } 2176 | // Get the path of cmd.exe in windows 2177 | function getCmdPath() { 2178 | var _a; 2179 | return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`; 2180 | } 2181 | exports.getCmdPath = getCmdPath; 2182 | //# sourceMappingURL=io-util.js.map 2183 | 2184 | /***/ }), 2185 | 2186 | /***/ 436: 2187 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 2188 | 2189 | 2190 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 2191 | if (k2 === undefined) k2 = k; 2192 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 2193 | }) : (function(o, m, k, k2) { 2194 | if (k2 === undefined) k2 = k; 2195 | o[k2] = m[k]; 2196 | })); 2197 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 2198 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 2199 | }) : function(o, v) { 2200 | o["default"] = v; 2201 | }); 2202 | var __importStar = (this && this.__importStar) || function (mod) { 2203 | if (mod && mod.__esModule) return mod; 2204 | var result = {}; 2205 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 2206 | __setModuleDefault(result, mod); 2207 | return result; 2208 | }; 2209 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 2210 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 2211 | return new (P || (P = Promise))(function (resolve, reject) { 2212 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 2213 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 2214 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 2215 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 2216 | }); 2217 | }; 2218 | Object.defineProperty(exports, "__esModule", ({ value: true })); 2219 | exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; 2220 | const assert_1 = __nccwpck_require__(491); 2221 | const childProcess = __importStar(__nccwpck_require__(81)); 2222 | const path = __importStar(__nccwpck_require__(17)); 2223 | const util_1 = __nccwpck_require__(837); 2224 | const ioUtil = __importStar(__nccwpck_require__(962)); 2225 | const exec = util_1.promisify(childProcess.exec); 2226 | const execFile = util_1.promisify(childProcess.execFile); 2227 | /** 2228 | * Copies a file or folder. 2229 | * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js 2230 | * 2231 | * @param source source path 2232 | * @param dest destination path 2233 | * @param options optional. See CopyOptions. 2234 | */ 2235 | function cp(source, dest, options = {}) { 2236 | return __awaiter(this, void 0, void 0, function* () { 2237 | const { force, recursive, copySourceDirectory } = readCopyOptions(options); 2238 | const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; 2239 | // Dest is an existing file, but not forcing 2240 | if (destStat && destStat.isFile() && !force) { 2241 | return; 2242 | } 2243 | // If dest is an existing directory, should copy inside. 2244 | const newDest = destStat && destStat.isDirectory() && copySourceDirectory 2245 | ? path.join(dest, path.basename(source)) 2246 | : dest; 2247 | if (!(yield ioUtil.exists(source))) { 2248 | throw new Error(`no such file or directory: ${source}`); 2249 | } 2250 | const sourceStat = yield ioUtil.stat(source); 2251 | if (sourceStat.isDirectory()) { 2252 | if (!recursive) { 2253 | throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); 2254 | } 2255 | else { 2256 | yield cpDirRecursive(source, newDest, 0, force); 2257 | } 2258 | } 2259 | else { 2260 | if (path.relative(source, newDest) === '') { 2261 | // a file cannot be copied to itself 2262 | throw new Error(`'${newDest}' and '${source}' are the same file`); 2263 | } 2264 | yield copyFile(source, newDest, force); 2265 | } 2266 | }); 2267 | } 2268 | exports.cp = cp; 2269 | /** 2270 | * Moves a path. 2271 | * 2272 | * @param source source path 2273 | * @param dest destination path 2274 | * @param options optional. See MoveOptions. 2275 | */ 2276 | function mv(source, dest, options = {}) { 2277 | return __awaiter(this, void 0, void 0, function* () { 2278 | if (yield ioUtil.exists(dest)) { 2279 | let destExists = true; 2280 | if (yield ioUtil.isDirectory(dest)) { 2281 | // If dest is directory copy src into dest 2282 | dest = path.join(dest, path.basename(source)); 2283 | destExists = yield ioUtil.exists(dest); 2284 | } 2285 | if (destExists) { 2286 | if (options.force == null || options.force) { 2287 | yield rmRF(dest); 2288 | } 2289 | else { 2290 | throw new Error('Destination already exists'); 2291 | } 2292 | } 2293 | } 2294 | yield mkdirP(path.dirname(dest)); 2295 | yield ioUtil.rename(source, dest); 2296 | }); 2297 | } 2298 | exports.mv = mv; 2299 | /** 2300 | * Remove a path recursively with force 2301 | * 2302 | * @param inputPath path to remove 2303 | */ 2304 | function rmRF(inputPath) { 2305 | return __awaiter(this, void 0, void 0, function* () { 2306 | if (ioUtil.IS_WINDOWS) { 2307 | // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another 2308 | // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del. 2309 | // Check for invalid characters 2310 | // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file 2311 | if (/[*"<>|]/.test(inputPath)) { 2312 | throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); 2313 | } 2314 | try { 2315 | const cmdPath = ioUtil.getCmdPath(); 2316 | if (yield ioUtil.isDirectory(inputPath, true)) { 2317 | yield exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, { 2318 | env: { inputPath } 2319 | }); 2320 | } 2321 | else { 2322 | yield exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, { 2323 | env: { inputPath } 2324 | }); 2325 | } 2326 | } 2327 | catch (err) { 2328 | // if you try to delete a file that doesn't exist, desired result is achieved 2329 | // other errors are valid 2330 | if (err.code !== 'ENOENT') 2331 | throw err; 2332 | } 2333 | // Shelling out fails to remove a symlink folder with missing source, this unlink catches that 2334 | try { 2335 | yield ioUtil.unlink(inputPath); 2336 | } 2337 | catch (err) { 2338 | // if you try to delete a file that doesn't exist, desired result is achieved 2339 | // other errors are valid 2340 | if (err.code !== 'ENOENT') 2341 | throw err; 2342 | } 2343 | } 2344 | else { 2345 | let isDir = false; 2346 | try { 2347 | isDir = yield ioUtil.isDirectory(inputPath); 2348 | } 2349 | catch (err) { 2350 | // if you try to delete a file that doesn't exist, desired result is achieved 2351 | // other errors are valid 2352 | if (err.code !== 'ENOENT') 2353 | throw err; 2354 | return; 2355 | } 2356 | if (isDir) { 2357 | yield execFile(`rm`, [`-rf`, `${inputPath}`]); 2358 | } 2359 | else { 2360 | yield ioUtil.unlink(inputPath); 2361 | } 2362 | } 2363 | }); 2364 | } 2365 | exports.rmRF = rmRF; 2366 | /** 2367 | * Make a directory. Creates the full path with folders in between 2368 | * Will throw if it fails 2369 | * 2370 | * @param fsPath path to create 2371 | * @returns Promise 2372 | */ 2373 | function mkdirP(fsPath) { 2374 | return __awaiter(this, void 0, void 0, function* () { 2375 | assert_1.ok(fsPath, 'a path argument must be provided'); 2376 | yield ioUtil.mkdir(fsPath, { recursive: true }); 2377 | }); 2378 | } 2379 | exports.mkdirP = mkdirP; 2380 | /** 2381 | * Returns path of a tool had the tool actually been invoked. Resolves via paths. 2382 | * If you check and the tool does not exist, it will throw. 2383 | * 2384 | * @param tool name of the tool 2385 | * @param check whether to check if tool exists 2386 | * @returns Promise path to tool 2387 | */ 2388 | function which(tool, check) { 2389 | return __awaiter(this, void 0, void 0, function* () { 2390 | if (!tool) { 2391 | throw new Error("parameter 'tool' is required"); 2392 | } 2393 | // recursive when check=true 2394 | if (check) { 2395 | const result = yield which(tool, false); 2396 | if (!result) { 2397 | if (ioUtil.IS_WINDOWS) { 2398 | throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); 2399 | } 2400 | else { 2401 | throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); 2402 | } 2403 | } 2404 | return result; 2405 | } 2406 | const matches = yield findInPath(tool); 2407 | if (matches && matches.length > 0) { 2408 | return matches[0]; 2409 | } 2410 | return ''; 2411 | }); 2412 | } 2413 | exports.which = which; 2414 | /** 2415 | * Returns a list of all occurrences of the given tool on the system path. 2416 | * 2417 | * @returns Promise the paths of the tool 2418 | */ 2419 | function findInPath(tool) { 2420 | return __awaiter(this, void 0, void 0, function* () { 2421 | if (!tool) { 2422 | throw new Error("parameter 'tool' is required"); 2423 | } 2424 | // build the list of extensions to try 2425 | const extensions = []; 2426 | if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) { 2427 | for (const extension of process.env['PATHEXT'].split(path.delimiter)) { 2428 | if (extension) { 2429 | extensions.push(extension); 2430 | } 2431 | } 2432 | } 2433 | // if it's rooted, return it if exists. otherwise return empty. 2434 | if (ioUtil.isRooted(tool)) { 2435 | const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); 2436 | if (filePath) { 2437 | return [filePath]; 2438 | } 2439 | return []; 2440 | } 2441 | // if any path separators, return empty 2442 | if (tool.includes(path.sep)) { 2443 | return []; 2444 | } 2445 | // build the list of directories 2446 | // 2447 | // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, 2448 | // it feels like we should not do this. Checking the current directory seems like more of a use 2449 | // case of a shell, and the which() function exposed by the toolkit should strive for consistency 2450 | // across platforms. 2451 | const directories = []; 2452 | if (process.env.PATH) { 2453 | for (const p of process.env.PATH.split(path.delimiter)) { 2454 | if (p) { 2455 | directories.push(p); 2456 | } 2457 | } 2458 | } 2459 | // find all matches 2460 | const matches = []; 2461 | for (const directory of directories) { 2462 | const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions); 2463 | if (filePath) { 2464 | matches.push(filePath); 2465 | } 2466 | } 2467 | return matches; 2468 | }); 2469 | } 2470 | exports.findInPath = findInPath; 2471 | function readCopyOptions(options) { 2472 | const force = options.force == null ? true : options.force; 2473 | const recursive = Boolean(options.recursive); 2474 | const copySourceDirectory = options.copySourceDirectory == null 2475 | ? true 2476 | : Boolean(options.copySourceDirectory); 2477 | return { force, recursive, copySourceDirectory }; 2478 | } 2479 | function cpDirRecursive(sourceDir, destDir, currentDepth, force) { 2480 | return __awaiter(this, void 0, void 0, function* () { 2481 | // Ensure there is not a run away recursive copy 2482 | if (currentDepth >= 255) 2483 | return; 2484 | currentDepth++; 2485 | yield mkdirP(destDir); 2486 | const files = yield ioUtil.readdir(sourceDir); 2487 | for (const fileName of files) { 2488 | const srcFile = `${sourceDir}/${fileName}`; 2489 | const destFile = `${destDir}/${fileName}`; 2490 | const srcFileStat = yield ioUtil.lstat(srcFile); 2491 | if (srcFileStat.isDirectory()) { 2492 | // Recurse 2493 | yield cpDirRecursive(srcFile, destFile, currentDepth, force); 2494 | } 2495 | else { 2496 | yield copyFile(srcFile, destFile, force); 2497 | } 2498 | } 2499 | // Change the mode for the newly created directory 2500 | yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); 2501 | }); 2502 | } 2503 | // Buffered file copy 2504 | function copyFile(srcFile, destFile, force) { 2505 | return __awaiter(this, void 0, void 0, function* () { 2506 | if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { 2507 | // unlink/re-link it 2508 | try { 2509 | yield ioUtil.lstat(destFile); 2510 | yield ioUtil.unlink(destFile); 2511 | } 2512 | catch (e) { 2513 | // Try to override file permission 2514 | if (e.code === 'EPERM') { 2515 | yield ioUtil.chmod(destFile, '0666'); 2516 | yield ioUtil.unlink(destFile); 2517 | } 2518 | // other errors = it doesn't exist, no work to do 2519 | } 2520 | // Copy over symlink 2521 | const symlinkFull = yield ioUtil.readlink(srcFile); 2522 | yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null); 2523 | } 2524 | else if (!(yield ioUtil.exists(destFile)) || force) { 2525 | yield ioUtil.copyFile(srcFile, destFile); 2526 | } 2527 | }); 2528 | } 2529 | //# sourceMappingURL=io.js.map 2530 | 2531 | /***/ }), 2532 | 2533 | /***/ 294: 2534 | /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { 2535 | 2536 | module.exports = __nccwpck_require__(219); 2537 | 2538 | 2539 | /***/ }), 2540 | 2541 | /***/ 219: 2542 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2543 | 2544 | 2545 | 2546 | var net = __nccwpck_require__(808); 2547 | var tls = __nccwpck_require__(404); 2548 | var http = __nccwpck_require__(685); 2549 | var https = __nccwpck_require__(687); 2550 | var events = __nccwpck_require__(361); 2551 | var assert = __nccwpck_require__(491); 2552 | var util = __nccwpck_require__(837); 2553 | 2554 | 2555 | exports.httpOverHttp = httpOverHttp; 2556 | exports.httpsOverHttp = httpsOverHttp; 2557 | exports.httpOverHttps = httpOverHttps; 2558 | exports.httpsOverHttps = httpsOverHttps; 2559 | 2560 | 2561 | function httpOverHttp(options) { 2562 | var agent = new TunnelingAgent(options); 2563 | agent.request = http.request; 2564 | return agent; 2565 | } 2566 | 2567 | function httpsOverHttp(options) { 2568 | var agent = new TunnelingAgent(options); 2569 | agent.request = http.request; 2570 | agent.createSocket = createSecureSocket; 2571 | agent.defaultPort = 443; 2572 | return agent; 2573 | } 2574 | 2575 | function httpOverHttps(options) { 2576 | var agent = new TunnelingAgent(options); 2577 | agent.request = https.request; 2578 | return agent; 2579 | } 2580 | 2581 | function httpsOverHttps(options) { 2582 | var agent = new TunnelingAgent(options); 2583 | agent.request = https.request; 2584 | agent.createSocket = createSecureSocket; 2585 | agent.defaultPort = 443; 2586 | return agent; 2587 | } 2588 | 2589 | 2590 | function TunnelingAgent(options) { 2591 | var self = this; 2592 | self.options = options || {}; 2593 | self.proxyOptions = self.options.proxy || {}; 2594 | self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; 2595 | self.requests = []; 2596 | self.sockets = []; 2597 | 2598 | self.on('free', function onFree(socket, host, port, localAddress) { 2599 | var options = toOptions(host, port, localAddress); 2600 | for (var i = 0, len = self.requests.length; i < len; ++i) { 2601 | var pending = self.requests[i]; 2602 | if (pending.host === options.host && pending.port === options.port) { 2603 | // Detect the request to connect same origin server, 2604 | // reuse the connection. 2605 | self.requests.splice(i, 1); 2606 | pending.request.onSocket(socket); 2607 | return; 2608 | } 2609 | } 2610 | socket.destroy(); 2611 | self.removeSocket(socket); 2612 | }); 2613 | } 2614 | util.inherits(TunnelingAgent, events.EventEmitter); 2615 | 2616 | TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { 2617 | var self = this; 2618 | var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); 2619 | 2620 | if (self.sockets.length >= this.maxSockets) { 2621 | // We are over limit so we'll add it to the queue. 2622 | self.requests.push(options); 2623 | return; 2624 | } 2625 | 2626 | // If we are under maxSockets create a new one. 2627 | self.createSocket(options, function(socket) { 2628 | socket.on('free', onFree); 2629 | socket.on('close', onCloseOrRemove); 2630 | socket.on('agentRemove', onCloseOrRemove); 2631 | req.onSocket(socket); 2632 | 2633 | function onFree() { 2634 | self.emit('free', socket, options); 2635 | } 2636 | 2637 | function onCloseOrRemove(err) { 2638 | self.removeSocket(socket); 2639 | socket.removeListener('free', onFree); 2640 | socket.removeListener('close', onCloseOrRemove); 2641 | socket.removeListener('agentRemove', onCloseOrRemove); 2642 | } 2643 | }); 2644 | }; 2645 | 2646 | TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { 2647 | var self = this; 2648 | var placeholder = {}; 2649 | self.sockets.push(placeholder); 2650 | 2651 | var connectOptions = mergeOptions({}, self.proxyOptions, { 2652 | method: 'CONNECT', 2653 | path: options.host + ':' + options.port, 2654 | agent: false, 2655 | headers: { 2656 | host: options.host + ':' + options.port 2657 | } 2658 | }); 2659 | if (options.localAddress) { 2660 | connectOptions.localAddress = options.localAddress; 2661 | } 2662 | if (connectOptions.proxyAuth) { 2663 | connectOptions.headers = connectOptions.headers || {}; 2664 | connectOptions.headers['Proxy-Authorization'] = 'Basic ' + 2665 | new Buffer(connectOptions.proxyAuth).toString('base64'); 2666 | } 2667 | 2668 | debug('making CONNECT request'); 2669 | var connectReq = self.request(connectOptions); 2670 | connectReq.useChunkedEncodingByDefault = false; // for v0.6 2671 | connectReq.once('response', onResponse); // for v0.6 2672 | connectReq.once('upgrade', onUpgrade); // for v0.6 2673 | connectReq.once('connect', onConnect); // for v0.7 or later 2674 | connectReq.once('error', onError); 2675 | connectReq.end(); 2676 | 2677 | function onResponse(res) { 2678 | // Very hacky. This is necessary to avoid http-parser leaks. 2679 | res.upgrade = true; 2680 | } 2681 | 2682 | function onUpgrade(res, socket, head) { 2683 | // Hacky. 2684 | process.nextTick(function() { 2685 | onConnect(res, socket, head); 2686 | }); 2687 | } 2688 | 2689 | function onConnect(res, socket, head) { 2690 | connectReq.removeAllListeners(); 2691 | socket.removeAllListeners(); 2692 | 2693 | if (res.statusCode !== 200) { 2694 | debug('tunneling socket could not be established, statusCode=%d', 2695 | res.statusCode); 2696 | socket.destroy(); 2697 | var error = new Error('tunneling socket could not be established, ' + 2698 | 'statusCode=' + res.statusCode); 2699 | error.code = 'ECONNRESET'; 2700 | options.request.emit('error', error); 2701 | self.removeSocket(placeholder); 2702 | return; 2703 | } 2704 | if (head.length > 0) { 2705 | debug('got illegal response body from proxy'); 2706 | socket.destroy(); 2707 | var error = new Error('got illegal response body from proxy'); 2708 | error.code = 'ECONNRESET'; 2709 | options.request.emit('error', error); 2710 | self.removeSocket(placeholder); 2711 | return; 2712 | } 2713 | debug('tunneling connection has established'); 2714 | self.sockets[self.sockets.indexOf(placeholder)] = socket; 2715 | return cb(socket); 2716 | } 2717 | 2718 | function onError(cause) { 2719 | connectReq.removeAllListeners(); 2720 | 2721 | debug('tunneling socket could not be established, cause=%s\n', 2722 | cause.message, cause.stack); 2723 | var error = new Error('tunneling socket could not be established, ' + 2724 | 'cause=' + cause.message); 2725 | error.code = 'ECONNRESET'; 2726 | options.request.emit('error', error); 2727 | self.removeSocket(placeholder); 2728 | } 2729 | }; 2730 | 2731 | TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { 2732 | var pos = this.sockets.indexOf(socket) 2733 | if (pos === -1) { 2734 | return; 2735 | } 2736 | this.sockets.splice(pos, 1); 2737 | 2738 | var pending = this.requests.shift(); 2739 | if (pending) { 2740 | // If we have pending requests and a socket gets closed a new one 2741 | // needs to be created to take over in the pool for the one that closed. 2742 | this.createSocket(pending, function(socket) { 2743 | pending.request.onSocket(socket); 2744 | }); 2745 | } 2746 | }; 2747 | 2748 | function createSecureSocket(options, cb) { 2749 | var self = this; 2750 | TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { 2751 | var hostHeader = options.request.getHeader('host'); 2752 | var tlsOptions = mergeOptions({}, self.options, { 2753 | socket: socket, 2754 | servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host 2755 | }); 2756 | 2757 | // 0 is dummy port for v0.6 2758 | var secureSocket = tls.connect(0, tlsOptions); 2759 | self.sockets[self.sockets.indexOf(socket)] = secureSocket; 2760 | cb(secureSocket); 2761 | }); 2762 | } 2763 | 2764 | 2765 | function toOptions(host, port, localAddress) { 2766 | if (typeof host === 'string') { // since v0.10 2767 | return { 2768 | host: host, 2769 | port: port, 2770 | localAddress: localAddress 2771 | }; 2772 | } 2773 | return host; // for v0.11 or later 2774 | } 2775 | 2776 | function mergeOptions(target) { 2777 | for (var i = 1, len = arguments.length; i < len; ++i) { 2778 | var overrides = arguments[i]; 2779 | if (typeof overrides === 'object') { 2780 | var keys = Object.keys(overrides); 2781 | for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { 2782 | var k = keys[j]; 2783 | if (overrides[k] !== undefined) { 2784 | target[k] = overrides[k]; 2785 | } 2786 | } 2787 | } 2788 | } 2789 | return target; 2790 | } 2791 | 2792 | 2793 | var debug; 2794 | if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { 2795 | debug = function() { 2796 | var args = Array.prototype.slice.call(arguments); 2797 | if (typeof args[0] === 'string') { 2798 | args[0] = 'TUNNEL: ' + args[0]; 2799 | } else { 2800 | args.unshift('TUNNEL:'); 2801 | } 2802 | console.error.apply(console, args); 2803 | } 2804 | } else { 2805 | debug = function() {}; 2806 | } 2807 | exports.debug = debug; // for test 2808 | 2809 | 2810 | /***/ }), 2811 | 2812 | /***/ 491: 2813 | /***/ ((module) => { 2814 | 2815 | module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("assert"); 2816 | 2817 | /***/ }), 2818 | 2819 | /***/ 81: 2820 | /***/ ((module) => { 2821 | 2822 | module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("child_process"); 2823 | 2824 | /***/ }), 2825 | 2826 | /***/ 361: 2827 | /***/ ((module) => { 2828 | 2829 | module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("events"); 2830 | 2831 | /***/ }), 2832 | 2833 | /***/ 147: 2834 | /***/ ((module) => { 2835 | 2836 | module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs"); 2837 | 2838 | /***/ }), 2839 | 2840 | /***/ 685: 2841 | /***/ ((module) => { 2842 | 2843 | module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("http"); 2844 | 2845 | /***/ }), 2846 | 2847 | /***/ 687: 2848 | /***/ ((module) => { 2849 | 2850 | module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("https"); 2851 | 2852 | /***/ }), 2853 | 2854 | /***/ 808: 2855 | /***/ ((module) => { 2856 | 2857 | module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("net"); 2858 | 2859 | /***/ }), 2860 | 2861 | /***/ 37: 2862 | /***/ ((module) => { 2863 | 2864 | module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("os"); 2865 | 2866 | /***/ }), 2867 | 2868 | /***/ 17: 2869 | /***/ ((module) => { 2870 | 2871 | module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("path"); 2872 | 2873 | /***/ }), 2874 | 2875 | /***/ 576: 2876 | /***/ ((module) => { 2877 | 2878 | module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("string_decoder"); 2879 | 2880 | /***/ }), 2881 | 2882 | /***/ 512: 2883 | /***/ ((module) => { 2884 | 2885 | module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("timers"); 2886 | 2887 | /***/ }), 2888 | 2889 | /***/ 404: 2890 | /***/ ((module) => { 2891 | 2892 | module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("tls"); 2893 | 2894 | /***/ }), 2895 | 2896 | /***/ 837: 2897 | /***/ ((module) => { 2898 | 2899 | module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util"); 2900 | 2901 | /***/ }) 2902 | 2903 | /******/ }); 2904 | /************************************************************************/ 2905 | /******/ // The module cache 2906 | /******/ var __webpack_module_cache__ = {}; 2907 | /******/ 2908 | /******/ // The require function 2909 | /******/ function __nccwpck_require__(moduleId) { 2910 | /******/ // Check if module is in cache 2911 | /******/ var cachedModule = __webpack_module_cache__[moduleId]; 2912 | /******/ if (cachedModule !== undefined) { 2913 | /******/ return cachedModule.exports; 2914 | /******/ } 2915 | /******/ // Create a new module (and put it into the cache) 2916 | /******/ var module = __webpack_module_cache__[moduleId] = { 2917 | /******/ // no module.id needed 2918 | /******/ // no module.loaded needed 2919 | /******/ exports: {} 2920 | /******/ }; 2921 | /******/ 2922 | /******/ // Execute the module function 2923 | /******/ var threw = true; 2924 | /******/ try { 2925 | /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); 2926 | /******/ threw = false; 2927 | /******/ } finally { 2928 | /******/ if(threw) delete __webpack_module_cache__[moduleId]; 2929 | /******/ } 2930 | /******/ 2931 | /******/ // Return the exports of the module 2932 | /******/ return module.exports; 2933 | /******/ } 2934 | /******/ 2935 | /************************************************************************/ 2936 | /******/ /* webpack/runtime/compat get default export */ 2937 | /******/ (() => { 2938 | /******/ // getDefaultExport function for compatibility with non-harmony modules 2939 | /******/ __nccwpck_require__.n = (module) => { 2940 | /******/ var getter = module && module.__esModule ? 2941 | /******/ () => (module['default']) : 2942 | /******/ () => (module); 2943 | /******/ __nccwpck_require__.d(getter, { a: getter }); 2944 | /******/ return getter; 2945 | /******/ }; 2946 | /******/ })(); 2947 | /******/ 2948 | /******/ /* webpack/runtime/define property getters */ 2949 | /******/ (() => { 2950 | /******/ // define getter functions for harmony exports 2951 | /******/ __nccwpck_require__.d = (exports, definition) => { 2952 | /******/ for(var key in definition) { 2953 | /******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { 2954 | /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 2955 | /******/ } 2956 | /******/ } 2957 | /******/ }; 2958 | /******/ })(); 2959 | /******/ 2960 | /******/ /* webpack/runtime/hasOwnProperty shorthand */ 2961 | /******/ (() => { 2962 | /******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 2963 | /******/ })(); 2964 | /******/ 2965 | /******/ /* webpack/runtime/compat */ 2966 | /******/ 2967 | /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/"; 2968 | /******/ 2969 | /************************************************************************/ 2970 | var __webpack_exports__ = {}; 2971 | // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 2972 | (() => { 2973 | /* harmony import */ var _actions_core__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(186); 2974 | /* harmony import */ var _actions_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(_actions_core__WEBPACK_IMPORTED_MODULE_0__); 2975 | /* harmony import */ var _actions_exec__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(514); 2976 | /* harmony import */ var _actions_exec__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nccwpck_require__.n(_actions_exec__WEBPACK_IMPORTED_MODULE_1__); 2977 | var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { 2978 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 2979 | return new (P || (P = Promise))(function (resolve, reject) { 2980 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 2981 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 2982 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 2983 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 2984 | }); 2985 | }; 2986 | 2987 | 2988 | function run() { 2989 | return __awaiter(this, void 0, void 0, function* () { 2990 | const port = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput('port'); 2991 | let runArguments = [ 2992 | "run", "-d", "-p", `${port}:12321`, 2993 | "--name", "cache_proxy", 2994 | "--env", "ACTIONS_CACHE_URL", 2995 | "--env", "ACTIONS_RUNTIME_URL", 2996 | "--env", "ACTIONS_RUNTIME_TOKEN", 2997 | "ghcr.io/cirruslabs/actions-http-cache-proxy:latest" 2998 | ]; 2999 | try { 3000 | yield (0,_actions_exec__WEBPACK_IMPORTED_MODULE_1__.exec)(`"docker"`, runArguments); 3001 | } 3002 | catch (e) { 3003 | _actions_core__WEBPACK_IMPORTED_MODULE_0__.error(e); 3004 | } 3005 | }); 3006 | } 3007 | run(); 3008 | 3009 | })(); 3010 | 3011 | -------------------------------------------------------------------------------- /dist/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } 4 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "http-cache-service", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@actions/core": { 8 | "version": "1.6.0", 9 | "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.6.0.tgz", 10 | "integrity": "sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==", 11 | "requires": { 12 | "@actions/http-client": "^1.0.11" 13 | } 14 | }, 15 | "@actions/exec": { 16 | "version": "1.1.1", 17 | "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", 18 | "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", 19 | "requires": { 20 | "@actions/io": "^1.0.1" 21 | } 22 | }, 23 | "@actions/glob": { 24 | "version": "0.1.2", 25 | "resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.1.2.tgz", 26 | "integrity": "sha512-SclLR7Ia5sEqjkJTPs7Sd86maMDw43p769YxBOxvPvEWuPEhpAnBsQfENOpXjFYMmhCqd127bmf+YdvJqVqR4A==", 27 | "requires": { 28 | "@actions/core": "^1.2.6", 29 | "minimatch": "^3.0.4" 30 | } 31 | }, 32 | "@actions/http-client": { 33 | "version": "1.0.11", 34 | "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz", 35 | "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==", 36 | "requires": { 37 | "tunnel": "0.0.6" 38 | } 39 | }, 40 | "@actions/io": { 41 | "version": "1.1.2", 42 | "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.2.tgz", 43 | "integrity": "sha512-d+RwPlMp+2qmBfeLYPLXuSRykDIFEwdTA0MMxzS9kh4kvP1ftrc/9fzy6pX6qAjthdXruHQ6/6kjT/DNo5ALuw==" 44 | }, 45 | "@azure/abort-controller": { 46 | "version": "1.0.4", 47 | "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.4.tgz", 48 | "integrity": "sha512-lNUmDRVGpanCsiUN3NWxFTdwmdFI53xwhkTFfHDGTYk46ca7Ind3nanJc+U6Zj9Tv+9nTCWRBscWEW1DyKOpTw==", 49 | "requires": { 50 | "tslib": "^2.0.0" 51 | }, 52 | "dependencies": { 53 | "tslib": { 54 | "version": "2.3.1", 55 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", 56 | "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" 57 | } 58 | } 59 | }, 60 | "@azure/core-asynciterator-polyfill": { 61 | "version": "1.0.2", 62 | "resolved": "https://registry.npmjs.org/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.2.tgz", 63 | "integrity": "sha512-3rkP4LnnlWawl0LZptJOdXNrT/fHp2eQMadoasa6afspXdpGrtPZuAQc2PD0cpgyuoXtUWyC3tv7xfntjGS5Dw==" 64 | }, 65 | "@azure/core-auth": { 66 | "version": "1.3.2", 67 | "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.3.2.tgz", 68 | "integrity": "sha512-7CU6DmCHIZp5ZPiZ9r3J17lTKMmYsm/zGvNkjArQwPkrLlZ1TZ+EUYfGgh2X31OLMVAQCTJZW4cXHJi02EbJnA==", 69 | "requires": { 70 | "@azure/abort-controller": "^1.0.0", 71 | "tslib": "^2.2.0" 72 | }, 73 | "dependencies": { 74 | "tslib": { 75 | "version": "2.3.1", 76 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", 77 | "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" 78 | } 79 | } 80 | }, 81 | "@azure/core-http": { 82 | "version": "2.2.4", 83 | "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.2.4.tgz", 84 | "integrity": "sha512-QmmJmexXKtPyc3/rsZR/YTLDvMatzbzAypJmLzvlfxgz/SkgnqV/D4f6F2LsK6tBj1qhyp8BoXiOebiej0zz3A==", 85 | "requires": { 86 | "@azure/abort-controller": "^1.0.0", 87 | "@azure/core-asynciterator-polyfill": "^1.0.0", 88 | "@azure/core-auth": "^1.3.0", 89 | "@azure/core-tracing": "1.0.0-preview.13", 90 | "@azure/logger": "^1.0.0", 91 | "@types/node-fetch": "^2.5.0", 92 | "@types/tunnel": "^0.0.3", 93 | "form-data": "^4.0.0", 94 | "node-fetch": "^2.6.7", 95 | "process": "^0.11.10", 96 | "tough-cookie": "^4.0.0", 97 | "tslib": "^2.2.0", 98 | "tunnel": "^0.0.6", 99 | "uuid": "^8.3.0", 100 | "xml2js": "^0.4.19" 101 | }, 102 | "dependencies": { 103 | "form-data": { 104 | "version": "4.0.0", 105 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 106 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 107 | "requires": { 108 | "asynckit": "^0.4.0", 109 | "combined-stream": "^1.0.8", 110 | "mime-types": "^2.1.12" 111 | } 112 | }, 113 | "tough-cookie": { 114 | "version": "4.0.0", 115 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", 116 | "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", 117 | "requires": { 118 | "psl": "^1.1.33", 119 | "punycode": "^2.1.1", 120 | "universalify": "^0.1.2" 121 | } 122 | }, 123 | "tslib": { 124 | "version": "2.3.1", 125 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", 126 | "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" 127 | } 128 | } 129 | }, 130 | "@azure/core-lro": { 131 | "version": "2.2.4", 132 | "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.2.4.tgz", 133 | "integrity": "sha512-e1I2v2CZM0mQo8+RSix0x091Av493e4bnT22ds2fcQGslTHzM2oTbswkB65nP4iEpCxBrFxOSDPKExmTmjCVtQ==", 134 | "requires": { 135 | "@azure/abort-controller": "^1.0.0", 136 | "@azure/core-tracing": "1.0.0-preview.13", 137 | "@azure/logger": "^1.0.0", 138 | "tslib": "^2.2.0" 139 | }, 140 | "dependencies": { 141 | "tslib": { 142 | "version": "2.3.1", 143 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", 144 | "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" 145 | } 146 | } 147 | }, 148 | "@azure/core-paging": { 149 | "version": "1.2.1", 150 | "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.2.1.tgz", 151 | "integrity": "sha512-UtH5iMlYsvg+nQYIl4UHlvvSrsBjOlRF4fs0j7mxd3rWdAStrKYrh2durOpHs5C9yZbVhsVDaisoyaf/lL1EVA==", 152 | "requires": { 153 | "@azure/core-asynciterator-polyfill": "^1.0.0", 154 | "tslib": "^2.2.0" 155 | }, 156 | "dependencies": { 157 | "tslib": { 158 | "version": "2.3.1", 159 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", 160 | "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" 161 | } 162 | } 163 | }, 164 | "@azure/core-tracing": { 165 | "version": "1.0.0-preview.13", 166 | "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", 167 | "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", 168 | "requires": { 169 | "@opentelemetry/api": "^1.0.1", 170 | "tslib": "^2.2.0" 171 | }, 172 | "dependencies": { 173 | "tslib": { 174 | "version": "2.3.1", 175 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", 176 | "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" 177 | } 178 | } 179 | }, 180 | "@azure/logger": { 181 | "version": "1.0.3", 182 | "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz", 183 | "integrity": "sha512-aK4s3Xxjrx3daZr3VylxejK3vG5ExXck5WOHDJ8in/k9AqlfIyFMMT1uG7u8mNjX+QRILTIn0/Xgschfh/dQ9g==", 184 | "requires": { 185 | "tslib": "^2.2.0" 186 | }, 187 | "dependencies": { 188 | "tslib": { 189 | "version": "2.3.1", 190 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", 191 | "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" 192 | } 193 | } 194 | }, 195 | "@azure/ms-rest-js": { 196 | "version": "2.6.1", 197 | "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.6.1.tgz", 198 | "integrity": "sha512-LLi4jRe/qy5IM8U2CkoDgSZp2OH+MgDe2wePmhz8uY84Svc53EhHaamVyoU6BjjHBxvCRh1vcD1urJDccrxqIw==", 199 | "requires": { 200 | "@azure/core-auth": "^1.1.4", 201 | "abort-controller": "^3.0.0", 202 | "form-data": "^2.5.0", 203 | "node-fetch": "^2.6.7", 204 | "tough-cookie": "^3.0.1", 205 | "tslib": "^1.10.0", 206 | "tunnel": "0.0.6", 207 | "uuid": "^8.3.2", 208 | "xml2js": "^0.4.19" 209 | }, 210 | "dependencies": { 211 | "form-data": { 212 | "version": "2.5.1", 213 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", 214 | "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", 215 | "requires": { 216 | "asynckit": "^0.4.0", 217 | "combined-stream": "^1.0.6", 218 | "mime-types": "^2.1.12" 219 | } 220 | }, 221 | "tough-cookie": { 222 | "version": "3.0.1", 223 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", 224 | "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", 225 | "requires": { 226 | "ip-regex": "^2.1.0", 227 | "psl": "^1.1.28", 228 | "punycode": "^2.1.1" 229 | } 230 | } 231 | } 232 | }, 233 | "@azure/storage-blob": { 234 | "version": "12.9.0", 235 | "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.9.0.tgz", 236 | "integrity": "sha512-ank38FdCLfJ+EoeMzCz3hkYJuZAd63ARvDKkxZYRDb+beBYf+/+gx8jNTqkq/hfyUl4dJQ/a7tECU0Y0F98CHg==", 237 | "requires": { 238 | "@azure/abort-controller": "^1.0.0", 239 | "@azure/core-http": "^2.0.0", 240 | "@azure/core-lro": "^2.2.0", 241 | "@azure/core-paging": "^1.1.1", 242 | "@azure/core-tracing": "1.0.0-preview.13", 243 | "@azure/logger": "^1.0.0", 244 | "events": "^3.0.0", 245 | "tslib": "^2.2.0" 246 | }, 247 | "dependencies": { 248 | "tslib": { 249 | "version": "2.3.1", 250 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", 251 | "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" 252 | } 253 | } 254 | }, 255 | "@opentelemetry/api": { 256 | "version": "1.1.0", 257 | "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.1.0.tgz", 258 | "integrity": "sha512-hf+3bwuBwtXsugA2ULBc95qxrOqP2pOekLz34BJhcAKawt94vfeNyUKpYc0lZQ/3sCP6LqRa7UAdHA7i5UODzQ==" 259 | }, 260 | "@sindresorhus/is": { 261 | "version": "4.6.0", 262 | "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", 263 | "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==" 264 | }, 265 | "@szmarczak/http-timer": { 266 | "version": "4.0.6", 267 | "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", 268 | "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", 269 | "requires": { 270 | "defer-to-connect": "^2.0.0" 271 | } 272 | }, 273 | "@types/cacheable-request": { 274 | "version": "6.0.2", 275 | "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", 276 | "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", 277 | "requires": { 278 | "@types/http-cache-semantics": "*", 279 | "@types/keyv": "*", 280 | "@types/node": "*", 281 | "@types/responselike": "*" 282 | } 283 | }, 284 | "@types/caseless": { 285 | "version": "0.12.2", 286 | "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", 287 | "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==" 288 | }, 289 | "@types/chai": { 290 | "version": "4.2.12", 291 | "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.12.tgz", 292 | "integrity": "sha512-aN5IAC8QNtSUdQzxu7lGBgYAOuU1tmRU4c9dIq5OKGf/SBVjXo+ffM2wEjudAWbgpOhy60nLoAGH1xm8fpCKFQ==", 293 | "dev": true 294 | }, 295 | "@types/http-cache-semantics": { 296 | "version": "4.0.1", 297 | "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", 298 | "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==" 299 | }, 300 | "@types/keyv": { 301 | "version": "3.1.4", 302 | "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", 303 | "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", 304 | "requires": { 305 | "@types/node": "*" 306 | } 307 | }, 308 | "@types/mocha": { 309 | "version": "8.0.3", 310 | "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.0.3.tgz", 311 | "integrity": "sha512-vyxR57nv8NfcU0GZu8EUXZLTbCMupIUwy95LJ6lllN+JRPG25CwMHoB1q5xKh8YKhQnHYRAn4yW2yuHbf/5xgg==", 312 | "dev": true 313 | }, 314 | "@types/node": { 315 | "version": "14.18.12", 316 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.12.tgz", 317 | "integrity": "sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==" 318 | }, 319 | "@types/node-fetch": { 320 | "version": "2.6.1", 321 | "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz", 322 | "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==", 323 | "requires": { 324 | "@types/node": "*", 325 | "form-data": "^3.0.0" 326 | }, 327 | "dependencies": { 328 | "form-data": { 329 | "version": "3.0.1", 330 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", 331 | "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", 332 | "requires": { 333 | "asynckit": "^0.4.0", 334 | "combined-stream": "^1.0.8", 335 | "mime-types": "^2.1.12" 336 | } 337 | } 338 | } 339 | }, 340 | "@types/request": { 341 | "version": "2.48.8", 342 | "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.8.tgz", 343 | "integrity": "sha512-whjk1EDJPcAR2kYHRbFl/lKeeKYTi05A15K9bnLInCVroNDCtXce57xKdI0/rQaA3K+6q0eFyUBPmqfSndUZdQ==", 344 | "requires": { 345 | "@types/caseless": "*", 346 | "@types/node": "*", 347 | "@types/tough-cookie": "*", 348 | "form-data": "^2.5.0" 349 | }, 350 | "dependencies": { 351 | "form-data": { 352 | "version": "2.5.1", 353 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", 354 | "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", 355 | "requires": { 356 | "asynckit": "^0.4.0", 357 | "combined-stream": "^1.0.6", 358 | "mime-types": "^2.1.12" 359 | } 360 | } 361 | } 362 | }, 363 | "@types/responselike": { 364 | "version": "1.0.0", 365 | "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", 366 | "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", 367 | "requires": { 368 | "@types/node": "*" 369 | } 370 | }, 371 | "@types/semver": { 372 | "version": "7.3.9", 373 | "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.9.tgz", 374 | "integrity": "sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ==" 375 | }, 376 | "@types/tough-cookie": { 377 | "version": "4.0.1", 378 | "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.1.tgz", 379 | "integrity": "sha512-Y0K95ThC3esLEYD6ZuqNek29lNX2EM1qxV8y2FTLUB0ff5wWrk7az+mLrnNFUnaXcgKye22+sFBRXOgpPILZNg==" 380 | }, 381 | "@types/tunnel": { 382 | "version": "0.0.3", 383 | "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.3.tgz", 384 | "integrity": "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==", 385 | "requires": { 386 | "@types/node": "*" 387 | } 388 | }, 389 | "@types/uuid": { 390 | "version": "8.3.4", 391 | "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", 392 | "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" 393 | }, 394 | "@ungap/promise-all-settled": { 395 | "version": "1.1.2", 396 | "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", 397 | "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", 398 | "dev": true 399 | }, 400 | "@vercel/ncc": { 401 | "version": "0.33.3", 402 | "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.33.3.tgz", 403 | "integrity": "sha512-JGZ11QV+/ZcfudW2Cz2JVp54/pJNXbsuWRgSh2ZmmZdQBKXqBtIGrwI1Wyx8nlbzAiEFe7FHi4K1zX4//jxTnQ==", 404 | "dev": true 405 | }, 406 | "abort-controller": { 407 | "version": "3.0.0", 408 | "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", 409 | "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", 410 | "requires": { 411 | "event-target-shim": "^5.0.0" 412 | } 413 | }, 414 | "ajv": { 415 | "version": "6.12.4", 416 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz", 417 | "integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==", 418 | "dev": true, 419 | "requires": { 420 | "fast-deep-equal": "^3.1.1", 421 | "fast-json-stable-stringify": "^2.0.0", 422 | "json-schema-traverse": "^0.4.1", 423 | "uri-js": "^4.2.2" 424 | } 425 | }, 426 | "ansi-colors": { 427 | "version": "4.1.1", 428 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", 429 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", 430 | "dev": true 431 | }, 432 | "ansi-regex": { 433 | "version": "5.0.1", 434 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 435 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 436 | "dev": true 437 | }, 438 | "ansi-styles": { 439 | "version": "4.3.0", 440 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 441 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 442 | "dev": true, 443 | "requires": { 444 | "color-convert": "^2.0.1" 445 | } 446 | }, 447 | "anymatch": { 448 | "version": "3.1.2", 449 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", 450 | "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", 451 | "dev": true, 452 | "requires": { 453 | "normalize-path": "^3.0.0", 454 | "picomatch": "^2.0.4" 455 | } 456 | }, 457 | "arg": { 458 | "version": "4.1.3", 459 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 460 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", 461 | "dev": true 462 | }, 463 | "argparse": { 464 | "version": "2.0.1", 465 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 466 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 467 | "dev": true 468 | }, 469 | "asn1": { 470 | "version": "0.2.4", 471 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", 472 | "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", 473 | "dev": true, 474 | "requires": { 475 | "safer-buffer": "~2.1.0" 476 | } 477 | }, 478 | "assert-plus": { 479 | "version": "1.0.0", 480 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", 481 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", 482 | "dev": true 483 | }, 484 | "assertion-error": { 485 | "version": "1.1.0", 486 | "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", 487 | "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", 488 | "dev": true 489 | }, 490 | "asynckit": { 491 | "version": "0.4.0", 492 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 493 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" 494 | }, 495 | "aws-sign2": { 496 | "version": "0.7.0", 497 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", 498 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", 499 | "dev": true 500 | }, 501 | "aws4": { 502 | "version": "1.10.1", 503 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", 504 | "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==", 505 | "dev": true 506 | }, 507 | "balanced-match": { 508 | "version": "1.0.0", 509 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 510 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" 511 | }, 512 | "bcrypt-pbkdf": { 513 | "version": "1.0.2", 514 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", 515 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", 516 | "dev": true, 517 | "requires": { 518 | "tweetnacl": "^0.14.3" 519 | } 520 | }, 521 | "binary-extensions": { 522 | "version": "2.2.0", 523 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 524 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 525 | "dev": true 526 | }, 527 | "brace-expansion": { 528 | "version": "1.1.11", 529 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 530 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 531 | "requires": { 532 | "balanced-match": "^1.0.0", 533 | "concat-map": "0.0.1" 534 | } 535 | }, 536 | "braces": { 537 | "version": "3.0.2", 538 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 539 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 540 | "dev": true, 541 | "requires": { 542 | "fill-range": "^7.0.1" 543 | } 544 | }, 545 | "browser-stdout": { 546 | "version": "1.3.1", 547 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 548 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 549 | "dev": true 550 | }, 551 | "buffer-from": { 552 | "version": "1.1.1", 553 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 554 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", 555 | "dev": true 556 | }, 557 | "cacheable-lookup": { 558 | "version": "5.0.4", 559 | "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", 560 | "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==" 561 | }, 562 | "cacheable-request": { 563 | "version": "7.0.2", 564 | "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", 565 | "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", 566 | "requires": { 567 | "clone-response": "^1.0.2", 568 | "get-stream": "^5.1.0", 569 | "http-cache-semantics": "^4.0.0", 570 | "keyv": "^4.0.0", 571 | "lowercase-keys": "^2.0.0", 572 | "normalize-url": "^6.0.1", 573 | "responselike": "^2.0.0" 574 | } 575 | }, 576 | "camelcase": { 577 | "version": "6.3.0", 578 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", 579 | "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", 580 | "dev": true 581 | }, 582 | "caseless": { 583 | "version": "0.12.0", 584 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", 585 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", 586 | "dev": true 587 | }, 588 | "chai": { 589 | "version": "4.2.0", 590 | "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", 591 | "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", 592 | "dev": true, 593 | "requires": { 594 | "assertion-error": "^1.1.0", 595 | "check-error": "^1.0.2", 596 | "deep-eql": "^3.0.1", 597 | "get-func-name": "^2.0.0", 598 | "pathval": "^1.1.0", 599 | "type-detect": "^4.0.5" 600 | } 601 | }, 602 | "chalk": { 603 | "version": "4.1.2", 604 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 605 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 606 | "dev": true, 607 | "requires": { 608 | "ansi-styles": "^4.1.0", 609 | "supports-color": "^7.1.0" 610 | }, 611 | "dependencies": { 612 | "supports-color": { 613 | "version": "7.2.0", 614 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 615 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 616 | "dev": true, 617 | "requires": { 618 | "has-flag": "^4.0.0" 619 | } 620 | } 621 | } 622 | }, 623 | "check-error": { 624 | "version": "1.0.2", 625 | "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", 626 | "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", 627 | "dev": true 628 | }, 629 | "chokidar": { 630 | "version": "3.5.3", 631 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 632 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 633 | "dev": true, 634 | "requires": { 635 | "anymatch": "~3.1.2", 636 | "braces": "~3.0.2", 637 | "fsevents": "~2.3.2", 638 | "glob-parent": "~5.1.2", 639 | "is-binary-path": "~2.1.0", 640 | "is-glob": "~4.0.1", 641 | "normalize-path": "~3.0.0", 642 | "readdirp": "~3.6.0" 643 | } 644 | }, 645 | "cliui": { 646 | "version": "7.0.4", 647 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 648 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 649 | "dev": true, 650 | "requires": { 651 | "string-width": "^4.2.0", 652 | "strip-ansi": "^6.0.0", 653 | "wrap-ansi": "^7.0.0" 654 | } 655 | }, 656 | "clone-response": { 657 | "version": "1.0.2", 658 | "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", 659 | "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", 660 | "requires": { 661 | "mimic-response": "^1.0.0" 662 | } 663 | }, 664 | "color-convert": { 665 | "version": "2.0.1", 666 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 667 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 668 | "dev": true, 669 | "requires": { 670 | "color-name": "~1.1.4" 671 | } 672 | }, 673 | "color-name": { 674 | "version": "1.1.4", 675 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 676 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 677 | "dev": true 678 | }, 679 | "combined-stream": { 680 | "version": "1.0.8", 681 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 682 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 683 | "requires": { 684 | "delayed-stream": "~1.0.0" 685 | } 686 | }, 687 | "concat-map": { 688 | "version": "0.0.1", 689 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 690 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 691 | }, 692 | "core-util-is": { 693 | "version": "1.0.2", 694 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 695 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", 696 | "dev": true 697 | }, 698 | "dashdash": { 699 | "version": "1.14.1", 700 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", 701 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", 702 | "dev": true, 703 | "requires": { 704 | "assert-plus": "^1.0.0" 705 | } 706 | }, 707 | "debug": { 708 | "version": "4.3.3", 709 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", 710 | "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", 711 | "dev": true, 712 | "requires": { 713 | "ms": "2.1.2" 714 | }, 715 | "dependencies": { 716 | "ms": { 717 | "version": "2.1.2", 718 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 719 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 720 | "dev": true 721 | } 722 | } 723 | }, 724 | "decamelize": { 725 | "version": "4.0.0", 726 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 727 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 728 | "dev": true 729 | }, 730 | "decompress-response": { 731 | "version": "6.0.0", 732 | "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", 733 | "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", 734 | "requires": { 735 | "mimic-response": "^3.1.0" 736 | }, 737 | "dependencies": { 738 | "mimic-response": { 739 | "version": "3.1.0", 740 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", 741 | "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" 742 | } 743 | } 744 | }, 745 | "deep-eql": { 746 | "version": "3.0.1", 747 | "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", 748 | "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", 749 | "dev": true, 750 | "requires": { 751 | "type-detect": "^4.0.0" 752 | } 753 | }, 754 | "defer-to-connect": { 755 | "version": "2.0.1", 756 | "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", 757 | "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==" 758 | }, 759 | "delayed-stream": { 760 | "version": "1.0.0", 761 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 762 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" 763 | }, 764 | "diff": { 765 | "version": "4.0.2", 766 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 767 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 768 | "dev": true 769 | }, 770 | "ecc-jsbn": { 771 | "version": "0.1.2", 772 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", 773 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", 774 | "dev": true, 775 | "requires": { 776 | "jsbn": "~0.1.0", 777 | "safer-buffer": "^2.1.0" 778 | } 779 | }, 780 | "emoji-regex": { 781 | "version": "8.0.0", 782 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 783 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 784 | "dev": true 785 | }, 786 | "end-of-stream": { 787 | "version": "1.4.4", 788 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 789 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 790 | "requires": { 791 | "once": "^1.4.0" 792 | } 793 | }, 794 | "escalade": { 795 | "version": "3.1.1", 796 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 797 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 798 | "dev": true 799 | }, 800 | "escape-string-regexp": { 801 | "version": "4.0.0", 802 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 803 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 804 | "dev": true 805 | }, 806 | "event-target-shim": { 807 | "version": "5.0.1", 808 | "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", 809 | "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" 810 | }, 811 | "events": { 812 | "version": "3.3.0", 813 | "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", 814 | "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" 815 | }, 816 | "extend": { 817 | "version": "3.0.2", 818 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", 819 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", 820 | "dev": true 821 | }, 822 | "extsprintf": { 823 | "version": "1.3.0", 824 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", 825 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", 826 | "dev": true 827 | }, 828 | "fast-deep-equal": { 829 | "version": "3.1.3", 830 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 831 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", 832 | "dev": true 833 | }, 834 | "fast-json-stable-stringify": { 835 | "version": "2.1.0", 836 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 837 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 838 | "dev": true 839 | }, 840 | "fill-range": { 841 | "version": "7.0.1", 842 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 843 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 844 | "dev": true, 845 | "requires": { 846 | "to-regex-range": "^5.0.1" 847 | } 848 | }, 849 | "find-up": { 850 | "version": "5.0.0", 851 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 852 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 853 | "dev": true, 854 | "requires": { 855 | "locate-path": "^6.0.0", 856 | "path-exists": "^4.0.0" 857 | } 858 | }, 859 | "flat": { 860 | "version": "5.0.2", 861 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 862 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 863 | "dev": true 864 | }, 865 | "forever-agent": { 866 | "version": "0.6.1", 867 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", 868 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", 869 | "dev": true 870 | }, 871 | "form-data": { 872 | "version": "2.3.3", 873 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", 874 | "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", 875 | "dev": true, 876 | "requires": { 877 | "asynckit": "^0.4.0", 878 | "combined-stream": "^1.0.6", 879 | "mime-types": "^2.1.12" 880 | } 881 | }, 882 | "fs.realpath": { 883 | "version": "1.0.0", 884 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 885 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 886 | "dev": true 887 | }, 888 | "fsevents": { 889 | "version": "2.3.2", 890 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 891 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 892 | "dev": true, 893 | "optional": true 894 | }, 895 | "get-caller-file": { 896 | "version": "2.0.5", 897 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 898 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 899 | "dev": true 900 | }, 901 | "get-func-name": { 902 | "version": "2.0.0", 903 | "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", 904 | "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", 905 | "dev": true 906 | }, 907 | "get-stream": { 908 | "version": "5.2.0", 909 | "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", 910 | "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", 911 | "requires": { 912 | "pump": "^3.0.0" 913 | } 914 | }, 915 | "getpass": { 916 | "version": "0.1.7", 917 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", 918 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", 919 | "dev": true, 920 | "requires": { 921 | "assert-plus": "^1.0.0" 922 | } 923 | }, 924 | "glob": { 925 | "version": "7.2.0", 926 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", 927 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", 928 | "dev": true, 929 | "requires": { 930 | "fs.realpath": "^1.0.0", 931 | "inflight": "^1.0.4", 932 | "inherits": "2", 933 | "minimatch": "^3.0.4", 934 | "once": "^1.3.0", 935 | "path-is-absolute": "^1.0.0" 936 | } 937 | }, 938 | "glob-parent": { 939 | "version": "5.1.2", 940 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 941 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 942 | "dev": true, 943 | "requires": { 944 | "is-glob": "^4.0.1" 945 | } 946 | }, 947 | "got": { 948 | "version": "11.8.3", 949 | "resolved": "https://registry.npmjs.org/got/-/got-11.8.3.tgz", 950 | "integrity": "sha512-7gtQ5KiPh1RtGS9/Jbv1ofDpBFuq42gyfEib+ejaRBJuj/3tQFeR5+gw57e4ipaU8c/rCjvX6fkQz2lyDlGAOg==", 951 | "requires": { 952 | "@sindresorhus/is": "^4.0.0", 953 | "@szmarczak/http-timer": "^4.0.5", 954 | "@types/cacheable-request": "^6.0.1", 955 | "@types/responselike": "^1.0.0", 956 | "cacheable-lookup": "^5.0.3", 957 | "cacheable-request": "^7.0.2", 958 | "decompress-response": "^6.0.0", 959 | "http2-wrapper": "^1.0.0-beta.5.2", 960 | "lowercase-keys": "^2.0.0", 961 | "p-cancelable": "^2.0.0", 962 | "responselike": "^2.0.0" 963 | } 964 | }, 965 | "growl": { 966 | "version": "1.10.5", 967 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", 968 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", 969 | "dev": true 970 | }, 971 | "har-schema": { 972 | "version": "2.0.0", 973 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", 974 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", 975 | "dev": true 976 | }, 977 | "har-validator": { 978 | "version": "5.1.5", 979 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", 980 | "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", 981 | "dev": true, 982 | "requires": { 983 | "ajv": "^6.12.3", 984 | "har-schema": "^2.0.0" 985 | } 986 | }, 987 | "has-flag": { 988 | "version": "4.0.0", 989 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 990 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 991 | "dev": true 992 | }, 993 | "he": { 994 | "version": "1.2.0", 995 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 996 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 997 | "dev": true 998 | }, 999 | "http-cache-semantics": { 1000 | "version": "4.1.0", 1001 | "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", 1002 | "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" 1003 | }, 1004 | "http-signature": { 1005 | "version": "1.2.0", 1006 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", 1007 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", 1008 | "dev": true, 1009 | "requires": { 1010 | "assert-plus": "^1.0.0", 1011 | "jsprim": "^1.2.2", 1012 | "sshpk": "^1.7.0" 1013 | } 1014 | }, 1015 | "http2-wrapper": { 1016 | "version": "1.0.3", 1017 | "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", 1018 | "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", 1019 | "requires": { 1020 | "quick-lru": "^5.1.1", 1021 | "resolve-alpn": "^1.0.0" 1022 | } 1023 | }, 1024 | "inflight": { 1025 | "version": "1.0.6", 1026 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1027 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 1028 | "dev": true, 1029 | "requires": { 1030 | "once": "^1.3.0", 1031 | "wrappy": "1" 1032 | } 1033 | }, 1034 | "inherits": { 1035 | "version": "2.0.4", 1036 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1037 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1038 | "dev": true 1039 | }, 1040 | "ip-regex": { 1041 | "version": "2.1.0", 1042 | "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", 1043 | "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" 1044 | }, 1045 | "is-binary-path": { 1046 | "version": "2.1.0", 1047 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 1048 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 1049 | "dev": true, 1050 | "requires": { 1051 | "binary-extensions": "^2.0.0" 1052 | } 1053 | }, 1054 | "is-extglob": { 1055 | "version": "2.1.1", 1056 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1057 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 1058 | "dev": true 1059 | }, 1060 | "is-fullwidth-code-point": { 1061 | "version": "3.0.0", 1062 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1063 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1064 | "dev": true 1065 | }, 1066 | "is-glob": { 1067 | "version": "4.0.3", 1068 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 1069 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 1070 | "dev": true, 1071 | "requires": { 1072 | "is-extglob": "^2.1.1" 1073 | } 1074 | }, 1075 | "is-number": { 1076 | "version": "7.0.0", 1077 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 1078 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 1079 | "dev": true 1080 | }, 1081 | "is-plain-obj": { 1082 | "version": "2.1.0", 1083 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 1084 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 1085 | "dev": true 1086 | }, 1087 | "is-typedarray": { 1088 | "version": "1.0.0", 1089 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 1090 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", 1091 | "dev": true 1092 | }, 1093 | "is-unicode-supported": { 1094 | "version": "0.1.0", 1095 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 1096 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 1097 | "dev": true 1098 | }, 1099 | "isexe": { 1100 | "version": "2.0.0", 1101 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 1102 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 1103 | "dev": true 1104 | }, 1105 | "isstream": { 1106 | "version": "0.1.2", 1107 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", 1108 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", 1109 | "dev": true 1110 | }, 1111 | "js-yaml": { 1112 | "version": "4.1.0", 1113 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 1114 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 1115 | "dev": true, 1116 | "requires": { 1117 | "argparse": "^2.0.1" 1118 | } 1119 | }, 1120 | "jsbn": { 1121 | "version": "0.1.1", 1122 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", 1123 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", 1124 | "dev": true 1125 | }, 1126 | "json-buffer": { 1127 | "version": "3.0.1", 1128 | "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", 1129 | "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" 1130 | }, 1131 | "json-schema": { 1132 | "version": "0.4.0", 1133 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", 1134 | "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", 1135 | "dev": true 1136 | }, 1137 | "json-schema-traverse": { 1138 | "version": "0.4.1", 1139 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 1140 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 1141 | "dev": true 1142 | }, 1143 | "json-stringify-safe": { 1144 | "version": "5.0.1", 1145 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 1146 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", 1147 | "dev": true 1148 | }, 1149 | "jsprim": { 1150 | "version": "1.4.2", 1151 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", 1152 | "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", 1153 | "dev": true, 1154 | "requires": { 1155 | "assert-plus": "1.0.0", 1156 | "extsprintf": "1.3.0", 1157 | "json-schema": "0.4.0", 1158 | "verror": "1.10.0" 1159 | } 1160 | }, 1161 | "keyv": { 1162 | "version": "4.1.1", 1163 | "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.1.1.tgz", 1164 | "integrity": "sha512-tGv1yP6snQVDSM4X6yxrv2zzq/EvpW+oYiUz6aueW1u9CtS8RzUQYxxmFwgZlO2jSgCxQbchhxaqXXp2hnKGpQ==", 1165 | "requires": { 1166 | "json-buffer": "3.0.1" 1167 | } 1168 | }, 1169 | "locate-path": { 1170 | "version": "6.0.0", 1171 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 1172 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 1173 | "dev": true, 1174 | "requires": { 1175 | "p-locate": "^5.0.0" 1176 | } 1177 | }, 1178 | "log-symbols": { 1179 | "version": "4.1.0", 1180 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 1181 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 1182 | "dev": true, 1183 | "requires": { 1184 | "chalk": "^4.1.0", 1185 | "is-unicode-supported": "^0.1.0" 1186 | } 1187 | }, 1188 | "lowercase-keys": { 1189 | "version": "2.0.0", 1190 | "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", 1191 | "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" 1192 | }, 1193 | "lru-cache": { 1194 | "version": "6.0.0", 1195 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 1196 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 1197 | "requires": { 1198 | "yallist": "^4.0.0" 1199 | } 1200 | }, 1201 | "make-error": { 1202 | "version": "1.3.6", 1203 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 1204 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", 1205 | "dev": true 1206 | }, 1207 | "mime-db": { 1208 | "version": "1.44.0", 1209 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", 1210 | "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" 1211 | }, 1212 | "mime-types": { 1213 | "version": "2.1.27", 1214 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", 1215 | "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", 1216 | "requires": { 1217 | "mime-db": "1.44.0" 1218 | } 1219 | }, 1220 | "mimic-response": { 1221 | "version": "1.0.1", 1222 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", 1223 | "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" 1224 | }, 1225 | "minimatch": { 1226 | "version": "3.0.4", 1227 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 1228 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 1229 | "requires": { 1230 | "brace-expansion": "^1.1.7" 1231 | } 1232 | }, 1233 | "mocha": { 1234 | "version": "9.2.2", 1235 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", 1236 | "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", 1237 | "dev": true, 1238 | "requires": { 1239 | "@ungap/promise-all-settled": "1.1.2", 1240 | "ansi-colors": "4.1.1", 1241 | "browser-stdout": "1.3.1", 1242 | "chokidar": "3.5.3", 1243 | "debug": "4.3.3", 1244 | "diff": "5.0.0", 1245 | "escape-string-regexp": "4.0.0", 1246 | "find-up": "5.0.0", 1247 | "glob": "7.2.0", 1248 | "growl": "1.10.5", 1249 | "he": "1.2.0", 1250 | "js-yaml": "4.1.0", 1251 | "log-symbols": "4.1.0", 1252 | "minimatch": "4.2.1", 1253 | "ms": "2.1.3", 1254 | "nanoid": "3.3.1", 1255 | "serialize-javascript": "6.0.0", 1256 | "strip-json-comments": "3.1.1", 1257 | "supports-color": "8.1.1", 1258 | "which": "2.0.2", 1259 | "workerpool": "6.2.0", 1260 | "yargs": "16.2.0", 1261 | "yargs-parser": "20.2.4", 1262 | "yargs-unparser": "2.0.0" 1263 | }, 1264 | "dependencies": { 1265 | "diff": { 1266 | "version": "5.0.0", 1267 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", 1268 | "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", 1269 | "dev": true 1270 | }, 1271 | "minimatch": { 1272 | "version": "4.2.1", 1273 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", 1274 | "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", 1275 | "dev": true, 1276 | "requires": { 1277 | "brace-expansion": "^1.1.7" 1278 | } 1279 | } 1280 | } 1281 | }, 1282 | "ms": { 1283 | "version": "2.1.3", 1284 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1285 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1286 | "dev": true 1287 | }, 1288 | "nanoid": { 1289 | "version": "3.3.1", 1290 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", 1291 | "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", 1292 | "dev": true 1293 | }, 1294 | "node-fetch": { 1295 | "version": "2.6.7", 1296 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", 1297 | "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", 1298 | "requires": { 1299 | "whatwg-url": "^5.0.0" 1300 | } 1301 | }, 1302 | "normalize-path": { 1303 | "version": "3.0.0", 1304 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1305 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1306 | "dev": true 1307 | }, 1308 | "normalize-url": { 1309 | "version": "6.1.0", 1310 | "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", 1311 | "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==" 1312 | }, 1313 | "oauth-sign": { 1314 | "version": "0.9.0", 1315 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", 1316 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", 1317 | "dev": true 1318 | }, 1319 | "once": { 1320 | "version": "1.4.0", 1321 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1322 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1323 | "requires": { 1324 | "wrappy": "1" 1325 | } 1326 | }, 1327 | "p-cancelable": { 1328 | "version": "2.1.1", 1329 | "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", 1330 | "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==" 1331 | }, 1332 | "p-limit": { 1333 | "version": "3.1.0", 1334 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 1335 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 1336 | "dev": true, 1337 | "requires": { 1338 | "yocto-queue": "^0.1.0" 1339 | } 1340 | }, 1341 | "p-locate": { 1342 | "version": "5.0.0", 1343 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 1344 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 1345 | "dev": true, 1346 | "requires": { 1347 | "p-limit": "^3.0.2" 1348 | } 1349 | }, 1350 | "path-exists": { 1351 | "version": "4.0.0", 1352 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 1353 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 1354 | "dev": true 1355 | }, 1356 | "path-is-absolute": { 1357 | "version": "1.0.1", 1358 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1359 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 1360 | "dev": true 1361 | }, 1362 | "pathval": { 1363 | "version": "1.1.1", 1364 | "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", 1365 | "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", 1366 | "dev": true 1367 | }, 1368 | "performance-now": { 1369 | "version": "2.1.0", 1370 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", 1371 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", 1372 | "dev": true 1373 | }, 1374 | "picomatch": { 1375 | "version": "2.3.1", 1376 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1377 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1378 | "dev": true 1379 | }, 1380 | "process": { 1381 | "version": "0.11.10", 1382 | "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", 1383 | "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" 1384 | }, 1385 | "psl": { 1386 | "version": "1.8.0", 1387 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", 1388 | "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" 1389 | }, 1390 | "pump": { 1391 | "version": "3.0.0", 1392 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 1393 | "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 1394 | "requires": { 1395 | "end-of-stream": "^1.1.0", 1396 | "once": "^1.3.1" 1397 | } 1398 | }, 1399 | "punycode": { 1400 | "version": "2.1.1", 1401 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 1402 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" 1403 | }, 1404 | "qs": { 1405 | "version": "6.5.2", 1406 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", 1407 | "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", 1408 | "dev": true 1409 | }, 1410 | "quick-lru": { 1411 | "version": "5.1.1", 1412 | "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", 1413 | "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==" 1414 | }, 1415 | "randombytes": { 1416 | "version": "2.1.0", 1417 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 1418 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 1419 | "dev": true, 1420 | "requires": { 1421 | "safe-buffer": "^5.1.0" 1422 | } 1423 | }, 1424 | "readdirp": { 1425 | "version": "3.6.0", 1426 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 1427 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1428 | "dev": true, 1429 | "requires": { 1430 | "picomatch": "^2.2.1" 1431 | } 1432 | }, 1433 | "request": { 1434 | "version": "2.88.2", 1435 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", 1436 | "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", 1437 | "dev": true, 1438 | "requires": { 1439 | "aws-sign2": "~0.7.0", 1440 | "aws4": "^1.8.0", 1441 | "caseless": "~0.12.0", 1442 | "combined-stream": "~1.0.6", 1443 | "extend": "~3.0.2", 1444 | "forever-agent": "~0.6.1", 1445 | "form-data": "~2.3.2", 1446 | "har-validator": "~5.1.3", 1447 | "http-signature": "~1.2.0", 1448 | "is-typedarray": "~1.0.0", 1449 | "isstream": "~0.1.2", 1450 | "json-stringify-safe": "~5.0.1", 1451 | "mime-types": "~2.1.19", 1452 | "oauth-sign": "~0.9.0", 1453 | "performance-now": "^2.1.0", 1454 | "qs": "~6.5.2", 1455 | "safe-buffer": "^5.1.2", 1456 | "tough-cookie": "~2.5.0", 1457 | "tunnel-agent": "^0.6.0", 1458 | "uuid": "^3.3.2" 1459 | }, 1460 | "dependencies": { 1461 | "uuid": { 1462 | "version": "3.4.0", 1463 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", 1464 | "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", 1465 | "dev": true 1466 | } 1467 | } 1468 | }, 1469 | "require-directory": { 1470 | "version": "2.1.1", 1471 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 1472 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 1473 | "dev": true 1474 | }, 1475 | "resolve-alpn": { 1476 | "version": "1.2.1", 1477 | "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", 1478 | "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" 1479 | }, 1480 | "responselike": { 1481 | "version": "2.0.0", 1482 | "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", 1483 | "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", 1484 | "requires": { 1485 | "lowercase-keys": "^2.0.0" 1486 | } 1487 | }, 1488 | "safe-buffer": { 1489 | "version": "5.2.1", 1490 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1491 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1492 | "dev": true 1493 | }, 1494 | "safer-buffer": { 1495 | "version": "2.1.2", 1496 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1497 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 1498 | "dev": true 1499 | }, 1500 | "sax": { 1501 | "version": "1.2.4", 1502 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", 1503 | "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" 1504 | }, 1505 | "semver": { 1506 | "version": "7.3.5", 1507 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", 1508 | "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", 1509 | "requires": { 1510 | "lru-cache": "^6.0.0" 1511 | } 1512 | }, 1513 | "serialize-javascript": { 1514 | "version": "6.0.0", 1515 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", 1516 | "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", 1517 | "dev": true, 1518 | "requires": { 1519 | "randombytes": "^2.1.0" 1520 | } 1521 | }, 1522 | "source-map": { 1523 | "version": "0.6.1", 1524 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 1525 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 1526 | "dev": true 1527 | }, 1528 | "source-map-support": { 1529 | "version": "0.5.19", 1530 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", 1531 | "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", 1532 | "dev": true, 1533 | "requires": { 1534 | "buffer-from": "^1.0.0", 1535 | "source-map": "^0.6.0" 1536 | } 1537 | }, 1538 | "sshpk": { 1539 | "version": "1.16.1", 1540 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", 1541 | "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", 1542 | "dev": true, 1543 | "requires": { 1544 | "asn1": "~0.2.3", 1545 | "assert-plus": "^1.0.0", 1546 | "bcrypt-pbkdf": "^1.0.0", 1547 | "dashdash": "^1.12.0", 1548 | "ecc-jsbn": "~0.1.1", 1549 | "getpass": "^0.1.1", 1550 | "jsbn": "~0.1.0", 1551 | "safer-buffer": "^2.0.2", 1552 | "tweetnacl": "~0.14.0" 1553 | } 1554 | }, 1555 | "string-width": { 1556 | "version": "4.2.3", 1557 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 1558 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 1559 | "dev": true, 1560 | "requires": { 1561 | "emoji-regex": "^8.0.0", 1562 | "is-fullwidth-code-point": "^3.0.0", 1563 | "strip-ansi": "^6.0.1" 1564 | } 1565 | }, 1566 | "strip-ansi": { 1567 | "version": "6.0.1", 1568 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 1569 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 1570 | "dev": true, 1571 | "requires": { 1572 | "ansi-regex": "^5.0.1" 1573 | } 1574 | }, 1575 | "strip-json-comments": { 1576 | "version": "3.1.1", 1577 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1578 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1579 | "dev": true 1580 | }, 1581 | "supports-color": { 1582 | "version": "8.1.1", 1583 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 1584 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 1585 | "dev": true, 1586 | "requires": { 1587 | "has-flag": "^4.0.0" 1588 | } 1589 | }, 1590 | "to-regex-range": { 1591 | "version": "5.0.1", 1592 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1593 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1594 | "dev": true, 1595 | "requires": { 1596 | "is-number": "^7.0.0" 1597 | } 1598 | }, 1599 | "tough-cookie": { 1600 | "version": "2.5.0", 1601 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", 1602 | "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", 1603 | "dev": true, 1604 | "requires": { 1605 | "psl": "^1.1.28", 1606 | "punycode": "^2.1.1" 1607 | } 1608 | }, 1609 | "tr46": { 1610 | "version": "0.0.3", 1611 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", 1612 | "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" 1613 | }, 1614 | "ts-node": { 1615 | "version": "9.0.0", 1616 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.0.0.tgz", 1617 | "integrity": "sha512-/TqB4SnererCDR/vb4S/QvSZvzQMJN8daAslg7MeaiHvD8rDZsSfXmNeNumyZZzMned72Xoq/isQljYSt8Ynfg==", 1618 | "dev": true, 1619 | "requires": { 1620 | "arg": "^4.1.0", 1621 | "diff": "^4.0.1", 1622 | "make-error": "^1.1.1", 1623 | "source-map-support": "^0.5.17", 1624 | "yn": "3.1.1" 1625 | } 1626 | }, 1627 | "tslib": { 1628 | "version": "1.14.1", 1629 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 1630 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" 1631 | }, 1632 | "tunnel": { 1633 | "version": "0.0.6", 1634 | "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", 1635 | "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" 1636 | }, 1637 | "tunnel-agent": { 1638 | "version": "0.6.0", 1639 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 1640 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 1641 | "dev": true, 1642 | "requires": { 1643 | "safe-buffer": "^5.0.1" 1644 | } 1645 | }, 1646 | "tweetnacl": { 1647 | "version": "0.14.5", 1648 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", 1649 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", 1650 | "dev": true 1651 | }, 1652 | "type-detect": { 1653 | "version": "4.0.8", 1654 | "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", 1655 | "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", 1656 | "dev": true 1657 | }, 1658 | "typescript": { 1659 | "version": "4.6.2", 1660 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz", 1661 | "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==" 1662 | }, 1663 | "universalify": { 1664 | "version": "0.1.2", 1665 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", 1666 | "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" 1667 | }, 1668 | "uri-js": { 1669 | "version": "4.4.0", 1670 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", 1671 | "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", 1672 | "dev": true, 1673 | "requires": { 1674 | "punycode": "^2.1.0" 1675 | } 1676 | }, 1677 | "uuid": { 1678 | "version": "8.3.2", 1679 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 1680 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" 1681 | }, 1682 | "verror": { 1683 | "version": "1.10.0", 1684 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", 1685 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", 1686 | "dev": true, 1687 | "requires": { 1688 | "assert-plus": "^1.0.0", 1689 | "core-util-is": "1.0.2", 1690 | "extsprintf": "^1.2.0" 1691 | } 1692 | }, 1693 | "webidl-conversions": { 1694 | "version": "3.0.1", 1695 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", 1696 | "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" 1697 | }, 1698 | "whatwg-url": { 1699 | "version": "5.0.0", 1700 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", 1701 | "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", 1702 | "requires": { 1703 | "tr46": "~0.0.3", 1704 | "webidl-conversions": "^3.0.0" 1705 | } 1706 | }, 1707 | "which": { 1708 | "version": "2.0.2", 1709 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 1710 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 1711 | "dev": true, 1712 | "requires": { 1713 | "isexe": "^2.0.0" 1714 | } 1715 | }, 1716 | "workerpool": { 1717 | "version": "6.2.0", 1718 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", 1719 | "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", 1720 | "dev": true 1721 | }, 1722 | "wrap-ansi": { 1723 | "version": "7.0.0", 1724 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 1725 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 1726 | "dev": true, 1727 | "requires": { 1728 | "ansi-styles": "^4.0.0", 1729 | "string-width": "^4.1.0", 1730 | "strip-ansi": "^6.0.0" 1731 | } 1732 | }, 1733 | "wrappy": { 1734 | "version": "1.0.2", 1735 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1736 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 1737 | }, 1738 | "xml2js": { 1739 | "version": "0.4.23", 1740 | "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", 1741 | "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", 1742 | "requires": { 1743 | "sax": ">=0.6.0", 1744 | "xmlbuilder": "~11.0.0" 1745 | } 1746 | }, 1747 | "xmlbuilder": { 1748 | "version": "11.0.1", 1749 | "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", 1750 | "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" 1751 | }, 1752 | "y18n": { 1753 | "version": "5.0.8", 1754 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 1755 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 1756 | "dev": true 1757 | }, 1758 | "yallist": { 1759 | "version": "4.0.0", 1760 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 1761 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" 1762 | }, 1763 | "yargs": { 1764 | "version": "16.2.0", 1765 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 1766 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 1767 | "dev": true, 1768 | "requires": { 1769 | "cliui": "^7.0.2", 1770 | "escalade": "^3.1.1", 1771 | "get-caller-file": "^2.0.5", 1772 | "require-directory": "^2.1.1", 1773 | "string-width": "^4.2.0", 1774 | "y18n": "^5.0.5", 1775 | "yargs-parser": "^20.2.2" 1776 | } 1777 | }, 1778 | "yargs-parser": { 1779 | "version": "20.2.4", 1780 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", 1781 | "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", 1782 | "dev": true 1783 | }, 1784 | "yargs-unparser": { 1785 | "version": "2.0.0", 1786 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 1787 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 1788 | "dev": true, 1789 | "requires": { 1790 | "camelcase": "^6.0.0", 1791 | "decamelize": "^4.0.0", 1792 | "flat": "^5.0.2", 1793 | "is-plain-obj": "^2.1.0" 1794 | } 1795 | }, 1796 | "yn": { 1797 | "version": "3.1.1", 1798 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 1799 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 1800 | "dev": true 1801 | }, 1802 | "yocto-queue": { 1803 | "version": "0.1.0", 1804 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 1805 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 1806 | "dev": true 1807 | } 1808 | } 1809 | } 1810 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "http-cache-service", 3 | "version": "1.0.0", 4 | "description": "HTTP Caching service for GitHub Actions", 5 | "type": "module", 6 | "scripts": { 7 | "build": "ncc build src/action.ts", 8 | "test": "mocha --timeout 30000 -r ts-node/register src/**.spec.ts" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/cirruslabs/http-cache-service.git" 13 | }, 14 | "keywords": [], 15 | "author": "", 16 | "license": "MIT", 17 | "bugs": { 18 | "url": "https://github.com/cirruslabs/http-cache-service/issues" 19 | }, 20 | "homepage": "https://github.com/cirruslabs/http-cache-service#readme", 21 | "dependencies": { 22 | "@actions/core": "^1.2.5", 23 | "@actions/exec": "^1.0.4", 24 | "@actions/glob": "^0.1.0", 25 | "@actions/http-client": "^1.0.8", 26 | "@actions/io": "^1.0.2", 27 | "@azure/ms-rest-js": "^2.0.8", 28 | "@azure/storage-blob": "^12.2.0-preview.1", 29 | "@types/node": "^14.6.2", 30 | "@types/request": "^2.48.5", 31 | "@types/semver": "^7.3.3", 32 | "@types/uuid": "^8.3.0", 33 | "got": "^11.5.2", 34 | "semver": "^7.3.2", 35 | "typescript": "^4.0.2", 36 | "uuid": "^8.3.0" 37 | }, 38 | "devDependencies": { 39 | "@types/chai": "^4.2.12", 40 | "@types/mocha": "^8.0.3", 41 | "@vercel/ncc": "^0.33.3", 42 | "chai": "^4.2.0", 43 | "mocha": "^9.2.2", 44 | "request": "^2.88.2", 45 | "ts-node": "^9.0.0" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /proxy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:latest as builder 2 | 3 | WORKDIR /tmp/build 4 | ADD . /tmp/build/ 5 | 6 | RUN go get ./... && \ 7 | CGO_ENABLED=0 GOOS=linux go build -o proxy proxy.go 8 | 9 | FROM alpine:latest 10 | 11 | LABEL org.opencontainers.image.source = "https://github.com/cirruslabs/http-cache-action/" 12 | EXPOSE 12321 13 | 14 | RUN apk --no-cache add ca-certificates 15 | COPY --from=builder /tmp/build/proxy /app/ 16 | WORKDIR /app 17 | CMD ["./proxy"] -------------------------------------------------------------------------------- /proxy/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/cirruslabs/http-cache-action/proxy 2 | 3 | go 1.15 4 | 5 | require github.com/dimchansky/utfbom v1.1.0 6 | -------------------------------------------------------------------------------- /proxy/go.sum: -------------------------------------------------------------------------------- 1 | github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= 2 | github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= 3 | -------------------------------------------------------------------------------- /proxy/proxy.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bufio" 5 | "bytes" 6 | "crypto/sha256" 7 | "encoding/hex" 8 | "encoding/json" 9 | "fmt" 10 | "github.com/dimchansky/utfbom" 11 | "io" 12 | "io/ioutil" 13 | "log" 14 | "net/http" 15 | "os" 16 | "strings" 17 | "time" 18 | ) 19 | 20 | var token = os.Getenv("ACTIONS_RUNTIME_TOKEN") 21 | var httpClient = &http.Client{} 22 | 23 | type GetCacheResponse struct { 24 | ArchiveLocation string `json:"archiveLocation"` 25 | } 26 | 27 | type ReserveCacheResponse struct { 28 | CacheId int `json:"cacheId"` 29 | } 30 | 31 | func main() { 32 | http.HandleFunc("/", handler) 33 | 34 | log.Println("Starting http cache server on port 12321") 35 | err := http.ListenAndServe(":12321", nil) 36 | if err != nil { 37 | log.Printf("Failed to start server: %v\n", err) 38 | } 39 | } 40 | 41 | func handler(w http.ResponseWriter, r *http.Request) { 42 | startTime := time.Now() 43 | key := r.URL.Path 44 | if key[0] == '/' { 45 | key = key[1:] 46 | } 47 | if key == "" { 48 | _, _ = w.Write([]byte("HTTP Cache is running!")) 49 | w.WriteHeader(200) 50 | } else if r.Method == "GET" { 51 | downloadCache(w, r, key) 52 | } else if r.Method == "HEAD" { 53 | checkCacheExists(w, key) 54 | } else if r.Method == "POST" { 55 | uploadCache(w, r, key) 56 | } else if r.Method == "PUT" { 57 | uploadCache(w, r, key) 58 | } 59 | duration := time.Since(startTime) 60 | log.Printf("Served %s request for %s key in %dms\n", r.Method, key, duration.Milliseconds()) 61 | } 62 | 63 | func downloadCache(w http.ResponseWriter, r *http.Request, key string) { 64 | location, err := findCacheLocation(key) 65 | if err != nil { 66 | log.Printf("Failed to download key %s: %v\n", key, err) 67 | w.Write([]byte(err.Error())) 68 | w.WriteHeader(500) 69 | return 70 | } 71 | if location == "" { 72 | log.Printf("Cache %s not found\n", key) 73 | w.WriteHeader(404) 74 | return 75 | } 76 | proxyDownloadFromURL(w, location) 77 | } 78 | 79 | func proxyDownloadFromURL(w http.ResponseWriter, url string) { 80 | resp, err := http.Get(url) 81 | if err != nil { 82 | log.Printf("Proxying cache %s failed: %v\n", url, err) 83 | w.WriteHeader(http.StatusInternalServerError) 84 | return 85 | } 86 | successfulStatus := 100 <= resp.StatusCode && resp.StatusCode < 300 87 | if !successfulStatus { 88 | log.Printf("Proxying cache %s failed with %d status\n", url, resp.StatusCode) 89 | w.WriteHeader(resp.StatusCode) 90 | return 91 | } 92 | _, err = io.Copy(w, resp.Body) 93 | if err != nil { 94 | w.WriteHeader(http.StatusInternalServerError) 95 | } 96 | w.WriteHeader(http.StatusOK) 97 | } 98 | 99 | func checkCacheExists(w http.ResponseWriter, key string) { 100 | location, err := findCacheLocation(key) 101 | if location == "" || err != nil { 102 | log.Printf("Cache %s not found\n", key) 103 | w.WriteHeader(404) 104 | return 105 | } 106 | w.WriteHeader(200) 107 | } 108 | 109 | func findCacheLocation(key string) (string, error) { 110 | resource := fmt.Sprintf("cache?keys=%s&version=%s", key, calculateSHA256(key)) 111 | requestUrl := getCacheApiUrl(resource) 112 | request, _ := http.NewRequest("GET", requestUrl, nil) 113 | request.Header.Set("Authorization", "Bearer "+token) 114 | request.Header.Set("User-Agent", "actions/cache") 115 | request.Header.Set("Accept", "application/json;api-version=6.0-preview.1") 116 | request.Header.Set("Accept-Charset", "utf-8") 117 | 118 | response, err := httpClient.Do(request) 119 | if err != nil { 120 | return "", err 121 | } 122 | if response.StatusCode == 404 { 123 | return "", nil 124 | } 125 | if response.StatusCode == 204 { 126 | // no content 127 | return "", nil 128 | } 129 | defer response.Body.Close() 130 | bodyBytes, err := ioutil.ReadAll(utfbom.SkipOnly(response.Body)) 131 | if response.StatusCode >= 400 { 132 | log.Printf("Failed to download key %s: %d %s\n", key, response.StatusCode, string(bodyBytes)) 133 | return "", fmt.Errorf("failed to get location: %d", response.StatusCode) 134 | } 135 | 136 | cacheResponse := GetCacheResponse{} 137 | err = json.NewDecoder(bytes.NewReader(bodyBytes)).Decode(&cacheResponse) 138 | if err != nil { 139 | log.Println(string(bodyBytes)) 140 | return "", err 141 | } 142 | if cacheResponse.ArchiveLocation == "" { 143 | log.Println(string(bodyBytes)) 144 | } 145 | return cacheResponse.ArchiveLocation, nil 146 | } 147 | 148 | func uploadCache(w http.ResponseWriter, r *http.Request, key string) { 149 | cacheId, err := reserveCache(key) 150 | if err != nil { 151 | log.Printf("Failed to reserve upload for cache key %s: %v\n", key, err) 152 | w.Write([]byte(err.Error())) 153 | w.WriteHeader(500) 154 | return 155 | } 156 | err = uploadCacheFromReader(cacheId, r.Body) 157 | if err != nil { 158 | log.Printf("Failed to upload cache %s: %v\n", key, err) 159 | w.Write([]byte(err.Error())) 160 | w.WriteHeader(http.StatusBadRequest) 161 | return 162 | } 163 | w.WriteHeader(http.StatusCreated) 164 | } 165 | 166 | func uploadCacheFromReader(cacheId int, body io.Reader) error { 167 | resourceUrl := getCacheApiUrl(fmt.Sprintf("caches/%d", cacheId)) 168 | readBufferSize := int(1024 * 1024) 169 | readBuffer := make([]byte, readBufferSize) 170 | bufferedBodyReader := bufio.NewReaderSize(body, readBufferSize) 171 | bytesUploaded := 0 172 | for { 173 | n, err := bufferedBodyReader.Read(readBuffer) 174 | 175 | if n > 0 { 176 | uploadCacheChunk(resourceUrl, readBuffer[:n], bytesUploaded) 177 | bytesUploaded += n 178 | } 179 | 180 | if err == io.EOF || n == 0 { 181 | break 182 | } 183 | if err != nil { 184 | return err 185 | } 186 | } 187 | return commitCache(cacheId, bytesUploaded) 188 | } 189 | 190 | func uploadCacheChunk(url string, data []byte, position int) error { 191 | request, _ := http.NewRequest("PATCH", url, bytes.NewBuffer(data)) 192 | request.Header.Set("Authorization", "Bearer "+token) 193 | request.Header.Set("User-Agent", "actions/cache") 194 | request.Header.Set("Content-Type", "application/octet-stream") 195 | request.Header.Set("Content-Range", fmt.Sprintf("bytes %d-%d/*", position, position+len(data)-1)) 196 | request.Header.Set("Accept", "application/json;api-version=6.0-preview.1") 197 | request.Header.Set("Accept-Charset", "utf-8") 198 | 199 | response, _ := httpClient.Do(request) 200 | if response.StatusCode != 204 { 201 | defer response.Body.Close() 202 | bodyBytes, _ := ioutil.ReadAll(response.Body) 203 | log.Printf("Failed to upload cache chunk: %s\n", string(bodyBytes)) 204 | log.Println(string(bodyBytes)) 205 | return fmt.Errorf("failed to upload chunk with status %d: %s", response.StatusCode, string(bodyBytes)) 206 | } 207 | return nil 208 | } 209 | 210 | func commitCache(cacheId int, size int) error { 211 | url := getCacheApiUrl(fmt.Sprintf("caches/%d", cacheId)) 212 | requestBody := fmt.Sprintf("{ \"size\": \"%d\" }", size) 213 | request, _ := http.NewRequest("POST", url, bytes.NewBufferString(requestBody)) 214 | request.Header.Set("Authorization", "Bearer "+token) 215 | request.Header.Set("User-Agent", "actions/cache") 216 | request.Header.Set("Content-Type", "application/json") 217 | request.Header.Set("Accept", "application/json;api-version=6.0-preview.1") 218 | request.Header.Set("Accept-Charset", "utf-8") 219 | response, _ := httpClient.Do(request) 220 | if response.StatusCode != 204 { 221 | defer response.Body.Close() 222 | bodyBytes, _ := ioutil.ReadAll(response.Body) 223 | log.Printf("Failed to commit cache %d: %s\n", cacheId, string(bodyBytes)) 224 | return fmt.Errorf("failed to commit cache %d with status %d: %s", cacheId, response.StatusCode, string(bodyBytes)) 225 | } 226 | return nil 227 | } 228 | 229 | func reserveCache(key string) (int, error) { 230 | requestUrl := getCacheApiUrl("caches") 231 | requestBody := fmt.Sprintf("{ \"key\": \"%s\", \"version\": \"%s\" }", key, calculateSHA256(key)) 232 | request, _ := http.NewRequest("POST", requestUrl, bytes.NewBufferString(requestBody)) 233 | request.Header.Set("Authorization", "Bearer "+token) 234 | request.Header.Set("User-Agent", "actions/cache") 235 | request.Header.Set("Content-Type", "application/json") 236 | request.Header.Set("Accept", "application/json;api-version=6.0-preview.1") 237 | request.Header.Set("Accept-Charset", "utf-8") 238 | 239 | response, err := httpClient.Do(request) 240 | if err != nil { 241 | return -1, err 242 | } 243 | defer response.Body.Close() 244 | bodyBytes, err := ioutil.ReadAll(utfbom.SkipOnly(response.Body)) 245 | if response.StatusCode >= 400 { 246 | return -1, fmt.Errorf("failed to reserve cache: %d", response.StatusCode) 247 | } 248 | 249 | var cacheResponse ReserveCacheResponse 250 | err = json.Unmarshal(bodyBytes, &cacheResponse) 251 | if err != nil { 252 | return -1, err 253 | } 254 | return cacheResponse.CacheId, nil 255 | } 256 | 257 | func calculateSHA256(s string) string { 258 | h := sha256.New() 259 | h.Write([]byte(s)) 260 | return hex.EncodeToString(h.Sum(nil)) 261 | } 262 | 263 | func getCacheApiUrl(resource string) string { 264 | baseUrl := strings.ReplaceAll(os.Getenv("ACTIONS_CACHE_URL"), "pipelines", "artifactcache") 265 | return baseUrl + "_apis/artifactcache/" + resource 266 | } 267 | -------------------------------------------------------------------------------- /proxy/proxy_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "crypto/rand" 5 | "fmt" 6 | "io" 7 | "net/http" 8 | "testing" 9 | "time" 10 | ) 11 | 12 | func Test_API(t *testing.T) { 13 | //log.Printf("Cache URL for debugging: %s\n", os.Getenv("ACTIONS_CACHE_URL")) 14 | //encodedToken := base32.StdEncoding.EncodeToString([]byte(os.Getenv("ACTIONS_RUNTIME_TOKEN"))) 15 | //log.Printf("Token for debugging: %s\n", encodedToken) 16 | 17 | cacheKey := fmt.Sprintf("Linux-node-%d", time.Now().Unix()) 18 | location, err := findCacheLocation(cacheKey) 19 | if err != nil { 20 | t.Error(err) 21 | } 22 | if location != "" { 23 | t.Error("cache should not exist") 24 | } 25 | 26 | cacheId, err := reserveCache(cacheKey) 27 | if err != nil { 28 | t.Error(err) 29 | return 30 | } 31 | 32 | var cacheEntrySize int64 = 100 * 1024 * 1024 33 | err = uploadCacheFromReader(cacheId, io.LimitReader(rand.Reader, cacheEntrySize)) 34 | if err != nil { 35 | t.Error(err) 36 | return 37 | } 38 | 39 | location, err = findCacheLocation(cacheKey) 40 | if err != nil { 41 | t.Error(err) 42 | return 43 | } 44 | if location == "" { 45 | t.Error("cache should exist now!") 46 | return 47 | } 48 | 49 | resp, err := http.Get(location) 50 | if err != nil { 51 | t.Error(err) 52 | return 53 | } 54 | if resp.StatusCode != 200 { 55 | t.Errorf("Failed to download cache entry: %d %s", resp.StatusCode, resp.Status) 56 | } 57 | 58 | if resp.ContentLength != cacheEntrySize { 59 | t.Errorf("Downloaded only %d bytes!", resp.ContentLength) 60 | return 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/action.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core'; 2 | import {exec} from "@actions/exec"; 3 | 4 | async function run() { 5 | const port = core.getInput('port'); 6 | 7 | let runArguments = [ 8 | "run", "-d", "-p", `${port}:12321`, 9 | "--name", "cache_proxy", 10 | "--env", "ACTIONS_CACHE_URL", 11 | "--env", "ACTIONS_RUNTIME_URL", 12 | "--env", "ACTIONS_RUNTIME_TOKEN", 13 | "ghcr.io/cirruslabs/actions-http-cache-proxy:latest" 14 | ]; 15 | 16 | try { 17 | await exec(`"docker"`, runArguments); 18 | } catch (e: any) { 19 | core.error(e) 20 | } 21 | } 22 | 23 | run(); -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "moduleResolution": "node", 4 | "strict": true, 5 | "target": "es6" 6 | } 7 | } --------------------------------------------------------------------------------