├── .github └── workflows │ ├── main.yml │ ├── update_semver.yml │ └── yaml-lint-workflow.yaml ├── .gitignore ├── README.md ├── action.yml ├── dist └── index.js ├── package-lock.json ├── package.json ├── src └── main.ts ├── test ├── index.html ├── test-basic-auth.js └── test.js └── tsconfig.json /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Test Tunnel 2 | 3 | on: # yamllint disable-line rule:truthy 4 | pull_request: 5 | branches: 6 | - master 7 | push: 8 | branches: 9 | - master 10 | 11 | jobs: 12 | test-tunnel: 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - name: Check out Git repository 17 | uses: actions/checkout@v3 18 | 19 | - name: Setup Node 20 | uses: actions/setup-node@v3 21 | with: 22 | node-version: 16 23 | - run: npm ci 24 | 25 | - name: Start LambdaTest Tunnel 26 | id: tunnel 27 | uses: ./ # Uses an action in the root directory 28 | with: 29 | user: ${{ secrets.LT_USERNAME }} 30 | accessKey: ${{ secrets.LT_ACCESS_KEY }} 31 | basicAuth: ${{ secrets.LT_BASIC_AUTH }} 32 | tunnelName: "test-tunnel-${{github.run_number}}" 33 | verbose: true 34 | 35 | - name: Run Test Case 36 | env: 37 | username: ${{ secrets.LT_USERNAME }} 38 | accessKey: ${{ secrets.LT_ACCESS_KEY }} 39 | tunnelName: "test-tunnel-${{github.run_number}}" 40 | 41 | run: npm test 42 | 43 | - name: Export Tunnel Logs for debugging 44 | uses: actions/upload-artifact@v3 45 | if: always() 46 | with: 47 | name: tunnel_logs 48 | path: ${{ steps.tunnel.outputs.logFileName }} 49 | -------------------------------------------------------------------------------- /.github/workflows/update_semver.yml: -------------------------------------------------------------------------------- 1 | name: Update Major semver 2 | on: 3 | push: 4 | tags: 5 | - "v*" 6 | 7 | jobs: 8 | update-majorver: 9 | name: Update Major Version Tag 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: nowactions/update-majorver@v1 13 | with: 14 | github_token: ${{ secrets.github_token }} 15 | -------------------------------------------------------------------------------- /.github/workflows/yaml-lint-workflow.yaml: -------------------------------------------------------------------------------- 1 | name: lint 2 | on: 3 | pull_request: 4 | branches: 5 | - master 6 | jobs: 7 | yamllint: 8 | name: yamllint 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | - name: yamllint 13 | uses: reviewdog/action-yamllint@v1 14 | with: 15 | github_token: ${{ secrets.github_token }} 16 | reporter: github-pr-review # Change reporter. 17 | yamllint_flags: "." 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | lib 2 | node_modules -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![LAMBDATEST Logo](https://www.lambdatest.com/resources/images/logos/logo.svg) 2 | # LambdaTest Tunnel Action 3 | 4 | [![Test](https://github.com/LambdaTest/LambdaTest-tunnel-action/actions/workflows/main.yml/badge.svg?branch=master&event=push)](https://github.com/LambdaTest/LambdaTest-tunnel-action/actions/workflows/main.yml) 5 | 6 | [![Releases](https://github.com/LambdaTest/LambdaTest-tunnel-action/actions/workflows/update_semver.yml/badge.svg)](https://github.com/LambdaTest/LambdaTest-tunnel-action/actions/workflows/update_semver.yml) 7 | 8 | This action seamlessly integrates LambdaTest Tunnel and 9 | run Selenium tests on 2000+ browsers for your locally hosted or 10 | privately hosted pages with LambdaTest Selenium Grid. 11 | 12 | ## Example usage 13 | 14 | ```yaml 15 | jobs: 16 | test-tunnel: 17 | runs-on: ubuntu-latest 18 | steps: 19 | # ... 20 | -name: Start Tunnel 21 | uses: LambdaTest/LambdaTest-tunnel-action@v2 22 | id: tunnel 23 | with: 24 | user: ${{ secrets.LT_USERNAME }} 25 | accessKey: ${{ secrets.LT_ACCESS_KEY }} 26 | tunnelName: "testTunnel" 27 | - run: npm test 28 | - name: Export Tunnel Logs for debugging 29 | uses: actions/upload-artifact@v2 30 | with: 31 | name: tunnel_logs 32 | path: ${{ steps.tunnel.outputs.logFileName }} 33 | # ... 34 | ``` 35 | 36 | ## Inputs 37 | 38 | ### `user` 39 | 40 | **Required** LambdaTest user email. 41 | 42 | ### `accessKey` 43 | 44 | **Required** LambdaTest user Access Key. 45 | > We suggest using [github secrets](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) for storing LambdaTest access key 46 | 47 | ### `tunnelName` 48 | 49 | **Required** Tunnel name to uniquely identify your tunnel on LambdaTest platform. 50 | 51 | ### `proxyHost` 52 | 53 | Proxy host if connecting tunnel via proxy. 54 | 55 | ### `proxyPort` 56 | 57 | Proxy port if connecting tunnel via proxy. 58 | 59 | ### `proxyUser` 60 | 61 | Proxy username if connecting tunnel via proxy that has authentication enabled. 62 | 63 | ### `proxyPass` 64 | 65 | Proxy password if connecting tunnel via proxy that has authentication enabled. 66 | 67 | ### `sharedTunnel` 68 | 69 | Sharing tunnel among team members. 70 | 71 | ### `ingressOnly` 72 | 73 | Routes only incoming traffic via the proxy specified. 74 | 75 | ### `egressOnly` 76 | 77 | Routes only outgoing traffic via the proxy specified. 78 | 79 | ### `mitm` 80 | 81 | Enable Man in the Middle Mode 82 | 83 | ### `dns` 84 | 85 | Comma separated list of dns servers. 86 | 87 | ### `verbose` 88 | 89 | Run tunnel in verbose mode. 90 | 91 | ### `loadBalanced` 92 | 93 | Run tunnel in load balanced mode. 94 | 95 | ### `bypassHosts` 96 | 97 | Comma separated list of host to bypass from tunnel. 98 | 99 | ### `basicAuth` 100 | 101 | Add basicAuth to provided hosts on the format "https://USER:PWD@YourWebsite.com" 102 | > We suggest using [github secrets](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) 103 | for sensitive information 104 | 105 | ## Outputs 106 | 107 | ### `port` 108 | 109 | Port on which tunnel api server is running. 110 | 111 | ### `logFileName` 112 | 113 | Name of log file of tunnel. 114 | 115 | ### `usePrivateIP` 116 | 117 | Tunnel to use system private IP for remote connections. 118 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: "LambdaTest Tunnel Action" 2 | description: "A Github Action to launch LambdaTest Tunnel" 3 | inputs: 4 | user: 5 | description: "LambdaTest Email" 6 | required: true 7 | accessKey: 8 | description: "LambdaTest AccessKey" 9 | required: true 10 | tunnelName: 11 | description: "Tunnel name to uniquely identify your tunnel on LambdaTest platform" 12 | required: true 13 | proxyHost: 14 | description: "Proxy host if connecting tunnel via proxy" 15 | required: false 16 | proxyPort: 17 | description: "Proxy port if connecting tunnel via proxy" 18 | required: false 19 | proxyUser: 20 | description: "Proxy username if connecting tunnel via proxy that has authentication enabled" 21 | required: false 22 | proxyPass: 23 | description: "Proxy password if connecting tunnel via proxy that has authentication enabled" 24 | required: false 25 | sharedTunnel: 26 | description: "Sharing tunnel among team members" 27 | required: false 28 | verbose: 29 | description: "Run tunnel in verbose mode" 30 | required: false 31 | ingressOnly: 32 | description: "Routes only incoming traffic via the proxy specified" 33 | required: false 34 | egressOnly: 35 | description: "Routes only outgoing traffic via the proxy specified" 36 | required: false 37 | mitm: 38 | description: "Enable Man in the Middle Mode" 39 | required: false 40 | dns: 41 | description: "Comma separated list of dns servers" 42 | required: false 43 | loadBalanced: 44 | description: "Enable Load Balanced Mode" 45 | required: false 46 | bypassHosts: 47 | description: "Comma separated list of host to bypass from tunnel" 48 | required: false 49 | basicAuth: 50 | description: "Basic Auth in the following format" 51 | required: false 52 | usePrivateIP: 53 | description: "Tunnel to use system private IP for remote connections" 54 | required: false 55 | outputs: 56 | port: # id of output 57 | description: "Port on which tunnel api server is running" 58 | logFileName: 59 | description: "Name of log file of tunnel" 60 | 61 | runs: 62 | using: "node16" 63 | main: "dist/index.js" 64 | post: "dist/index.js" 65 | 66 | branding: 67 | icon: 'wifi' 68 | color: 'orange' 69 | -------------------------------------------------------------------------------- /dist/index.js: -------------------------------------------------------------------------------- 1 | /******/ (() => { // webpackBootstrap 2 | /******/ var __webpack_modules__ = ({ 3 | 4 | /***/ 109: 5 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 6 | 7 | "use strict"; 8 | 9 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 10 | if (k2 === undefined) k2 = k; 11 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 12 | }) : (function(o, m, k, k2) { 13 | if (k2 === undefined) k2 = k; 14 | o[k2] = m[k]; 15 | })); 16 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 17 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 18 | }) : function(o, v) { 19 | o["default"] = v; 20 | }); 21 | var __importStar = (this && this.__importStar) || function (mod) { 22 | if (mod && mod.__esModule) return mod; 23 | var result = {}; 24 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 25 | __setModuleDefault(result, mod); 26 | return result; 27 | }; 28 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 29 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 30 | return new (P || (P = Promise))(function (resolve, reject) { 31 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 32 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 33 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 34 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 35 | }); 36 | }; 37 | var __importDefault = (this && this.__importDefault) || function (mod) { 38 | return (mod && mod.__esModule) ? mod : { "default": mod }; 39 | }; 40 | Object.defineProperty(exports, "__esModule", ({ value: true })); 41 | exports.run = void 0; 42 | const core = __importStar(__nccwpck_require__(186)); 43 | const crypto_1 = __importDefault(__nccwpck_require__(113)); 44 | const get_port_1 = __importDefault(__nccwpck_require__(2)); 45 | const child_process_1 = __importDefault(__nccwpck_require__(81)); 46 | /** 47 | * Name of state that stores port number of the tunnel 48 | */ 49 | const STATE_PORT = "port"; 50 | function run() { 51 | return __awaiter(this, void 0, void 0, function* () { 52 | // if state is already setup, then kick off the cleanup 53 | if (!!core.getState(STATE_PORT)) { 54 | cleanup(); 55 | } 56 | else { 57 | // start the tunnel 58 | launch(); 59 | } 60 | }); 61 | } 62 | exports.run = run; 63 | function launch() { 64 | return __awaiter(this, void 0, void 0, function* () { 65 | try { 66 | let port = yield get_port_1.default(); 67 | let name = crypto_1.default.randomBytes(10).toString("hex"); 68 | let logFileName = name + ".log"; 69 | core.setOutput("port", port); 70 | core.setOutput("logFileName", logFileName); 71 | core.saveState(STATE_PORT, port); 72 | let params = (yield getTunnelParams(port)).join(" "); 73 | let dockerPullCmd = "docker pull lambdatest/tunnel:latest"; 74 | core.info(dockerPullCmd); 75 | child_process_1.default.execSync(dockerPullCmd, { 76 | stdio: "inherit", 77 | }); 78 | let dockerRunCmd = `docker run --name=${name} -d=true --net=host lambdatest/tunnel:latest ${params}`; 79 | core.info(dockerRunCmd); 80 | child_process_1.default.execSync(dockerRunCmd, { 81 | stdio: "inherit", 82 | }); 83 | let checkTunnelCmd = `curl -s --retry-connrefused --connect-timeout 5 --max-time 5 --retry 30 --retry-delay 2 --retry-max-time 60 http://127.0.0.1:${port}/api/v1.0/info`; 84 | core.info(checkTunnelCmd); 85 | let checkTunnelErr; 86 | try { 87 | child_process_1.default.execSync(checkTunnelCmd, { stdio: "inherit" }); 88 | } 89 | catch (error) { 90 | core.error('error while starting tunnel', error.message); 91 | checkTunnelErr = error; 92 | } 93 | let dockerLogsCmd = `docker logs -f ${name} > ${logFileName} 2>&1 &`; 94 | core.info(dockerLogsCmd); 95 | child_process_1.default.execSync(dockerLogsCmd, { 96 | stdio: "inherit", 97 | }); 98 | if (checkTunnelErr) { 99 | throw checkTunnelErr; 100 | } 101 | core.info("Tunnel is running now"); 102 | } 103 | catch (error) { 104 | core.error(error); 105 | core.setFailed(error.message); 106 | } 107 | }); 108 | } 109 | function getTunnelParams(port) { 110 | return __awaiter(this, void 0, void 0, function* () { 111 | let params = []; 112 | if (core.getInput("user")) { 113 | params.push("--user", core.getInput("user")); 114 | } 115 | if (core.getInput("accessKey")) { 116 | params.push("--key", core.getInput("accessKey")); 117 | } 118 | if (core.getInput("tunnelName")) { 119 | params.push("--tunnelName", `"${core.getInput("tunnelName")}"`); 120 | } 121 | if (core.getInput("proxyHost")) { 122 | params.push("--proxy-host", `"${core.getInput("proxyHost")}"`); 123 | } 124 | if (core.getInput("proxyPort")) { 125 | params.push("--proxy-port", `"${core.getInput("proxyPort")}"`); 126 | } 127 | if (core.getInput("proxyUser")) { 128 | params.push("--proxy-user", `"${core.getInput("proxyUser")}"`); 129 | } 130 | if (core.getInput("proxyPass")) { 131 | params.push("--proxy-pass", `"${core.getInput("proxyPass")}"`); 132 | } 133 | if (core.getInput("sharedTunnel")) { 134 | params.push("--shared-tunnel"); 135 | } 136 | if (core.getInput("ingressOnly")) { 137 | params.push("--ingress-only"); 138 | } 139 | if (core.getInput("egressOnly")) { 140 | params.push("--egress-only"); 141 | } 142 | if (core.getInput("mitm")) { 143 | params.push("--mitm"); 144 | } 145 | if (core.getInput("dns")) { 146 | params.push("--dns", `"${core.getInput("dns")}"`); 147 | } 148 | if (core.getInput("verbose")) { 149 | params.push("-v"); 150 | } 151 | if (core.getInput("loadBalanced")) { 152 | params.push("--load-balanced"); 153 | } 154 | if (core.getInput("bypassHosts")) { 155 | params.push("--bypassHosts", `"${core.getInput("bypassHosts")}"`); 156 | } 157 | if (core.getInput("basicAuth")) { 158 | params.push("--basic-auth", core.getInput("basicAuth")); 159 | } 160 | if (core.getInput("usePrivateIP")) { 161 | params.push("--use-private-ip"); 162 | } 163 | params.push("--controller", "github", "--infoAPIPort", `${port}`); 164 | return params; 165 | }); 166 | } 167 | function cleanup() { 168 | return __awaiter(this, void 0, void 0, function* () { 169 | let port = core.getState(STATE_PORT); 170 | let stopTunnelCmd = `curl -X DELETE http://127.0.0.1:${port}/api/v1.0/stop`; 171 | core.info("Gracefully close the tunnel:"); 172 | core.info(stopTunnelCmd); 173 | child_process_1.default.execSync(stopTunnelCmd, { stdio: "inherit" }); 174 | }); 175 | } 176 | run(); 177 | 178 | 179 | /***/ }), 180 | 181 | /***/ 351: 182 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 183 | 184 | "use strict"; 185 | 186 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 187 | if (k2 === undefined) k2 = k; 188 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 189 | }) : (function(o, m, k, k2) { 190 | if (k2 === undefined) k2 = k; 191 | o[k2] = m[k]; 192 | })); 193 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 194 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 195 | }) : function(o, v) { 196 | o["default"] = v; 197 | }); 198 | var __importStar = (this && this.__importStar) || function (mod) { 199 | if (mod && mod.__esModule) return mod; 200 | var result = {}; 201 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 202 | __setModuleDefault(result, mod); 203 | return result; 204 | }; 205 | Object.defineProperty(exports, "__esModule", ({ value: true })); 206 | exports.issue = exports.issueCommand = void 0; 207 | const os = __importStar(__nccwpck_require__(37)); 208 | const utils_1 = __nccwpck_require__(278); 209 | /** 210 | * Commands 211 | * 212 | * Command Format: 213 | * ::name key=value,key=value::message 214 | * 215 | * Examples: 216 | * ::warning::This is the message 217 | * ::set-env name=MY_VAR::some value 218 | */ 219 | function issueCommand(command, properties, message) { 220 | const cmd = new Command(command, properties, message); 221 | process.stdout.write(cmd.toString() + os.EOL); 222 | } 223 | exports.issueCommand = issueCommand; 224 | function issue(name, message = '') { 225 | issueCommand(name, {}, message); 226 | } 227 | exports.issue = issue; 228 | const CMD_STRING = '::'; 229 | class Command { 230 | constructor(command, properties, message) { 231 | if (!command) { 232 | command = 'missing.command'; 233 | } 234 | this.command = command; 235 | this.properties = properties; 236 | this.message = message; 237 | } 238 | toString() { 239 | let cmdStr = CMD_STRING + this.command; 240 | if (this.properties && Object.keys(this.properties).length > 0) { 241 | cmdStr += ' '; 242 | let first = true; 243 | for (const key in this.properties) { 244 | if (this.properties.hasOwnProperty(key)) { 245 | const val = this.properties[key]; 246 | if (val) { 247 | if (first) { 248 | first = false; 249 | } 250 | else { 251 | cmdStr += ','; 252 | } 253 | cmdStr += `${key}=${escapeProperty(val)}`; 254 | } 255 | } 256 | } 257 | } 258 | cmdStr += `${CMD_STRING}${escapeData(this.message)}`; 259 | return cmdStr; 260 | } 261 | } 262 | function escapeData(s) { 263 | return utils_1.toCommandValue(s) 264 | .replace(/%/g, '%25') 265 | .replace(/\r/g, '%0D') 266 | .replace(/\n/g, '%0A'); 267 | } 268 | function escapeProperty(s) { 269 | return utils_1.toCommandValue(s) 270 | .replace(/%/g, '%25') 271 | .replace(/\r/g, '%0D') 272 | .replace(/\n/g, '%0A') 273 | .replace(/:/g, '%3A') 274 | .replace(/,/g, '%2C'); 275 | } 276 | //# sourceMappingURL=command.js.map 277 | 278 | /***/ }), 279 | 280 | /***/ 186: 281 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 282 | 283 | "use strict"; 284 | 285 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 286 | if (k2 === undefined) k2 = k; 287 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 288 | }) : (function(o, m, k, k2) { 289 | if (k2 === undefined) k2 = k; 290 | o[k2] = m[k]; 291 | })); 292 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 293 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 294 | }) : function(o, v) { 295 | o["default"] = v; 296 | }); 297 | var __importStar = (this && this.__importStar) || function (mod) { 298 | if (mod && mod.__esModule) return mod; 299 | var result = {}; 300 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 301 | __setModuleDefault(result, mod); 302 | return result; 303 | }; 304 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 305 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 306 | return new (P || (P = Promise))(function (resolve, reject) { 307 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 308 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 309 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 310 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 311 | }); 312 | }; 313 | Object.defineProperty(exports, "__esModule", ({ value: true })); 314 | 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; 315 | const command_1 = __nccwpck_require__(351); 316 | const file_command_1 = __nccwpck_require__(717); 317 | const utils_1 = __nccwpck_require__(278); 318 | const os = __importStar(__nccwpck_require__(37)); 319 | const path = __importStar(__nccwpck_require__(17)); 320 | const oidc_utils_1 = __nccwpck_require__(41); 321 | /** 322 | * The code to exit an action 323 | */ 324 | var ExitCode; 325 | (function (ExitCode) { 326 | /** 327 | * A code indicating that the action was successful 328 | */ 329 | ExitCode[ExitCode["Success"] = 0] = "Success"; 330 | /** 331 | * A code indicating that the action was a failure 332 | */ 333 | ExitCode[ExitCode["Failure"] = 1] = "Failure"; 334 | })(ExitCode = exports.ExitCode || (exports.ExitCode = {})); 335 | //----------------------------------------------------------------------- 336 | // Variables 337 | //----------------------------------------------------------------------- 338 | /** 339 | * Sets env variable for this action and future actions in the job 340 | * @param name the name of the variable to set 341 | * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify 342 | */ 343 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 344 | function exportVariable(name, val) { 345 | const convertedVal = utils_1.toCommandValue(val); 346 | process.env[name] = convertedVal; 347 | const filePath = process.env['GITHUB_ENV'] || ''; 348 | if (filePath) { 349 | return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); 350 | } 351 | command_1.issueCommand('set-env', { name }, convertedVal); 352 | } 353 | exports.exportVariable = exportVariable; 354 | /** 355 | * Registers a secret which will get masked from logs 356 | * @param secret value of the secret 357 | */ 358 | function setSecret(secret) { 359 | command_1.issueCommand('add-mask', {}, secret); 360 | } 361 | exports.setSecret = setSecret; 362 | /** 363 | * Prepends inputPath to the PATH (for this action and future actions) 364 | * @param inputPath 365 | */ 366 | function addPath(inputPath) { 367 | const filePath = process.env['GITHUB_PATH'] || ''; 368 | if (filePath) { 369 | file_command_1.issueFileCommand('PATH', inputPath); 370 | } 371 | else { 372 | command_1.issueCommand('add-path', {}, inputPath); 373 | } 374 | process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; 375 | } 376 | exports.addPath = addPath; 377 | /** 378 | * Gets the value of an input. 379 | * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. 380 | * Returns an empty string if the value is not defined. 381 | * 382 | * @param name name of the input to get 383 | * @param options optional. See InputOptions. 384 | * @returns string 385 | */ 386 | function getInput(name, options) { 387 | const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; 388 | if (options && options.required && !val) { 389 | throw new Error(`Input required and not supplied: ${name}`); 390 | } 391 | if (options && options.trimWhitespace === false) { 392 | return val; 393 | } 394 | return val.trim(); 395 | } 396 | exports.getInput = getInput; 397 | /** 398 | * Gets the values of an multiline input. Each value is also trimmed. 399 | * 400 | * @param name name of the input to get 401 | * @param options optional. See InputOptions. 402 | * @returns string[] 403 | * 404 | */ 405 | function getMultilineInput(name, options) { 406 | const inputs = getInput(name, options) 407 | .split('\n') 408 | .filter(x => x !== ''); 409 | if (options && options.trimWhitespace === false) { 410 | return inputs; 411 | } 412 | return inputs.map(input => input.trim()); 413 | } 414 | exports.getMultilineInput = getMultilineInput; 415 | /** 416 | * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. 417 | * Support boolean input list: `true | True | TRUE | false | False | FALSE` . 418 | * The return value is also in boolean type. 419 | * ref: https://yaml.org/spec/1.2/spec.html#id2804923 420 | * 421 | * @param name name of the input to get 422 | * @param options optional. See InputOptions. 423 | * @returns boolean 424 | */ 425 | function getBooleanInput(name, options) { 426 | const trueValue = ['true', 'True', 'TRUE']; 427 | const falseValue = ['false', 'False', 'FALSE']; 428 | const val = getInput(name, options); 429 | if (trueValue.includes(val)) 430 | return true; 431 | if (falseValue.includes(val)) 432 | return false; 433 | throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + 434 | `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); 435 | } 436 | exports.getBooleanInput = getBooleanInput; 437 | /** 438 | * Sets the value of an output. 439 | * 440 | * @param name name of the output to set 441 | * @param value value to store. Non-string values will be converted to a string via JSON.stringify 442 | */ 443 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 444 | function setOutput(name, value) { 445 | const filePath = process.env['GITHUB_OUTPUT'] || ''; 446 | if (filePath) { 447 | return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); 448 | } 449 | process.stdout.write(os.EOL); 450 | command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); 451 | } 452 | exports.setOutput = setOutput; 453 | /** 454 | * Enables or disables the echoing of commands into stdout for the rest of the step. 455 | * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. 456 | * 457 | */ 458 | function setCommandEcho(enabled) { 459 | command_1.issue('echo', enabled ? 'on' : 'off'); 460 | } 461 | exports.setCommandEcho = setCommandEcho; 462 | //----------------------------------------------------------------------- 463 | // Results 464 | //----------------------------------------------------------------------- 465 | /** 466 | * Sets the action status to failed. 467 | * When the action exits it will be with an exit code of 1 468 | * @param message add error issue message 469 | */ 470 | function setFailed(message) { 471 | process.exitCode = ExitCode.Failure; 472 | error(message); 473 | } 474 | exports.setFailed = setFailed; 475 | //----------------------------------------------------------------------- 476 | // Logging Commands 477 | //----------------------------------------------------------------------- 478 | /** 479 | * Gets whether Actions Step Debug is on or not 480 | */ 481 | function isDebug() { 482 | return process.env['RUNNER_DEBUG'] === '1'; 483 | } 484 | exports.isDebug = isDebug; 485 | /** 486 | * Writes debug message to user log 487 | * @param message debug message 488 | */ 489 | function debug(message) { 490 | command_1.issueCommand('debug', {}, message); 491 | } 492 | exports.debug = debug; 493 | /** 494 | * Adds an error issue 495 | * @param message error issue message. Errors will be converted to string via toString() 496 | * @param properties optional properties to add to the annotation. 497 | */ 498 | function error(message, properties = {}) { 499 | command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); 500 | } 501 | exports.error = error; 502 | /** 503 | * Adds a warning issue 504 | * @param message warning issue message. Errors will be converted to string via toString() 505 | * @param properties optional properties to add to the annotation. 506 | */ 507 | function warning(message, properties = {}) { 508 | command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); 509 | } 510 | exports.warning = warning; 511 | /** 512 | * Adds a notice issue 513 | * @param message notice issue message. Errors will be converted to string via toString() 514 | * @param properties optional properties to add to the annotation. 515 | */ 516 | function notice(message, properties = {}) { 517 | command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); 518 | } 519 | exports.notice = notice; 520 | /** 521 | * Writes info to log with console.log. 522 | * @param message info message 523 | */ 524 | function info(message) { 525 | process.stdout.write(message + os.EOL); 526 | } 527 | exports.info = info; 528 | /** 529 | * Begin an output group. 530 | * 531 | * Output until the next `groupEnd` will be foldable in this group 532 | * 533 | * @param name The name of the output group 534 | */ 535 | function startGroup(name) { 536 | command_1.issue('group', name); 537 | } 538 | exports.startGroup = startGroup; 539 | /** 540 | * End an output group. 541 | */ 542 | function endGroup() { 543 | command_1.issue('endgroup'); 544 | } 545 | exports.endGroup = endGroup; 546 | /** 547 | * Wrap an asynchronous function call in a group. 548 | * 549 | * Returns the same type as the function itself. 550 | * 551 | * @param name The name of the group 552 | * @param fn The function to wrap in the group 553 | */ 554 | function group(name, fn) { 555 | return __awaiter(this, void 0, void 0, function* () { 556 | startGroup(name); 557 | let result; 558 | try { 559 | result = yield fn(); 560 | } 561 | finally { 562 | endGroup(); 563 | } 564 | return result; 565 | }); 566 | } 567 | exports.group = group; 568 | //----------------------------------------------------------------------- 569 | // Wrapper action state 570 | //----------------------------------------------------------------------- 571 | /** 572 | * Saves state for current action, the state can only be retrieved by this action's post job execution. 573 | * 574 | * @param name name of the state to store 575 | * @param value value to store. Non-string values will be converted to a string via JSON.stringify 576 | */ 577 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 578 | function saveState(name, value) { 579 | const filePath = process.env['GITHUB_STATE'] || ''; 580 | if (filePath) { 581 | return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); 582 | } 583 | command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); 584 | } 585 | exports.saveState = saveState; 586 | /** 587 | * Gets the value of an state set by this action's main execution. 588 | * 589 | * @param name name of the state to get 590 | * @returns string 591 | */ 592 | function getState(name) { 593 | return process.env[`STATE_${name}`] || ''; 594 | } 595 | exports.getState = getState; 596 | function getIDToken(aud) { 597 | return __awaiter(this, void 0, void 0, function* () { 598 | return yield oidc_utils_1.OidcClient.getIDToken(aud); 599 | }); 600 | } 601 | exports.getIDToken = getIDToken; 602 | /** 603 | * Summary exports 604 | */ 605 | var summary_1 = __nccwpck_require__(327); 606 | Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); 607 | /** 608 | * @deprecated use core.summary 609 | */ 610 | var summary_2 = __nccwpck_require__(327); 611 | Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); 612 | /** 613 | * Path exports 614 | */ 615 | var path_utils_1 = __nccwpck_require__(981); 616 | Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); 617 | Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); 618 | Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); 619 | //# sourceMappingURL=core.js.map 620 | 621 | /***/ }), 622 | 623 | /***/ 717: 624 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 625 | 626 | "use strict"; 627 | 628 | // For internal use, subject to change. 629 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 630 | if (k2 === undefined) k2 = k; 631 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 632 | }) : (function(o, m, k, k2) { 633 | if (k2 === undefined) k2 = k; 634 | o[k2] = m[k]; 635 | })); 636 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 637 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 638 | }) : function(o, v) { 639 | o["default"] = v; 640 | }); 641 | var __importStar = (this && this.__importStar) || function (mod) { 642 | if (mod && mod.__esModule) return mod; 643 | var result = {}; 644 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 645 | __setModuleDefault(result, mod); 646 | return result; 647 | }; 648 | Object.defineProperty(exports, "__esModule", ({ value: true })); 649 | exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; 650 | // We use any as a valid input type 651 | /* eslint-disable @typescript-eslint/no-explicit-any */ 652 | const fs = __importStar(__nccwpck_require__(147)); 653 | const os = __importStar(__nccwpck_require__(37)); 654 | const uuid_1 = __nccwpck_require__(840); 655 | const utils_1 = __nccwpck_require__(278); 656 | function issueFileCommand(command, message) { 657 | const filePath = process.env[`GITHUB_${command}`]; 658 | if (!filePath) { 659 | throw new Error(`Unable to find environment variable for file command ${command}`); 660 | } 661 | if (!fs.existsSync(filePath)) { 662 | throw new Error(`Missing file at path: ${filePath}`); 663 | } 664 | fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { 665 | encoding: 'utf8' 666 | }); 667 | } 668 | exports.issueFileCommand = issueFileCommand; 669 | function prepareKeyValueMessage(key, value) { 670 | const delimiter = `ghadelimiter_${uuid_1.v4()}`; 671 | const convertedValue = utils_1.toCommandValue(value); 672 | // These should realistically never happen, but just in case someone finds a 673 | // way to exploit uuid generation let's not allow keys or values that contain 674 | // the delimiter. 675 | if (key.includes(delimiter)) { 676 | throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); 677 | } 678 | if (convertedValue.includes(delimiter)) { 679 | throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); 680 | } 681 | return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; 682 | } 683 | exports.prepareKeyValueMessage = prepareKeyValueMessage; 684 | //# sourceMappingURL=file-command.js.map 685 | 686 | /***/ }), 687 | 688 | /***/ 41: 689 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 690 | 691 | "use strict"; 692 | 693 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 694 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 695 | return new (P || (P = Promise))(function (resolve, reject) { 696 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 697 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 698 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 699 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 700 | }); 701 | }; 702 | Object.defineProperty(exports, "__esModule", ({ value: true })); 703 | exports.OidcClient = void 0; 704 | const http_client_1 = __nccwpck_require__(255); 705 | const auth_1 = __nccwpck_require__(526); 706 | const core_1 = __nccwpck_require__(186); 707 | class OidcClient { 708 | static createHttpClient(allowRetry = true, maxRetry = 10) { 709 | const requestOptions = { 710 | allowRetries: allowRetry, 711 | maxRetries: maxRetry 712 | }; 713 | return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); 714 | } 715 | static getRequestToken() { 716 | const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; 717 | if (!token) { 718 | throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); 719 | } 720 | return token; 721 | } 722 | static getIDTokenUrl() { 723 | const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; 724 | if (!runtimeUrl) { 725 | throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); 726 | } 727 | return runtimeUrl; 728 | } 729 | static getCall(id_token_url) { 730 | var _a; 731 | return __awaiter(this, void 0, void 0, function* () { 732 | const httpclient = OidcClient.createHttpClient(); 733 | const res = yield httpclient 734 | .getJson(id_token_url) 735 | .catch(error => { 736 | throw new Error(`Failed to get ID Token. \n 737 | Error Code : ${error.statusCode}\n 738 | Error Message: ${error.result.message}`); 739 | }); 740 | const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; 741 | if (!id_token) { 742 | throw new Error('Response json body do not have ID Token field'); 743 | } 744 | return id_token; 745 | }); 746 | } 747 | static getIDToken(audience) { 748 | return __awaiter(this, void 0, void 0, function* () { 749 | try { 750 | // New ID Token is requested from action service 751 | let id_token_url = OidcClient.getIDTokenUrl(); 752 | if (audience) { 753 | const encodedAudience = encodeURIComponent(audience); 754 | id_token_url = `${id_token_url}&audience=${encodedAudience}`; 755 | } 756 | core_1.debug(`ID token url is ${id_token_url}`); 757 | const id_token = yield OidcClient.getCall(id_token_url); 758 | core_1.setSecret(id_token); 759 | return id_token; 760 | } 761 | catch (error) { 762 | throw new Error(`Error message: ${error.message}`); 763 | } 764 | }); 765 | } 766 | } 767 | exports.OidcClient = OidcClient; 768 | //# sourceMappingURL=oidc-utils.js.map 769 | 770 | /***/ }), 771 | 772 | /***/ 981: 773 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 774 | 775 | "use strict"; 776 | 777 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 778 | if (k2 === undefined) k2 = k; 779 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 780 | }) : (function(o, m, k, k2) { 781 | if (k2 === undefined) k2 = k; 782 | o[k2] = m[k]; 783 | })); 784 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 785 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 786 | }) : function(o, v) { 787 | o["default"] = v; 788 | }); 789 | var __importStar = (this && this.__importStar) || function (mod) { 790 | if (mod && mod.__esModule) return mod; 791 | var result = {}; 792 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 793 | __setModuleDefault(result, mod); 794 | return result; 795 | }; 796 | Object.defineProperty(exports, "__esModule", ({ value: true })); 797 | exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; 798 | const path = __importStar(__nccwpck_require__(17)); 799 | /** 800 | * toPosixPath converts the given path to the posix form. On Windows, \\ will be 801 | * replaced with /. 802 | * 803 | * @param pth. Path to transform. 804 | * @return string Posix path. 805 | */ 806 | function toPosixPath(pth) { 807 | return pth.replace(/[\\]/g, '/'); 808 | } 809 | exports.toPosixPath = toPosixPath; 810 | /** 811 | * toWin32Path converts the given path to the win32 form. On Linux, / will be 812 | * replaced with \\. 813 | * 814 | * @param pth. Path to transform. 815 | * @return string Win32 path. 816 | */ 817 | function toWin32Path(pth) { 818 | return pth.replace(/[/]/g, '\\'); 819 | } 820 | exports.toWin32Path = toWin32Path; 821 | /** 822 | * toPlatformPath converts the given path to a platform-specific path. It does 823 | * this by replacing instances of / and \ with the platform-specific path 824 | * separator. 825 | * 826 | * @param pth The path to platformize. 827 | * @return string The platform-specific path. 828 | */ 829 | function toPlatformPath(pth) { 830 | return pth.replace(/[/\\]/g, path.sep); 831 | } 832 | exports.toPlatformPath = toPlatformPath; 833 | //# sourceMappingURL=path-utils.js.map 834 | 835 | /***/ }), 836 | 837 | /***/ 327: 838 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 839 | 840 | "use strict"; 841 | 842 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 843 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 844 | return new (P || (P = Promise))(function (resolve, reject) { 845 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 846 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 847 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 848 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 849 | }); 850 | }; 851 | Object.defineProperty(exports, "__esModule", ({ value: true })); 852 | exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; 853 | const os_1 = __nccwpck_require__(37); 854 | const fs_1 = __nccwpck_require__(147); 855 | const { access, appendFile, writeFile } = fs_1.promises; 856 | exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; 857 | exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; 858 | class Summary { 859 | constructor() { 860 | this._buffer = ''; 861 | } 862 | /** 863 | * Finds the summary file path from the environment, rejects if env var is not found or file does not exist 864 | * Also checks r/w permissions. 865 | * 866 | * @returns step summary file path 867 | */ 868 | filePath() { 869 | return __awaiter(this, void 0, void 0, function* () { 870 | if (this._filePath) { 871 | return this._filePath; 872 | } 873 | const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; 874 | if (!pathFromEnv) { 875 | throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); 876 | } 877 | try { 878 | yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); 879 | } 880 | catch (_a) { 881 | throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); 882 | } 883 | this._filePath = pathFromEnv; 884 | return this._filePath; 885 | }); 886 | } 887 | /** 888 | * Wraps content in an HTML tag, adding any HTML attributes 889 | * 890 | * @param {string} tag HTML tag to wrap 891 | * @param {string | null} content content within the tag 892 | * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add 893 | * 894 | * @returns {string} content wrapped in HTML element 895 | */ 896 | wrap(tag, content, attrs = {}) { 897 | const htmlAttrs = Object.entries(attrs) 898 | .map(([key, value]) => ` ${key}="${value}"`) 899 | .join(''); 900 | if (!content) { 901 | return `<${tag}${htmlAttrs}>`; 902 | } 903 | return `<${tag}${htmlAttrs}>${content}`; 904 | } 905 | /** 906 | * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. 907 | * 908 | * @param {SummaryWriteOptions} [options] (optional) options for write operation 909 | * 910 | * @returns {Promise} summary instance 911 | */ 912 | write(options) { 913 | return __awaiter(this, void 0, void 0, function* () { 914 | const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); 915 | const filePath = yield this.filePath(); 916 | const writeFunc = overwrite ? writeFile : appendFile; 917 | yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); 918 | return this.emptyBuffer(); 919 | }); 920 | } 921 | /** 922 | * Clears the summary buffer and wipes the summary file 923 | * 924 | * @returns {Summary} summary instance 925 | */ 926 | clear() { 927 | return __awaiter(this, void 0, void 0, function* () { 928 | return this.emptyBuffer().write({ overwrite: true }); 929 | }); 930 | } 931 | /** 932 | * Returns the current summary buffer as a string 933 | * 934 | * @returns {string} string of summary buffer 935 | */ 936 | stringify() { 937 | return this._buffer; 938 | } 939 | /** 940 | * If the summary buffer is empty 941 | * 942 | * @returns {boolen} true if the buffer is empty 943 | */ 944 | isEmptyBuffer() { 945 | return this._buffer.length === 0; 946 | } 947 | /** 948 | * Resets the summary buffer without writing to summary file 949 | * 950 | * @returns {Summary} summary instance 951 | */ 952 | emptyBuffer() { 953 | this._buffer = ''; 954 | return this; 955 | } 956 | /** 957 | * Adds raw text to the summary buffer 958 | * 959 | * @param {string} text content to add 960 | * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) 961 | * 962 | * @returns {Summary} summary instance 963 | */ 964 | addRaw(text, addEOL = false) { 965 | this._buffer += text; 966 | return addEOL ? this.addEOL() : this; 967 | } 968 | /** 969 | * Adds the operating system-specific end-of-line marker to the buffer 970 | * 971 | * @returns {Summary} summary instance 972 | */ 973 | addEOL() { 974 | return this.addRaw(os_1.EOL); 975 | } 976 | /** 977 | * Adds an HTML codeblock to the summary buffer 978 | * 979 | * @param {string} code content to render within fenced code block 980 | * @param {string} lang (optional) language to syntax highlight code 981 | * 982 | * @returns {Summary} summary instance 983 | */ 984 | addCodeBlock(code, lang) { 985 | const attrs = Object.assign({}, (lang && { lang })); 986 | const element = this.wrap('pre', this.wrap('code', code), attrs); 987 | return this.addRaw(element).addEOL(); 988 | } 989 | /** 990 | * Adds an HTML list to the summary buffer 991 | * 992 | * @param {string[]} items list of items to render 993 | * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) 994 | * 995 | * @returns {Summary} summary instance 996 | */ 997 | addList(items, ordered = false) { 998 | const tag = ordered ? 'ol' : 'ul'; 999 | const listItems = items.map(item => this.wrap('li', item)).join(''); 1000 | const element = this.wrap(tag, listItems); 1001 | return this.addRaw(element).addEOL(); 1002 | } 1003 | /** 1004 | * Adds an HTML table to the summary buffer 1005 | * 1006 | * @param {SummaryTableCell[]} rows table rows 1007 | * 1008 | * @returns {Summary} summary instance 1009 | */ 1010 | addTable(rows) { 1011 | const tableBody = rows 1012 | .map(row => { 1013 | const cells = row 1014 | .map(cell => { 1015 | if (typeof cell === 'string') { 1016 | return this.wrap('td', cell); 1017 | } 1018 | const { header, data, colspan, rowspan } = cell; 1019 | const tag = header ? 'th' : 'td'; 1020 | const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); 1021 | return this.wrap(tag, data, attrs); 1022 | }) 1023 | .join(''); 1024 | return this.wrap('tr', cells); 1025 | }) 1026 | .join(''); 1027 | const element = this.wrap('table', tableBody); 1028 | return this.addRaw(element).addEOL(); 1029 | } 1030 | /** 1031 | * Adds a collapsable HTML details element to the summary buffer 1032 | * 1033 | * @param {string} label text for the closed state 1034 | * @param {string} content collapsable content 1035 | * 1036 | * @returns {Summary} summary instance 1037 | */ 1038 | addDetails(label, content) { 1039 | const element = this.wrap('details', this.wrap('summary', label) + content); 1040 | return this.addRaw(element).addEOL(); 1041 | } 1042 | /** 1043 | * Adds an HTML image tag to the summary buffer 1044 | * 1045 | * @param {string} src path to the image you to embed 1046 | * @param {string} alt text description of the image 1047 | * @param {SummaryImageOptions} options (optional) addition image attributes 1048 | * 1049 | * @returns {Summary} summary instance 1050 | */ 1051 | addImage(src, alt, options) { 1052 | const { width, height } = options || {}; 1053 | const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); 1054 | const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); 1055 | return this.addRaw(element).addEOL(); 1056 | } 1057 | /** 1058 | * Adds an HTML section heading element 1059 | * 1060 | * @param {string} text heading text 1061 | * @param {number | string} [level=1] (optional) the heading level, default: 1 1062 | * 1063 | * @returns {Summary} summary instance 1064 | */ 1065 | addHeading(text, level) { 1066 | const tag = `h${level}`; 1067 | const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) 1068 | ? tag 1069 | : 'h1'; 1070 | const element = this.wrap(allowedTag, text); 1071 | return this.addRaw(element).addEOL(); 1072 | } 1073 | /** 1074 | * Adds an HTML thematic break (
) to the summary buffer 1075 | * 1076 | * @returns {Summary} summary instance 1077 | */ 1078 | addSeparator() { 1079 | const element = this.wrap('hr', null); 1080 | return this.addRaw(element).addEOL(); 1081 | } 1082 | /** 1083 | * Adds an HTML line break (
) to the summary buffer 1084 | * 1085 | * @returns {Summary} summary instance 1086 | */ 1087 | addBreak() { 1088 | const element = this.wrap('br', null); 1089 | return this.addRaw(element).addEOL(); 1090 | } 1091 | /** 1092 | * Adds an HTML blockquote to the summary buffer 1093 | * 1094 | * @param {string} text quote text 1095 | * @param {string} cite (optional) citation url 1096 | * 1097 | * @returns {Summary} summary instance 1098 | */ 1099 | addQuote(text, cite) { 1100 | const attrs = Object.assign({}, (cite && { cite })); 1101 | const element = this.wrap('blockquote', text, attrs); 1102 | return this.addRaw(element).addEOL(); 1103 | } 1104 | /** 1105 | * Adds an HTML anchor tag to the summary buffer 1106 | * 1107 | * @param {string} text link text/content 1108 | * @param {string} href hyperlink 1109 | * 1110 | * @returns {Summary} summary instance 1111 | */ 1112 | addLink(text, href) { 1113 | const element = this.wrap('a', text, { href }); 1114 | return this.addRaw(element).addEOL(); 1115 | } 1116 | } 1117 | const _summary = new Summary(); 1118 | /** 1119 | * @deprecated use `core.summary` 1120 | */ 1121 | exports.markdownSummary = _summary; 1122 | exports.summary = _summary; 1123 | //# sourceMappingURL=summary.js.map 1124 | 1125 | /***/ }), 1126 | 1127 | /***/ 278: 1128 | /***/ ((__unused_webpack_module, exports) => { 1129 | 1130 | "use strict"; 1131 | 1132 | // We use any as a valid input type 1133 | /* eslint-disable @typescript-eslint/no-explicit-any */ 1134 | Object.defineProperty(exports, "__esModule", ({ value: true })); 1135 | exports.toCommandProperties = exports.toCommandValue = void 0; 1136 | /** 1137 | * Sanitizes an input into a string so it can be passed into issueCommand safely 1138 | * @param input input to sanitize into a string 1139 | */ 1140 | function toCommandValue(input) { 1141 | if (input === null || input === undefined) { 1142 | return ''; 1143 | } 1144 | else if (typeof input === 'string' || input instanceof String) { 1145 | return input; 1146 | } 1147 | return JSON.stringify(input); 1148 | } 1149 | exports.toCommandValue = toCommandValue; 1150 | /** 1151 | * 1152 | * @param annotationProperties 1153 | * @returns The command properties to send with the actual annotation command 1154 | * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 1155 | */ 1156 | function toCommandProperties(annotationProperties) { 1157 | if (!Object.keys(annotationProperties).length) { 1158 | return {}; 1159 | } 1160 | return { 1161 | title: annotationProperties.title, 1162 | file: annotationProperties.file, 1163 | line: annotationProperties.startLine, 1164 | endLine: annotationProperties.endLine, 1165 | col: annotationProperties.startColumn, 1166 | endColumn: annotationProperties.endColumn 1167 | }; 1168 | } 1169 | exports.toCommandProperties = toCommandProperties; 1170 | //# sourceMappingURL=utils.js.map 1171 | 1172 | /***/ }), 1173 | 1174 | /***/ 526: 1175 | /***/ (function(__unused_webpack_module, exports) { 1176 | 1177 | "use strict"; 1178 | 1179 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 1180 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 1181 | return new (P || (P = Promise))(function (resolve, reject) { 1182 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 1183 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 1184 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 1185 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 1186 | }); 1187 | }; 1188 | Object.defineProperty(exports, "__esModule", ({ value: true })); 1189 | exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; 1190 | class BasicCredentialHandler { 1191 | constructor(username, password) { 1192 | this.username = username; 1193 | this.password = password; 1194 | } 1195 | prepareRequest(options) { 1196 | if (!options.headers) { 1197 | throw Error('The request has no headers'); 1198 | } 1199 | options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; 1200 | } 1201 | // This handler cannot handle 401 1202 | canHandleAuthentication() { 1203 | return false; 1204 | } 1205 | handleAuthentication() { 1206 | return __awaiter(this, void 0, void 0, function* () { 1207 | throw new Error('not implemented'); 1208 | }); 1209 | } 1210 | } 1211 | exports.BasicCredentialHandler = BasicCredentialHandler; 1212 | class BearerCredentialHandler { 1213 | constructor(token) { 1214 | this.token = token; 1215 | } 1216 | // currently implements pre-authorization 1217 | // TODO: support preAuth = false where it hooks on 401 1218 | prepareRequest(options) { 1219 | if (!options.headers) { 1220 | throw Error('The request has no headers'); 1221 | } 1222 | options.headers['Authorization'] = `Bearer ${this.token}`; 1223 | } 1224 | // This handler cannot handle 401 1225 | canHandleAuthentication() { 1226 | return false; 1227 | } 1228 | handleAuthentication() { 1229 | return __awaiter(this, void 0, void 0, function* () { 1230 | throw new Error('not implemented'); 1231 | }); 1232 | } 1233 | } 1234 | exports.BearerCredentialHandler = BearerCredentialHandler; 1235 | class PersonalAccessTokenCredentialHandler { 1236 | constructor(token) { 1237 | this.token = token; 1238 | } 1239 | // currently implements pre-authorization 1240 | // TODO: support preAuth = false where it hooks on 401 1241 | prepareRequest(options) { 1242 | if (!options.headers) { 1243 | throw Error('The request has no headers'); 1244 | } 1245 | options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; 1246 | } 1247 | // This handler cannot handle 401 1248 | canHandleAuthentication() { 1249 | return false; 1250 | } 1251 | handleAuthentication() { 1252 | return __awaiter(this, void 0, void 0, function* () { 1253 | throw new Error('not implemented'); 1254 | }); 1255 | } 1256 | } 1257 | exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; 1258 | //# sourceMappingURL=auth.js.map 1259 | 1260 | /***/ }), 1261 | 1262 | /***/ 255: 1263 | /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { 1264 | 1265 | "use strict"; 1266 | 1267 | /* eslint-disable @typescript-eslint/no-explicit-any */ 1268 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 1269 | if (k2 === undefined) k2 = k; 1270 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 1271 | }) : (function(o, m, k, k2) { 1272 | if (k2 === undefined) k2 = k; 1273 | o[k2] = m[k]; 1274 | })); 1275 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 1276 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 1277 | }) : function(o, v) { 1278 | o["default"] = v; 1279 | }); 1280 | var __importStar = (this && this.__importStar) || function (mod) { 1281 | if (mod && mod.__esModule) return mod; 1282 | var result = {}; 1283 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 1284 | __setModuleDefault(result, mod); 1285 | return result; 1286 | }; 1287 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 1288 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 1289 | return new (P || (P = Promise))(function (resolve, reject) { 1290 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 1291 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 1292 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 1293 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 1294 | }); 1295 | }; 1296 | Object.defineProperty(exports, "__esModule", ({ value: true })); 1297 | exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; 1298 | const http = __importStar(__nccwpck_require__(685)); 1299 | const https = __importStar(__nccwpck_require__(687)); 1300 | const pm = __importStar(__nccwpck_require__(835)); 1301 | const tunnel = __importStar(__nccwpck_require__(294)); 1302 | var HttpCodes; 1303 | (function (HttpCodes) { 1304 | HttpCodes[HttpCodes["OK"] = 200] = "OK"; 1305 | HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; 1306 | HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; 1307 | HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; 1308 | HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; 1309 | HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; 1310 | HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; 1311 | HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; 1312 | HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; 1313 | HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; 1314 | HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; 1315 | HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; 1316 | HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; 1317 | HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; 1318 | HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; 1319 | HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; 1320 | HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; 1321 | HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; 1322 | HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; 1323 | HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; 1324 | HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; 1325 | HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; 1326 | HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; 1327 | HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; 1328 | HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; 1329 | HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; 1330 | HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; 1331 | })(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); 1332 | var Headers; 1333 | (function (Headers) { 1334 | Headers["Accept"] = "accept"; 1335 | Headers["ContentType"] = "content-type"; 1336 | })(Headers = exports.Headers || (exports.Headers = {})); 1337 | var MediaTypes; 1338 | (function (MediaTypes) { 1339 | MediaTypes["ApplicationJson"] = "application/json"; 1340 | })(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); 1341 | /** 1342 | * Returns the proxy URL, depending upon the supplied url and proxy environment variables. 1343 | * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com 1344 | */ 1345 | function getProxyUrl(serverUrl) { 1346 | const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); 1347 | return proxyUrl ? proxyUrl.href : ''; 1348 | } 1349 | exports.getProxyUrl = getProxyUrl; 1350 | const HttpRedirectCodes = [ 1351 | HttpCodes.MovedPermanently, 1352 | HttpCodes.ResourceMoved, 1353 | HttpCodes.SeeOther, 1354 | HttpCodes.TemporaryRedirect, 1355 | HttpCodes.PermanentRedirect 1356 | ]; 1357 | const HttpResponseRetryCodes = [ 1358 | HttpCodes.BadGateway, 1359 | HttpCodes.ServiceUnavailable, 1360 | HttpCodes.GatewayTimeout 1361 | ]; 1362 | const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; 1363 | const ExponentialBackoffCeiling = 10; 1364 | const ExponentialBackoffTimeSlice = 5; 1365 | class HttpClientError extends Error { 1366 | constructor(message, statusCode) { 1367 | super(message); 1368 | this.name = 'HttpClientError'; 1369 | this.statusCode = statusCode; 1370 | Object.setPrototypeOf(this, HttpClientError.prototype); 1371 | } 1372 | } 1373 | exports.HttpClientError = HttpClientError; 1374 | class HttpClientResponse { 1375 | constructor(message) { 1376 | this.message = message; 1377 | } 1378 | readBody() { 1379 | return __awaiter(this, void 0, void 0, function* () { 1380 | return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 1381 | let output = Buffer.alloc(0); 1382 | this.message.on('data', (chunk) => { 1383 | output = Buffer.concat([output, chunk]); 1384 | }); 1385 | this.message.on('end', () => { 1386 | resolve(output.toString()); 1387 | }); 1388 | })); 1389 | }); 1390 | } 1391 | readBodyBuffer() { 1392 | return __awaiter(this, void 0, void 0, function* () { 1393 | return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { 1394 | const chunks = []; 1395 | this.message.on('data', (chunk) => { 1396 | chunks.push(chunk); 1397 | }); 1398 | this.message.on('end', () => { 1399 | resolve(Buffer.concat(chunks)); 1400 | }); 1401 | })); 1402 | }); 1403 | } 1404 | } 1405 | exports.HttpClientResponse = HttpClientResponse; 1406 | function isHttps(requestUrl) { 1407 | const parsedUrl = new URL(requestUrl); 1408 | return parsedUrl.protocol === 'https:'; 1409 | } 1410 | exports.isHttps = isHttps; 1411 | class HttpClient { 1412 | constructor(userAgent, handlers, requestOptions) { 1413 | this._ignoreSslError = false; 1414 | this._allowRedirects = true; 1415 | this._allowRedirectDowngrade = false; 1416 | this._maxRedirects = 50; 1417 | this._allowRetries = false; 1418 | this._maxRetries = 1; 1419 | this._keepAlive = false; 1420 | this._disposed = false; 1421 | this.userAgent = userAgent; 1422 | this.handlers = handlers || []; 1423 | this.requestOptions = requestOptions; 1424 | if (requestOptions) { 1425 | if (requestOptions.ignoreSslError != null) { 1426 | this._ignoreSslError = requestOptions.ignoreSslError; 1427 | } 1428 | this._socketTimeout = requestOptions.socketTimeout; 1429 | if (requestOptions.allowRedirects != null) { 1430 | this._allowRedirects = requestOptions.allowRedirects; 1431 | } 1432 | if (requestOptions.allowRedirectDowngrade != null) { 1433 | this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; 1434 | } 1435 | if (requestOptions.maxRedirects != null) { 1436 | this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); 1437 | } 1438 | if (requestOptions.keepAlive != null) { 1439 | this._keepAlive = requestOptions.keepAlive; 1440 | } 1441 | if (requestOptions.allowRetries != null) { 1442 | this._allowRetries = requestOptions.allowRetries; 1443 | } 1444 | if (requestOptions.maxRetries != null) { 1445 | this._maxRetries = requestOptions.maxRetries; 1446 | } 1447 | } 1448 | } 1449 | options(requestUrl, additionalHeaders) { 1450 | return __awaiter(this, void 0, void 0, function* () { 1451 | return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); 1452 | }); 1453 | } 1454 | get(requestUrl, additionalHeaders) { 1455 | return __awaiter(this, void 0, void 0, function* () { 1456 | return this.request('GET', requestUrl, null, additionalHeaders || {}); 1457 | }); 1458 | } 1459 | del(requestUrl, additionalHeaders) { 1460 | return __awaiter(this, void 0, void 0, function* () { 1461 | return this.request('DELETE', requestUrl, null, additionalHeaders || {}); 1462 | }); 1463 | } 1464 | post(requestUrl, data, additionalHeaders) { 1465 | return __awaiter(this, void 0, void 0, function* () { 1466 | return this.request('POST', requestUrl, data, additionalHeaders || {}); 1467 | }); 1468 | } 1469 | patch(requestUrl, data, additionalHeaders) { 1470 | return __awaiter(this, void 0, void 0, function* () { 1471 | return this.request('PATCH', requestUrl, data, additionalHeaders || {}); 1472 | }); 1473 | } 1474 | put(requestUrl, data, additionalHeaders) { 1475 | return __awaiter(this, void 0, void 0, function* () { 1476 | return this.request('PUT', requestUrl, data, additionalHeaders || {}); 1477 | }); 1478 | } 1479 | head(requestUrl, additionalHeaders) { 1480 | return __awaiter(this, void 0, void 0, function* () { 1481 | return this.request('HEAD', requestUrl, null, additionalHeaders || {}); 1482 | }); 1483 | } 1484 | sendStream(verb, requestUrl, stream, additionalHeaders) { 1485 | return __awaiter(this, void 0, void 0, function* () { 1486 | return this.request(verb, requestUrl, stream, additionalHeaders); 1487 | }); 1488 | } 1489 | /** 1490 | * Gets a typed object from an endpoint 1491 | * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise 1492 | */ 1493 | getJson(requestUrl, additionalHeaders = {}) { 1494 | return __awaiter(this, void 0, void 0, function* () { 1495 | additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); 1496 | const res = yield this.get(requestUrl, additionalHeaders); 1497 | return this._processResponse(res, this.requestOptions); 1498 | }); 1499 | } 1500 | postJson(requestUrl, obj, additionalHeaders = {}) { 1501 | return __awaiter(this, void 0, void 0, function* () { 1502 | const data = JSON.stringify(obj, null, 2); 1503 | additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); 1504 | additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); 1505 | const res = yield this.post(requestUrl, data, additionalHeaders); 1506 | return this._processResponse(res, this.requestOptions); 1507 | }); 1508 | } 1509 | putJson(requestUrl, obj, additionalHeaders = {}) { 1510 | return __awaiter(this, void 0, void 0, function* () { 1511 | const data = JSON.stringify(obj, null, 2); 1512 | additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); 1513 | additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); 1514 | const res = yield this.put(requestUrl, data, additionalHeaders); 1515 | return this._processResponse(res, this.requestOptions); 1516 | }); 1517 | } 1518 | patchJson(requestUrl, obj, additionalHeaders = {}) { 1519 | return __awaiter(this, void 0, void 0, function* () { 1520 | const data = JSON.stringify(obj, null, 2); 1521 | additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); 1522 | additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); 1523 | const res = yield this.patch(requestUrl, data, additionalHeaders); 1524 | return this._processResponse(res, this.requestOptions); 1525 | }); 1526 | } 1527 | /** 1528 | * Makes a raw http request. 1529 | * All other methods such as get, post, patch, and request ultimately call this. 1530 | * Prefer get, del, post and patch 1531 | */ 1532 | request(verb, requestUrl, data, headers) { 1533 | return __awaiter(this, void 0, void 0, function* () { 1534 | if (this._disposed) { 1535 | throw new Error('Client has already been disposed.'); 1536 | } 1537 | const parsedUrl = new URL(requestUrl); 1538 | let info = this._prepareRequest(verb, parsedUrl, headers); 1539 | // Only perform retries on reads since writes may not be idempotent. 1540 | const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) 1541 | ? this._maxRetries + 1 1542 | : 1; 1543 | let numTries = 0; 1544 | let response; 1545 | do { 1546 | response = yield this.requestRaw(info, data); 1547 | // Check if it's an authentication challenge 1548 | if (response && 1549 | response.message && 1550 | response.message.statusCode === HttpCodes.Unauthorized) { 1551 | let authenticationHandler; 1552 | for (const handler of this.handlers) { 1553 | if (handler.canHandleAuthentication(response)) { 1554 | authenticationHandler = handler; 1555 | break; 1556 | } 1557 | } 1558 | if (authenticationHandler) { 1559 | return authenticationHandler.handleAuthentication(this, info, data); 1560 | } 1561 | else { 1562 | // We have received an unauthorized response but have no handlers to handle it. 1563 | // Let the response return to the caller. 1564 | return response; 1565 | } 1566 | } 1567 | let redirectsRemaining = this._maxRedirects; 1568 | while (response.message.statusCode && 1569 | HttpRedirectCodes.includes(response.message.statusCode) && 1570 | this._allowRedirects && 1571 | redirectsRemaining > 0) { 1572 | const redirectUrl = response.message.headers['location']; 1573 | if (!redirectUrl) { 1574 | // if there's no location to redirect to, we won't 1575 | break; 1576 | } 1577 | const parsedRedirectUrl = new URL(redirectUrl); 1578 | if (parsedUrl.protocol === 'https:' && 1579 | parsedUrl.protocol !== parsedRedirectUrl.protocol && 1580 | !this._allowRedirectDowngrade) { 1581 | 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.'); 1582 | } 1583 | // we need to finish reading the response before reassigning response 1584 | // which will leak the open socket. 1585 | yield response.readBody(); 1586 | // strip authorization header if redirected to a different hostname 1587 | if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { 1588 | for (const header in headers) { 1589 | // header names are case insensitive 1590 | if (header.toLowerCase() === 'authorization') { 1591 | delete headers[header]; 1592 | } 1593 | } 1594 | } 1595 | // let's make the request with the new redirectUrl 1596 | info = this._prepareRequest(verb, parsedRedirectUrl, headers); 1597 | response = yield this.requestRaw(info, data); 1598 | redirectsRemaining--; 1599 | } 1600 | if (!response.message.statusCode || 1601 | !HttpResponseRetryCodes.includes(response.message.statusCode)) { 1602 | // If not a retry code, return immediately instead of retrying 1603 | return response; 1604 | } 1605 | numTries += 1; 1606 | if (numTries < maxTries) { 1607 | yield response.readBody(); 1608 | yield this._performExponentialBackoff(numTries); 1609 | } 1610 | } while (numTries < maxTries); 1611 | return response; 1612 | }); 1613 | } 1614 | /** 1615 | * Needs to be called if keepAlive is set to true in request options. 1616 | */ 1617 | dispose() { 1618 | if (this._agent) { 1619 | this._agent.destroy(); 1620 | } 1621 | this._disposed = true; 1622 | } 1623 | /** 1624 | * Raw request. 1625 | * @param info 1626 | * @param data 1627 | */ 1628 | requestRaw(info, data) { 1629 | return __awaiter(this, void 0, void 0, function* () { 1630 | return new Promise((resolve, reject) => { 1631 | function callbackForResult(err, res) { 1632 | if (err) { 1633 | reject(err); 1634 | } 1635 | else if (!res) { 1636 | // If `err` is not passed, then `res` must be passed. 1637 | reject(new Error('Unknown error')); 1638 | } 1639 | else { 1640 | resolve(res); 1641 | } 1642 | } 1643 | this.requestRawWithCallback(info, data, callbackForResult); 1644 | }); 1645 | }); 1646 | } 1647 | /** 1648 | * Raw request with callback. 1649 | * @param info 1650 | * @param data 1651 | * @param onResult 1652 | */ 1653 | requestRawWithCallback(info, data, onResult) { 1654 | if (typeof data === 'string') { 1655 | if (!info.options.headers) { 1656 | info.options.headers = {}; 1657 | } 1658 | info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); 1659 | } 1660 | let callbackCalled = false; 1661 | function handleResult(err, res) { 1662 | if (!callbackCalled) { 1663 | callbackCalled = true; 1664 | onResult(err, res); 1665 | } 1666 | } 1667 | const req = info.httpModule.request(info.options, (msg) => { 1668 | const res = new HttpClientResponse(msg); 1669 | handleResult(undefined, res); 1670 | }); 1671 | let socket; 1672 | req.on('socket', sock => { 1673 | socket = sock; 1674 | }); 1675 | // If we ever get disconnected, we want the socket to timeout eventually 1676 | req.setTimeout(this._socketTimeout || 3 * 60000, () => { 1677 | if (socket) { 1678 | socket.end(); 1679 | } 1680 | handleResult(new Error(`Request timeout: ${info.options.path}`)); 1681 | }); 1682 | req.on('error', function (err) { 1683 | // err has statusCode property 1684 | // res should have headers 1685 | handleResult(err); 1686 | }); 1687 | if (data && typeof data === 'string') { 1688 | req.write(data, 'utf8'); 1689 | } 1690 | if (data && typeof data !== 'string') { 1691 | data.on('close', function () { 1692 | req.end(); 1693 | }); 1694 | data.pipe(req); 1695 | } 1696 | else { 1697 | req.end(); 1698 | } 1699 | } 1700 | /** 1701 | * Gets an http agent. This function is useful when you need an http agent that handles 1702 | * routing through a proxy server - depending upon the url and proxy environment variables. 1703 | * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com 1704 | */ 1705 | getAgent(serverUrl) { 1706 | const parsedUrl = new URL(serverUrl); 1707 | return this._getAgent(parsedUrl); 1708 | } 1709 | _prepareRequest(method, requestUrl, headers) { 1710 | const info = {}; 1711 | info.parsedUrl = requestUrl; 1712 | const usingSsl = info.parsedUrl.protocol === 'https:'; 1713 | info.httpModule = usingSsl ? https : http; 1714 | const defaultPort = usingSsl ? 443 : 80; 1715 | info.options = {}; 1716 | info.options.host = info.parsedUrl.hostname; 1717 | info.options.port = info.parsedUrl.port 1718 | ? parseInt(info.parsedUrl.port) 1719 | : defaultPort; 1720 | info.options.path = 1721 | (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); 1722 | info.options.method = method; 1723 | info.options.headers = this._mergeHeaders(headers); 1724 | if (this.userAgent != null) { 1725 | info.options.headers['user-agent'] = this.userAgent; 1726 | } 1727 | info.options.agent = this._getAgent(info.parsedUrl); 1728 | // gives handlers an opportunity to participate 1729 | if (this.handlers) { 1730 | for (const handler of this.handlers) { 1731 | handler.prepareRequest(info.options); 1732 | } 1733 | } 1734 | return info; 1735 | } 1736 | _mergeHeaders(headers) { 1737 | if (this.requestOptions && this.requestOptions.headers) { 1738 | return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); 1739 | } 1740 | return lowercaseKeys(headers || {}); 1741 | } 1742 | _getExistingOrDefaultHeader(additionalHeaders, header, _default) { 1743 | let clientHeader; 1744 | if (this.requestOptions && this.requestOptions.headers) { 1745 | clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; 1746 | } 1747 | return additionalHeaders[header] || clientHeader || _default; 1748 | } 1749 | _getAgent(parsedUrl) { 1750 | let agent; 1751 | const proxyUrl = pm.getProxyUrl(parsedUrl); 1752 | const useProxy = proxyUrl && proxyUrl.hostname; 1753 | if (this._keepAlive && useProxy) { 1754 | agent = this._proxyAgent; 1755 | } 1756 | if (this._keepAlive && !useProxy) { 1757 | agent = this._agent; 1758 | } 1759 | // if agent is already assigned use that agent. 1760 | if (agent) { 1761 | return agent; 1762 | } 1763 | const usingSsl = parsedUrl.protocol === 'https:'; 1764 | let maxSockets = 100; 1765 | if (this.requestOptions) { 1766 | maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; 1767 | } 1768 | // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. 1769 | if (proxyUrl && proxyUrl.hostname) { 1770 | const agentOptions = { 1771 | maxSockets, 1772 | keepAlive: this._keepAlive, 1773 | proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { 1774 | proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` 1775 | })), { host: proxyUrl.hostname, port: proxyUrl.port }) 1776 | }; 1777 | let tunnelAgent; 1778 | const overHttps = proxyUrl.protocol === 'https:'; 1779 | if (usingSsl) { 1780 | tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; 1781 | } 1782 | else { 1783 | tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; 1784 | } 1785 | agent = tunnelAgent(agentOptions); 1786 | this._proxyAgent = agent; 1787 | } 1788 | // if reusing agent across request and tunneling agent isn't assigned create a new agent 1789 | if (this._keepAlive && !agent) { 1790 | const options = { keepAlive: this._keepAlive, maxSockets }; 1791 | agent = usingSsl ? new https.Agent(options) : new http.Agent(options); 1792 | this._agent = agent; 1793 | } 1794 | // if not using private agent and tunnel agent isn't setup then use global agent 1795 | if (!agent) { 1796 | agent = usingSsl ? https.globalAgent : http.globalAgent; 1797 | } 1798 | if (usingSsl && this._ignoreSslError) { 1799 | // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process 1800 | // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options 1801 | // we have to cast it to any and change it directly 1802 | agent.options = Object.assign(agent.options || {}, { 1803 | rejectUnauthorized: false 1804 | }); 1805 | } 1806 | return agent; 1807 | } 1808 | _performExponentialBackoff(retryNumber) { 1809 | return __awaiter(this, void 0, void 0, function* () { 1810 | retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); 1811 | const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); 1812 | return new Promise(resolve => setTimeout(() => resolve(), ms)); 1813 | }); 1814 | } 1815 | _processResponse(res, options) { 1816 | return __awaiter(this, void 0, void 0, function* () { 1817 | return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { 1818 | const statusCode = res.message.statusCode || 0; 1819 | const response = { 1820 | statusCode, 1821 | result: null, 1822 | headers: {} 1823 | }; 1824 | // not found leads to null obj returned 1825 | if (statusCode === HttpCodes.NotFound) { 1826 | resolve(response); 1827 | } 1828 | // get the result from the body 1829 | function dateTimeDeserializer(key, value) { 1830 | if (typeof value === 'string') { 1831 | const a = new Date(value); 1832 | if (!isNaN(a.valueOf())) { 1833 | return a; 1834 | } 1835 | } 1836 | return value; 1837 | } 1838 | let obj; 1839 | let contents; 1840 | try { 1841 | contents = yield res.readBody(); 1842 | if (contents && contents.length > 0) { 1843 | if (options && options.deserializeDates) { 1844 | obj = JSON.parse(contents, dateTimeDeserializer); 1845 | } 1846 | else { 1847 | obj = JSON.parse(contents); 1848 | } 1849 | response.result = obj; 1850 | } 1851 | response.headers = res.message.headers; 1852 | } 1853 | catch (err) { 1854 | // Invalid resource (contents not json); leaving result obj null 1855 | } 1856 | // note that 3xx redirects are handled by the http layer. 1857 | if (statusCode > 299) { 1858 | let msg; 1859 | // if exception/error in body, attempt to get better error 1860 | if (obj && obj.message) { 1861 | msg = obj.message; 1862 | } 1863 | else if (contents && contents.length > 0) { 1864 | // it may be the case that the exception is in the body message as string 1865 | msg = contents; 1866 | } 1867 | else { 1868 | msg = `Failed request: (${statusCode})`; 1869 | } 1870 | const err = new HttpClientError(msg, statusCode); 1871 | err.result = response.result; 1872 | reject(err); 1873 | } 1874 | else { 1875 | resolve(response); 1876 | } 1877 | })); 1878 | }); 1879 | } 1880 | } 1881 | exports.HttpClient = HttpClient; 1882 | const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); 1883 | //# sourceMappingURL=index.js.map 1884 | 1885 | /***/ }), 1886 | 1887 | /***/ 835: 1888 | /***/ ((__unused_webpack_module, exports) => { 1889 | 1890 | "use strict"; 1891 | 1892 | Object.defineProperty(exports, "__esModule", ({ value: true })); 1893 | exports.checkBypass = exports.getProxyUrl = void 0; 1894 | function getProxyUrl(reqUrl) { 1895 | const usingSsl = reqUrl.protocol === 'https:'; 1896 | if (checkBypass(reqUrl)) { 1897 | return undefined; 1898 | } 1899 | const proxyVar = (() => { 1900 | if (usingSsl) { 1901 | return process.env['https_proxy'] || process.env['HTTPS_PROXY']; 1902 | } 1903 | else { 1904 | return process.env['http_proxy'] || process.env['HTTP_PROXY']; 1905 | } 1906 | })(); 1907 | if (proxyVar) { 1908 | try { 1909 | return new URL(proxyVar); 1910 | } 1911 | catch (_a) { 1912 | if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) 1913 | return new URL(`http://${proxyVar}`); 1914 | } 1915 | } 1916 | else { 1917 | return undefined; 1918 | } 1919 | } 1920 | exports.getProxyUrl = getProxyUrl; 1921 | function checkBypass(reqUrl) { 1922 | if (!reqUrl.hostname) { 1923 | return false; 1924 | } 1925 | const reqHost = reqUrl.hostname; 1926 | if (isLoopbackAddress(reqHost)) { 1927 | return true; 1928 | } 1929 | const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; 1930 | if (!noProxy) { 1931 | return false; 1932 | } 1933 | // Determine the request port 1934 | let reqPort; 1935 | if (reqUrl.port) { 1936 | reqPort = Number(reqUrl.port); 1937 | } 1938 | else if (reqUrl.protocol === 'http:') { 1939 | reqPort = 80; 1940 | } 1941 | else if (reqUrl.protocol === 'https:') { 1942 | reqPort = 443; 1943 | } 1944 | // Format the request hostname and hostname with port 1945 | const upperReqHosts = [reqUrl.hostname.toUpperCase()]; 1946 | if (typeof reqPort === 'number') { 1947 | upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); 1948 | } 1949 | // Compare request host against noproxy 1950 | for (const upperNoProxyItem of noProxy 1951 | .split(',') 1952 | .map(x => x.trim().toUpperCase()) 1953 | .filter(x => x)) { 1954 | if (upperNoProxyItem === '*' || 1955 | upperReqHosts.some(x => x === upperNoProxyItem || 1956 | x.endsWith(`.${upperNoProxyItem}`) || 1957 | (upperNoProxyItem.startsWith('.') && 1958 | x.endsWith(`${upperNoProxyItem}`)))) { 1959 | return true; 1960 | } 1961 | } 1962 | return false; 1963 | } 1964 | exports.checkBypass = checkBypass; 1965 | function isLoopbackAddress(host) { 1966 | const hostLower = host.toLowerCase(); 1967 | return (hostLower === 'localhost' || 1968 | hostLower.startsWith('127.') || 1969 | hostLower.startsWith('[::1]') || 1970 | hostLower.startsWith('[0:0:0:0:0:0:0:1]')); 1971 | } 1972 | //# sourceMappingURL=proxy.js.map 1973 | 1974 | /***/ }), 1975 | 1976 | /***/ 2: 1977 | /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { 1978 | 1979 | "use strict"; 1980 | 1981 | const net = __nccwpck_require__(808); 1982 | 1983 | class Locked extends Error { 1984 | constructor(port) { 1985 | super(`${port} is locked`); 1986 | } 1987 | } 1988 | 1989 | const lockedPorts = { 1990 | old: new Set(), 1991 | young: new Set() 1992 | }; 1993 | 1994 | // On this interval, the old locked ports are discarded, 1995 | // the young locked ports are moved to old locked ports, 1996 | // and a new young set for locked ports are created. 1997 | const releaseOldLockedPortsIntervalMs = 1000 * 15; 1998 | 1999 | // Lazily create interval on first use 2000 | let interval; 2001 | 2002 | const getAvailablePort = options => new Promise((resolve, reject) => { 2003 | const server = net.createServer(); 2004 | server.unref(); 2005 | server.on('error', reject); 2006 | server.listen(options, () => { 2007 | const {port} = server.address(); 2008 | server.close(() => { 2009 | resolve(port); 2010 | }); 2011 | }); 2012 | }); 2013 | 2014 | const portCheckSequence = function * (ports) { 2015 | if (ports) { 2016 | yield * ports; 2017 | } 2018 | 2019 | yield 0; // Fall back to 0 if anything else failed 2020 | }; 2021 | 2022 | module.exports = async options => { 2023 | let ports; 2024 | 2025 | if (options) { 2026 | ports = typeof options.port === 'number' ? [options.port] : options.port; 2027 | } 2028 | 2029 | if (interval === undefined) { 2030 | interval = setInterval(() => { 2031 | lockedPorts.old = lockedPorts.young; 2032 | lockedPorts.young = new Set(); 2033 | }, releaseOldLockedPortsIntervalMs); 2034 | 2035 | // Does not exist in some environments (Electron, Jest jsdom env, browser, etc). 2036 | if (interval.unref) { 2037 | interval.unref(); 2038 | } 2039 | } 2040 | 2041 | for (const port of portCheckSequence(ports)) { 2042 | try { 2043 | let availablePort = await getAvailablePort({...options, port}); // eslint-disable-line no-await-in-loop 2044 | while (lockedPorts.old.has(availablePort) || lockedPorts.young.has(availablePort)) { 2045 | if (port !== 0) { 2046 | throw new Locked(port); 2047 | } 2048 | 2049 | availablePort = await getAvailablePort({...options, port}); // eslint-disable-line no-await-in-loop 2050 | } 2051 | 2052 | lockedPorts.young.add(availablePort); 2053 | return availablePort; 2054 | } catch (error) { 2055 | if (!['EADDRINUSE', 'EACCES'].includes(error.code) && !(error instanceof Locked)) { 2056 | throw error; 2057 | } 2058 | } 2059 | } 2060 | 2061 | throw new Error('No available ports found'); 2062 | }; 2063 | 2064 | module.exports.makeRange = (from, to) => { 2065 | if (!Number.isInteger(from) || !Number.isInteger(to)) { 2066 | throw new TypeError('`from` and `to` must be integer numbers'); 2067 | } 2068 | 2069 | if (from < 1024 || from > 65535) { 2070 | throw new RangeError('`from` must be between 1024 and 65535'); 2071 | } 2072 | 2073 | if (to < 1024 || to > 65536) { 2074 | throw new RangeError('`to` must be between 1024 and 65536'); 2075 | } 2076 | 2077 | if (to < from) { 2078 | throw new RangeError('`to` must be greater than or equal to `from`'); 2079 | } 2080 | 2081 | const generator = function * (from, to) { 2082 | for (let port = from; port <= to; port++) { 2083 | yield port; 2084 | } 2085 | }; 2086 | 2087 | return generator(from, to); 2088 | }; 2089 | 2090 | 2091 | /***/ }), 2092 | 2093 | /***/ 294: 2094 | /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { 2095 | 2096 | module.exports = __nccwpck_require__(219); 2097 | 2098 | 2099 | /***/ }), 2100 | 2101 | /***/ 219: 2102 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2103 | 2104 | "use strict"; 2105 | 2106 | 2107 | var net = __nccwpck_require__(808); 2108 | var tls = __nccwpck_require__(404); 2109 | var http = __nccwpck_require__(685); 2110 | var https = __nccwpck_require__(687); 2111 | var events = __nccwpck_require__(361); 2112 | var assert = __nccwpck_require__(491); 2113 | var util = __nccwpck_require__(837); 2114 | 2115 | 2116 | exports.httpOverHttp = httpOverHttp; 2117 | exports.httpsOverHttp = httpsOverHttp; 2118 | exports.httpOverHttps = httpOverHttps; 2119 | exports.httpsOverHttps = httpsOverHttps; 2120 | 2121 | 2122 | function httpOverHttp(options) { 2123 | var agent = new TunnelingAgent(options); 2124 | agent.request = http.request; 2125 | return agent; 2126 | } 2127 | 2128 | function httpsOverHttp(options) { 2129 | var agent = new TunnelingAgent(options); 2130 | agent.request = http.request; 2131 | agent.createSocket = createSecureSocket; 2132 | agent.defaultPort = 443; 2133 | return agent; 2134 | } 2135 | 2136 | function httpOverHttps(options) { 2137 | var agent = new TunnelingAgent(options); 2138 | agent.request = https.request; 2139 | return agent; 2140 | } 2141 | 2142 | function httpsOverHttps(options) { 2143 | var agent = new TunnelingAgent(options); 2144 | agent.request = https.request; 2145 | agent.createSocket = createSecureSocket; 2146 | agent.defaultPort = 443; 2147 | return agent; 2148 | } 2149 | 2150 | 2151 | function TunnelingAgent(options) { 2152 | var self = this; 2153 | self.options = options || {}; 2154 | self.proxyOptions = self.options.proxy || {}; 2155 | self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; 2156 | self.requests = []; 2157 | self.sockets = []; 2158 | 2159 | self.on('free', function onFree(socket, host, port, localAddress) { 2160 | var options = toOptions(host, port, localAddress); 2161 | for (var i = 0, len = self.requests.length; i < len; ++i) { 2162 | var pending = self.requests[i]; 2163 | if (pending.host === options.host && pending.port === options.port) { 2164 | // Detect the request to connect same origin server, 2165 | // reuse the connection. 2166 | self.requests.splice(i, 1); 2167 | pending.request.onSocket(socket); 2168 | return; 2169 | } 2170 | } 2171 | socket.destroy(); 2172 | self.removeSocket(socket); 2173 | }); 2174 | } 2175 | util.inherits(TunnelingAgent, events.EventEmitter); 2176 | 2177 | TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { 2178 | var self = this; 2179 | var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); 2180 | 2181 | if (self.sockets.length >= this.maxSockets) { 2182 | // We are over limit so we'll add it to the queue. 2183 | self.requests.push(options); 2184 | return; 2185 | } 2186 | 2187 | // If we are under maxSockets create a new one. 2188 | self.createSocket(options, function(socket) { 2189 | socket.on('free', onFree); 2190 | socket.on('close', onCloseOrRemove); 2191 | socket.on('agentRemove', onCloseOrRemove); 2192 | req.onSocket(socket); 2193 | 2194 | function onFree() { 2195 | self.emit('free', socket, options); 2196 | } 2197 | 2198 | function onCloseOrRemove(err) { 2199 | self.removeSocket(socket); 2200 | socket.removeListener('free', onFree); 2201 | socket.removeListener('close', onCloseOrRemove); 2202 | socket.removeListener('agentRemove', onCloseOrRemove); 2203 | } 2204 | }); 2205 | }; 2206 | 2207 | TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { 2208 | var self = this; 2209 | var placeholder = {}; 2210 | self.sockets.push(placeholder); 2211 | 2212 | var connectOptions = mergeOptions({}, self.proxyOptions, { 2213 | method: 'CONNECT', 2214 | path: options.host + ':' + options.port, 2215 | agent: false, 2216 | headers: { 2217 | host: options.host + ':' + options.port 2218 | } 2219 | }); 2220 | if (options.localAddress) { 2221 | connectOptions.localAddress = options.localAddress; 2222 | } 2223 | if (connectOptions.proxyAuth) { 2224 | connectOptions.headers = connectOptions.headers || {}; 2225 | connectOptions.headers['Proxy-Authorization'] = 'Basic ' + 2226 | new Buffer(connectOptions.proxyAuth).toString('base64'); 2227 | } 2228 | 2229 | debug('making CONNECT request'); 2230 | var connectReq = self.request(connectOptions); 2231 | connectReq.useChunkedEncodingByDefault = false; // for v0.6 2232 | connectReq.once('response', onResponse); // for v0.6 2233 | connectReq.once('upgrade', onUpgrade); // for v0.6 2234 | connectReq.once('connect', onConnect); // for v0.7 or later 2235 | connectReq.once('error', onError); 2236 | connectReq.end(); 2237 | 2238 | function onResponse(res) { 2239 | // Very hacky. This is necessary to avoid http-parser leaks. 2240 | res.upgrade = true; 2241 | } 2242 | 2243 | function onUpgrade(res, socket, head) { 2244 | // Hacky. 2245 | process.nextTick(function() { 2246 | onConnect(res, socket, head); 2247 | }); 2248 | } 2249 | 2250 | function onConnect(res, socket, head) { 2251 | connectReq.removeAllListeners(); 2252 | socket.removeAllListeners(); 2253 | 2254 | if (res.statusCode !== 200) { 2255 | debug('tunneling socket could not be established, statusCode=%d', 2256 | res.statusCode); 2257 | socket.destroy(); 2258 | var error = new Error('tunneling socket could not be established, ' + 2259 | 'statusCode=' + res.statusCode); 2260 | error.code = 'ECONNRESET'; 2261 | options.request.emit('error', error); 2262 | self.removeSocket(placeholder); 2263 | return; 2264 | } 2265 | if (head.length > 0) { 2266 | debug('got illegal response body from proxy'); 2267 | socket.destroy(); 2268 | var error = new Error('got illegal response body from proxy'); 2269 | error.code = 'ECONNRESET'; 2270 | options.request.emit('error', error); 2271 | self.removeSocket(placeholder); 2272 | return; 2273 | } 2274 | debug('tunneling connection has established'); 2275 | self.sockets[self.sockets.indexOf(placeholder)] = socket; 2276 | return cb(socket); 2277 | } 2278 | 2279 | function onError(cause) { 2280 | connectReq.removeAllListeners(); 2281 | 2282 | debug('tunneling socket could not be established, cause=%s\n', 2283 | cause.message, cause.stack); 2284 | var error = new Error('tunneling socket could not be established, ' + 2285 | 'cause=' + cause.message); 2286 | error.code = 'ECONNRESET'; 2287 | options.request.emit('error', error); 2288 | self.removeSocket(placeholder); 2289 | } 2290 | }; 2291 | 2292 | TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { 2293 | var pos = this.sockets.indexOf(socket) 2294 | if (pos === -1) { 2295 | return; 2296 | } 2297 | this.sockets.splice(pos, 1); 2298 | 2299 | var pending = this.requests.shift(); 2300 | if (pending) { 2301 | // If we have pending requests and a socket gets closed a new one 2302 | // needs to be created to take over in the pool for the one that closed. 2303 | this.createSocket(pending, function(socket) { 2304 | pending.request.onSocket(socket); 2305 | }); 2306 | } 2307 | }; 2308 | 2309 | function createSecureSocket(options, cb) { 2310 | var self = this; 2311 | TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { 2312 | var hostHeader = options.request.getHeader('host'); 2313 | var tlsOptions = mergeOptions({}, self.options, { 2314 | socket: socket, 2315 | servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host 2316 | }); 2317 | 2318 | // 0 is dummy port for v0.6 2319 | var secureSocket = tls.connect(0, tlsOptions); 2320 | self.sockets[self.sockets.indexOf(socket)] = secureSocket; 2321 | cb(secureSocket); 2322 | }); 2323 | } 2324 | 2325 | 2326 | function toOptions(host, port, localAddress) { 2327 | if (typeof host === 'string') { // since v0.10 2328 | return { 2329 | host: host, 2330 | port: port, 2331 | localAddress: localAddress 2332 | }; 2333 | } 2334 | return host; // for v0.11 or later 2335 | } 2336 | 2337 | function mergeOptions(target) { 2338 | for (var i = 1, len = arguments.length; i < len; ++i) { 2339 | var overrides = arguments[i]; 2340 | if (typeof overrides === 'object') { 2341 | var keys = Object.keys(overrides); 2342 | for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { 2343 | var k = keys[j]; 2344 | if (overrides[k] !== undefined) { 2345 | target[k] = overrides[k]; 2346 | } 2347 | } 2348 | } 2349 | } 2350 | return target; 2351 | } 2352 | 2353 | 2354 | var debug; 2355 | if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { 2356 | debug = function() { 2357 | var args = Array.prototype.slice.call(arguments); 2358 | if (typeof args[0] === 'string') { 2359 | args[0] = 'TUNNEL: ' + args[0]; 2360 | } else { 2361 | args.unshift('TUNNEL:'); 2362 | } 2363 | console.error.apply(console, args); 2364 | } 2365 | } else { 2366 | debug = function() {}; 2367 | } 2368 | exports.debug = debug; // for test 2369 | 2370 | 2371 | /***/ }), 2372 | 2373 | /***/ 840: 2374 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2375 | 2376 | "use strict"; 2377 | 2378 | 2379 | Object.defineProperty(exports, "__esModule", ({ 2380 | value: true 2381 | })); 2382 | Object.defineProperty(exports, "v1", ({ 2383 | enumerable: true, 2384 | get: function () { 2385 | return _v.default; 2386 | } 2387 | })); 2388 | Object.defineProperty(exports, "v3", ({ 2389 | enumerable: true, 2390 | get: function () { 2391 | return _v2.default; 2392 | } 2393 | })); 2394 | Object.defineProperty(exports, "v4", ({ 2395 | enumerable: true, 2396 | get: function () { 2397 | return _v3.default; 2398 | } 2399 | })); 2400 | Object.defineProperty(exports, "v5", ({ 2401 | enumerable: true, 2402 | get: function () { 2403 | return _v4.default; 2404 | } 2405 | })); 2406 | Object.defineProperty(exports, "NIL", ({ 2407 | enumerable: true, 2408 | get: function () { 2409 | return _nil.default; 2410 | } 2411 | })); 2412 | Object.defineProperty(exports, "version", ({ 2413 | enumerable: true, 2414 | get: function () { 2415 | return _version.default; 2416 | } 2417 | })); 2418 | Object.defineProperty(exports, "validate", ({ 2419 | enumerable: true, 2420 | get: function () { 2421 | return _validate.default; 2422 | } 2423 | })); 2424 | Object.defineProperty(exports, "stringify", ({ 2425 | enumerable: true, 2426 | get: function () { 2427 | return _stringify.default; 2428 | } 2429 | })); 2430 | Object.defineProperty(exports, "parse", ({ 2431 | enumerable: true, 2432 | get: function () { 2433 | return _parse.default; 2434 | } 2435 | })); 2436 | 2437 | var _v = _interopRequireDefault(__nccwpck_require__(628)); 2438 | 2439 | var _v2 = _interopRequireDefault(__nccwpck_require__(409)); 2440 | 2441 | var _v3 = _interopRequireDefault(__nccwpck_require__(122)); 2442 | 2443 | var _v4 = _interopRequireDefault(__nccwpck_require__(120)); 2444 | 2445 | var _nil = _interopRequireDefault(__nccwpck_require__(332)); 2446 | 2447 | var _version = _interopRequireDefault(__nccwpck_require__(595)); 2448 | 2449 | var _validate = _interopRequireDefault(__nccwpck_require__(900)); 2450 | 2451 | var _stringify = _interopRequireDefault(__nccwpck_require__(950)); 2452 | 2453 | var _parse = _interopRequireDefault(__nccwpck_require__(746)); 2454 | 2455 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 2456 | 2457 | /***/ }), 2458 | 2459 | /***/ 569: 2460 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2461 | 2462 | "use strict"; 2463 | 2464 | 2465 | Object.defineProperty(exports, "__esModule", ({ 2466 | value: true 2467 | })); 2468 | exports["default"] = void 0; 2469 | 2470 | var _crypto = _interopRequireDefault(__nccwpck_require__(113)); 2471 | 2472 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 2473 | 2474 | function md5(bytes) { 2475 | if (Array.isArray(bytes)) { 2476 | bytes = Buffer.from(bytes); 2477 | } else if (typeof bytes === 'string') { 2478 | bytes = Buffer.from(bytes, 'utf8'); 2479 | } 2480 | 2481 | return _crypto.default.createHash('md5').update(bytes).digest(); 2482 | } 2483 | 2484 | var _default = md5; 2485 | exports["default"] = _default; 2486 | 2487 | /***/ }), 2488 | 2489 | /***/ 332: 2490 | /***/ ((__unused_webpack_module, exports) => { 2491 | 2492 | "use strict"; 2493 | 2494 | 2495 | Object.defineProperty(exports, "__esModule", ({ 2496 | value: true 2497 | })); 2498 | exports["default"] = void 0; 2499 | var _default = '00000000-0000-0000-0000-000000000000'; 2500 | exports["default"] = _default; 2501 | 2502 | /***/ }), 2503 | 2504 | /***/ 746: 2505 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2506 | 2507 | "use strict"; 2508 | 2509 | 2510 | Object.defineProperty(exports, "__esModule", ({ 2511 | value: true 2512 | })); 2513 | exports["default"] = void 0; 2514 | 2515 | var _validate = _interopRequireDefault(__nccwpck_require__(900)); 2516 | 2517 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 2518 | 2519 | function parse(uuid) { 2520 | if (!(0, _validate.default)(uuid)) { 2521 | throw TypeError('Invalid UUID'); 2522 | } 2523 | 2524 | let v; 2525 | const arr = new Uint8Array(16); // Parse ########-....-....-....-............ 2526 | 2527 | arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; 2528 | arr[1] = v >>> 16 & 0xff; 2529 | arr[2] = v >>> 8 & 0xff; 2530 | arr[3] = v & 0xff; // Parse ........-####-....-....-............ 2531 | 2532 | arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; 2533 | arr[5] = v & 0xff; // Parse ........-....-####-....-............ 2534 | 2535 | arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; 2536 | arr[7] = v & 0xff; // Parse ........-....-....-####-............ 2537 | 2538 | arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; 2539 | arr[9] = v & 0xff; // Parse ........-....-....-....-############ 2540 | // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) 2541 | 2542 | arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; 2543 | arr[11] = v / 0x100000000 & 0xff; 2544 | arr[12] = v >>> 24 & 0xff; 2545 | arr[13] = v >>> 16 & 0xff; 2546 | arr[14] = v >>> 8 & 0xff; 2547 | arr[15] = v & 0xff; 2548 | return arr; 2549 | } 2550 | 2551 | var _default = parse; 2552 | exports["default"] = _default; 2553 | 2554 | /***/ }), 2555 | 2556 | /***/ 814: 2557 | /***/ ((__unused_webpack_module, exports) => { 2558 | 2559 | "use strict"; 2560 | 2561 | 2562 | Object.defineProperty(exports, "__esModule", ({ 2563 | value: true 2564 | })); 2565 | exports["default"] = void 0; 2566 | var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; 2567 | exports["default"] = _default; 2568 | 2569 | /***/ }), 2570 | 2571 | /***/ 807: 2572 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2573 | 2574 | "use strict"; 2575 | 2576 | 2577 | Object.defineProperty(exports, "__esModule", ({ 2578 | value: true 2579 | })); 2580 | exports["default"] = rng; 2581 | 2582 | var _crypto = _interopRequireDefault(__nccwpck_require__(113)); 2583 | 2584 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 2585 | 2586 | const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate 2587 | 2588 | let poolPtr = rnds8Pool.length; 2589 | 2590 | function rng() { 2591 | if (poolPtr > rnds8Pool.length - 16) { 2592 | _crypto.default.randomFillSync(rnds8Pool); 2593 | 2594 | poolPtr = 0; 2595 | } 2596 | 2597 | return rnds8Pool.slice(poolPtr, poolPtr += 16); 2598 | } 2599 | 2600 | /***/ }), 2601 | 2602 | /***/ 274: 2603 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2604 | 2605 | "use strict"; 2606 | 2607 | 2608 | Object.defineProperty(exports, "__esModule", ({ 2609 | value: true 2610 | })); 2611 | exports["default"] = void 0; 2612 | 2613 | var _crypto = _interopRequireDefault(__nccwpck_require__(113)); 2614 | 2615 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 2616 | 2617 | function sha1(bytes) { 2618 | if (Array.isArray(bytes)) { 2619 | bytes = Buffer.from(bytes); 2620 | } else if (typeof bytes === 'string') { 2621 | bytes = Buffer.from(bytes, 'utf8'); 2622 | } 2623 | 2624 | return _crypto.default.createHash('sha1').update(bytes).digest(); 2625 | } 2626 | 2627 | var _default = sha1; 2628 | exports["default"] = _default; 2629 | 2630 | /***/ }), 2631 | 2632 | /***/ 950: 2633 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2634 | 2635 | "use strict"; 2636 | 2637 | 2638 | Object.defineProperty(exports, "__esModule", ({ 2639 | value: true 2640 | })); 2641 | exports["default"] = void 0; 2642 | 2643 | var _validate = _interopRequireDefault(__nccwpck_require__(900)); 2644 | 2645 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 2646 | 2647 | /** 2648 | * Convert array of 16 byte values to UUID string format of the form: 2649 | * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX 2650 | */ 2651 | const byteToHex = []; 2652 | 2653 | for (let i = 0; i < 256; ++i) { 2654 | byteToHex.push((i + 0x100).toString(16).substr(1)); 2655 | } 2656 | 2657 | function stringify(arr, offset = 0) { 2658 | // Note: Be careful editing this code! It's been tuned for performance 2659 | // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 2660 | const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one 2661 | // of the following: 2662 | // - One or more input array values don't map to a hex octet (leading to 2663 | // "undefined" in the uuid) 2664 | // - Invalid input values for the RFC `version` or `variant` fields 2665 | 2666 | if (!(0, _validate.default)(uuid)) { 2667 | throw TypeError('Stringified UUID is invalid'); 2668 | } 2669 | 2670 | return uuid; 2671 | } 2672 | 2673 | var _default = stringify; 2674 | exports["default"] = _default; 2675 | 2676 | /***/ }), 2677 | 2678 | /***/ 628: 2679 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2680 | 2681 | "use strict"; 2682 | 2683 | 2684 | Object.defineProperty(exports, "__esModule", ({ 2685 | value: true 2686 | })); 2687 | exports["default"] = void 0; 2688 | 2689 | var _rng = _interopRequireDefault(__nccwpck_require__(807)); 2690 | 2691 | var _stringify = _interopRequireDefault(__nccwpck_require__(950)); 2692 | 2693 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 2694 | 2695 | // **`v1()` - Generate time-based UUID** 2696 | // 2697 | // Inspired by https://github.com/LiosK/UUID.js 2698 | // and http://docs.python.org/library/uuid.html 2699 | let _nodeId; 2700 | 2701 | let _clockseq; // Previous uuid creation time 2702 | 2703 | 2704 | let _lastMSecs = 0; 2705 | let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details 2706 | 2707 | function v1(options, buf, offset) { 2708 | let i = buf && offset || 0; 2709 | const b = buf || new Array(16); 2710 | options = options || {}; 2711 | let node = options.node || _nodeId; 2712 | let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not 2713 | // specified. We do this lazily to minimize issues related to insufficient 2714 | // system entropy. See #189 2715 | 2716 | if (node == null || clockseq == null) { 2717 | const seedBytes = options.random || (options.rng || _rng.default)(); 2718 | 2719 | if (node == null) { 2720 | // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) 2721 | node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; 2722 | } 2723 | 2724 | if (clockseq == null) { 2725 | // Per 4.2.2, randomize (14 bit) clockseq 2726 | clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; 2727 | } 2728 | } // UUID timestamps are 100 nano-second units since the Gregorian epoch, 2729 | // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so 2730 | // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' 2731 | // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. 2732 | 2733 | 2734 | let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock 2735 | // cycle to simulate higher resolution clock 2736 | 2737 | let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) 2738 | 2739 | const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression 2740 | 2741 | if (dt < 0 && options.clockseq === undefined) { 2742 | clockseq = clockseq + 1 & 0x3fff; 2743 | } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new 2744 | // time interval 2745 | 2746 | 2747 | if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { 2748 | nsecs = 0; 2749 | } // Per 4.2.1.2 Throw error if too many uuids are requested 2750 | 2751 | 2752 | if (nsecs >= 10000) { 2753 | throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); 2754 | } 2755 | 2756 | _lastMSecs = msecs; 2757 | _lastNSecs = nsecs; 2758 | _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch 2759 | 2760 | msecs += 12219292800000; // `time_low` 2761 | 2762 | const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; 2763 | b[i++] = tl >>> 24 & 0xff; 2764 | b[i++] = tl >>> 16 & 0xff; 2765 | b[i++] = tl >>> 8 & 0xff; 2766 | b[i++] = tl & 0xff; // `time_mid` 2767 | 2768 | const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; 2769 | b[i++] = tmh >>> 8 & 0xff; 2770 | b[i++] = tmh & 0xff; // `time_high_and_version` 2771 | 2772 | b[i++] = tmh >>> 24 & 0xf | 0x10; // include version 2773 | 2774 | b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) 2775 | 2776 | b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` 2777 | 2778 | b[i++] = clockseq & 0xff; // `node` 2779 | 2780 | for (let n = 0; n < 6; ++n) { 2781 | b[i + n] = node[n]; 2782 | } 2783 | 2784 | return buf || (0, _stringify.default)(b); 2785 | } 2786 | 2787 | var _default = v1; 2788 | exports["default"] = _default; 2789 | 2790 | /***/ }), 2791 | 2792 | /***/ 409: 2793 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2794 | 2795 | "use strict"; 2796 | 2797 | 2798 | Object.defineProperty(exports, "__esModule", ({ 2799 | value: true 2800 | })); 2801 | exports["default"] = void 0; 2802 | 2803 | var _v = _interopRequireDefault(__nccwpck_require__(998)); 2804 | 2805 | var _md = _interopRequireDefault(__nccwpck_require__(569)); 2806 | 2807 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 2808 | 2809 | const v3 = (0, _v.default)('v3', 0x30, _md.default); 2810 | var _default = v3; 2811 | exports["default"] = _default; 2812 | 2813 | /***/ }), 2814 | 2815 | /***/ 998: 2816 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2817 | 2818 | "use strict"; 2819 | 2820 | 2821 | Object.defineProperty(exports, "__esModule", ({ 2822 | value: true 2823 | })); 2824 | exports["default"] = _default; 2825 | exports.URL = exports.DNS = void 0; 2826 | 2827 | var _stringify = _interopRequireDefault(__nccwpck_require__(950)); 2828 | 2829 | var _parse = _interopRequireDefault(__nccwpck_require__(746)); 2830 | 2831 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 2832 | 2833 | function stringToBytes(str) { 2834 | str = unescape(encodeURIComponent(str)); // UTF8 escape 2835 | 2836 | const bytes = []; 2837 | 2838 | for (let i = 0; i < str.length; ++i) { 2839 | bytes.push(str.charCodeAt(i)); 2840 | } 2841 | 2842 | return bytes; 2843 | } 2844 | 2845 | const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; 2846 | exports.DNS = DNS; 2847 | const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; 2848 | exports.URL = URL; 2849 | 2850 | function _default(name, version, hashfunc) { 2851 | function generateUUID(value, namespace, buf, offset) { 2852 | if (typeof value === 'string') { 2853 | value = stringToBytes(value); 2854 | } 2855 | 2856 | if (typeof namespace === 'string') { 2857 | namespace = (0, _parse.default)(namespace); 2858 | } 2859 | 2860 | if (namespace.length !== 16) { 2861 | throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); 2862 | } // Compute hash of namespace and value, Per 4.3 2863 | // Future: Use spread syntax when supported on all platforms, e.g. `bytes = 2864 | // hashfunc([...namespace, ... value])` 2865 | 2866 | 2867 | let bytes = new Uint8Array(16 + value.length); 2868 | bytes.set(namespace); 2869 | bytes.set(value, namespace.length); 2870 | bytes = hashfunc(bytes); 2871 | bytes[6] = bytes[6] & 0x0f | version; 2872 | bytes[8] = bytes[8] & 0x3f | 0x80; 2873 | 2874 | if (buf) { 2875 | offset = offset || 0; 2876 | 2877 | for (let i = 0; i < 16; ++i) { 2878 | buf[offset + i] = bytes[i]; 2879 | } 2880 | 2881 | return buf; 2882 | } 2883 | 2884 | return (0, _stringify.default)(bytes); 2885 | } // Function#name is not settable on some platforms (#270) 2886 | 2887 | 2888 | try { 2889 | generateUUID.name = name; // eslint-disable-next-line no-empty 2890 | } catch (err) {} // For CommonJS default export support 2891 | 2892 | 2893 | generateUUID.DNS = DNS; 2894 | generateUUID.URL = URL; 2895 | return generateUUID; 2896 | } 2897 | 2898 | /***/ }), 2899 | 2900 | /***/ 122: 2901 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2902 | 2903 | "use strict"; 2904 | 2905 | 2906 | Object.defineProperty(exports, "__esModule", ({ 2907 | value: true 2908 | })); 2909 | exports["default"] = void 0; 2910 | 2911 | var _rng = _interopRequireDefault(__nccwpck_require__(807)); 2912 | 2913 | var _stringify = _interopRequireDefault(__nccwpck_require__(950)); 2914 | 2915 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 2916 | 2917 | function v4(options, buf, offset) { 2918 | options = options || {}; 2919 | 2920 | const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` 2921 | 2922 | 2923 | rnds[6] = rnds[6] & 0x0f | 0x40; 2924 | rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided 2925 | 2926 | if (buf) { 2927 | offset = offset || 0; 2928 | 2929 | for (let i = 0; i < 16; ++i) { 2930 | buf[offset + i] = rnds[i]; 2931 | } 2932 | 2933 | return buf; 2934 | } 2935 | 2936 | return (0, _stringify.default)(rnds); 2937 | } 2938 | 2939 | var _default = v4; 2940 | exports["default"] = _default; 2941 | 2942 | /***/ }), 2943 | 2944 | /***/ 120: 2945 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2946 | 2947 | "use strict"; 2948 | 2949 | 2950 | Object.defineProperty(exports, "__esModule", ({ 2951 | value: true 2952 | })); 2953 | exports["default"] = void 0; 2954 | 2955 | var _v = _interopRequireDefault(__nccwpck_require__(998)); 2956 | 2957 | var _sha = _interopRequireDefault(__nccwpck_require__(274)); 2958 | 2959 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 2960 | 2961 | const v5 = (0, _v.default)('v5', 0x50, _sha.default); 2962 | var _default = v5; 2963 | exports["default"] = _default; 2964 | 2965 | /***/ }), 2966 | 2967 | /***/ 900: 2968 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2969 | 2970 | "use strict"; 2971 | 2972 | 2973 | Object.defineProperty(exports, "__esModule", ({ 2974 | value: true 2975 | })); 2976 | exports["default"] = void 0; 2977 | 2978 | var _regex = _interopRequireDefault(__nccwpck_require__(814)); 2979 | 2980 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 2981 | 2982 | function validate(uuid) { 2983 | return typeof uuid === 'string' && _regex.default.test(uuid); 2984 | } 2985 | 2986 | var _default = validate; 2987 | exports["default"] = _default; 2988 | 2989 | /***/ }), 2990 | 2991 | /***/ 595: 2992 | /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { 2993 | 2994 | "use strict"; 2995 | 2996 | 2997 | Object.defineProperty(exports, "__esModule", ({ 2998 | value: true 2999 | })); 3000 | exports["default"] = void 0; 3001 | 3002 | var _validate = _interopRequireDefault(__nccwpck_require__(900)); 3003 | 3004 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3005 | 3006 | function version(uuid) { 3007 | if (!(0, _validate.default)(uuid)) { 3008 | throw TypeError('Invalid UUID'); 3009 | } 3010 | 3011 | return parseInt(uuid.substr(14, 1), 16); 3012 | } 3013 | 3014 | var _default = version; 3015 | exports["default"] = _default; 3016 | 3017 | /***/ }), 3018 | 3019 | /***/ 491: 3020 | /***/ ((module) => { 3021 | 3022 | "use strict"; 3023 | module.exports = require("assert"); 3024 | 3025 | /***/ }), 3026 | 3027 | /***/ 81: 3028 | /***/ ((module) => { 3029 | 3030 | "use strict"; 3031 | module.exports = require("child_process"); 3032 | 3033 | /***/ }), 3034 | 3035 | /***/ 113: 3036 | /***/ ((module) => { 3037 | 3038 | "use strict"; 3039 | module.exports = require("crypto"); 3040 | 3041 | /***/ }), 3042 | 3043 | /***/ 361: 3044 | /***/ ((module) => { 3045 | 3046 | "use strict"; 3047 | module.exports = require("events"); 3048 | 3049 | /***/ }), 3050 | 3051 | /***/ 147: 3052 | /***/ ((module) => { 3053 | 3054 | "use strict"; 3055 | module.exports = require("fs"); 3056 | 3057 | /***/ }), 3058 | 3059 | /***/ 685: 3060 | /***/ ((module) => { 3061 | 3062 | "use strict"; 3063 | module.exports = require("http"); 3064 | 3065 | /***/ }), 3066 | 3067 | /***/ 687: 3068 | /***/ ((module) => { 3069 | 3070 | "use strict"; 3071 | module.exports = require("https"); 3072 | 3073 | /***/ }), 3074 | 3075 | /***/ 808: 3076 | /***/ ((module) => { 3077 | 3078 | "use strict"; 3079 | module.exports = require("net"); 3080 | 3081 | /***/ }), 3082 | 3083 | /***/ 37: 3084 | /***/ ((module) => { 3085 | 3086 | "use strict"; 3087 | module.exports = require("os"); 3088 | 3089 | /***/ }), 3090 | 3091 | /***/ 17: 3092 | /***/ ((module) => { 3093 | 3094 | "use strict"; 3095 | module.exports = require("path"); 3096 | 3097 | /***/ }), 3098 | 3099 | /***/ 404: 3100 | /***/ ((module) => { 3101 | 3102 | "use strict"; 3103 | module.exports = require("tls"); 3104 | 3105 | /***/ }), 3106 | 3107 | /***/ 837: 3108 | /***/ ((module) => { 3109 | 3110 | "use strict"; 3111 | module.exports = require("util"); 3112 | 3113 | /***/ }) 3114 | 3115 | /******/ }); 3116 | /************************************************************************/ 3117 | /******/ // The module cache 3118 | /******/ var __webpack_module_cache__ = {}; 3119 | /******/ 3120 | /******/ // The require function 3121 | /******/ function __nccwpck_require__(moduleId) { 3122 | /******/ // Check if module is in cache 3123 | /******/ var cachedModule = __webpack_module_cache__[moduleId]; 3124 | /******/ if (cachedModule !== undefined) { 3125 | /******/ return cachedModule.exports; 3126 | /******/ } 3127 | /******/ // Create a new module (and put it into the cache) 3128 | /******/ var module = __webpack_module_cache__[moduleId] = { 3129 | /******/ // no module.id needed 3130 | /******/ // no module.loaded needed 3131 | /******/ exports: {} 3132 | /******/ }; 3133 | /******/ 3134 | /******/ // Execute the module function 3135 | /******/ var threw = true; 3136 | /******/ try { 3137 | /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); 3138 | /******/ threw = false; 3139 | /******/ } finally { 3140 | /******/ if(threw) delete __webpack_module_cache__[moduleId]; 3141 | /******/ } 3142 | /******/ 3143 | /******/ // Return the exports of the module 3144 | /******/ return module.exports; 3145 | /******/ } 3146 | /******/ 3147 | /************************************************************************/ 3148 | /******/ /* webpack/runtime/compat */ 3149 | /******/ 3150 | /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/"; 3151 | /******/ 3152 | /************************************************************************/ 3153 | /******/ 3154 | /******/ // startup 3155 | /******/ // Load entry module and return exports 3156 | /******/ // This entry module is referenced by other modules so it can't be inlined 3157 | /******/ var __webpack_exports__ = __nccwpck_require__(109); 3158 | /******/ module.exports = __webpack_exports__; 3159 | /******/ 3160 | /******/ })() 3161 | ; -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lambdatest-tunnel-action", 3 | "version": "1.1.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "lambdatest-tunnel-action", 9 | "version": "1.1.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@actions/core": "^1.9.1", 13 | "@types/node": "^14.0.13", 14 | "get-port": "^5.1.1" 15 | }, 16 | "devDependencies": { 17 | "@vercel/ncc": "^0.36.1", 18 | "http-server": "^14.1.1", 19 | "npm-run-all": "^4.1.5", 20 | "selenium-webdriver": "^3.6.0", 21 | "typescript": "^3.9.5" 22 | } 23 | }, 24 | "node_modules/@actions/core": { 25 | "version": "1.10.0", 26 | "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", 27 | "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", 28 | "dependencies": { 29 | "@actions/http-client": "^2.0.1", 30 | "uuid": "^8.3.2" 31 | } 32 | }, 33 | "node_modules/@actions/http-client": { 34 | "version": "2.1.1", 35 | "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.1.tgz", 36 | "integrity": "sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw==", 37 | "dependencies": { 38 | "tunnel": "^0.0.6" 39 | } 40 | }, 41 | "node_modules/@types/node": { 42 | "version": "14.0.13", 43 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.13.tgz", 44 | "integrity": "sha512-rouEWBImiRaSJsVA+ITTFM6ZxibuAlTuNOCyxVbwreu6k6+ujs7DfnU9o+PShFhET78pMBl3eH+AGSI5eOTkPA==" 45 | }, 46 | "node_modules/@vercel/ncc": { 47 | "version": "0.36.1", 48 | "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.1.tgz", 49 | "integrity": "sha512-S4cL7Taa9yb5qbv+6wLgiKVZ03Qfkc4jGRuiUQMQ8HGBD5pcNRnHeYM33zBvJE4/zJGjJJ8GScB+WmTsn9mORw==", 50 | "dev": true, 51 | "bin": { 52 | "ncc": "dist/ncc/cli.js" 53 | } 54 | }, 55 | "node_modules/ansi-styles": { 56 | "version": "3.2.1", 57 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 58 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 59 | "dev": true, 60 | "dependencies": { 61 | "color-convert": "^1.9.0" 62 | }, 63 | "engines": { 64 | "node": ">=4" 65 | } 66 | }, 67 | "node_modules/async": { 68 | "version": "2.6.4", 69 | "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", 70 | "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", 71 | "dev": true, 72 | "dependencies": { 73 | "lodash": "^4.17.14" 74 | } 75 | }, 76 | "node_modules/balanced-match": { 77 | "version": "1.0.0", 78 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 79 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 80 | "dev": true 81 | }, 82 | "node_modules/basic-auth": { 83 | "version": "2.0.1", 84 | "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", 85 | "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", 86 | "dev": true, 87 | "dependencies": { 88 | "safe-buffer": "5.1.2" 89 | }, 90 | "engines": { 91 | "node": ">= 0.8" 92 | } 93 | }, 94 | "node_modules/brace-expansion": { 95 | "version": "1.1.11", 96 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 97 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 98 | "dev": true, 99 | "dependencies": { 100 | "balanced-match": "^1.0.0", 101 | "concat-map": "0.0.1" 102 | } 103 | }, 104 | "node_modules/call-bind": { 105 | "version": "1.0.2", 106 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", 107 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", 108 | "dev": true, 109 | "dependencies": { 110 | "function-bind": "^1.1.1", 111 | "get-intrinsic": "^1.0.2" 112 | }, 113 | "funding": { 114 | "url": "https://github.com/sponsors/ljharb" 115 | } 116 | }, 117 | "node_modules/chalk": { 118 | "version": "2.4.2", 119 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 120 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 121 | "dev": true, 122 | "dependencies": { 123 | "ansi-styles": "^3.2.1", 124 | "escape-string-regexp": "^1.0.5", 125 | "supports-color": "^5.3.0" 126 | }, 127 | "engines": { 128 | "node": ">=4" 129 | } 130 | }, 131 | "node_modules/color-convert": { 132 | "version": "1.9.3", 133 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 134 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 135 | "dev": true, 136 | "dependencies": { 137 | "color-name": "1.1.3" 138 | } 139 | }, 140 | "node_modules/color-name": { 141 | "version": "1.1.3", 142 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 143 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 144 | "dev": true 145 | }, 146 | "node_modules/concat-map": { 147 | "version": "0.0.1", 148 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 149 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 150 | "dev": true 151 | }, 152 | "node_modules/core-util-is": { 153 | "version": "1.0.3", 154 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", 155 | "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", 156 | "dev": true 157 | }, 158 | "node_modules/corser": { 159 | "version": "2.0.1", 160 | "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", 161 | "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=", 162 | "dev": true, 163 | "engines": { 164 | "node": ">= 0.4.0" 165 | } 166 | }, 167 | "node_modules/cross-spawn": { 168 | "version": "6.0.5", 169 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", 170 | "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", 171 | "dev": true, 172 | "dependencies": { 173 | "nice-try": "^1.0.4", 174 | "path-key": "^2.0.1", 175 | "semver": "^5.5.0", 176 | "shebang-command": "^1.2.0", 177 | "which": "^1.2.9" 178 | }, 179 | "engines": { 180 | "node": ">=4.8" 181 | } 182 | }, 183 | "node_modules/debug": { 184 | "version": "3.2.7", 185 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", 186 | "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", 187 | "dev": true, 188 | "dependencies": { 189 | "ms": "^2.1.1" 190 | } 191 | }, 192 | "node_modules/define-properties": { 193 | "version": "1.1.3", 194 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", 195 | "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", 196 | "dev": true, 197 | "dependencies": { 198 | "object-keys": "^1.0.12" 199 | }, 200 | "engines": { 201 | "node": ">= 0.4" 202 | } 203 | }, 204 | "node_modules/error-ex": { 205 | "version": "1.3.2", 206 | "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", 207 | "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", 208 | "dev": true, 209 | "dependencies": { 210 | "is-arrayish": "^0.2.1" 211 | } 212 | }, 213 | "node_modules/es-abstract": { 214 | "version": "1.17.6", 215 | "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", 216 | "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", 217 | "dev": true, 218 | "dependencies": { 219 | "es-to-primitive": "^1.2.1", 220 | "function-bind": "^1.1.1", 221 | "has": "^1.0.3", 222 | "has-symbols": "^1.0.1", 223 | "is-callable": "^1.2.0", 224 | "is-regex": "^1.1.0", 225 | "object-inspect": "^1.7.0", 226 | "object-keys": "^1.1.1", 227 | "object.assign": "^4.1.0", 228 | "string.prototype.trimend": "^1.0.1", 229 | "string.prototype.trimstart": "^1.0.1" 230 | }, 231 | "engines": { 232 | "node": ">= 0.4" 233 | }, 234 | "funding": { 235 | "url": "https://github.com/sponsors/ljharb" 236 | } 237 | }, 238 | "node_modules/es-to-primitive": { 239 | "version": "1.2.1", 240 | "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", 241 | "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", 242 | "dev": true, 243 | "dependencies": { 244 | "is-callable": "^1.1.4", 245 | "is-date-object": "^1.0.1", 246 | "is-symbol": "^1.0.2" 247 | }, 248 | "engines": { 249 | "node": ">= 0.4" 250 | }, 251 | "funding": { 252 | "url": "https://github.com/sponsors/ljharb" 253 | } 254 | }, 255 | "node_modules/escape-string-regexp": { 256 | "version": "1.0.5", 257 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 258 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 259 | "dev": true, 260 | "engines": { 261 | "node": ">=0.8.0" 262 | } 263 | }, 264 | "node_modules/eventemitter3": { 265 | "version": "4.0.4", 266 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", 267 | "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", 268 | "dev": true 269 | }, 270 | "node_modules/follow-redirects": { 271 | "version": "1.15.2", 272 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", 273 | "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", 274 | "dev": true, 275 | "funding": [ 276 | { 277 | "type": "individual", 278 | "url": "https://github.com/sponsors/RubenVerborgh" 279 | } 280 | ], 281 | "engines": { 282 | "node": ">=4.0" 283 | }, 284 | "peerDependenciesMeta": { 285 | "debug": { 286 | "optional": true 287 | } 288 | } 289 | }, 290 | "node_modules/fs.realpath": { 291 | "version": "1.0.0", 292 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 293 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", 294 | "dev": true 295 | }, 296 | "node_modules/function-bind": { 297 | "version": "1.1.1", 298 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 299 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 300 | "dev": true 301 | }, 302 | "node_modules/get-intrinsic": { 303 | "version": "1.2.1", 304 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", 305 | "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", 306 | "dev": true, 307 | "dependencies": { 308 | "function-bind": "^1.1.1", 309 | "has": "^1.0.3", 310 | "has-proto": "^1.0.1", 311 | "has-symbols": "^1.0.3" 312 | }, 313 | "funding": { 314 | "url": "https://github.com/sponsors/ljharb" 315 | } 316 | }, 317 | "node_modules/get-port": { 318 | "version": "5.1.1", 319 | "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz", 320 | "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==", 321 | "engines": { 322 | "node": ">=8" 323 | }, 324 | "funding": { 325 | "url": "https://github.com/sponsors/sindresorhus" 326 | } 327 | }, 328 | "node_modules/glob": { 329 | "version": "7.2.3", 330 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", 331 | "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", 332 | "dev": true, 333 | "dependencies": { 334 | "fs.realpath": "^1.0.0", 335 | "inflight": "^1.0.4", 336 | "inherits": "2", 337 | "minimatch": "^3.1.1", 338 | "once": "^1.3.0", 339 | "path-is-absolute": "^1.0.0" 340 | }, 341 | "engines": { 342 | "node": "*" 343 | }, 344 | "funding": { 345 | "url": "https://github.com/sponsors/isaacs" 346 | } 347 | }, 348 | "node_modules/graceful-fs": { 349 | "version": "4.2.4", 350 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", 351 | "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", 352 | "dev": true 353 | }, 354 | "node_modules/has": { 355 | "version": "1.0.3", 356 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 357 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 358 | "dev": true, 359 | "dependencies": { 360 | "function-bind": "^1.1.1" 361 | }, 362 | "engines": { 363 | "node": ">= 0.4.0" 364 | } 365 | }, 366 | "node_modules/has-flag": { 367 | "version": "3.0.0", 368 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 369 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 370 | "dev": true, 371 | "engines": { 372 | "node": ">=4" 373 | } 374 | }, 375 | "node_modules/has-proto": { 376 | "version": "1.0.1", 377 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", 378 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", 379 | "dev": true, 380 | "engines": { 381 | "node": ">= 0.4" 382 | }, 383 | "funding": { 384 | "url": "https://github.com/sponsors/ljharb" 385 | } 386 | }, 387 | "node_modules/has-symbols": { 388 | "version": "1.0.3", 389 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 390 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 391 | "dev": true, 392 | "engines": { 393 | "node": ">= 0.4" 394 | }, 395 | "funding": { 396 | "url": "https://github.com/sponsors/ljharb" 397 | } 398 | }, 399 | "node_modules/he": { 400 | "version": "1.2.0", 401 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 402 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 403 | "dev": true, 404 | "bin": { 405 | "he": "bin/he" 406 | } 407 | }, 408 | "node_modules/hosted-git-info": { 409 | "version": "2.8.9", 410 | "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", 411 | "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", 412 | "dev": true 413 | }, 414 | "node_modules/html-encoding-sniffer": { 415 | "version": "3.0.0", 416 | "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", 417 | "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", 418 | "dev": true, 419 | "dependencies": { 420 | "whatwg-encoding": "^2.0.0" 421 | }, 422 | "engines": { 423 | "node": ">=12" 424 | } 425 | }, 426 | "node_modules/http-proxy": { 427 | "version": "1.18.1", 428 | "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", 429 | "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", 430 | "dev": true, 431 | "dependencies": { 432 | "eventemitter3": "^4.0.0", 433 | "follow-redirects": "^1.0.0", 434 | "requires-port": "^1.0.0" 435 | }, 436 | "engines": { 437 | "node": ">=8.0.0" 438 | } 439 | }, 440 | "node_modules/http-server": { 441 | "version": "14.1.1", 442 | "resolved": "https://registry.npmjs.org/http-server/-/http-server-14.1.1.tgz", 443 | "integrity": "sha512-+cbxadF40UXd9T01zUHgA+rlo2Bg1Srer4+B4NwIHdaGxAGGv59nYRnGGDJ9LBk7alpS0US+J+bLLdQOOkJq4A==", 444 | "dev": true, 445 | "dependencies": { 446 | "basic-auth": "^2.0.1", 447 | "chalk": "^4.1.2", 448 | "corser": "^2.0.1", 449 | "he": "^1.2.0", 450 | "html-encoding-sniffer": "^3.0.0", 451 | "http-proxy": "^1.18.1", 452 | "mime": "^1.6.0", 453 | "minimist": "^1.2.6", 454 | "opener": "^1.5.1", 455 | "portfinder": "^1.0.28", 456 | "secure-compare": "3.0.1", 457 | "union": "~0.5.0", 458 | "url-join": "^4.0.1" 459 | }, 460 | "bin": { 461 | "http-server": "bin/http-server" 462 | }, 463 | "engines": { 464 | "node": ">=12" 465 | } 466 | }, 467 | "node_modules/http-server/node_modules/ansi-styles": { 468 | "version": "4.3.0", 469 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 470 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 471 | "dev": true, 472 | "dependencies": { 473 | "color-convert": "^2.0.1" 474 | }, 475 | "engines": { 476 | "node": ">=8" 477 | }, 478 | "funding": { 479 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 480 | } 481 | }, 482 | "node_modules/http-server/node_modules/chalk": { 483 | "version": "4.1.2", 484 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 485 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 486 | "dev": true, 487 | "dependencies": { 488 | "ansi-styles": "^4.1.0", 489 | "supports-color": "^7.1.0" 490 | }, 491 | "engines": { 492 | "node": ">=10" 493 | }, 494 | "funding": { 495 | "url": "https://github.com/chalk/chalk?sponsor=1" 496 | } 497 | }, 498 | "node_modules/http-server/node_modules/color-convert": { 499 | "version": "2.0.1", 500 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 501 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 502 | "dev": true, 503 | "dependencies": { 504 | "color-name": "~1.1.4" 505 | }, 506 | "engines": { 507 | "node": ">=7.0.0" 508 | } 509 | }, 510 | "node_modules/http-server/node_modules/color-name": { 511 | "version": "1.1.4", 512 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 513 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 514 | "dev": true 515 | }, 516 | "node_modules/http-server/node_modules/has-flag": { 517 | "version": "4.0.0", 518 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 519 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 520 | "dev": true, 521 | "engines": { 522 | "node": ">=8" 523 | } 524 | }, 525 | "node_modules/http-server/node_modules/supports-color": { 526 | "version": "7.2.0", 527 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 528 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 529 | "dev": true, 530 | "dependencies": { 531 | "has-flag": "^4.0.0" 532 | }, 533 | "engines": { 534 | "node": ">=8" 535 | } 536 | }, 537 | "node_modules/iconv-lite": { 538 | "version": "0.6.3", 539 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", 540 | "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", 541 | "dev": true, 542 | "dependencies": { 543 | "safer-buffer": ">= 2.1.2 < 3.0.0" 544 | }, 545 | "engines": { 546 | "node": ">=0.10.0" 547 | } 548 | }, 549 | "node_modules/immediate": { 550 | "version": "3.0.6", 551 | "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", 552 | "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", 553 | "dev": true 554 | }, 555 | "node_modules/inflight": { 556 | "version": "1.0.6", 557 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 558 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 559 | "dev": true, 560 | "dependencies": { 561 | "once": "^1.3.0", 562 | "wrappy": "1" 563 | } 564 | }, 565 | "node_modules/inherits": { 566 | "version": "2.0.4", 567 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 568 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 569 | "dev": true 570 | }, 571 | "node_modules/is-arrayish": { 572 | "version": "0.2.1", 573 | "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", 574 | "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", 575 | "dev": true 576 | }, 577 | "node_modules/is-callable": { 578 | "version": "1.2.0", 579 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", 580 | "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", 581 | "dev": true, 582 | "engines": { 583 | "node": ">= 0.4" 584 | }, 585 | "funding": { 586 | "url": "https://github.com/sponsors/ljharb" 587 | } 588 | }, 589 | "node_modules/is-date-object": { 590 | "version": "1.0.2", 591 | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", 592 | "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", 593 | "dev": true, 594 | "engines": { 595 | "node": ">= 0.4" 596 | }, 597 | "funding": { 598 | "url": "https://github.com/sponsors/ljharb" 599 | } 600 | }, 601 | "node_modules/is-regex": { 602 | "version": "1.1.0", 603 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", 604 | "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", 605 | "dev": true, 606 | "dependencies": { 607 | "has-symbols": "^1.0.1" 608 | }, 609 | "engines": { 610 | "node": ">= 0.4" 611 | }, 612 | "funding": { 613 | "url": "https://github.com/sponsors/ljharb" 614 | } 615 | }, 616 | "node_modules/is-symbol": { 617 | "version": "1.0.3", 618 | "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", 619 | "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", 620 | "dev": true, 621 | "dependencies": { 622 | "has-symbols": "^1.0.1" 623 | }, 624 | "engines": { 625 | "node": ">= 0.4" 626 | }, 627 | "funding": { 628 | "url": "https://github.com/sponsors/ljharb" 629 | } 630 | }, 631 | "node_modules/isarray": { 632 | "version": "1.0.0", 633 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 634 | "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", 635 | "dev": true 636 | }, 637 | "node_modules/isexe": { 638 | "version": "2.0.0", 639 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 640 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 641 | "dev": true 642 | }, 643 | "node_modules/json-parse-better-errors": { 644 | "version": "1.0.2", 645 | "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", 646 | "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", 647 | "dev": true 648 | }, 649 | "node_modules/jszip": { 650 | "version": "3.10.1", 651 | "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", 652 | "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", 653 | "dev": true, 654 | "dependencies": { 655 | "lie": "~3.3.0", 656 | "pako": "~1.0.2", 657 | "readable-stream": "~2.3.6", 658 | "setimmediate": "^1.0.5" 659 | } 660 | }, 661 | "node_modules/lie": { 662 | "version": "3.3.0", 663 | "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", 664 | "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", 665 | "dev": true, 666 | "dependencies": { 667 | "immediate": "~3.0.5" 668 | } 669 | }, 670 | "node_modules/load-json-file": { 671 | "version": "4.0.0", 672 | "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", 673 | "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", 674 | "dev": true, 675 | "dependencies": { 676 | "graceful-fs": "^4.1.2", 677 | "parse-json": "^4.0.0", 678 | "pify": "^3.0.0", 679 | "strip-bom": "^3.0.0" 680 | }, 681 | "engines": { 682 | "node": ">=4" 683 | } 684 | }, 685 | "node_modules/lodash": { 686 | "version": "4.17.21", 687 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 688 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 689 | "dev": true 690 | }, 691 | "node_modules/memorystream": { 692 | "version": "0.3.1", 693 | "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", 694 | "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", 695 | "dev": true, 696 | "engines": { 697 | "node": ">= 0.10.0" 698 | } 699 | }, 700 | "node_modules/mime": { 701 | "version": "1.6.0", 702 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 703 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 704 | "dev": true, 705 | "bin": { 706 | "mime": "cli.js" 707 | }, 708 | "engines": { 709 | "node": ">=4" 710 | } 711 | }, 712 | "node_modules/minimatch": { 713 | "version": "3.1.2", 714 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 715 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 716 | "dev": true, 717 | "dependencies": { 718 | "brace-expansion": "^1.1.7" 719 | }, 720 | "engines": { 721 | "node": "*" 722 | } 723 | }, 724 | "node_modules/minimist": { 725 | "version": "1.2.8", 726 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", 727 | "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", 728 | "dev": true, 729 | "funding": { 730 | "url": "https://github.com/sponsors/ljharb" 731 | } 732 | }, 733 | "node_modules/mkdirp": { 734 | "version": "0.5.6", 735 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", 736 | "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", 737 | "dev": true, 738 | "dependencies": { 739 | "minimist": "^1.2.6" 740 | }, 741 | "bin": { 742 | "mkdirp": "bin/cmd.js" 743 | } 744 | }, 745 | "node_modules/ms": { 746 | "version": "2.1.2", 747 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 748 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 749 | "dev": true 750 | }, 751 | "node_modules/nice-try": { 752 | "version": "1.0.5", 753 | "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", 754 | "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", 755 | "dev": true 756 | }, 757 | "node_modules/normalize-package-data": { 758 | "version": "2.5.0", 759 | "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", 760 | "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", 761 | "dev": true, 762 | "dependencies": { 763 | "hosted-git-info": "^2.1.4", 764 | "resolve": "^1.10.0", 765 | "semver": "2 || 3 || 4 || 5", 766 | "validate-npm-package-license": "^3.0.1" 767 | } 768 | }, 769 | "node_modules/npm-run-all": { 770 | "version": "4.1.5", 771 | "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", 772 | "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", 773 | "dev": true, 774 | "dependencies": { 775 | "ansi-styles": "^3.2.1", 776 | "chalk": "^2.4.1", 777 | "cross-spawn": "^6.0.5", 778 | "memorystream": "^0.3.1", 779 | "minimatch": "^3.0.4", 780 | "pidtree": "^0.3.0", 781 | "read-pkg": "^3.0.0", 782 | "shell-quote": "^1.6.1", 783 | "string.prototype.padend": "^3.0.0" 784 | }, 785 | "bin": { 786 | "npm-run-all": "bin/npm-run-all/index.js", 787 | "run-p": "bin/run-p/index.js", 788 | "run-s": "bin/run-s/index.js" 789 | }, 790 | "engines": { 791 | "node": ">= 4" 792 | } 793 | }, 794 | "node_modules/object-inspect": { 795 | "version": "1.12.3", 796 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", 797 | "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", 798 | "dev": true, 799 | "funding": { 800 | "url": "https://github.com/sponsors/ljharb" 801 | } 802 | }, 803 | "node_modules/object-keys": { 804 | "version": "1.1.1", 805 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", 806 | "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", 807 | "dev": true, 808 | "engines": { 809 | "node": ">= 0.4" 810 | } 811 | }, 812 | "node_modules/object.assign": { 813 | "version": "4.1.0", 814 | "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", 815 | "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", 816 | "dev": true, 817 | "dependencies": { 818 | "define-properties": "^1.1.2", 819 | "function-bind": "^1.1.1", 820 | "has-symbols": "^1.0.0", 821 | "object-keys": "^1.0.11" 822 | }, 823 | "engines": { 824 | "node": ">= 0.4" 825 | } 826 | }, 827 | "node_modules/once": { 828 | "version": "1.4.0", 829 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 830 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 831 | "dev": true, 832 | "dependencies": { 833 | "wrappy": "1" 834 | } 835 | }, 836 | "node_modules/opener": { 837 | "version": "1.5.1", 838 | "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", 839 | "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==", 840 | "dev": true, 841 | "bin": { 842 | "opener": "bin/opener-bin.js" 843 | } 844 | }, 845 | "node_modules/os-tmpdir": { 846 | "version": "1.0.2", 847 | "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", 848 | "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", 849 | "dev": true, 850 | "engines": { 851 | "node": ">=0.10.0" 852 | } 853 | }, 854 | "node_modules/pako": { 855 | "version": "1.0.11", 856 | "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", 857 | "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", 858 | "dev": true 859 | }, 860 | "node_modules/parse-json": { 861 | "version": "4.0.0", 862 | "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", 863 | "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", 864 | "dev": true, 865 | "dependencies": { 866 | "error-ex": "^1.3.1", 867 | "json-parse-better-errors": "^1.0.1" 868 | }, 869 | "engines": { 870 | "node": ">=4" 871 | } 872 | }, 873 | "node_modules/path-is-absolute": { 874 | "version": "1.0.1", 875 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 876 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", 877 | "dev": true, 878 | "engines": { 879 | "node": ">=0.10.0" 880 | } 881 | }, 882 | "node_modules/path-key": { 883 | "version": "2.0.1", 884 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", 885 | "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", 886 | "dev": true, 887 | "engines": { 888 | "node": ">=4" 889 | } 890 | }, 891 | "node_modules/path-parse": { 892 | "version": "1.0.7", 893 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 894 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 895 | "dev": true 896 | }, 897 | "node_modules/path-type": { 898 | "version": "3.0.0", 899 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", 900 | "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", 901 | "dev": true, 902 | "dependencies": { 903 | "pify": "^3.0.0" 904 | }, 905 | "engines": { 906 | "node": ">=4" 907 | } 908 | }, 909 | "node_modules/pidtree": { 910 | "version": "0.3.1", 911 | "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", 912 | "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", 913 | "dev": true, 914 | "bin": { 915 | "pidtree": "bin/pidtree.js" 916 | }, 917 | "engines": { 918 | "node": ">=0.10" 919 | } 920 | }, 921 | "node_modules/pify": { 922 | "version": "3.0.0", 923 | "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", 924 | "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", 925 | "dev": true, 926 | "engines": { 927 | "node": ">=4" 928 | } 929 | }, 930 | "node_modules/portfinder": { 931 | "version": "1.0.32", 932 | "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz", 933 | "integrity": "sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==", 934 | "dev": true, 935 | "dependencies": { 936 | "async": "^2.6.4", 937 | "debug": "^3.2.7", 938 | "mkdirp": "^0.5.6" 939 | }, 940 | "engines": { 941 | "node": ">= 0.12.0" 942 | } 943 | }, 944 | "node_modules/process-nextick-args": { 945 | "version": "2.0.1", 946 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 947 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", 948 | "dev": true 949 | }, 950 | "node_modules/qs": { 951 | "version": "6.11.2", 952 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", 953 | "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", 954 | "dev": true, 955 | "dependencies": { 956 | "side-channel": "^1.0.4" 957 | }, 958 | "engines": { 959 | "node": ">=0.6" 960 | }, 961 | "funding": { 962 | "url": "https://github.com/sponsors/ljharb" 963 | } 964 | }, 965 | "node_modules/read-pkg": { 966 | "version": "3.0.0", 967 | "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", 968 | "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", 969 | "dev": true, 970 | "dependencies": { 971 | "load-json-file": "^4.0.0", 972 | "normalize-package-data": "^2.3.2", 973 | "path-type": "^3.0.0" 974 | }, 975 | "engines": { 976 | "node": ">=4" 977 | } 978 | }, 979 | "node_modules/readable-stream": { 980 | "version": "2.3.8", 981 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", 982 | "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", 983 | "dev": true, 984 | "dependencies": { 985 | "core-util-is": "~1.0.0", 986 | "inherits": "~2.0.3", 987 | "isarray": "~1.0.0", 988 | "process-nextick-args": "~2.0.0", 989 | "safe-buffer": "~5.1.1", 990 | "string_decoder": "~1.1.1", 991 | "util-deprecate": "~1.0.1" 992 | } 993 | }, 994 | "node_modules/requires-port": { 995 | "version": "1.0.0", 996 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", 997 | "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", 998 | "dev": true 999 | }, 1000 | "node_modules/resolve": { 1001 | "version": "1.17.0", 1002 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", 1003 | "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", 1004 | "dev": true, 1005 | "dependencies": { 1006 | "path-parse": "^1.0.6" 1007 | }, 1008 | "funding": { 1009 | "url": "https://github.com/sponsors/ljharb" 1010 | } 1011 | }, 1012 | "node_modules/rimraf": { 1013 | "version": "2.7.1", 1014 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", 1015 | "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", 1016 | "dev": true, 1017 | "dependencies": { 1018 | "glob": "^7.1.3" 1019 | }, 1020 | "bin": { 1021 | "rimraf": "bin.js" 1022 | } 1023 | }, 1024 | "node_modules/safe-buffer": { 1025 | "version": "5.1.2", 1026 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1027 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 1028 | "dev": true 1029 | }, 1030 | "node_modules/safer-buffer": { 1031 | "version": "2.1.2", 1032 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1033 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 1034 | "dev": true 1035 | }, 1036 | "node_modules/sax": { 1037 | "version": "1.2.4", 1038 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", 1039 | "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", 1040 | "dev": true 1041 | }, 1042 | "node_modules/secure-compare": { 1043 | "version": "3.0.1", 1044 | "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz", 1045 | "integrity": "sha1-8aAymzCLIh+uN7mXTz1XjQypmeM=", 1046 | "dev": true 1047 | }, 1048 | "node_modules/selenium-webdriver": { 1049 | "version": "3.6.0", 1050 | "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", 1051 | "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", 1052 | "dev": true, 1053 | "dependencies": { 1054 | "jszip": "^3.1.3", 1055 | "rimraf": "^2.5.4", 1056 | "tmp": "0.0.30", 1057 | "xml2js": "^0.4.17" 1058 | }, 1059 | "engines": { 1060 | "node": ">= 6.9.0" 1061 | } 1062 | }, 1063 | "node_modules/semver": { 1064 | "version": "5.7.2", 1065 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", 1066 | "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", 1067 | "dev": true, 1068 | "bin": { 1069 | "semver": "bin/semver" 1070 | } 1071 | }, 1072 | "node_modules/setimmediate": { 1073 | "version": "1.0.5", 1074 | "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", 1075 | "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", 1076 | "dev": true 1077 | }, 1078 | "node_modules/shebang-command": { 1079 | "version": "1.2.0", 1080 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", 1081 | "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", 1082 | "dev": true, 1083 | "dependencies": { 1084 | "shebang-regex": "^1.0.0" 1085 | }, 1086 | "engines": { 1087 | "node": ">=0.10.0" 1088 | } 1089 | }, 1090 | "node_modules/shebang-regex": { 1091 | "version": "1.0.0", 1092 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", 1093 | "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", 1094 | "dev": true, 1095 | "engines": { 1096 | "node": ">=0.10.0" 1097 | } 1098 | }, 1099 | "node_modules/shell-quote": { 1100 | "version": "1.7.3", 1101 | "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", 1102 | "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", 1103 | "dev": true 1104 | }, 1105 | "node_modules/side-channel": { 1106 | "version": "1.0.4", 1107 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 1108 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 1109 | "dev": true, 1110 | "dependencies": { 1111 | "call-bind": "^1.0.0", 1112 | "get-intrinsic": "^1.0.2", 1113 | "object-inspect": "^1.9.0" 1114 | }, 1115 | "funding": { 1116 | "url": "https://github.com/sponsors/ljharb" 1117 | } 1118 | }, 1119 | "node_modules/spdx-correct": { 1120 | "version": "3.1.1", 1121 | "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", 1122 | "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", 1123 | "dev": true, 1124 | "dependencies": { 1125 | "spdx-expression-parse": "^3.0.0", 1126 | "spdx-license-ids": "^3.0.0" 1127 | } 1128 | }, 1129 | "node_modules/spdx-exceptions": { 1130 | "version": "2.3.0", 1131 | "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", 1132 | "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", 1133 | "dev": true 1134 | }, 1135 | "node_modules/spdx-expression-parse": { 1136 | "version": "3.0.1", 1137 | "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", 1138 | "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", 1139 | "dev": true, 1140 | "dependencies": { 1141 | "spdx-exceptions": "^2.1.0", 1142 | "spdx-license-ids": "^3.0.0" 1143 | } 1144 | }, 1145 | "node_modules/spdx-license-ids": { 1146 | "version": "3.0.5", 1147 | "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", 1148 | "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", 1149 | "dev": true 1150 | }, 1151 | "node_modules/string_decoder": { 1152 | "version": "1.1.1", 1153 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 1154 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 1155 | "dev": true, 1156 | "dependencies": { 1157 | "safe-buffer": "~5.1.0" 1158 | } 1159 | }, 1160 | "node_modules/string.prototype.padend": { 1161 | "version": "3.1.0", 1162 | "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz", 1163 | "integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==", 1164 | "dev": true, 1165 | "dependencies": { 1166 | "define-properties": "^1.1.3", 1167 | "es-abstract": "^1.17.0-next.1" 1168 | }, 1169 | "engines": { 1170 | "node": ">= 0.4" 1171 | }, 1172 | "funding": { 1173 | "url": "https://github.com/sponsors/ljharb" 1174 | } 1175 | }, 1176 | "node_modules/string.prototype.trimend": { 1177 | "version": "1.0.1", 1178 | "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", 1179 | "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", 1180 | "dev": true, 1181 | "dependencies": { 1182 | "define-properties": "^1.1.3", 1183 | "es-abstract": "^1.17.5" 1184 | }, 1185 | "funding": { 1186 | "url": "https://github.com/sponsors/ljharb" 1187 | } 1188 | }, 1189 | "node_modules/string.prototype.trimstart": { 1190 | "version": "1.0.1", 1191 | "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", 1192 | "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", 1193 | "dev": true, 1194 | "dependencies": { 1195 | "define-properties": "^1.1.3", 1196 | "es-abstract": "^1.17.5" 1197 | }, 1198 | "funding": { 1199 | "url": "https://github.com/sponsors/ljharb" 1200 | } 1201 | }, 1202 | "node_modules/strip-bom": { 1203 | "version": "3.0.0", 1204 | "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", 1205 | "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", 1206 | "dev": true, 1207 | "engines": { 1208 | "node": ">=4" 1209 | } 1210 | }, 1211 | "node_modules/supports-color": { 1212 | "version": "5.5.0", 1213 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1214 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1215 | "dev": true, 1216 | "dependencies": { 1217 | "has-flag": "^3.0.0" 1218 | }, 1219 | "engines": { 1220 | "node": ">=4" 1221 | } 1222 | }, 1223 | "node_modules/tmp": { 1224 | "version": "0.0.30", 1225 | "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", 1226 | "integrity": "sha512-HXdTB7lvMwcb55XFfrTM8CPr/IYREk4hVBFaQ4b/6nInrluSL86hfHm7vu0luYKCfyBZp2trCjpc8caC3vVM3w==", 1227 | "dev": true, 1228 | "dependencies": { 1229 | "os-tmpdir": "~1.0.1" 1230 | }, 1231 | "engines": { 1232 | "node": ">=0.4.0" 1233 | } 1234 | }, 1235 | "node_modules/tunnel": { 1236 | "version": "0.0.6", 1237 | "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", 1238 | "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", 1239 | "engines": { 1240 | "node": ">=0.6.11 <=0.7.0 || >=0.7.3" 1241 | } 1242 | }, 1243 | "node_modules/typescript": { 1244 | "version": "3.9.5", 1245 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz", 1246 | "integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==", 1247 | "dev": true, 1248 | "bin": { 1249 | "tsc": "bin/tsc", 1250 | "tsserver": "bin/tsserver" 1251 | }, 1252 | "engines": { 1253 | "node": ">=4.2.0" 1254 | } 1255 | }, 1256 | "node_modules/union": { 1257 | "version": "0.5.0", 1258 | "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", 1259 | "integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==", 1260 | "dev": true, 1261 | "dependencies": { 1262 | "qs": "^6.4.0" 1263 | }, 1264 | "engines": { 1265 | "node": ">= 0.8.0" 1266 | } 1267 | }, 1268 | "node_modules/url-join": { 1269 | "version": "4.0.1", 1270 | "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", 1271 | "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", 1272 | "dev": true 1273 | }, 1274 | "node_modules/util-deprecate": { 1275 | "version": "1.0.2", 1276 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1277 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", 1278 | "dev": true 1279 | }, 1280 | "node_modules/uuid": { 1281 | "version": "8.3.2", 1282 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 1283 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", 1284 | "bin": { 1285 | "uuid": "dist/bin/uuid" 1286 | } 1287 | }, 1288 | "node_modules/validate-npm-package-license": { 1289 | "version": "3.0.4", 1290 | "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", 1291 | "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", 1292 | "dev": true, 1293 | "dependencies": { 1294 | "spdx-correct": "^3.0.0", 1295 | "spdx-expression-parse": "^3.0.0" 1296 | } 1297 | }, 1298 | "node_modules/whatwg-encoding": { 1299 | "version": "2.0.0", 1300 | "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", 1301 | "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", 1302 | "dev": true, 1303 | "dependencies": { 1304 | "iconv-lite": "0.6.3" 1305 | }, 1306 | "engines": { 1307 | "node": ">=12" 1308 | } 1309 | }, 1310 | "node_modules/which": { 1311 | "version": "1.3.1", 1312 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 1313 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 1314 | "dev": true, 1315 | "dependencies": { 1316 | "isexe": "^2.0.0" 1317 | }, 1318 | "bin": { 1319 | "which": "bin/which" 1320 | } 1321 | }, 1322 | "node_modules/wrappy": { 1323 | "version": "1.0.2", 1324 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1325 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 1326 | "dev": true 1327 | }, 1328 | "node_modules/xml2js": { 1329 | "version": "0.4.23", 1330 | "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", 1331 | "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", 1332 | "dev": true, 1333 | "dependencies": { 1334 | "sax": ">=0.6.0", 1335 | "xmlbuilder": "~11.0.0" 1336 | }, 1337 | "engines": { 1338 | "node": ">=4.0.0" 1339 | } 1340 | }, 1341 | "node_modules/xmlbuilder": { 1342 | "version": "11.0.1", 1343 | "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", 1344 | "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", 1345 | "dev": true, 1346 | "engines": { 1347 | "node": ">=4.0" 1348 | } 1349 | } 1350 | } 1351 | } 1352 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lambdatest-tunnel-action", 3 | "version": "1.1.0", 4 | "description": "A Github Action to launch LambdaTest Tunnel", 5 | "main": "./lib/main.js", 6 | "scripts": { 7 | "build": "tsc && ncc build", 8 | "test": "run-p test:*", 9 | "test:server": "http-server -p 8888 ./test > /dev/null 2>&1 &", 10 | "test:run": "node ./test/test-basic-auth.js && node ./test/test.js" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/LambdaTest/lambdatest-tunnel-action.git" 15 | }, 16 | "keywords": [ 17 | "LambdaTest", 18 | "tunnel" 19 | ], 20 | "author": "Rishabh Arya ", 21 | "license": "ISC", 22 | "bugs": { 23 | "url": "https://github.com/LambdaTest/lambdatest-tunnel-action/issues" 24 | }, 25 | "homepage": "https://github.com/LambdaTest/lambdatest-tunnel-action#readme", 26 | "dependencies": { 27 | "@actions/core": "^1.9.1", 28 | "@types/node": "^14.0.13", 29 | "get-port": "^5.1.1" 30 | }, 31 | "devDependencies": { 32 | "@vercel/ncc": "^0.36.1", 33 | "http-server": "^14.1.1", 34 | "npm-run-all": "^4.1.5", 35 | "selenium-webdriver": "^3.6.0", 36 | "typescript": "^3.9.5" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import * as core from "@actions/core"; 2 | import crypto from "crypto"; 3 | import getPort from "get-port"; 4 | import childProcess from "child_process"; 5 | 6 | /** 7 | * Name of state that stores port number of the tunnel 8 | */ 9 | const STATE_PORT = "port"; 10 | 11 | export async function run() { 12 | // if state is already setup, then kick off the cleanup 13 | if (!!core.getState(STATE_PORT)) { 14 | cleanup(); 15 | } else { 16 | // start the tunnel 17 | launch(); 18 | } 19 | } 20 | 21 | async function launch() { 22 | try { 23 | let port: Number = await getPort(); 24 | let name: string = crypto.randomBytes(10).toString("hex"); 25 | let logFileName = name + ".log"; 26 | core.setOutput("port", port); 27 | core.setOutput("logFileName", logFileName); 28 | core.saveState(STATE_PORT, port); 29 | let params: string = (await getTunnelParams(port)).join(" "); 30 | 31 | let dockerPullCmd: string = "docker pull lambdatest/tunnel:latest"; 32 | core.info(dockerPullCmd); 33 | childProcess.execSync(dockerPullCmd, { 34 | stdio: "inherit", 35 | }); 36 | 37 | let dockerRunCmd: string = `docker run --name=${name} -d=true --net=host lambdatest/tunnel:latest ${params}`; 38 | core.info(dockerRunCmd); 39 | childProcess.execSync(dockerRunCmd, { 40 | stdio: "inherit", 41 | }); 42 | 43 | let checkTunnelCmd: string = `curl -s --retry-connrefused --connect-timeout 5 --max-time 5 --retry 30 --retry-delay 2 --retry-max-time 60 http://127.0.0.1:${port}/api/v1.0/info`; 44 | core.info(checkTunnelCmd); 45 | let checkTunnelErr: any; 46 | try { 47 | childProcess.execSync(checkTunnelCmd, { stdio: "inherit" }); 48 | } catch (error) { 49 | core.error('error while starting tunnel', error.message) 50 | checkTunnelErr = error; 51 | } 52 | 53 | let dockerLogsCmd: string = `docker logs -f ${name} > ${logFileName} 2>&1 &`; 54 | core.info(dockerLogsCmd); 55 | childProcess.execSync(dockerLogsCmd, { 56 | stdio: "inherit", 57 | }); 58 | 59 | if (checkTunnelErr) { 60 | throw checkTunnelErr; 61 | } 62 | 63 | core.info("Tunnel is running now"); 64 | } catch (error) { 65 | core.error(error); 66 | core.setFailed(error.message); 67 | } 68 | } 69 | 70 | async function getTunnelParams(port: Number) { 71 | let params = []; 72 | 73 | if (core.getInput("user")) { 74 | params.push("--user", core.getInput("user")); 75 | } 76 | if (core.getInput("accessKey")) { 77 | params.push("--key", core.getInput("accessKey")); 78 | } 79 | if (core.getInput("tunnelName")) { 80 | params.push("--tunnelName", `"${core.getInput("tunnelName")}"`); 81 | } 82 | if (core.getInput("proxyHost")) { 83 | params.push("--proxy-host", `"${core.getInput("proxyHost")}"`); 84 | } 85 | if (core.getInput("proxyPort")) { 86 | params.push("--proxy-port", `"${core.getInput("proxyPort")}"`); 87 | } 88 | if (core.getInput("proxyUser")) { 89 | params.push("--proxy-user", `"${core.getInput("proxyUser")}"`); 90 | } 91 | if (core.getInput("proxyPass")) { 92 | params.push("--proxy-pass", `"${core.getInput("proxyPass")}"`); 93 | } 94 | if (core.getInput("sharedTunnel")) { 95 | params.push("--shared-tunnel"); 96 | } 97 | if (core.getInput("ingressOnly")) { 98 | params.push("--ingress-only"); 99 | } 100 | if (core.getInput("egressOnly")) { 101 | params.push("--egress-only"); 102 | } 103 | if (core.getInput("mitm")) { 104 | params.push("--mitm"); 105 | } 106 | if (core.getInput("dns")) { 107 | params.push("--dns", `"${core.getInput("dns")}"`); 108 | } 109 | if (core.getInput("verbose")) { 110 | params.push("-v"); 111 | } 112 | if (core.getInput("loadBalanced")) { 113 | params.push("--load-balanced"); 114 | } 115 | if (core.getInput("bypassHosts")) { 116 | params.push("--bypassHosts", `"${core.getInput("bypassHosts")}"`); 117 | } 118 | if (core.getInput("basicAuth")) { 119 | params.push("--basic-auth", core.getInput("basicAuth")); 120 | } 121 | if (core.getInput("usePrivateIP")) { 122 | params.push("--use-private-ip"); 123 | } 124 | params.push("--controller", "github", "--infoAPIPort", `${port}`); 125 | return params; 126 | } 127 | 128 | async function cleanup() { 129 | let port = core.getState(STATE_PORT); 130 | let stopTunnelCmd: string = `curl -X DELETE http://127.0.0.1:${port}/api/v1.0/stop`; 131 | core.info("Gracefully close the tunnel:"); 132 | core.info(stopTunnelCmd); 133 | childProcess.execSync(stopTunnelCmd, { stdio: "inherit" }); 134 | } 135 | run(); 136 | -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | LambdaTest Tunnel -------------------------------------------------------------------------------- /test/test-basic-auth.js: -------------------------------------------------------------------------------- 1 | const webdriver = require("selenium-webdriver"); 2 | const assert = require("assert"); 3 | const gridHost = "hub.lambdatest.com/wd/hub"; 4 | 5 | async function executeTest() { 6 | // Setup Input capabilities 7 | const capabilities = { 8 | platform: "windows 10", 9 | browserName: "chrome", 10 | version: "114.0", 11 | tunnel: true, 12 | video: true, 13 | tunnelName: process.env.tunnelName, 14 | name: "Test 2", // name of the test 15 | build: "NodeJS build", // name of the build 16 | }; 17 | 18 | // URL: https://{username}:{accessKey}@hub.lambdatest.com/wd/hub 19 | const gridUrl = `https://${process.env.username}:${process.env.accessKey}@${gridHost}`; 20 | console.log(gridUrl) 21 | const driver = new webdriver.Builder() 22 | .usingServer(gridUrl) 23 | .withCapabilities(capabilities) 24 | .build(); 25 | 26 | try { 27 | await driver.get("http://the-internet.herokuapp.com/basic_auth"); 28 | const content = await driver.findElement(webdriver.By.xpath("(//p[contains(text(),'Congratulations! You must have the proper credenti')])[1]")); 29 | assert.strictEqual(await content.getText(), "Congratulations! You must have the proper credentials."); 30 | } finally { 31 | await driver.quit(); 32 | } 33 | } 34 | executeTest(); -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- 1 | const webdriver = require("selenium-webdriver"); 2 | const assert = require("assert"); 3 | const gridHost = "hub.lambdatest.com/wd/hub"; 4 | 5 | async function executeTest() { 6 | // Setup Input capabilities 7 | const capabilities = { 8 | platform: "windows 10", 9 | browserName: "chrome", 10 | version: "114.0", 11 | tunnel: true, 12 | video: true, 13 | tunnelName: process.env.tunnelName, 14 | name: "Test 1", // name of the test 15 | build: "NodeJS build", // name of the build 16 | }; 17 | 18 | // URL: https://{username}:{accessKey}@hub.lambdatest.com/wd/hub 19 | const gridUrl = `https://${process.env.username}:${process.env.accessKey}@${gridHost}`; 20 | console.log(gridUrl) 21 | const driver = new webdriver.Builder() 22 | .usingServer(gridUrl) 23 | .withCapabilities(capabilities) 24 | .build(); 25 | 26 | try { 27 | await driver.get("http://localhost:8888/"); 28 | const body = await driver.findElement(webdriver.By.tagName("body")); 29 | assert.strictEqual(await body.getText(), "LambdaTest Tunnel"); 30 | } finally { 31 | await driver.quit(); 32 | } 33 | } 34 | executeTest(); -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Basic Options */ 4 | // "incremental": true, /* Enable incremental compilation */ 5 | "target": "es6", 6 | /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ 7 | "module": "commonjs", 8 | /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ 9 | "lib": [ 10 | "es6" 11 | ], 12 | /* Specify library files to be included in the compilation. */ 13 | // "allowJs": true, /* Allow javascript files to be compiled. */ 14 | // "checkJs": true, /* Report errors in .js files. */ 15 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ 16 | // "declaration": true, /* Generates corresponding '.d.ts' file. */ 17 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ 18 | // "sourceMap": true, /* Generates corresponding '.map' file. */ 19 | // "outFile": "./", /* Concatenate and emit output to single file. */ 20 | "outDir": "./lib", 21 | /* Redirect output structure to the directory. */ 22 | "rootDir": "./src", 23 | /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 24 | // "composite": true, /* Enable project compilation */ 25 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ 26 | // "removeComments": true, /* Do not emit comments to output. */ 27 | // "noEmit": true, /* Do not emit outputs. */ 28 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 29 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 30 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 31 | 32 | /* Strict Type-Checking Options */ 33 | "strict": true, 34 | /* Enable all strict type-checking options. */ 35 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 36 | // "strictNullChecks": true, /* Enable strict null checks. */ 37 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 38 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ 39 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 40 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 41 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 42 | 43 | /* Additional Checks */ 44 | // "noUnusedLocals": true, /* Report errors on unused locals. */ 45 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 46 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 47 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 48 | 49 | /* Module Resolution Options */ 50 | // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 51 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 52 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 53 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 54 | // "typeRoots": [], /* List of folders to include type definitions from. */ 55 | // "types": [], /* Type declaration files to be included in compilation. */ 56 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 57 | "esModuleInterop": true, 58 | /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 59 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 60 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 61 | 62 | /* Source Map Options */ 63 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 64 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 65 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 66 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 67 | 68 | /* Experimental Options */ 69 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 70 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 71 | 72 | /* Advanced Options */ 73 | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ 74 | } 75 | } --------------------------------------------------------------------------------