├── .github ├── CODEOWNERS ├── dependabot.yml └── workflows │ ├── dependabot.yml │ ├── main.yml │ └── update-main-version.yml ├── .gitignore ├── LICENSE ├── README.md ├── action.yml ├── lib └── main.js ├── node_modules ├── .bin │ └── uuid ├── .package-lock.json ├── .yarn-integrity ├── @actions │ ├── core │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── lib │ │ │ ├── command.d.ts │ │ │ ├── command.js │ │ │ ├── command.js.map │ │ │ ├── core.d.ts │ │ │ ├── core.js │ │ │ ├── core.js.map │ │ │ ├── file-command.d.ts │ │ │ ├── file-command.js │ │ │ ├── file-command.js.map │ │ │ ├── oidc-utils.d.ts │ │ │ ├── oidc-utils.js │ │ │ ├── oidc-utils.js.map │ │ │ ├── path-utils.d.ts │ │ │ ├── path-utils.js │ │ │ ├── path-utils.js.map │ │ │ ├── summary.d.ts │ │ │ ├── summary.js │ │ │ ├── summary.js.map │ │ │ ├── utils.d.ts │ │ │ ├── utils.js │ │ │ └── utils.js.map │ │ └── package.json │ └── http-client │ │ ├── LICENSE │ │ ├── README.md │ │ ├── lib │ │ ├── auth.d.ts │ │ ├── auth.js │ │ ├── auth.js.map │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── index.js.map │ │ ├── interfaces.d.ts │ │ ├── interfaces.js │ │ ├── interfaces.js.map │ │ ├── proxy.d.ts │ │ ├── proxy.js │ │ └── proxy.js.map │ │ └── package.json ├── @types │ └── node │ │ ├── LICENSE │ │ ├── README.md │ │ ├── assert.d.ts │ │ ├── assert │ │ └── strict.d.ts │ │ ├── async_hooks.d.ts │ │ ├── buffer.d.ts │ │ ├── child_process.d.ts │ │ ├── cluster.d.ts │ │ ├── console.d.ts │ │ ├── constants.d.ts │ │ ├── crypto.d.ts │ │ ├── dgram.d.ts │ │ ├── diagnostics_channel.d.ts │ │ ├── dns.d.ts │ │ ├── dns │ │ └── promises.d.ts │ │ ├── dom-events.d.ts │ │ ├── domain.d.ts │ │ ├── events.d.ts │ │ ├── fs.d.ts │ │ ├── fs │ │ └── promises.d.ts │ │ ├── globals.d.ts │ │ ├── globals.global.d.ts │ │ ├── http.d.ts │ │ ├── http2.d.ts │ │ ├── https.d.ts │ │ ├── index.d.ts │ │ ├── inspector.d.ts │ │ ├── module.d.ts │ │ ├── net.d.ts │ │ ├── os.d.ts │ │ ├── package.json │ │ ├── path.d.ts │ │ ├── perf_hooks.d.ts │ │ ├── process.d.ts │ │ ├── punycode.d.ts │ │ ├── querystring.d.ts │ │ ├── readline.d.ts │ │ ├── readline │ │ └── promises.d.ts │ │ ├── repl.d.ts │ │ ├── stream.d.ts │ │ ├── stream │ │ ├── consumers.d.ts │ │ ├── promises.d.ts │ │ └── web.d.ts │ │ ├── string_decoder.d.ts │ │ ├── test.d.ts │ │ ├── timers.d.ts │ │ ├── timers │ │ └── promises.d.ts │ │ ├── tls.d.ts │ │ ├── trace_events.d.ts │ │ ├── ts4.8 │ │ ├── assert.d.ts │ │ ├── assert │ │ │ └── strict.d.ts │ │ ├── async_hooks.d.ts │ │ ├── buffer.d.ts │ │ ├── child_process.d.ts │ │ ├── cluster.d.ts │ │ ├── console.d.ts │ │ ├── constants.d.ts │ │ ├── crypto.d.ts │ │ ├── dgram.d.ts │ │ ├── diagnostics_channel.d.ts │ │ ├── dns.d.ts │ │ ├── dns │ │ │ └── promises.d.ts │ │ ├── dom-events.d.ts │ │ ├── domain.d.ts │ │ ├── events.d.ts │ │ ├── fs.d.ts │ │ ├── fs │ │ │ └── promises.d.ts │ │ ├── globals.d.ts │ │ ├── globals.global.d.ts │ │ ├── http.d.ts │ │ ├── http2.d.ts │ │ ├── https.d.ts │ │ ├── index.d.ts │ │ ├── inspector.d.ts │ │ ├── module.d.ts │ │ ├── net.d.ts │ │ ├── os.d.ts │ │ ├── path.d.ts │ │ ├── perf_hooks.d.ts │ │ ├── process.d.ts │ │ ├── punycode.d.ts │ │ ├── querystring.d.ts │ │ ├── readline.d.ts │ │ ├── readline │ │ │ └── promises.d.ts │ │ ├── repl.d.ts │ │ ├── stream.d.ts │ │ ├── stream │ │ │ ├── consumers.d.ts │ │ │ ├── promises.d.ts │ │ │ └── web.d.ts │ │ ├── string_decoder.d.ts │ │ ├── test.d.ts │ │ ├── timers.d.ts │ │ ├── timers │ │ │ └── promises.d.ts │ │ ├── tls.d.ts │ │ ├── trace_events.d.ts │ │ ├── tty.d.ts │ │ ├── url.d.ts │ │ ├── util.d.ts │ │ ├── v8.d.ts │ │ ├── vm.d.ts │ │ ├── wasi.d.ts │ │ ├── worker_threads.d.ts │ │ └── zlib.d.ts │ │ ├── tty.d.ts │ │ ├── url.d.ts │ │ ├── util.d.ts │ │ ├── v8.d.ts │ │ ├── vm.d.ts │ │ ├── wasi.d.ts │ │ ├── worker_threads.d.ts │ │ └── zlib.d.ts ├── tunnel │ ├── .idea │ │ ├── encodings.xml │ │ ├── modules.xml │ │ ├── node-tunnel.iml │ │ ├── vcs.xml │ │ └── workspace.xml │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ └── tunnel.js │ └── package.json ├── undici-types │ ├── README.md │ ├── agent.d.ts │ ├── api.d.ts │ ├── balanced-pool.d.ts │ ├── cache.d.ts │ ├── client.d.ts │ ├── connector.d.ts │ ├── content-type.d.ts │ ├── cookies.d.ts │ ├── diagnostics-channel.d.ts │ ├── dispatcher.d.ts │ ├── errors.d.ts │ ├── fetch.d.ts │ ├── file.d.ts │ ├── filereader.d.ts │ ├── formdata.d.ts │ ├── global-dispatcher.d.ts │ ├── global-origin.d.ts │ ├── handlers.d.ts │ ├── header.d.ts │ ├── index.d.ts │ ├── interceptors.d.ts │ ├── mock-agent.d.ts │ ├── mock-client.d.ts │ ├── mock-errors.d.ts │ ├── mock-interceptor.d.ts │ ├── mock-pool.d.ts │ ├── package.json │ ├── patch.d.ts │ ├── pool-stats.d.ts │ ├── pool.d.ts │ ├── proxy-agent.d.ts │ ├── readable.d.ts │ ├── webidl.d.ts │ └── websocket.d.ts └── uuid │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── LICENSE.md │ ├── README.md │ ├── dist │ ├── bin │ │ └── uuid │ ├── esm-browser │ │ ├── index.js │ │ ├── md5.js │ │ ├── nil.js │ │ ├── parse.js │ │ ├── regex.js │ │ ├── rng.js │ │ ├── sha1.js │ │ ├── stringify.js │ │ ├── v1.js │ │ ├── v3.js │ │ ├── v35.js │ │ ├── v4.js │ │ ├── v5.js │ │ ├── validate.js │ │ └── version.js │ ├── esm-node │ │ ├── index.js │ │ ├── md5.js │ │ ├── nil.js │ │ ├── parse.js │ │ ├── regex.js │ │ ├── rng.js │ │ ├── sha1.js │ │ ├── stringify.js │ │ ├── v1.js │ │ ├── v3.js │ │ ├── v35.js │ │ ├── v4.js │ │ ├── v5.js │ │ ├── validate.js │ │ └── version.js │ ├── index.js │ ├── md5-browser.js │ ├── md5.js │ ├── nil.js │ ├── parse.js │ ├── regex.js │ ├── rng-browser.js │ ├── rng.js │ ├── sha1-browser.js │ ├── sha1.js │ ├── stringify.js │ ├── umd │ │ ├── uuid.min.js │ │ ├── uuidNIL.min.js │ │ ├── uuidParse.min.js │ │ ├── uuidStringify.min.js │ │ ├── uuidValidate.min.js │ │ ├── uuidVersion.min.js │ │ ├── uuidv1.min.js │ │ ├── uuidv3.min.js │ │ ├── uuidv4.min.js │ │ └── uuidv5.min.js │ ├── uuid-bin.js │ ├── v1.js │ ├── v3.js │ ├── v35.js │ ├── v4.js │ ├── v5.js │ ├── validate.js │ └── version.js │ ├── package.json │ └── wrapper.mjs ├── package-lock.json ├── package.json └── tests └── fixtures └── ddevProj1 ├── .ddev └── config.yaml └── index.html /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @jonaseberle @davereid 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" 9 | directory: "/" 10 | schedule: 11 | interval: "weekly" 12 | labels: 13 | - "dependencies" 14 | -------------------------------------------------------------------------------- /.github/workflows/dependabot.yml: -------------------------------------------------------------------------------- 1 | name: Dependabot NPM changes 2 | 3 | on: 4 | pull_request 5 | 6 | jobs: 7 | npm-update: 8 | runs-on: ubuntu-latest 9 | if: ${{ github.actor == 'dependabot[bot]' }} 10 | permissions: 11 | contents: write 12 | pull-requests: write 13 | steps: 14 | - uses: actions/checkout@v4 15 | - uses: actions/setup-node@v4 16 | with: 17 | node-version: 18 18 | cache: npm 19 | - name: Checkout PR 20 | run: gh pr checkout ${{ github.event.pull_request.number }} 21 | env: 22 | GITHUB_TOKEN: ${{ github.token }} 23 | - run: npm install 24 | - name: Git config 25 | run: | 26 | git config user.name github-actions 27 | git config user.email github-actions@github.com 28 | - name: Stage changes 29 | run: git add -A node_modules 30 | - name: Commit changes 31 | run: git commit -m "Updated node_modules" 32 | - name: Push changes to PR 33 | run: git push 34 | - name: Dependabot metadata 35 | id: metadata 36 | uses: dependabot/fetch-metadata@v2 37 | with: 38 | github-token: "${{ secrets.GITHUB_TOKEN }}" 39 | - name: Enable auto-merge for Dependabot PRs 40 | if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }} 41 | run: gh pr merge --auto --merge "$PR_URL" 42 | env: 43 | PR_URL: ${{ github.event.pull_request.html_url }} 44 | GITHUB_TOKEN: ${{ github.token }} 45 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: tests 2 | 3 | on: 4 | pull_request: 5 | merge_group: 6 | types: [checks_requested] 7 | push: 8 | branches: 9 | - 'main' 10 | workflow_dispatch: 11 | schedule: 12 | - cron: 0 0 * * * 13 | 14 | jobs: 15 | test: 16 | runs-on: ${{ matrix.os }} 17 | strategy: 18 | fail-fast: false 19 | matrix: 20 | os: [ubuntu-22.04, ubuntu-24.04] 21 | version: ['latest', '1.24.0'] 22 | steps: 23 | - uses: actions/checkout@v4 24 | - uses: ./ 25 | with: 26 | ddevDir: tests/fixtures/ddevProj1 27 | autostart: false 28 | version: ${{ matrix.version }} 29 | - name: ddev version 30 | run: | 31 | if [[ ${{ matrix.version }} == '1.24.0' ]]; then 32 | test "$(ddev --version)" == 'ddev version v1.24.0' 33 | else 34 | test "$(ddev --version)" != 'ddev version v1.24.0' 35 | fi 36 | - name: ddev stopped 37 | run: | 38 | cd tests/fixtures/ddevProj1 39 | test '"stopped"' = "$(ddev describe --json-output | jq '.raw.status')" 40 | - name: start ddev 41 | run: | 42 | cd tests/fixtures/ddevProj1 43 | ddev start --json-output --skip-confirmation 44 | - name: Mailpit reachable 45 | run: curl --silent --dump-header - --output /dev/null https://setup-ddev-proj1.ddev.site:8026 46 | - name: "index.html: expected output" 47 | run: test 'index.html test output' = "$(curl --silent https://setup-ddev-proj1.ddev.site)" 48 | -------------------------------------------------------------------------------- /.github/workflows/update-main-version.yml: -------------------------------------------------------------------------------- 1 | name: Update Main Version 2 | run-name: Move ${{ github.event.inputs.major_version || 'latest branch tag' }} to ${{ github.event.inputs.target || github.sha }} 3 | 4 | on: 5 | push: 6 | tags: 7 | - 'v[0-9]+.**' 8 | workflow_dispatch: 9 | inputs: 10 | target: 11 | description: The tag or reference to use 12 | required: true 13 | major_version: 14 | type: choice 15 | description: The major version to update 16 | options: 17 | - v1 18 | 19 | env: 20 | MAJOR_VERSION: 'v1' 21 | 22 | jobs: 23 | tag: 24 | runs-on: ubuntu-latest 25 | permissions: 26 | contents: write 27 | steps: 28 | - uses: actions/checkout@v4 29 | with: 30 | fetch-depth: 0 31 | - name: Git config 32 | run: | 33 | git config user.name github-actions 34 | git config user.email github-actions@github.com 35 | #- name: Get major version from tag name 36 | # if: ${{ github.event_name === 'push' }} 37 | # run: echo "MAJOR_VERSION=`echo ${GITHUB_REF#refs/*/} | cut -c1-2`" >> $GITHUB_ENV 38 | - name: Tag new target 39 | run: git tag -f ${{ github.event.inputs.major_version || env.MAJOR_VERSION }} ${{ github.event.inputs.target || github.sha }} 40 | - name: Push new tag 41 | run: git push origin ${{ github.event.inputs.major_version || env.MAJOR_VERSION }} --force 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | #/node_modules -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Tests](https://github.com/ddev/github-action-setup-ddev/workflows/tests/badge.svg?event=push)](https://github.com/ddev/github-action-setup-ddev/actions) 2 | 3 | # Setup and start DDEV action 4 | 5 | This **GitHub action** starts [DDEV](https://github.com/drud/ddev/) with your project's configuration from the directory `.ddev`. 6 | 7 | The idea is to reuse the same environment that you are maintaining for development anyways for automated acceptance testing, thus saving on maintaining a separate CI-configuration. 8 | 9 | Any additional services that you might have configured will be started and any post-start hooks etc. will be run. 10 | 11 | ## Example GitHub workflow 12 | 13 | ```yaml 14 | on: [push, pull_request] 15 | 16 | jobs: 17 | test: 18 | runs-on: ubuntu-22.04 # tested on: 20.04/22.04 19 | steps: 20 | - uses: actions/checkout@v1 21 | - name: Setup DDEV 22 | uses: ddev/github-action-setup-ddev@v1 23 | 24 | # example: composer install 25 | - run: ddev composer install 26 | 27 | # example: fill database 28 | - run: ddev mysql < data/db.sql 29 | 30 | # ... and so on. For example: 31 | - run: ddev exec bin/myAcceptanceTests.sh 32 | - run: ddev exec make tests 33 | - run: ddev composer ci:tests 34 | - run: ddev composer ci:tests:acceptance:${{ matrix.browser }} 35 | - run: ddev yarn --frozen-lockfile --no-progress --non-interactive && ddev yarn mocha-tests 36 | - run: ddev npm ci && ddev npm run mocha-tests 37 | - run: test 'test for expected output' = "$(curl --silent https://my-ddev-project.ddev.site)" 38 | 39 | # use different PHP version in a test matrix 40 | - run: | 41 | sed -i -e 's/^php_version:.*/php_version: ${{ matrix.php-version }}/g' .ddev/config.yaml \ 42 | && ddev start 43 | ``` 44 | 45 | ### Options 46 | 47 | #### ddevDir 48 | 49 | Path to your DDEV project. This path needs to contain the `.ddev/` directory. 50 | 51 | default: `.` (root directory) 52 | 53 | ```yaml 54 | - name: Setup DDEV 55 | uses: ddev/github-action-setup-ddev@v1 56 | with: 57 | ddevDir: ".devbox" 58 | - name: 'You need to switch to that directory to use the `ddev` command' 59 | run: ddev composer install 60 | working-directory: .devbox 61 | ``` 62 | 63 | #### autostart 64 | 65 | Starts your DDEV project immediately. 66 | 67 | default: `true` 68 | 69 | ```yaml 70 | - uses: ddev/github-action-setup-ddev@v1 71 | with: 72 | autostart: false 73 | ``` 74 | 75 | #### version 76 | 77 | Install a specific ddev version. The version must be available in ddev's apt repository. 78 | 79 | default: `latest` 80 | 81 | ```yaml 82 | - uses: ddev/github-action-setup-ddev@v1 83 | with: 84 | version: 1.22.4 85 | ``` 86 | 87 | ## Common recipes 88 | 89 | ### SSH keys 90 | 91 | If your workflow needs to reach remote destinations that require private SSH keys, 92 | we recommend adding SSH keys that you have entered as [GitHub "secrets"](https://docs.github.com/en/actions/security-guides/encrypted-secrets): 93 | 94 | ``` 95 | - name: Setup SSH keys 96 | run: | 97 | mkdir -p .ddev/homeadditions/.ssh 98 | echo "${{ secrets.MY_KEY }}" > .ddev/homeadditions/.ssh/id_rsa 99 | chmod 700 .ddev/homeadditions/.ssh 100 | chmod 600 .ddev/homeadditions/.ssh/id_rsa 101 | - name 'optional: set up host keys' 102 | run: | 103 | echo "${{ secrets.MY_KNOWN_HOSTS }}" > .ddev/homeadditions/.ssh/known_hosts 104 | - name: Setup DDEV 105 | uses: ddev/github-action-setup-ddev@v1 106 | ``` 107 | 108 | ## Contact 109 | 110 | For **bugs** and **feature requests** use the [GitHub bug tracker](https://github.com/ddev/github-action-setup-ddev/issues). 111 | 112 | Pull requests are very welcome. 113 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Setup DDEV in Github Workflows' 2 | description: | 3 | This action installs **DDEV** in your Github Workflow. 4 | author: 'Jonas Eberle and DDEV contributors' 5 | runs: 6 | using: 'node20' 7 | main: 'lib/main.js' 8 | branding: 9 | icon: cpu 10 | color: yellow 11 | inputs: 12 | ddevDir: 13 | description: 'ddev project directory' 14 | required: false 15 | default: '.' 16 | autostart: 17 | description: 'Start ddev automatically' 18 | required: false 19 | default: true 20 | version: 21 | description: 'Install a specific ddev version, such as 1.22.4' 22 | required: false 23 | default: 'latest' 24 | -------------------------------------------------------------------------------- /node_modules/.bin/uuid: -------------------------------------------------------------------------------- 1 | ../uuid/dist/bin/uuid -------------------------------------------------------------------------------- /node_modules/.package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "github-action-setup-ddev", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "node_modules/@actions/core": { 8 | "version": "1.10.0", 9 | "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", 10 | "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", 11 | "dependencies": { 12 | "@actions/http-client": "^2.0.1", 13 | "uuid": "^8.3.2" 14 | } 15 | }, 16 | "node_modules/@actions/http-client": { 17 | "version": "2.0.1", 18 | "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", 19 | "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", 20 | "license": "MIT", 21 | "dependencies": { 22 | "tunnel": "^0.0.6" 23 | } 24 | }, 25 | "node_modules/@types/node": { 26 | "version": "20.11.25", 27 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", 28 | "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", 29 | "dependencies": { 30 | "undici-types": "~5.26.4" 31 | } 32 | }, 33 | "node_modules/tunnel": { 34 | "version": "0.0.6", 35 | "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", 36 | "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", 37 | "license": "MIT", 38 | "engines": { 39 | "node": ">=0.6.11 <=0.7.0 || >=0.7.3" 40 | } 41 | }, 42 | "node_modules/undici-types": { 43 | "version": "5.26.5", 44 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", 45 | "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" 46 | }, 47 | "node_modules/uuid": { 48 | "version": "8.3.2", 49 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 50 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", 51 | "bin": { 52 | "uuid": "dist/bin/uuid" 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /node_modules/.yarn-integrity: -------------------------------------------------------------------------------- 1 | { 2 | "systemParams": "linux-x64-83", 3 | "modulesFolders": [ 4 | "node_modules" 5 | ], 6 | "flags": [], 7 | "linkedModules": [], 8 | "topLevelPatterns": [ 9 | "@actions/core@^1.2.6", 10 | "@types/node@^12.12.47" 11 | ], 12 | "lockfileEntries": { 13 | "@actions/core@^1.2.6": "https://registry.yarnpkg.com/@actions/core/-/core-1.9.0.tgz#20c1baac5d4bd2508ba1fc3e5f3fc4b8a80d4082", 14 | "@actions/http-client@^2.0.1": "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.0.1.tgz#873f4ca98fe32f6839462a6f046332677322f99c", 15 | "@types/node@^12.12.47": "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240", 16 | "tunnel@^0.0.6": "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" 17 | }, 18 | "files": [], 19 | "artifacts": {} 20 | } -------------------------------------------------------------------------------- /node_modules/@actions/core/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright 2019 GitHub 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/command.d.ts: -------------------------------------------------------------------------------- 1 | export interface CommandProperties { 2 | [key: string]: any; 3 | } 4 | /** 5 | * Commands 6 | * 7 | * Command Format: 8 | * ::name key=value,key=value::message 9 | * 10 | * Examples: 11 | * ::warning::This is the message 12 | * ::set-env name=MY_VAR::some value 13 | */ 14 | export declare function issueCommand(command: string, properties: CommandProperties, message: any): void; 15 | export declare function issue(name: string, message?: string): void; 16 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/command.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 5 | }) : (function(o, m, k, k2) { 6 | if (k2 === undefined) k2 = k; 7 | o[k2] = m[k]; 8 | })); 9 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 10 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 11 | }) : function(o, v) { 12 | o["default"] = v; 13 | }); 14 | var __importStar = (this && this.__importStar) || function (mod) { 15 | if (mod && mod.__esModule) return mod; 16 | var result = {}; 17 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 18 | __setModuleDefault(result, mod); 19 | return result; 20 | }; 21 | Object.defineProperty(exports, "__esModule", { value: true }); 22 | exports.issue = exports.issueCommand = void 0; 23 | const os = __importStar(require("os")); 24 | const utils_1 = require("./utils"); 25 | /** 26 | * Commands 27 | * 28 | * Command Format: 29 | * ::name key=value,key=value::message 30 | * 31 | * Examples: 32 | * ::warning::This is the message 33 | * ::set-env name=MY_VAR::some value 34 | */ 35 | function issueCommand(command, properties, message) { 36 | const cmd = new Command(command, properties, message); 37 | process.stdout.write(cmd.toString() + os.EOL); 38 | } 39 | exports.issueCommand = issueCommand; 40 | function issue(name, message = '') { 41 | issueCommand(name, {}, message); 42 | } 43 | exports.issue = issue; 44 | const CMD_STRING = '::'; 45 | class Command { 46 | constructor(command, properties, message) { 47 | if (!command) { 48 | command = 'missing.command'; 49 | } 50 | this.command = command; 51 | this.properties = properties; 52 | this.message = message; 53 | } 54 | toString() { 55 | let cmdStr = CMD_STRING + this.command; 56 | if (this.properties && Object.keys(this.properties).length > 0) { 57 | cmdStr += ' '; 58 | let first = true; 59 | for (const key in this.properties) { 60 | if (this.properties.hasOwnProperty(key)) { 61 | const val = this.properties[key]; 62 | if (val) { 63 | if (first) { 64 | first = false; 65 | } 66 | else { 67 | cmdStr += ','; 68 | } 69 | cmdStr += `${key}=${escapeProperty(val)}`; 70 | } 71 | } 72 | } 73 | } 74 | cmdStr += `${CMD_STRING}${escapeData(this.message)}`; 75 | return cmdStr; 76 | } 77 | } 78 | function escapeData(s) { 79 | return utils_1.toCommandValue(s) 80 | .replace(/%/g, '%25') 81 | .replace(/\r/g, '%0D') 82 | .replace(/\n/g, '%0A'); 83 | } 84 | function escapeProperty(s) { 85 | return utils_1.toCommandValue(s) 86 | .replace(/%/g, '%25') 87 | .replace(/\r/g, '%0D') 88 | .replace(/\n/g, '%0A') 89 | .replace(/:/g, '%3A') 90 | .replace(/,/g, '%2C'); 91 | } 92 | //# sourceMappingURL=command.js.map -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/command.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,mCAAsC;AAWtC;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAY;IAEZ,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AAC/C,CAAC;AAPD,oCAOC;AAED,SAAgB,KAAK,CAAC,IAAY,EAAE,OAAO,GAAG,EAAE;IAC9C,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACjC,CAAC;AAFD,sBAEC;AAED,MAAM,UAAU,GAAG,IAAI,CAAA;AAEvB,MAAM,OAAO;IAKX,YAAY,OAAe,EAAE,UAA6B,EAAE,OAAe;QACzE,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,iBAAiB,CAAA;SAC5B;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,QAAQ;QACN,IAAI,MAAM,GAAG,UAAU,GAAG,IAAI,CAAC,OAAO,CAAA;QAEtC,IAAI,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9D,MAAM,IAAI,GAAG,CAAA;YACb,IAAI,KAAK,GAAG,IAAI,CAAA;YAChB,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjC,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBACvC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;oBAChC,IAAI,GAAG,EAAE;wBACP,IAAI,KAAK,EAAE;4BACT,KAAK,GAAG,KAAK,CAAA;yBACd;6BAAM;4BACL,MAAM,IAAI,GAAG,CAAA;yBACd;wBAED,MAAM,IAAI,GAAG,GAAG,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE,CAAA;qBAC1C;iBACF;aACF;SACF;QAED,MAAM,IAAI,GAAG,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAA;QACpD,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,UAAU,CAAC,CAAM;IACxB,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AAC1B,CAAC;AAED,SAAS,cAAc,CAAC,CAAM;IAC5B,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"} -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/file-command.d.ts: -------------------------------------------------------------------------------- 1 | export declare function issueFileCommand(command: string, message: any): void; 2 | export declare function prepareKeyValueMessage(key: string, value: any): string; 3 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/file-command.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | // For internal use, subject to change. 3 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 4 | if (k2 === undefined) k2 = k; 5 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 6 | }) : (function(o, m, k, k2) { 7 | if (k2 === undefined) k2 = k; 8 | o[k2] = m[k]; 9 | })); 10 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 11 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 12 | }) : function(o, v) { 13 | o["default"] = v; 14 | }); 15 | var __importStar = (this && this.__importStar) || function (mod) { 16 | if (mod && mod.__esModule) return mod; 17 | var result = {}; 18 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 19 | __setModuleDefault(result, mod); 20 | return result; 21 | }; 22 | Object.defineProperty(exports, "__esModule", { value: true }); 23 | exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; 24 | // We use any as a valid input type 25 | /* eslint-disable @typescript-eslint/no-explicit-any */ 26 | const fs = __importStar(require("fs")); 27 | const os = __importStar(require("os")); 28 | const uuid_1 = require("uuid"); 29 | const utils_1 = require("./utils"); 30 | function issueFileCommand(command, message) { 31 | const filePath = process.env[`GITHUB_${command}`]; 32 | if (!filePath) { 33 | throw new Error(`Unable to find environment variable for file command ${command}`); 34 | } 35 | if (!fs.existsSync(filePath)) { 36 | throw new Error(`Missing file at path: ${filePath}`); 37 | } 38 | fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { 39 | encoding: 'utf8' 40 | }); 41 | } 42 | exports.issueFileCommand = issueFileCommand; 43 | function prepareKeyValueMessage(key, value) { 44 | const delimiter = `ghadelimiter_${uuid_1.v4()}`; 45 | const convertedValue = utils_1.toCommandValue(value); 46 | // These should realistically never happen, but just in case someone finds a 47 | // way to exploit uuid generation let's not allow keys or values that contain 48 | // the delimiter. 49 | if (key.includes(delimiter)) { 50 | throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); 51 | } 52 | if (convertedValue.includes(delimiter)) { 53 | throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); 54 | } 55 | return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; 56 | } 57 | exports.prepareKeyValueMessage = prepareKeyValueMessage; 58 | //# sourceMappingURL=file-command.js.map -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/file-command.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"file-command.js","sourceRoot":"","sources":["../src/file-command.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;;;;;;;;;;;;;;;;;;;;AAEvC,mCAAmC;AACnC,uDAAuD;AAEvD,uCAAwB;AACxB,uCAAwB;AACxB,+BAAiC;AACjC,mCAAsC;AAEtC,SAAgB,gBAAgB,CAAC,OAAe,EAAE,OAAY;IAC5D,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAA;IACjD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CACb,wDAAwD,OAAO,EAAE,CAClE,CAAA;KACF;IACD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAA;KACrD;IAED,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,GAAG,sBAAc,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE;QACjE,QAAQ,EAAE,MAAM;KACjB,CAAC,CAAA;AACJ,CAAC;AAdD,4CAcC;AAED,SAAgB,sBAAsB,CAAC,GAAW,EAAE,KAAU;IAC5D,MAAM,SAAS,GAAG,gBAAgB,SAAM,EAAE,EAAE,CAAA;IAC5C,MAAM,cAAc,GAAG,sBAAc,CAAC,KAAK,CAAC,CAAA;IAE5C,4EAA4E;IAC5E,6EAA6E;IAC7E,iBAAiB;IACjB,IAAI,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;QAC3B,MAAM,IAAI,KAAK,CACb,4DAA4D,SAAS,GAAG,CACzE,CAAA;KACF;IAED,IAAI,cAAc,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;QACtC,MAAM,IAAI,KAAK,CACb,6DAA6D,SAAS,GAAG,CAC1E,CAAA;KACF;IAED,OAAO,GAAG,GAAG,KAAK,SAAS,GAAG,EAAE,CAAC,GAAG,GAAG,cAAc,GAAG,EAAE,CAAC,GAAG,GAAG,SAAS,EAAE,CAAA;AAC9E,CAAC;AApBD,wDAoBC"} -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/oidc-utils.d.ts: -------------------------------------------------------------------------------- 1 | export declare class OidcClient { 2 | private static createHttpClient; 3 | private static getRequestToken; 4 | private static getIDTokenUrl; 5 | private static getCall; 6 | static getIDToken(audience?: string): Promise; 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/oidc-utils.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.OidcClient = void 0; 13 | const http_client_1 = require("@actions/http-client"); 14 | const auth_1 = require("@actions/http-client/lib/auth"); 15 | const core_1 = require("./core"); 16 | class OidcClient { 17 | static createHttpClient(allowRetry = true, maxRetry = 10) { 18 | const requestOptions = { 19 | allowRetries: allowRetry, 20 | maxRetries: maxRetry 21 | }; 22 | return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); 23 | } 24 | static getRequestToken() { 25 | const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; 26 | if (!token) { 27 | throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); 28 | } 29 | return token; 30 | } 31 | static getIDTokenUrl() { 32 | const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; 33 | if (!runtimeUrl) { 34 | throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); 35 | } 36 | return runtimeUrl; 37 | } 38 | static getCall(id_token_url) { 39 | var _a; 40 | return __awaiter(this, void 0, void 0, function* () { 41 | const httpclient = OidcClient.createHttpClient(); 42 | const res = yield httpclient 43 | .getJson(id_token_url) 44 | .catch(error => { 45 | throw new Error(`Failed to get ID Token. \n 46 | Error Code : ${error.statusCode}\n 47 | Error Message: ${error.result.message}`); 48 | }); 49 | const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; 50 | if (!id_token) { 51 | throw new Error('Response json body do not have ID Token field'); 52 | } 53 | return id_token; 54 | }); 55 | } 56 | static getIDToken(audience) { 57 | return __awaiter(this, void 0, void 0, function* () { 58 | try { 59 | // New ID Token is requested from action service 60 | let id_token_url = OidcClient.getIDTokenUrl(); 61 | if (audience) { 62 | const encodedAudience = encodeURIComponent(audience); 63 | id_token_url = `${id_token_url}&audience=${encodedAudience}`; 64 | } 65 | core_1.debug(`ID token url is ${id_token_url}`); 66 | const id_token = yield OidcClient.getCall(id_token_url); 67 | core_1.setSecret(id_token); 68 | return id_token; 69 | } 70 | catch (error) { 71 | throw new Error(`Error message: ${error.message}`); 72 | } 73 | }); 74 | } 75 | } 76 | exports.OidcClient = OidcClient; 77 | //# sourceMappingURL=oidc-utils.js.map -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/oidc-utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"oidc-utils.js","sourceRoot":"","sources":["../src/oidc-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,sDAA+C;AAC/C,wDAAqE;AACrE,iCAAuC;AAKvC,MAAa,UAAU;IACb,MAAM,CAAC,gBAAgB,CAC7B,UAAU,GAAG,IAAI,EACjB,QAAQ,GAAG,EAAE;QAEb,MAAM,cAAc,GAAmB;YACrC,YAAY,EAAE,UAAU;YACxB,UAAU,EAAE,QAAQ;SACrB,CAAA;QAED,OAAO,IAAI,wBAAU,CACnB,qBAAqB,EACrB,CAAC,IAAI,8BAAuB,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC,EAC3D,cAAc,CACf,CAAA;IACH,CAAC;IAEO,MAAM,CAAC,eAAe;QAC5B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAA;QAC3D,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,IAAI,KAAK,CACb,2DAA2D,CAC5D,CAAA;SACF;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAEO,MAAM,CAAC,aAAa;QAC1B,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAA;QAC9D,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAA;SAC3E;QACD,OAAO,UAAU,CAAA;IACnB,CAAC;IAEO,MAAM,CAAO,OAAO,CAAC,YAAoB;;;YAC/C,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAA;YAEhD,MAAM,GAAG,GAAG,MAAM,UAAU;iBACzB,OAAO,CAAgB,YAAY,CAAC;iBACpC,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,MAAM,IAAI,KAAK,CACb;uBACa,KAAK,CAAC,UAAU;yBACd,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CACtC,CAAA;YACH,CAAC,CAAC,CAAA;YAEJ,MAAM,QAAQ,SAAG,GAAG,CAAC,MAAM,0CAAE,KAAK,CAAA;YAClC,IAAI,CAAC,QAAQ,EAAE;gBACb,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;aACjE;YACD,OAAO,QAAQ,CAAA;;KAChB;IAED,MAAM,CAAO,UAAU,CAAC,QAAiB;;YACvC,IAAI;gBACF,gDAAgD;gBAChD,IAAI,YAAY,GAAW,UAAU,CAAC,aAAa,EAAE,CAAA;gBACrD,IAAI,QAAQ,EAAE;oBACZ,MAAM,eAAe,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAA;oBACpD,YAAY,GAAG,GAAG,YAAY,aAAa,eAAe,EAAE,CAAA;iBAC7D;gBAED,YAAK,CAAC,mBAAmB,YAAY,EAAE,CAAC,CAAA;gBAExC,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;gBACvD,gBAAS,CAAC,QAAQ,CAAC,CAAA;gBACnB,OAAO,QAAQ,CAAA;aAChB;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,IAAI,KAAK,CAAC,kBAAkB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;aACnD;QACH,CAAC;KAAA;CACF;AAzED,gCAyEC"} -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/path-utils.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * toPosixPath converts the given path to the posix form. On Windows, \\ will be 3 | * replaced with /. 4 | * 5 | * @param pth. Path to transform. 6 | * @return string Posix path. 7 | */ 8 | export declare function toPosixPath(pth: string): string; 9 | /** 10 | * toWin32Path converts the given path to the win32 form. On Linux, / will be 11 | * replaced with \\. 12 | * 13 | * @param pth. Path to transform. 14 | * @return string Win32 path. 15 | */ 16 | export declare function toWin32Path(pth: string): string; 17 | /** 18 | * toPlatformPath converts the given path to a platform-specific path. It does 19 | * this by replacing instances of / and \ with the platform-specific path 20 | * separator. 21 | * 22 | * @param pth The path to platformize. 23 | * @return string The platform-specific path. 24 | */ 25 | export declare function toPlatformPath(pth: string): string; 26 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/path-utils.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 5 | }) : (function(o, m, k, k2) { 6 | if (k2 === undefined) k2 = k; 7 | o[k2] = m[k]; 8 | })); 9 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 10 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 11 | }) : function(o, v) { 12 | o["default"] = v; 13 | }); 14 | var __importStar = (this && this.__importStar) || function (mod) { 15 | if (mod && mod.__esModule) return mod; 16 | var result = {}; 17 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 18 | __setModuleDefault(result, mod); 19 | return result; 20 | }; 21 | Object.defineProperty(exports, "__esModule", { value: true }); 22 | exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; 23 | const path = __importStar(require("path")); 24 | /** 25 | * toPosixPath converts the given path to the posix form. On Windows, \\ will be 26 | * replaced with /. 27 | * 28 | * @param pth. Path to transform. 29 | * @return string Posix path. 30 | */ 31 | function toPosixPath(pth) { 32 | return pth.replace(/[\\]/g, '/'); 33 | } 34 | exports.toPosixPath = toPosixPath; 35 | /** 36 | * toWin32Path converts the given path to the win32 form. On Linux, / will be 37 | * replaced with \\. 38 | * 39 | * @param pth. Path to transform. 40 | * @return string Win32 path. 41 | */ 42 | function toWin32Path(pth) { 43 | return pth.replace(/[/]/g, '\\'); 44 | } 45 | exports.toWin32Path = toWin32Path; 46 | /** 47 | * toPlatformPath converts the given path to a platform-specific path. It does 48 | * this by replacing instances of / and \ with the platform-specific path 49 | * separator. 50 | * 51 | * @param pth The path to platformize. 52 | * @return string The platform-specific path. 53 | */ 54 | function toPlatformPath(pth) { 55 | return pth.replace(/[/\\]/g, path.sep); 56 | } 57 | exports.toPlatformPath = toPlatformPath; 58 | //# sourceMappingURL=path-utils.js.map -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/path-utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"path-utils.js","sourceRoot":"","sources":["../src/path-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAE5B;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,GAAW;IACrC,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;AAClC,CAAC;AAFD,kCAEC;AAED;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,GAAW;IACrC,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;AAClC,CAAC;AAFD,kCAEC;AAED;;;;;;;GAOG;AACH,SAAgB,cAAc,CAAC,GAAW;IACxC,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;AACxC,CAAC;AAFD,wCAEC"} -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/utils.d.ts: -------------------------------------------------------------------------------- 1 | import { AnnotationProperties } from './core'; 2 | import { CommandProperties } from './command'; 3 | /** 4 | * Sanitizes an input into a string so it can be passed into issueCommand safely 5 | * @param input input to sanitize into a string 6 | */ 7 | export declare function toCommandValue(input: any): string; 8 | /** 9 | * 10 | * @param annotationProperties 11 | * @returns The command properties to send with the actual annotation command 12 | * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 13 | */ 14 | export declare function toCommandProperties(annotationProperties: AnnotationProperties): CommandProperties; 15 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/utils.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | // We use any as a valid input type 3 | /* eslint-disable @typescript-eslint/no-explicit-any */ 4 | Object.defineProperty(exports, "__esModule", { value: true }); 5 | exports.toCommandProperties = exports.toCommandValue = void 0; 6 | /** 7 | * Sanitizes an input into a string so it can be passed into issueCommand safely 8 | * @param input input to sanitize into a string 9 | */ 10 | function toCommandValue(input) { 11 | if (input === null || input === undefined) { 12 | return ''; 13 | } 14 | else if (typeof input === 'string' || input instanceof String) { 15 | return input; 16 | } 17 | return JSON.stringify(input); 18 | } 19 | exports.toCommandValue = toCommandValue; 20 | /** 21 | * 22 | * @param annotationProperties 23 | * @returns The command properties to send with the actual annotation command 24 | * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 25 | */ 26 | function toCommandProperties(annotationProperties) { 27 | if (!Object.keys(annotationProperties).length) { 28 | return {}; 29 | } 30 | return { 31 | title: annotationProperties.title, 32 | file: annotationProperties.file, 33 | line: annotationProperties.startLine, 34 | endLine: annotationProperties.endLine, 35 | col: annotationProperties.startColumn, 36 | endColumn: annotationProperties.endColumn 37 | }; 38 | } 39 | exports.toCommandProperties = toCommandProperties; 40 | //# sourceMappingURL=utils.js.map -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA,mCAAmC;AACnC,uDAAuD;;;AAKvD;;;GAGG;AACH,SAAgB,cAAc,CAAC,KAAU;IACvC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;QACzC,OAAO,EAAE,CAAA;KACV;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,MAAM,EAAE;QAC/D,OAAO,KAAe,CAAA;KACvB;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AAC9B,CAAC;AAPD,wCAOC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,oBAA0C;IAE1C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,MAAM,EAAE;QAC7C,OAAO,EAAE,CAAA;KACV;IAED,OAAO;QACL,KAAK,EAAE,oBAAoB,CAAC,KAAK;QACjC,IAAI,EAAE,oBAAoB,CAAC,IAAI;QAC/B,IAAI,EAAE,oBAAoB,CAAC,SAAS;QACpC,OAAO,EAAE,oBAAoB,CAAC,OAAO;QACrC,GAAG,EAAE,oBAAoB,CAAC,WAAW;QACrC,SAAS,EAAE,oBAAoB,CAAC,SAAS;KAC1C,CAAA;AACH,CAAC;AAfD,kDAeC"} -------------------------------------------------------------------------------- /node_modules/@actions/core/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@actions/core", 3 | "version": "1.10.0", 4 | "description": "Actions core lib", 5 | "keywords": [ 6 | "github", 7 | "actions", 8 | "core" 9 | ], 10 | "homepage": "https://github.com/actions/toolkit/tree/main/packages/core", 11 | "license": "MIT", 12 | "main": "lib/core.js", 13 | "types": "lib/core.d.ts", 14 | "directories": { 15 | "lib": "lib", 16 | "test": "__tests__" 17 | }, 18 | "files": [ 19 | "lib", 20 | "!.DS_Store" 21 | ], 22 | "publishConfig": { 23 | "access": "public" 24 | }, 25 | "repository": { 26 | "type": "git", 27 | "url": "git+https://github.com/actions/toolkit.git", 28 | "directory": "packages/core" 29 | }, 30 | "scripts": { 31 | "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", 32 | "test": "echo \"Error: run tests from root\" && exit 1", 33 | "tsc": "tsc" 34 | }, 35 | "bugs": { 36 | "url": "https://github.com/actions/toolkit/issues" 37 | }, 38 | "dependencies": { 39 | "@actions/http-client": "^2.0.1", 40 | "uuid": "^8.3.2" 41 | }, 42 | "devDependencies": { 43 | "@types/node": "^12.0.2", 44 | "@types/uuid": "^8.3.4" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/LICENSE: -------------------------------------------------------------------------------- 1 | Actions Http Client for Node.js 2 | 3 | Copyright (c) GitHub, Inc. 4 | 5 | All rights reserved. 6 | 7 | MIT License 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 10 | associated documentation files (the "Software"), to deal in the Software without restriction, 11 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 13 | subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 18 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 19 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/README.md: -------------------------------------------------------------------------------- 1 | # `@actions/http-client` 2 | 3 | A lightweight HTTP client optimized for building actions. 4 | 5 | ## Features 6 | 7 | - HTTP client with TypeScript generics and async/await/Promises 8 | - Typings included! 9 | - [Proxy support](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners#using-a-proxy-server-with-self-hosted-runners) just works with actions and the runner 10 | - Targets ES2019 (runner runs actions with node 12+). Only supported on node 12+. 11 | - Basic, Bearer and PAT Support out of the box. Extensible handlers for others. 12 | - Redirects supported 13 | 14 | Features and releases [here](./RELEASES.md) 15 | 16 | ## Install 17 | 18 | ``` 19 | npm install @actions/http-client --save 20 | ``` 21 | 22 | ## Samples 23 | 24 | See the [tests](./__tests__) for detailed examples. 25 | 26 | ## Errors 27 | 28 | ### HTTP 29 | 30 | The HTTP client does not throw unless truly exceptional. 31 | 32 | * A request that successfully executes resulting in a 404, 500 etc... will return a response object with a status code and a body. 33 | * Redirects (3xx) will be followed by default. 34 | 35 | See the [tests](./__tests__) for detailed examples. 36 | 37 | ## Debugging 38 | 39 | To enable detailed console logging of all HTTP requests and responses, set the NODE_DEBUG environment varible: 40 | 41 | ```shell 42 | export NODE_DEBUG=http 43 | ``` 44 | 45 | ## Node support 46 | 47 | The http-client is built using the latest LTS version of Node 12. It may work on previous node LTS versions but it's tested and officially supported on Node12+. 48 | 49 | ## Support and Versioning 50 | 51 | We follow semver and will hold compatibility between major versions and increment the minor version with new features and capabilities (while holding compat). 52 | 53 | ## Contributing 54 | 55 | We welcome PRs. Please create an issue and if applicable, a design before proceeding with code. 56 | 57 | once: 58 | 59 | ``` 60 | npm install 61 | ``` 62 | 63 | To build: 64 | 65 | ``` 66 | npm run build 67 | ``` 68 | 69 | To run all tests: 70 | 71 | ``` 72 | npm test 73 | ``` 74 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/lib/auth.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as http from 'http'; 3 | import * as ifm from './interfaces'; 4 | import { HttpClientResponse } from './index'; 5 | export declare class BasicCredentialHandler implements ifm.RequestHandler { 6 | username: string; 7 | password: string; 8 | constructor(username: string, password: string); 9 | prepareRequest(options: http.RequestOptions): void; 10 | canHandleAuthentication(): boolean; 11 | handleAuthentication(): Promise; 12 | } 13 | export declare class BearerCredentialHandler implements ifm.RequestHandler { 14 | token: string; 15 | constructor(token: string); 16 | prepareRequest(options: http.RequestOptions): void; 17 | canHandleAuthentication(): boolean; 18 | handleAuthentication(): Promise; 19 | } 20 | export declare class PersonalAccessTokenCredentialHandler implements ifm.RequestHandler { 21 | token: string; 22 | constructor(token: string); 23 | prepareRequest(options: http.RequestOptions): void; 24 | canHandleAuthentication(): boolean; 25 | handleAuthentication(): Promise; 26 | } 27 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/lib/auth.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; 13 | class BasicCredentialHandler { 14 | constructor(username, password) { 15 | this.username = username; 16 | this.password = password; 17 | } 18 | prepareRequest(options) { 19 | if (!options.headers) { 20 | throw Error('The request has no headers'); 21 | } 22 | options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; 23 | } 24 | // This handler cannot handle 401 25 | canHandleAuthentication() { 26 | return false; 27 | } 28 | handleAuthentication() { 29 | return __awaiter(this, void 0, void 0, function* () { 30 | throw new Error('not implemented'); 31 | }); 32 | } 33 | } 34 | exports.BasicCredentialHandler = BasicCredentialHandler; 35 | class BearerCredentialHandler { 36 | constructor(token) { 37 | this.token = token; 38 | } 39 | // currently implements pre-authorization 40 | // TODO: support preAuth = false where it hooks on 401 41 | prepareRequest(options) { 42 | if (!options.headers) { 43 | throw Error('The request has no headers'); 44 | } 45 | options.headers['Authorization'] = `Bearer ${this.token}`; 46 | } 47 | // This handler cannot handle 401 48 | canHandleAuthentication() { 49 | return false; 50 | } 51 | handleAuthentication() { 52 | return __awaiter(this, void 0, void 0, function* () { 53 | throw new Error('not implemented'); 54 | }); 55 | } 56 | } 57 | exports.BearerCredentialHandler = BearerCredentialHandler; 58 | class PersonalAccessTokenCredentialHandler { 59 | constructor(token) { 60 | this.token = token; 61 | } 62 | // currently implements pre-authorization 63 | // TODO: support preAuth = false where it hooks on 401 64 | prepareRequest(options) { 65 | if (!options.headers) { 66 | throw Error('The request has no headers'); 67 | } 68 | options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; 69 | } 70 | // This handler cannot handle 401 71 | canHandleAuthentication() { 72 | return false; 73 | } 74 | handleAuthentication() { 75 | return __awaiter(this, void 0, void 0, function* () { 76 | throw new Error('not implemented'); 77 | }); 78 | } 79 | } 80 | exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; 81 | //# sourceMappingURL=auth.js.map -------------------------------------------------------------------------------- /node_modules/@actions/http-client/lib/auth.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,MAAa,sBAAsB;IAIjC,YAAY,QAAgB,EAAE,QAAgB;QAC5C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAED,cAAc,CAAC,OAA4B;QACzC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACpB,MAAM,KAAK,CAAC,4BAA4B,CAAC,CAAA;SAC1C;QACD,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,SAAS,MAAM,CAAC,IAAI,CACrD,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,EAAE,CACpC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAA;IACxB,CAAC;IAED,iCAAiC;IACjC,uBAAuB;QACrB,OAAO,KAAK,CAAA;IACd,CAAC;IAEK,oBAAoB;;YACxB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;QACpC,CAAC;KAAA;CACF;AA1BD,wDA0BC;AAED,MAAa,uBAAuB;IAGlC,YAAY,KAAa;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IAED,yCAAyC;IACzC,sDAAsD;IACtD,cAAc,CAAC,OAA4B;QACzC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACpB,MAAM,KAAK,CAAC,4BAA4B,CAAC,CAAA;SAC1C;QACD,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,IAAI,CAAC,KAAK,EAAE,CAAA;IAC3D,CAAC;IAED,iCAAiC;IACjC,uBAAuB;QACrB,OAAO,KAAK,CAAA;IACd,CAAC;IAEK,oBAAoB;;YACxB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;QACpC,CAAC;KAAA;CACF;AAxBD,0DAwBC;AAED,MAAa,oCAAoC;IAI/C,YAAY,KAAa;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IAED,yCAAyC;IACzC,sDAAsD;IACtD,cAAc,CAAC,OAA4B;QACzC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACpB,MAAM,KAAK,CAAC,4BAA4B,CAAC,CAAA;SAC1C;QACD,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,SAAS,MAAM,CAAC,IAAI,CACrD,OAAO,IAAI,CAAC,KAAK,EAAE,CACpB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAA;IACxB,CAAC;IAED,iCAAiC;IACjC,uBAAuB;QACrB,OAAO,KAAK,CAAA;IACd,CAAC;IAEK,oBAAoB;;YACxB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;QACpC,CAAC;KAAA;CACF;AA3BD,oFA2BC"} -------------------------------------------------------------------------------- /node_modules/@actions/http-client/lib/interfaces.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as http from 'http'; 3 | import * as https from 'https'; 4 | import { HttpClientResponse } from './index'; 5 | export interface HttpClient { 6 | options(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; 7 | get(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; 8 | del(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; 9 | post(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; 10 | patch(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; 11 | put(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; 12 | sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: http.OutgoingHttpHeaders): Promise; 13 | request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: http.OutgoingHttpHeaders): Promise; 14 | requestRaw(info: RequestInfo, data: string | NodeJS.ReadableStream): Promise; 15 | requestRawWithCallback(info: RequestInfo, data: string | NodeJS.ReadableStream, onResult: (err?: Error, res?: HttpClientResponse) => void): void; 16 | } 17 | export interface RequestHandler { 18 | prepareRequest(options: http.RequestOptions): void; 19 | canHandleAuthentication(response: HttpClientResponse): boolean; 20 | handleAuthentication(httpClient: HttpClient, requestInfo: RequestInfo, data: string | NodeJS.ReadableStream | null): Promise; 21 | } 22 | export interface RequestInfo { 23 | options: http.RequestOptions; 24 | parsedUrl: URL; 25 | httpModule: typeof http | typeof https; 26 | } 27 | export interface RequestOptions { 28 | headers?: http.OutgoingHttpHeaders; 29 | socketTimeout?: number; 30 | ignoreSslError?: boolean; 31 | allowRedirects?: boolean; 32 | allowRedirectDowngrade?: boolean; 33 | maxRedirects?: number; 34 | maxSockets?: number; 35 | keepAlive?: boolean; 36 | deserializeDates?: boolean; 37 | allowRetries?: boolean; 38 | maxRetries?: number; 39 | } 40 | export interface TypedResponse { 41 | statusCode: number; 42 | result: T | null; 43 | headers: http.IncomingHttpHeaders; 44 | } 45 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/lib/interfaces.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | //# sourceMappingURL=interfaces.js.map -------------------------------------------------------------------------------- /node_modules/@actions/http-client/lib/interfaces.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /node_modules/@actions/http-client/lib/proxy.d.ts: -------------------------------------------------------------------------------- 1 | export declare function getProxyUrl(reqUrl: URL): URL | undefined; 2 | export declare function checkBypass(reqUrl: URL): boolean; 3 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/lib/proxy.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.checkBypass = exports.getProxyUrl = void 0; 4 | function getProxyUrl(reqUrl) { 5 | const usingSsl = reqUrl.protocol === 'https:'; 6 | if (checkBypass(reqUrl)) { 7 | return undefined; 8 | } 9 | const proxyVar = (() => { 10 | if (usingSsl) { 11 | return process.env['https_proxy'] || process.env['HTTPS_PROXY']; 12 | } 13 | else { 14 | return process.env['http_proxy'] || process.env['HTTP_PROXY']; 15 | } 16 | })(); 17 | if (proxyVar) { 18 | return new URL(proxyVar); 19 | } 20 | else { 21 | return undefined; 22 | } 23 | } 24 | exports.getProxyUrl = getProxyUrl; 25 | function checkBypass(reqUrl) { 26 | if (!reqUrl.hostname) { 27 | return false; 28 | } 29 | const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; 30 | if (!noProxy) { 31 | return false; 32 | } 33 | // Determine the request port 34 | let reqPort; 35 | if (reqUrl.port) { 36 | reqPort = Number(reqUrl.port); 37 | } 38 | else if (reqUrl.protocol === 'http:') { 39 | reqPort = 80; 40 | } 41 | else if (reqUrl.protocol === 'https:') { 42 | reqPort = 443; 43 | } 44 | // Format the request hostname and hostname with port 45 | const upperReqHosts = [reqUrl.hostname.toUpperCase()]; 46 | if (typeof reqPort === 'number') { 47 | upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); 48 | } 49 | // Compare request host against noproxy 50 | for (const upperNoProxyItem of noProxy 51 | .split(',') 52 | .map(x => x.trim().toUpperCase()) 53 | .filter(x => x)) { 54 | if (upperReqHosts.some(x => x === upperNoProxyItem)) { 55 | return true; 56 | } 57 | } 58 | return false; 59 | } 60 | exports.checkBypass = checkBypass; 61 | //# sourceMappingURL=proxy.js.map -------------------------------------------------------------------------------- /node_modules/@actions/http-client/lib/proxy.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"proxy.js","sourceRoot":"","sources":["../src/proxy.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAC,MAAW;IACrC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAA;IAE7C,IAAI,WAAW,CAAC,MAAM,CAAC,EAAE;QACvB,OAAO,SAAS,CAAA;KACjB;IAED,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE;QACrB,IAAI,QAAQ,EAAE;YACZ,OAAO,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;SAChE;aAAM;YACL,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;SAC9D;IACH,CAAC,CAAC,EAAE,CAAA;IAEJ,IAAI,QAAQ,EAAE;QACZ,OAAO,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAA;KACzB;SAAM;QACL,OAAO,SAAS,CAAA;KACjB;AACH,CAAC;AApBD,kCAoBC;AAED,SAAgB,WAAW,CAAC,MAAW;IACrC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QACpB,OAAO,KAAK,CAAA;KACb;IAED,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,CAAA;IACxE,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,KAAK,CAAA;KACb;IAED,6BAA6B;IAC7B,IAAI,OAA2B,CAAA;IAC/B,IAAI,MAAM,CAAC,IAAI,EAAE;QACf,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;KAC9B;SAAM,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,EAAE;QACtC,OAAO,GAAG,EAAE,CAAA;KACb;SAAM,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE;QACvC,OAAO,GAAG,GAAG,CAAA;KACd;IAED,qDAAqD;IACrD,MAAM,aAAa,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAA;IACrD,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,aAAa,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC,CAAA;KACrD;IAED,uCAAuC;IACvC,KAAK,MAAM,gBAAgB,IAAI,OAAO;SACnC,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;SAChC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;QACjB,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,gBAAgB,CAAC,EAAE;YACnD,OAAO,IAAI,CAAA;SACZ;KACF;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AArCD,kCAqCC"} -------------------------------------------------------------------------------- /node_modules/@actions/http-client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@actions/http-client", 3 | "version": "2.0.1", 4 | "description": "Actions Http Client", 5 | "keywords": [ 6 | "github", 7 | "actions", 8 | "http" 9 | ], 10 | "homepage": "https://github.com/actions/toolkit/tree/main/packages/http-client", 11 | "license": "MIT", 12 | "main": "lib/index.js", 13 | "types": "lib/index.d.ts", 14 | "directories": { 15 | "lib": "lib", 16 | "test": "__tests__" 17 | }, 18 | "files": [ 19 | "lib", 20 | "!.DS_Store" 21 | ], 22 | "publishConfig": { 23 | "access": "public" 24 | }, 25 | "repository": { 26 | "type": "git", 27 | "url": "git+https://github.com/actions/toolkit.git", 28 | "directory": "packages/http-client" 29 | }, 30 | "scripts": { 31 | "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", 32 | "test": "echo \"Error: run tests from root\" && exit 1", 33 | "build": "tsc", 34 | "format": "prettier --write **/*.ts", 35 | "format-check": "prettier --check **/*.ts", 36 | "tsc": "tsc" 37 | }, 38 | "bugs": { 39 | "url": "https://github.com/actions/toolkit/issues" 40 | }, 41 | "devDependencies": { 42 | "@types/tunnel": "0.0.3", 43 | "proxy": "^1.0.1" 44 | }, 45 | "dependencies": { 46 | "tunnel": "^0.0.6" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /node_modules/@types/node/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /node_modules/@types/node/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | > `npm install --save @types/node` 3 | 4 | # Summary 5 | This package contains type definitions for node (https://nodejs.org/). 6 | 7 | # Details 8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. 9 | 10 | ### Additional Details 11 | * Last updated: Wed, 06 Mar 2024 17:07:21 GMT 12 | * Dependencies: [undici-types](https://npmjs.com/package/undici-types) 13 | 14 | # Credits 15 | These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky). 16 | -------------------------------------------------------------------------------- /node_modules/@types/node/assert/strict.d.ts: -------------------------------------------------------------------------------- 1 | declare module "assert/strict" { 2 | import { strict } from "node:assert"; 3 | export = strict; 4 | } 5 | declare module "node:assert/strict" { 6 | import { strict } from "node:assert"; 7 | export = strict; 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/@types/node/constants.d.ts: -------------------------------------------------------------------------------- 1 | /** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */ 2 | declare module "constants" { 3 | import { constants as osConstants, SignalConstants } from "node:os"; 4 | import { constants as cryptoConstants } from "node:crypto"; 5 | import { constants as fsConstants } from "node:fs"; 6 | 7 | const exp: 8 | & typeof osConstants.errno 9 | & typeof osConstants.priority 10 | & SignalConstants 11 | & typeof cryptoConstants 12 | & typeof fsConstants; 13 | export = exp; 14 | } 15 | 16 | declare module "node:constants" { 17 | import constants = require("constants"); 18 | export = constants; 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/@types/node/globals.global.d.ts: -------------------------------------------------------------------------------- 1 | declare var global: typeof globalThis; 2 | -------------------------------------------------------------------------------- /node_modules/@types/node/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * License for programmatically and manually incorporated 3 | * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc 4 | * 5 | * Copyright Node.js contributors. All rights reserved. 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 22 | * IN THE SOFTWARE. 23 | */ 24 | 25 | // NOTE: These definitions support NodeJS and TypeScript 4.9+. 26 | 27 | // Reference required types from the default lib: 28 | /// 29 | /// 30 | /// 31 | /// 32 | 33 | // Base definitions for all NodeJS modules that are not specific to any version of TypeScript: 34 | /// 35 | /// 36 | /// 37 | /// 38 | /// 39 | /// 40 | /// 41 | /// 42 | /// 43 | /// 44 | /// 45 | /// 46 | /// 47 | /// 48 | /// 49 | /// 50 | /// 51 | /// 52 | /// 53 | /// 54 | /// 55 | /// 56 | /// 57 | /// 58 | /// 59 | /// 60 | /// 61 | /// 62 | /// 63 | /// 64 | /// 65 | /// 66 | /// 67 | /// 68 | /// 69 | /// 70 | /// 71 | /// 72 | /// 73 | /// 74 | /// 75 | /// 76 | /// 77 | /// 78 | /// 79 | /// 80 | /// 81 | /// 82 | /// 83 | /// 84 | /// 85 | /// 86 | /// 87 | 88 | /// 89 | -------------------------------------------------------------------------------- /node_modules/@types/node/stream/consumers.d.ts: -------------------------------------------------------------------------------- 1 | declare module "stream/consumers" { 2 | import { Blob as NodeBlob } from "node:buffer"; 3 | import { Readable } from "node:stream"; 4 | function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 5 | function text(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 6 | function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 7 | function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 8 | function json(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 9 | } 10 | declare module "node:stream/consumers" { 11 | export * from "stream/consumers"; 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/@types/node/stream/promises.d.ts: -------------------------------------------------------------------------------- 1 | declare module "stream/promises" { 2 | import { 3 | FinishedOptions, 4 | PipelineDestination, 5 | PipelineOptions, 6 | PipelinePromise, 7 | PipelineSource, 8 | PipelineTransform, 9 | } from "node:stream"; 10 | function finished( 11 | stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, 12 | options?: FinishedOptions, 13 | ): Promise; 14 | function pipeline, B extends PipelineDestination>( 15 | source: A, 16 | destination: B, 17 | options?: PipelineOptions, 18 | ): PipelinePromise; 19 | function pipeline< 20 | A extends PipelineSource, 21 | T1 extends PipelineTransform, 22 | B extends PipelineDestination, 23 | >( 24 | source: A, 25 | transform1: T1, 26 | destination: B, 27 | options?: PipelineOptions, 28 | ): PipelinePromise; 29 | function pipeline< 30 | A extends PipelineSource, 31 | T1 extends PipelineTransform, 32 | T2 extends PipelineTransform, 33 | B extends PipelineDestination, 34 | >( 35 | source: A, 36 | transform1: T1, 37 | transform2: T2, 38 | destination: B, 39 | options?: PipelineOptions, 40 | ): PipelinePromise; 41 | function pipeline< 42 | A extends PipelineSource, 43 | T1 extends PipelineTransform, 44 | T2 extends PipelineTransform, 45 | T3 extends PipelineTransform, 46 | B extends PipelineDestination, 47 | >( 48 | source: A, 49 | transform1: T1, 50 | transform2: T2, 51 | transform3: T3, 52 | destination: B, 53 | options?: PipelineOptions, 54 | ): PipelinePromise; 55 | function pipeline< 56 | A extends PipelineSource, 57 | T1 extends PipelineTransform, 58 | T2 extends PipelineTransform, 59 | T3 extends PipelineTransform, 60 | T4 extends PipelineTransform, 61 | B extends PipelineDestination, 62 | >( 63 | source: A, 64 | transform1: T1, 65 | transform2: T2, 66 | transform3: T3, 67 | transform4: T4, 68 | destination: B, 69 | options?: PipelineOptions, 70 | ): PipelinePromise; 71 | function pipeline( 72 | streams: ReadonlyArray, 73 | options?: PipelineOptions, 74 | ): Promise; 75 | function pipeline( 76 | stream1: NodeJS.ReadableStream, 77 | stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, 78 | ...streams: Array 79 | ): Promise; 80 | } 81 | declare module "node:stream/promises" { 82 | export * from "stream/promises"; 83 | } 84 | -------------------------------------------------------------------------------- /node_modules/@types/node/string_decoder.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * The `node:string_decoder` module provides an API for decoding `Buffer` objects 3 | * into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 4 | * characters. It can be accessed using: 5 | * 6 | * ```js 7 | * const { StringDecoder } = require('node:string_decoder'); 8 | * ``` 9 | * 10 | * The following example shows the basic use of the `StringDecoder` class. 11 | * 12 | * ```js 13 | * const { StringDecoder } = require('node:string_decoder'); 14 | * const decoder = new StringDecoder('utf8'); 15 | * 16 | * const cent = Buffer.from([0xC2, 0xA2]); 17 | * console.log(decoder.write(cent)); // Prints: ¢ 18 | * 19 | * const euro = Buffer.from([0xE2, 0x82, 0xAC]); 20 | * console.log(decoder.write(euro)); // Prints: € 21 | * ``` 22 | * 23 | * When a `Buffer` instance is written to the `StringDecoder` instance, an 24 | * internal buffer is used to ensure that the decoded string does not contain 25 | * any incomplete multibyte characters. These are held in the buffer until the 26 | * next call to `stringDecoder.write()` or until `stringDecoder.end()` is called. 27 | * 28 | * In the following example, the three UTF-8 encoded bytes of the European Euro 29 | * symbol (`€`) are written over three separate operations: 30 | * 31 | * ```js 32 | * const { StringDecoder } = require('node:string_decoder'); 33 | * const decoder = new StringDecoder('utf8'); 34 | * 35 | * decoder.write(Buffer.from([0xE2])); 36 | * decoder.write(Buffer.from([0x82])); 37 | * console.log(decoder.end(Buffer.from([0xAC]))); // Prints: € 38 | * ``` 39 | * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/string_decoder.js) 40 | */ 41 | declare module "string_decoder" { 42 | class StringDecoder { 43 | constructor(encoding?: BufferEncoding); 44 | /** 45 | * Returns a decoded string, ensuring that any incomplete multibyte characters at 46 | * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the 47 | * returned string and stored in an internal buffer for the next call to`stringDecoder.write()` or `stringDecoder.end()`. 48 | * @since v0.1.99 49 | * @param buffer The bytes to decode. 50 | */ 51 | write(buffer: string | Buffer | NodeJS.ArrayBufferView): string; 52 | /** 53 | * Returns any remaining input stored in the internal buffer as a string. Bytes 54 | * representing incomplete UTF-8 and UTF-16 characters will be replaced with 55 | * substitution characters appropriate for the character encoding. 56 | * 57 | * If the `buffer` argument is provided, one final call to `stringDecoder.write()`is performed before returning the remaining input. 58 | * After `end()` is called, the `stringDecoder` object can be reused for new input. 59 | * @since v0.9.3 60 | * @param buffer The bytes to decode. 61 | */ 62 | end(buffer?: string | Buffer | NodeJS.ArrayBufferView): string; 63 | } 64 | } 65 | declare module "node:string_decoder" { 66 | export * from "string_decoder"; 67 | } 68 | -------------------------------------------------------------------------------- /node_modules/@types/node/timers/promises.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * The `timers/promises` API provides an alternative set of timer functions 3 | * that return `Promise` objects. The API is accessible via`require('node:timers/promises')`. 4 | * 5 | * ```js 6 | * import { 7 | * setTimeout, 8 | * setImmediate, 9 | * setInterval, 10 | * } from 'timers/promises'; 11 | * ``` 12 | * @since v15.0.0 13 | */ 14 | declare module "timers/promises" { 15 | import { TimerOptions } from "node:timers"; 16 | /** 17 | * ```js 18 | * import { 19 | * setTimeout, 20 | * } from 'timers/promises'; 21 | * 22 | * const res = await setTimeout(100, 'result'); 23 | * 24 | * console.log(res); // Prints 'result' 25 | * ``` 26 | * @since v15.0.0 27 | * @param [delay=1] The number of milliseconds to wait before fulfilling the promise. 28 | * @param value A value with which the promise is fulfilled. 29 | */ 30 | function setTimeout(delay?: number, value?: T, options?: TimerOptions): Promise; 31 | /** 32 | * ```js 33 | * import { 34 | * setImmediate, 35 | * } from 'timers/promises'; 36 | * 37 | * const res = await setImmediate('result'); 38 | * 39 | * console.log(res); // Prints 'result' 40 | * ``` 41 | * @since v15.0.0 42 | * @param value A value with which the promise is fulfilled. 43 | */ 44 | function setImmediate(value?: T, options?: TimerOptions): Promise; 45 | /** 46 | * Returns an async iterator that generates values in an interval of `delay` ms. 47 | * If `ref` is `true`, you need to call `next()` of async iterator explicitly 48 | * or implicitly to keep the event loop alive. 49 | * 50 | * ```js 51 | * import { 52 | * setInterval, 53 | * } from 'timers/promises'; 54 | * 55 | * const interval = 100; 56 | * for await (const startTime of setInterval(interval, Date.now())) { 57 | * const now = Date.now(); 58 | * console.log(now); 59 | * if ((now - startTime) > 1000) 60 | * break; 61 | * } 62 | * console.log(Date.now()); 63 | * ``` 64 | * @since v15.9.0 65 | */ 66 | function setInterval(delay?: number, value?: T, options?: TimerOptions): AsyncIterable; 67 | interface Scheduler { 68 | /** 69 | * ```js 70 | * import { scheduler } from 'node:timers/promises'; 71 | * 72 | * await scheduler.wait(1000); // Wait one second before continuing 73 | * ``` 74 | * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API. 75 | * Calling timersPromises.scheduler.wait(delay, options) is roughly equivalent to calling timersPromises.setTimeout(delay, undefined, options) except that the ref option is not supported. 76 | * @since v16.14.0 77 | * @experimental 78 | * @param [delay=1] The number of milliseconds to wait before fulfilling the promise. 79 | */ 80 | wait: (delay?: number, options?: TimerOptions) => Promise; 81 | /** 82 | * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API. 83 | * Calling timersPromises.scheduler.yield() is equivalent to calling timersPromises.setImmediate() with no arguments. 84 | * @since v16.14.0 85 | * @experimental 86 | */ 87 | yield: () => Promise; 88 | } 89 | const scheduler: Scheduler; 90 | } 91 | declare module "node:timers/promises" { 92 | export * from "timers/promises"; 93 | } 94 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts4.8/assert/strict.d.ts: -------------------------------------------------------------------------------- 1 | declare module "assert/strict" { 2 | import { strict } from "node:assert"; 3 | export = strict; 4 | } 5 | declare module "node:assert/strict" { 6 | import { strict } from "node:assert"; 7 | export = strict; 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts4.8/constants.d.ts: -------------------------------------------------------------------------------- 1 | /** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */ 2 | declare module "constants" { 3 | import { constants as osConstants, SignalConstants } from "node:os"; 4 | import { constants as cryptoConstants } from "node:crypto"; 5 | import { constants as fsConstants } from "node:fs"; 6 | 7 | const exp: 8 | & typeof osConstants.errno 9 | & typeof osConstants.priority 10 | & SignalConstants 11 | & typeof cryptoConstants 12 | & typeof fsConstants; 13 | export = exp; 14 | } 15 | 16 | declare module "node:constants" { 17 | import constants = require("constants"); 18 | export = constants; 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts4.8/globals.global.d.ts: -------------------------------------------------------------------------------- 1 | declare var global: typeof globalThis; 2 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts4.8/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * License for programmatically and manually incorporated 3 | * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc 4 | * 5 | * Copyright Node.js contributors. All rights reserved. 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to 8 | * deal in the Software without restriction, including without limitation the 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | * sell copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 22 | * IN THE SOFTWARE. 23 | */ 24 | 25 | // NOTE: These definitions support NodeJS and TypeScript 4.8 and earlier. 26 | 27 | // Reference required types from the default lib: 28 | /// 29 | /// 30 | /// 31 | /// 32 | 33 | // Base definitions for all NodeJS modules that are not specific to any version of TypeScript: 34 | /// 35 | /// 36 | /// 37 | /// 38 | /// 39 | /// 40 | /// 41 | /// 42 | /// 43 | /// 44 | /// 45 | /// 46 | /// 47 | /// 48 | /// 49 | /// 50 | /// 51 | /// 52 | /// 53 | /// 54 | /// 55 | /// 56 | /// 57 | /// 58 | /// 59 | /// 60 | /// 61 | /// 62 | /// 63 | /// 64 | /// 65 | /// 66 | /// 67 | /// 68 | /// 69 | /// 70 | /// 71 | /// 72 | /// 73 | /// 74 | /// 75 | /// 76 | /// 77 | /// 78 | /// 79 | /// 80 | /// 81 | /// 82 | /// 83 | /// 84 | /// 85 | /// 86 | /// 87 | 88 | /// 89 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts4.8/stream/consumers.d.ts: -------------------------------------------------------------------------------- 1 | declare module "stream/consumers" { 2 | import { Blob as NodeBlob } from "node:buffer"; 3 | import { Readable } from "node:stream"; 4 | function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 5 | function text(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 6 | function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 7 | function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 8 | function json(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; 9 | } 10 | declare module "node:stream/consumers" { 11 | export * from "stream/consumers"; 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts4.8/stream/promises.d.ts: -------------------------------------------------------------------------------- 1 | declare module "stream/promises" { 2 | import { 3 | FinishedOptions, 4 | PipelineDestination, 5 | PipelineOptions, 6 | PipelinePromise, 7 | PipelineSource, 8 | PipelineTransform, 9 | } from "node:stream"; 10 | function finished( 11 | stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, 12 | options?: FinishedOptions, 13 | ): Promise; 14 | function pipeline, B extends PipelineDestination>( 15 | source: A, 16 | destination: B, 17 | options?: PipelineOptions, 18 | ): PipelinePromise; 19 | function pipeline< 20 | A extends PipelineSource, 21 | T1 extends PipelineTransform, 22 | B extends PipelineDestination, 23 | >( 24 | source: A, 25 | transform1: T1, 26 | destination: B, 27 | options?: PipelineOptions, 28 | ): PipelinePromise; 29 | function pipeline< 30 | A extends PipelineSource, 31 | T1 extends PipelineTransform, 32 | T2 extends PipelineTransform, 33 | B extends PipelineDestination, 34 | >( 35 | source: A, 36 | transform1: T1, 37 | transform2: T2, 38 | destination: B, 39 | options?: PipelineOptions, 40 | ): PipelinePromise; 41 | function pipeline< 42 | A extends PipelineSource, 43 | T1 extends PipelineTransform, 44 | T2 extends PipelineTransform, 45 | T3 extends PipelineTransform, 46 | B extends PipelineDestination, 47 | >( 48 | source: A, 49 | transform1: T1, 50 | transform2: T2, 51 | transform3: T3, 52 | destination: B, 53 | options?: PipelineOptions, 54 | ): PipelinePromise; 55 | function pipeline< 56 | A extends PipelineSource, 57 | T1 extends PipelineTransform, 58 | T2 extends PipelineTransform, 59 | T3 extends PipelineTransform, 60 | T4 extends PipelineTransform, 61 | B extends PipelineDestination, 62 | >( 63 | source: A, 64 | transform1: T1, 65 | transform2: T2, 66 | transform3: T3, 67 | transform4: T4, 68 | destination: B, 69 | options?: PipelineOptions, 70 | ): PipelinePromise; 71 | function pipeline( 72 | streams: ReadonlyArray, 73 | options?: PipelineOptions, 74 | ): Promise; 75 | function pipeline( 76 | stream1: NodeJS.ReadableStream, 77 | stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, 78 | ...streams: Array 79 | ): Promise; 80 | } 81 | declare module "node:stream/promises" { 82 | export * from "stream/promises"; 83 | } 84 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts4.8/string_decoder.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * The `node:string_decoder` module provides an API for decoding `Buffer` objects 3 | * into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 4 | * characters. It can be accessed using: 5 | * 6 | * ```js 7 | * const { StringDecoder } = require('node:string_decoder'); 8 | * ``` 9 | * 10 | * The following example shows the basic use of the `StringDecoder` class. 11 | * 12 | * ```js 13 | * const { StringDecoder } = require('node:string_decoder'); 14 | * const decoder = new StringDecoder('utf8'); 15 | * 16 | * const cent = Buffer.from([0xC2, 0xA2]); 17 | * console.log(decoder.write(cent)); // Prints: ¢ 18 | * 19 | * const euro = Buffer.from([0xE2, 0x82, 0xAC]); 20 | * console.log(decoder.write(euro)); // Prints: € 21 | * ``` 22 | * 23 | * When a `Buffer` instance is written to the `StringDecoder` instance, an 24 | * internal buffer is used to ensure that the decoded string does not contain 25 | * any incomplete multibyte characters. These are held in the buffer until the 26 | * next call to `stringDecoder.write()` or until `stringDecoder.end()` is called. 27 | * 28 | * In the following example, the three UTF-8 encoded bytes of the European Euro 29 | * symbol (`€`) are written over three separate operations: 30 | * 31 | * ```js 32 | * const { StringDecoder } = require('node:string_decoder'); 33 | * const decoder = new StringDecoder('utf8'); 34 | * 35 | * decoder.write(Buffer.from([0xE2])); 36 | * decoder.write(Buffer.from([0x82])); 37 | * console.log(decoder.end(Buffer.from([0xAC]))); // Prints: € 38 | * ``` 39 | * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/string_decoder.js) 40 | */ 41 | declare module "string_decoder" { 42 | class StringDecoder { 43 | constructor(encoding?: BufferEncoding); 44 | /** 45 | * Returns a decoded string, ensuring that any incomplete multibyte characters at 46 | * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the 47 | * returned string and stored in an internal buffer for the next call to`stringDecoder.write()` or `stringDecoder.end()`. 48 | * @since v0.1.99 49 | * @param buffer The bytes to decode. 50 | */ 51 | write(buffer: string | Buffer | NodeJS.ArrayBufferView): string; 52 | /** 53 | * Returns any remaining input stored in the internal buffer as a string. Bytes 54 | * representing incomplete UTF-8 and UTF-16 characters will be replaced with 55 | * substitution characters appropriate for the character encoding. 56 | * 57 | * If the `buffer` argument is provided, one final call to `stringDecoder.write()`is performed before returning the remaining input. 58 | * After `end()` is called, the `stringDecoder` object can be reused for new input. 59 | * @since v0.9.3 60 | * @param buffer The bytes to decode. 61 | */ 62 | end(buffer?: string | Buffer | NodeJS.ArrayBufferView): string; 63 | } 64 | } 65 | declare module "node:string_decoder" { 66 | export * from "string_decoder"; 67 | } 68 | -------------------------------------------------------------------------------- /node_modules/@types/node/ts4.8/timers/promises.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * The `timers/promises` API provides an alternative set of timer functions 3 | * that return `Promise` objects. The API is accessible via`require('node:timers/promises')`. 4 | * 5 | * ```js 6 | * import { 7 | * setTimeout, 8 | * setImmediate, 9 | * setInterval, 10 | * } from 'timers/promises'; 11 | * ``` 12 | * @since v15.0.0 13 | */ 14 | declare module "timers/promises" { 15 | import { TimerOptions } from "node:timers"; 16 | /** 17 | * ```js 18 | * import { 19 | * setTimeout, 20 | * } from 'timers/promises'; 21 | * 22 | * const res = await setTimeout(100, 'result'); 23 | * 24 | * console.log(res); // Prints 'result' 25 | * ``` 26 | * @since v15.0.0 27 | * @param [delay=1] The number of milliseconds to wait before fulfilling the promise. 28 | * @param value A value with which the promise is fulfilled. 29 | */ 30 | function setTimeout(delay?: number, value?: T, options?: TimerOptions): Promise; 31 | /** 32 | * ```js 33 | * import { 34 | * setImmediate, 35 | * } from 'timers/promises'; 36 | * 37 | * const res = await setImmediate('result'); 38 | * 39 | * console.log(res); // Prints 'result' 40 | * ``` 41 | * @since v15.0.0 42 | * @param value A value with which the promise is fulfilled. 43 | */ 44 | function setImmediate(value?: T, options?: TimerOptions): Promise; 45 | /** 46 | * Returns an async iterator that generates values in an interval of `delay` ms. 47 | * If `ref` is `true`, you need to call `next()` of async iterator explicitly 48 | * or implicitly to keep the event loop alive. 49 | * 50 | * ```js 51 | * import { 52 | * setInterval, 53 | * } from 'timers/promises'; 54 | * 55 | * const interval = 100; 56 | * for await (const startTime of setInterval(interval, Date.now())) { 57 | * const now = Date.now(); 58 | * console.log(now); 59 | * if ((now - startTime) > 1000) 60 | * break; 61 | * } 62 | * console.log(Date.now()); 63 | * ``` 64 | * @since v15.9.0 65 | */ 66 | function setInterval(delay?: number, value?: T, options?: TimerOptions): AsyncIterable; 67 | interface Scheduler { 68 | /** 69 | * ```js 70 | * import { scheduler } from 'node:timers/promises'; 71 | * 72 | * await scheduler.wait(1000); // Wait one second before continuing 73 | * ``` 74 | * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API. 75 | * Calling timersPromises.scheduler.wait(delay, options) is roughly equivalent to calling timersPromises.setTimeout(delay, undefined, options) except that the ref option is not supported. 76 | * @since v16.14.0 77 | * @experimental 78 | * @param [delay=1] The number of milliseconds to wait before fulfilling the promise. 79 | */ 80 | wait: (delay?: number, options?: TimerOptions) => Promise; 81 | /** 82 | * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API. 83 | * Calling timersPromises.scheduler.yield() is equivalent to calling timersPromises.setImmediate() with no arguments. 84 | * @since v16.14.0 85 | * @experimental 86 | */ 87 | yield: () => Promise; 88 | } 89 | const scheduler: Scheduler; 90 | } 91 | declare module "node:timers/promises" { 92 | export * from "timers/promises"; 93 | } 94 | -------------------------------------------------------------------------------- /node_modules/tunnel/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /node_modules/tunnel/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /node_modules/tunnel/.idea/node-tunnel.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /node_modules/tunnel/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /node_modules/tunnel/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "4" 4 | - "6" 5 | - "8" 6 | - "10" 7 | -------------------------------------------------------------------------------- /node_modules/tunnel/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | - 0.0.6 (2018/09/11) 4 | - Fix `localAddress` not working (#25) 5 | - Fix `Host:` header for CONNECT method by @tmurakam (#29, #30) 6 | - Fix default port for https (#32) 7 | - Fix error handling when the proxy send illegal response body (#33) 8 | 9 | - 0.0.5 (2017/06/12) 10 | - Fix socket leak. 11 | 12 | - 0.0.4 (2016/01/23) 13 | - supported Node v0.12 or later. 14 | 15 | - 0.0.3 (2014/01/20) 16 | - fixed package.json 17 | 18 | - 0.0.1 (2012/02/18) 19 | - supported Node v0.6.x (0.6.11 or later). 20 | 21 | - 0.0.0 (2012/02/11) 22 | - first release. 23 | -------------------------------------------------------------------------------- /node_modules/tunnel/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012 Koichi Kobayashi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/tunnel/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/tunnel'); 2 | -------------------------------------------------------------------------------- /node_modules/tunnel/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tunnel", 3 | "version": "0.0.6", 4 | "description": "Node HTTP/HTTPS Agents for tunneling proxies", 5 | "keywords": [ 6 | "http", 7 | "https", 8 | "agent", 9 | "proxy", 10 | "tunnel" 11 | ], 12 | "homepage": "https://github.com/koichik/node-tunnel/", 13 | "bugs": "https://github.com/koichik/node-tunnel/issues", 14 | "license": "MIT", 15 | "author": "Koichi Kobayashi ", 16 | "main": "./index.js", 17 | "directories": { 18 | "lib": "./lib" 19 | }, 20 | "repository": { 21 | "type": "git", 22 | "url": "https://github.com/koichik/node-tunnel.git" 23 | }, 24 | "scripts": { 25 | "test": "mocha" 26 | }, 27 | "devDependencies": { 28 | "mocha": "^5.2.0", 29 | "should": "^13.2.3" 30 | }, 31 | "engines": { 32 | "node": ">=0.6.11 <=0.7.0 || >=0.7.3" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /node_modules/undici-types/README.md: -------------------------------------------------------------------------------- 1 | # undici-types 2 | 3 | This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version. 4 | 5 | - [GitHub nodejs/undici](https://github.com/nodejs/undici) 6 | - [Undici Documentation](https://undici.nodejs.org/#/) 7 | -------------------------------------------------------------------------------- /node_modules/undici-types/agent.d.ts: -------------------------------------------------------------------------------- 1 | import { URL } from 'url' 2 | import Pool from './pool' 3 | import Dispatcher from "./dispatcher"; 4 | 5 | export default Agent 6 | 7 | declare class Agent extends Dispatcher{ 8 | constructor(opts?: Agent.Options) 9 | /** `true` after `dispatcher.close()` has been called. */ 10 | closed: boolean; 11 | /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */ 12 | destroyed: boolean; 13 | /** Dispatches a request. */ 14 | dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean; 15 | } 16 | 17 | declare namespace Agent { 18 | export interface Options extends Pool.Options { 19 | /** Default: `(origin, opts) => new Pool(origin, opts)`. */ 20 | factory?(origin: string | URL, opts: Object): Dispatcher; 21 | /** Integer. Default: `0` */ 22 | maxRedirections?: number; 23 | 24 | interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options["interceptors"] 25 | } 26 | 27 | export interface DispatchOptions extends Dispatcher.DispatchOptions { 28 | /** Integer. */ 29 | maxRedirections?: number; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/undici-types/api.d.ts: -------------------------------------------------------------------------------- 1 | import { URL, UrlObject } from 'url' 2 | import { Duplex } from 'stream' 3 | import Dispatcher from './dispatcher' 4 | 5 | export { 6 | request, 7 | stream, 8 | pipeline, 9 | connect, 10 | upgrade, 11 | } 12 | 13 | /** Performs an HTTP request. */ 14 | declare function request( 15 | url: string | URL | UrlObject, 16 | options?: { dispatcher?: Dispatcher } & Omit & Partial>, 17 | ): Promise; 18 | 19 | /** A faster version of `request`. */ 20 | declare function stream( 21 | url: string | URL | UrlObject, 22 | options: { dispatcher?: Dispatcher } & Omit, 23 | factory: Dispatcher.StreamFactory 24 | ): Promise; 25 | 26 | /** For easy use with `stream.pipeline`. */ 27 | declare function pipeline( 28 | url: string | URL | UrlObject, 29 | options: { dispatcher?: Dispatcher } & Omit, 30 | handler: Dispatcher.PipelineHandler 31 | ): Duplex; 32 | 33 | /** Starts two-way communications with the requested resource. */ 34 | declare function connect( 35 | url: string | URL | UrlObject, 36 | options?: { dispatcher?: Dispatcher } & Omit 37 | ): Promise; 38 | 39 | /** Upgrade to a different protocol. */ 40 | declare function upgrade( 41 | url: string | URL | UrlObject, 42 | options?: { dispatcher?: Dispatcher } & Omit 43 | ): Promise; 44 | -------------------------------------------------------------------------------- /node_modules/undici-types/balanced-pool.d.ts: -------------------------------------------------------------------------------- 1 | import Pool from './pool' 2 | import Dispatcher from './dispatcher' 3 | import { URL } from 'url' 4 | 5 | export default BalancedPool 6 | 7 | declare class BalancedPool extends Dispatcher { 8 | constructor(url: string | string[] | URL | URL[], options?: Pool.Options); 9 | 10 | addUpstream(upstream: string | URL): BalancedPool; 11 | removeUpstream(upstream: string | URL): BalancedPool; 12 | upstreams: Array; 13 | 14 | /** `true` after `pool.close()` has been called. */ 15 | closed: boolean; 16 | /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ 17 | destroyed: boolean; 18 | } 19 | -------------------------------------------------------------------------------- /node_modules/undici-types/cache.d.ts: -------------------------------------------------------------------------------- 1 | import type { RequestInfo, Response, Request } from './fetch' 2 | 3 | export interface CacheStorage { 4 | match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise, 5 | has (cacheName: string): Promise, 6 | open (cacheName: string): Promise, 7 | delete (cacheName: string): Promise, 8 | keys (): Promise 9 | } 10 | 11 | declare const CacheStorage: { 12 | prototype: CacheStorage 13 | new(): CacheStorage 14 | } 15 | 16 | export interface Cache { 17 | match (request: RequestInfo, options?: CacheQueryOptions): Promise, 18 | matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise, 19 | add (request: RequestInfo): Promise, 20 | addAll (requests: RequestInfo[]): Promise, 21 | put (request: RequestInfo, response: Response): Promise, 22 | delete (request: RequestInfo, options?: CacheQueryOptions): Promise, 23 | keys (request?: RequestInfo, options?: CacheQueryOptions): Promise 24 | } 25 | 26 | export interface CacheQueryOptions { 27 | ignoreSearch?: boolean, 28 | ignoreMethod?: boolean, 29 | ignoreVary?: boolean 30 | } 31 | 32 | export interface MultiCacheQueryOptions extends CacheQueryOptions { 33 | cacheName?: string 34 | } 35 | 36 | export declare const caches: CacheStorage 37 | -------------------------------------------------------------------------------- /node_modules/undici-types/client.d.ts: -------------------------------------------------------------------------------- 1 | import { URL } from 'url' 2 | import { TlsOptions } from 'tls' 3 | import Dispatcher from './dispatcher' 4 | import buildConnector from "./connector"; 5 | 6 | /** 7 | * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default. 8 | */ 9 | export class Client extends Dispatcher { 10 | constructor(url: string | URL, options?: Client.Options); 11 | /** Property to get and set the pipelining factor. */ 12 | pipelining: number; 13 | /** `true` after `client.close()` has been called. */ 14 | closed: boolean; 15 | /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */ 16 | destroyed: boolean; 17 | } 18 | 19 | export declare namespace Client { 20 | export interface OptionsInterceptors { 21 | Client: readonly Dispatcher.DispatchInterceptor[]; 22 | } 23 | export interface Options { 24 | /** TODO */ 25 | interceptors?: OptionsInterceptors; 26 | /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */ 27 | maxHeaderSize?: number; 28 | /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */ 29 | headersTimeout?: number; 30 | /** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */ 31 | socketTimeout?: never; 32 | /** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */ 33 | requestTimeout?: never; 34 | /** TODO */ 35 | connectTimeout?: number; 36 | /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */ 37 | bodyTimeout?: number; 38 | /** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */ 39 | idleTimeout?: never; 40 | /** @deprecated unsupported keepAlive, use pipelining=0 instead */ 41 | keepAlive?: never; 42 | /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */ 43 | keepAliveTimeout?: number; 44 | /** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */ 45 | maxKeepAliveTimeout?: never; 46 | /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ 47 | keepAliveMaxTimeout?: number; 48 | /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */ 49 | keepAliveTimeoutThreshold?: number; 50 | /** TODO */ 51 | socketPath?: string; 52 | /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */ 53 | pipelining?: number; 54 | /** @deprecated use the connect option instead */ 55 | tls?: never; 56 | /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */ 57 | strictContentLength?: boolean; 58 | /** TODO */ 59 | maxCachedSessions?: number; 60 | /** TODO */ 61 | maxRedirections?: number; 62 | /** TODO */ 63 | connect?: buildConnector.BuildOptions | buildConnector.connector; 64 | /** TODO */ 65 | maxRequestsPerClient?: number; 66 | /** TODO */ 67 | localAddress?: string; 68 | /** Max response body size in bytes, -1 is disabled */ 69 | maxResponseSize?: number; 70 | /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */ 71 | autoSelectFamily?: boolean; 72 | /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */ 73 | autoSelectFamilyAttemptTimeout?: number; 74 | /** 75 | * @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation. 76 | * @default false 77 | */ 78 | allowH2?: boolean; 79 | /** 80 | * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overriden by a SETTINGS remote frame. 81 | * @default 100 82 | */ 83 | maxConcurrentStreams?: number 84 | } 85 | export interface SocketInfo { 86 | localAddress?: string 87 | localPort?: number 88 | remoteAddress?: string 89 | remotePort?: number 90 | remoteFamily?: string 91 | timeout?: number 92 | bytesWritten?: number 93 | bytesRead?: number 94 | } 95 | } 96 | 97 | export default Client; 98 | -------------------------------------------------------------------------------- /node_modules/undici-types/connector.d.ts: -------------------------------------------------------------------------------- 1 | import { TLSSocket, ConnectionOptions } from 'tls' 2 | import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'net' 3 | 4 | export default buildConnector 5 | declare function buildConnector (options?: buildConnector.BuildOptions): buildConnector.connector 6 | 7 | declare namespace buildConnector { 8 | export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & { 9 | allowH2?: boolean; 10 | maxCachedSessions?: number | null; 11 | socketPath?: string | null; 12 | timeout?: number | null; 13 | port?: number; 14 | keepAlive?: boolean | null; 15 | keepAliveInitialDelay?: number | null; 16 | } 17 | 18 | export interface Options { 19 | hostname: string 20 | host?: string 21 | protocol: string 22 | port: string 23 | servername?: string 24 | localAddress?: string | null 25 | httpSocket?: Socket 26 | } 27 | 28 | export type Callback = (...args: CallbackArgs) => void 29 | type CallbackArgs = [null, Socket | TLSSocket] | [Error, null] 30 | 31 | export interface connector { 32 | (options: buildConnector.Options, callback: buildConnector.Callback): void 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /node_modules/undici-types/content-type.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | interface MIMEType { 4 | type: string 5 | subtype: string 6 | parameters: Map 7 | essence: string 8 | } 9 | 10 | /** 11 | * Parse a string to a {@link MIMEType} object. Returns `failure` if the string 12 | * couldn't be parsed. 13 | * @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type 14 | */ 15 | export function parseMIMEType (input: string): 'failure' | MIMEType 16 | 17 | /** 18 | * Convert a MIMEType object to a string. 19 | * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type 20 | */ 21 | export function serializeAMimeType (mimeType: MIMEType): string 22 | -------------------------------------------------------------------------------- /node_modules/undici-types/cookies.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | import type { Headers } from './fetch' 4 | 5 | export interface Cookie { 6 | name: string 7 | value: string 8 | expires?: Date | number 9 | maxAge?: number 10 | domain?: string 11 | path?: string 12 | secure?: boolean 13 | httpOnly?: boolean 14 | sameSite?: 'Strict' | 'Lax' | 'None' 15 | unparsed?: string[] 16 | } 17 | 18 | export function deleteCookie ( 19 | headers: Headers, 20 | name: string, 21 | attributes?: { name?: string, domain?: string } 22 | ): void 23 | 24 | export function getCookies (headers: Headers): Record 25 | 26 | export function getSetCookies (headers: Headers): Cookie[] 27 | 28 | export function setCookie (headers: Headers, cookie: Cookie): void 29 | -------------------------------------------------------------------------------- /node_modules/undici-types/diagnostics-channel.d.ts: -------------------------------------------------------------------------------- 1 | import { Socket } from "net"; 2 | import { URL } from "url"; 3 | import Connector from "./connector"; 4 | import Dispatcher from "./dispatcher"; 5 | 6 | declare namespace DiagnosticsChannel { 7 | interface Request { 8 | origin?: string | URL; 9 | completed: boolean; 10 | method?: Dispatcher.HttpMethod; 11 | path: string; 12 | headers: string; 13 | addHeader(key: string, value: string): Request; 14 | } 15 | interface Response { 16 | statusCode: number; 17 | statusText: string; 18 | headers: Array; 19 | } 20 | type Error = unknown; 21 | interface ConnectParams { 22 | host: URL["host"]; 23 | hostname: URL["hostname"]; 24 | protocol: URL["protocol"]; 25 | port: URL["port"]; 26 | servername: string | null; 27 | } 28 | type Connector = Connector.connector; 29 | export interface RequestCreateMessage { 30 | request: Request; 31 | } 32 | export interface RequestBodySentMessage { 33 | request: Request; 34 | } 35 | export interface RequestHeadersMessage { 36 | request: Request; 37 | response: Response; 38 | } 39 | export interface RequestTrailersMessage { 40 | request: Request; 41 | trailers: Array; 42 | } 43 | export interface RequestErrorMessage { 44 | request: Request; 45 | error: Error; 46 | } 47 | export interface ClientSendHeadersMessage { 48 | request: Request; 49 | headers: string; 50 | socket: Socket; 51 | } 52 | export interface ClientBeforeConnectMessage { 53 | connectParams: ConnectParams; 54 | connector: Connector; 55 | } 56 | export interface ClientConnectedMessage { 57 | socket: Socket; 58 | connectParams: ConnectParams; 59 | connector: Connector; 60 | } 61 | export interface ClientConnectErrorMessage { 62 | error: Error; 63 | socket: Socket; 64 | connectParams: ConnectParams; 65 | connector: Connector; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /node_modules/undici-types/errors.d.ts: -------------------------------------------------------------------------------- 1 | import { IncomingHttpHeaders } from "./header"; 2 | import Client from './client' 3 | 4 | export default Errors 5 | 6 | declare namespace Errors { 7 | export class UndiciError extends Error { 8 | name: string; 9 | code: string; 10 | } 11 | 12 | /** Connect timeout error. */ 13 | export class ConnectTimeoutError extends UndiciError { 14 | name: 'ConnectTimeoutError'; 15 | code: 'UND_ERR_CONNECT_TIMEOUT'; 16 | } 17 | 18 | /** A header exceeds the `headersTimeout` option. */ 19 | export class HeadersTimeoutError extends UndiciError { 20 | name: 'HeadersTimeoutError'; 21 | code: 'UND_ERR_HEADERS_TIMEOUT'; 22 | } 23 | 24 | /** Headers overflow error. */ 25 | export class HeadersOverflowError extends UndiciError { 26 | name: 'HeadersOverflowError' 27 | code: 'UND_ERR_HEADERS_OVERFLOW' 28 | } 29 | 30 | /** A body exceeds the `bodyTimeout` option. */ 31 | export class BodyTimeoutError extends UndiciError { 32 | name: 'BodyTimeoutError'; 33 | code: 'UND_ERR_BODY_TIMEOUT'; 34 | } 35 | 36 | export class ResponseStatusCodeError extends UndiciError { 37 | constructor ( 38 | message?: string, 39 | statusCode?: number, 40 | headers?: IncomingHttpHeaders | string[] | null, 41 | body?: null | Record | string 42 | ); 43 | name: 'ResponseStatusCodeError'; 44 | code: 'UND_ERR_RESPONSE_STATUS_CODE'; 45 | body: null | Record | string 46 | status: number 47 | statusCode: number 48 | headers: IncomingHttpHeaders | string[] | null; 49 | } 50 | 51 | /** Passed an invalid argument. */ 52 | export class InvalidArgumentError extends UndiciError { 53 | name: 'InvalidArgumentError'; 54 | code: 'UND_ERR_INVALID_ARG'; 55 | } 56 | 57 | /** Returned an invalid value. */ 58 | export class InvalidReturnValueError extends UndiciError { 59 | name: 'InvalidReturnValueError'; 60 | code: 'UND_ERR_INVALID_RETURN_VALUE'; 61 | } 62 | 63 | /** The request has been aborted by the user. */ 64 | export class RequestAbortedError extends UndiciError { 65 | name: 'AbortError'; 66 | code: 'UND_ERR_ABORTED'; 67 | } 68 | 69 | /** Expected error with reason. */ 70 | export class InformationalError extends UndiciError { 71 | name: 'InformationalError'; 72 | code: 'UND_ERR_INFO'; 73 | } 74 | 75 | /** Request body length does not match content-length header. */ 76 | export class RequestContentLengthMismatchError extends UndiciError { 77 | name: 'RequestContentLengthMismatchError'; 78 | code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'; 79 | } 80 | 81 | /** Response body length does not match content-length header. */ 82 | export class ResponseContentLengthMismatchError extends UndiciError { 83 | name: 'ResponseContentLengthMismatchError'; 84 | code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'; 85 | } 86 | 87 | /** Trying to use a destroyed client. */ 88 | export class ClientDestroyedError extends UndiciError { 89 | name: 'ClientDestroyedError'; 90 | code: 'UND_ERR_DESTROYED'; 91 | } 92 | 93 | /** Trying to use a closed client. */ 94 | export class ClientClosedError extends UndiciError { 95 | name: 'ClientClosedError'; 96 | code: 'UND_ERR_CLOSED'; 97 | } 98 | 99 | /** There is an error with the socket. */ 100 | export class SocketError extends UndiciError { 101 | name: 'SocketError'; 102 | code: 'UND_ERR_SOCKET'; 103 | socket: Client.SocketInfo | null 104 | } 105 | 106 | /** Encountered unsupported functionality. */ 107 | export class NotSupportedError extends UndiciError { 108 | name: 'NotSupportedError'; 109 | code: 'UND_ERR_NOT_SUPPORTED'; 110 | } 111 | 112 | /** No upstream has been added to the BalancedPool. */ 113 | export class BalancedPoolMissingUpstreamError extends UndiciError { 114 | name: 'MissingUpstreamError'; 115 | code: 'UND_ERR_BPL_MISSING_UPSTREAM'; 116 | } 117 | 118 | export class HTTPParserError extends UndiciError { 119 | name: 'HTTPParserError'; 120 | code: string; 121 | } 122 | 123 | /** The response exceed the length allowed. */ 124 | export class ResponseExceededMaxSizeError extends UndiciError { 125 | name: 'ResponseExceededMaxSizeError'; 126 | code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE'; 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /node_modules/undici-types/file.d.ts: -------------------------------------------------------------------------------- 1 | // Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/File.ts (MIT) 2 | /// 3 | 4 | import { Blob } from 'buffer' 5 | 6 | export interface BlobPropertyBag { 7 | type?: string 8 | endings?: 'native' | 'transparent' 9 | } 10 | 11 | export interface FilePropertyBag extends BlobPropertyBag { 12 | /** 13 | * The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date. 14 | */ 15 | lastModified?: number 16 | } 17 | 18 | export declare class File extends Blob { 19 | /** 20 | * Creates a new File instance. 21 | * 22 | * @param fileBits An `Array` strings, or [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), [`ArrayBufferView`](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView), [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) objects, or a mix of any of such objects, that will be put inside the [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). 23 | * @param fileName The name of the file. 24 | * @param options An options object containing optional attributes for the file. 25 | */ 26 | constructor(fileBits: ReadonlyArray, fileName: string, options?: FilePropertyBag) 27 | 28 | /** 29 | * Name of the file referenced by the File object. 30 | */ 31 | readonly name: string 32 | 33 | /** 34 | * The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date. 35 | */ 36 | readonly lastModified: number 37 | 38 | readonly [Symbol.toStringTag]: string 39 | } 40 | -------------------------------------------------------------------------------- /node_modules/undici-types/filereader.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | import { Blob } from 'buffer' 4 | import { DOMException, Event, EventInit, EventTarget } from './patch' 5 | 6 | export declare class FileReader { 7 | __proto__: EventTarget & FileReader 8 | 9 | constructor () 10 | 11 | readAsArrayBuffer (blob: Blob): void 12 | readAsBinaryString (blob: Blob): void 13 | readAsText (blob: Blob, encoding?: string): void 14 | readAsDataURL (blob: Blob): void 15 | 16 | abort (): void 17 | 18 | static readonly EMPTY = 0 19 | static readonly LOADING = 1 20 | static readonly DONE = 2 21 | 22 | readonly EMPTY = 0 23 | readonly LOADING = 1 24 | readonly DONE = 2 25 | 26 | readonly readyState: number 27 | 28 | readonly result: string | ArrayBuffer | null 29 | 30 | readonly error: DOMException | null 31 | 32 | onloadstart: null | ((this: FileReader, event: ProgressEvent) => void) 33 | onprogress: null | ((this: FileReader, event: ProgressEvent) => void) 34 | onload: null | ((this: FileReader, event: ProgressEvent) => void) 35 | onabort: null | ((this: FileReader, event: ProgressEvent) => void) 36 | onerror: null | ((this: FileReader, event: ProgressEvent) => void) 37 | onloadend: null | ((this: FileReader, event: ProgressEvent) => void) 38 | } 39 | 40 | export interface ProgressEventInit extends EventInit { 41 | lengthComputable?: boolean 42 | loaded?: number 43 | total?: number 44 | } 45 | 46 | export declare class ProgressEvent { 47 | __proto__: Event & ProgressEvent 48 | 49 | constructor (type: string, eventInitDict?: ProgressEventInit) 50 | 51 | readonly lengthComputable: boolean 52 | readonly loaded: number 53 | readonly total: number 54 | } 55 | -------------------------------------------------------------------------------- /node_modules/undici-types/global-dispatcher.d.ts: -------------------------------------------------------------------------------- 1 | import Dispatcher from "./dispatcher"; 2 | 3 | export { 4 | getGlobalDispatcher, 5 | setGlobalDispatcher 6 | } 7 | 8 | declare function setGlobalDispatcher(dispatcher: DispatcherImplementation): void; 9 | declare function getGlobalDispatcher(): Dispatcher; 10 | -------------------------------------------------------------------------------- /node_modules/undici-types/global-origin.d.ts: -------------------------------------------------------------------------------- 1 | export { 2 | setGlobalOrigin, 3 | getGlobalOrigin 4 | } 5 | 6 | declare function setGlobalOrigin(origin: string | URL | undefined): void; 7 | declare function getGlobalOrigin(): URL | undefined; -------------------------------------------------------------------------------- /node_modules/undici-types/handlers.d.ts: -------------------------------------------------------------------------------- 1 | import Dispatcher from "./dispatcher"; 2 | 3 | export declare class RedirectHandler implements Dispatcher.DispatchHandlers{ 4 | constructor (dispatch: Dispatcher, maxRedirections: number, opts: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandlers) 5 | } 6 | 7 | export declare class DecoratorHandler implements Dispatcher.DispatchHandlers{ 8 | constructor (handler: Dispatcher.DispatchHandlers) 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/undici-types/header.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * The header type declaration of `undici`. 3 | */ 4 | export type IncomingHttpHeaders = Record; 5 | -------------------------------------------------------------------------------- /node_modules/undici-types/index.d.ts: -------------------------------------------------------------------------------- 1 | import Dispatcher from'./dispatcher' 2 | import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher' 3 | import { setGlobalOrigin, getGlobalOrigin } from './global-origin' 4 | import Pool from'./pool' 5 | import { RedirectHandler, DecoratorHandler } from './handlers' 6 | 7 | import BalancedPool from './balanced-pool' 8 | import Client from'./client' 9 | import buildConnector from'./connector' 10 | import errors from'./errors' 11 | import Agent from'./agent' 12 | import MockClient from'./mock-client' 13 | import MockPool from'./mock-pool' 14 | import MockAgent from'./mock-agent' 15 | import mockErrors from'./mock-errors' 16 | import ProxyAgent from'./proxy-agent' 17 | import { request, pipeline, stream, connect, upgrade } from './api' 18 | 19 | export * from './cookies' 20 | export * from './fetch' 21 | export * from './file' 22 | export * from './filereader' 23 | export * from './formdata' 24 | export * from './diagnostics-channel' 25 | export * from './websocket' 26 | export * from './content-type' 27 | export * from './cache' 28 | export { Interceptable } from './mock-interceptor' 29 | 30 | export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, RedirectHandler, DecoratorHandler } 31 | export default Undici 32 | 33 | declare namespace Undici { 34 | var Dispatcher: typeof import('./dispatcher').default 35 | var Pool: typeof import('./pool').default; 36 | var RedirectHandler: typeof import ('./handlers').RedirectHandler 37 | var DecoratorHandler: typeof import ('./handlers').DecoratorHandler 38 | var createRedirectInterceptor: typeof import ('./interceptors').createRedirectInterceptor 39 | var BalancedPool: typeof import('./balanced-pool').default; 40 | var Client: typeof import('./client').default; 41 | var buildConnector: typeof import('./connector').default; 42 | var errors: typeof import('./errors').default; 43 | var Agent: typeof import('./agent').default; 44 | var setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher; 45 | var getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher; 46 | var request: typeof import('./api').request; 47 | var stream: typeof import('./api').stream; 48 | var pipeline: typeof import('./api').pipeline; 49 | var connect: typeof import('./api').connect; 50 | var upgrade: typeof import('./api').upgrade; 51 | var MockClient: typeof import('./mock-client').default; 52 | var MockPool: typeof import('./mock-pool').default; 53 | var MockAgent: typeof import('./mock-agent').default; 54 | var mockErrors: typeof import('./mock-errors').default; 55 | var fetch: typeof import('./fetch').fetch; 56 | var Headers: typeof import('./fetch').Headers; 57 | var Response: typeof import('./fetch').Response; 58 | var Request: typeof import('./fetch').Request; 59 | var FormData: typeof import('./formdata').FormData; 60 | var File: typeof import('./file').File; 61 | var FileReader: typeof import('./filereader').FileReader; 62 | var caches: typeof import('./cache').caches; 63 | } 64 | -------------------------------------------------------------------------------- /node_modules/undici-types/interceptors.d.ts: -------------------------------------------------------------------------------- 1 | import Dispatcher from "./dispatcher"; 2 | 3 | type RedirectInterceptorOpts = { maxRedirections?: number } 4 | 5 | export declare function createRedirectInterceptor (opts: RedirectInterceptorOpts): Dispatcher.DispatchInterceptor 6 | -------------------------------------------------------------------------------- /node_modules/undici-types/mock-agent.d.ts: -------------------------------------------------------------------------------- 1 | import Agent from './agent' 2 | import Dispatcher from './dispatcher' 3 | import { Interceptable, MockInterceptor } from './mock-interceptor' 4 | import MockDispatch = MockInterceptor.MockDispatch; 5 | 6 | export default MockAgent 7 | 8 | interface PendingInterceptor extends MockDispatch { 9 | origin: string; 10 | } 11 | 12 | /** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */ 13 | declare class MockAgent extends Dispatcher { 14 | constructor(options?: MockAgent.Options) 15 | /** Creates and retrieves mock Dispatcher instances which can then be used to intercept HTTP requests. If the number of connections on the mock agent is set to 1, a MockClient instance is returned. Otherwise a MockPool instance is returned. */ 16 | get(origin: string): TInterceptable; 17 | get(origin: RegExp): TInterceptable; 18 | get(origin: ((origin: string) => boolean)): TInterceptable; 19 | /** Dispatches a mocked request. */ 20 | dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean; 21 | /** Closes the mock agent and waits for registered mock pools and clients to also close before resolving. */ 22 | close(): Promise; 23 | /** Disables mocking in MockAgent. */ 24 | deactivate(): void; 25 | /** Enables mocking in a MockAgent instance. When instantiated, a MockAgent is automatically activated. Therefore, this method is only effective after `MockAgent.deactivate` has been called. */ 26 | activate(): void; 27 | /** Define host matchers so only matching requests that aren't intercepted by the mock dispatchers will be attempted. */ 28 | enableNetConnect(): void; 29 | enableNetConnect(host: string): void; 30 | enableNetConnect(host: RegExp): void; 31 | enableNetConnect(host: ((host: string) => boolean)): void; 32 | /** Causes all requests to throw when requests are not matched in a MockAgent intercept. */ 33 | disableNetConnect(): void; 34 | pendingInterceptors(): PendingInterceptor[]; 35 | assertNoPendingInterceptors(options?: { 36 | pendingInterceptorsFormatter?: PendingInterceptorsFormatter; 37 | }): void; 38 | } 39 | 40 | interface PendingInterceptorsFormatter { 41 | format(pendingInterceptors: readonly PendingInterceptor[]): string; 42 | } 43 | 44 | declare namespace MockAgent { 45 | /** MockAgent options. */ 46 | export interface Options extends Agent.Options { 47 | /** A custom agent to be encapsulated by the MockAgent. */ 48 | agent?: Agent; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /node_modules/undici-types/mock-client.d.ts: -------------------------------------------------------------------------------- 1 | import Client from './client' 2 | import Dispatcher from './dispatcher' 3 | import MockAgent from './mock-agent' 4 | import { MockInterceptor, Interceptable } from './mock-interceptor' 5 | 6 | export default MockClient 7 | 8 | /** MockClient extends the Client API and allows one to mock requests. */ 9 | declare class MockClient extends Client implements Interceptable { 10 | constructor(origin: string, options: MockClient.Options); 11 | /** Intercepts any matching requests that use the same origin as this mock client. */ 12 | intercept(options: MockInterceptor.Options): MockInterceptor; 13 | /** Dispatches a mocked request. */ 14 | dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandlers): boolean; 15 | /** Closes the mock client and gracefully waits for enqueued requests to complete. */ 16 | close(): Promise; 17 | } 18 | 19 | declare namespace MockClient { 20 | /** MockClient options. */ 21 | export interface Options extends Client.Options { 22 | /** The agent to associate this MockClient with. */ 23 | agent: MockAgent; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/undici-types/mock-errors.d.ts: -------------------------------------------------------------------------------- 1 | import Errors from './errors' 2 | 3 | export default MockErrors 4 | 5 | declare namespace MockErrors { 6 | /** The request does not match any registered mock dispatches. */ 7 | export class MockNotMatchedError extends Errors.UndiciError { 8 | constructor(message?: string); 9 | name: 'MockNotMatchedError'; 10 | code: 'UND_MOCK_ERR_MOCK_NOT_MATCHED'; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/undici-types/mock-interceptor.d.ts: -------------------------------------------------------------------------------- 1 | import { IncomingHttpHeaders } from './header' 2 | import Dispatcher from './dispatcher'; 3 | import { BodyInit, Headers } from './fetch' 4 | 5 | export { 6 | Interceptable, 7 | MockInterceptor, 8 | MockScope 9 | } 10 | 11 | /** The scope associated with a mock dispatch. */ 12 | declare class MockScope { 13 | constructor(mockDispatch: MockInterceptor.MockDispatch); 14 | /** Delay a reply by a set amount of time in ms. */ 15 | delay(waitInMs: number): MockScope; 16 | /** Persist the defined mock data for the associated reply. It will return the defined mock data indefinitely. */ 17 | persist(): MockScope; 18 | /** Define a reply for a set amount of matching requests. */ 19 | times(repeatTimes: number): MockScope; 20 | } 21 | 22 | /** The interceptor for a Mock. */ 23 | declare class MockInterceptor { 24 | constructor(options: MockInterceptor.Options, mockDispatches: MockInterceptor.MockDispatch[]); 25 | /** Mock an undici request with the defined reply. */ 26 | reply(replyOptionsCallback: MockInterceptor.MockReplyOptionsCallback): MockScope; 27 | reply( 28 | statusCode: number, 29 | data?: TData | Buffer | string | MockInterceptor.MockResponseDataHandler, 30 | responseOptions?: MockInterceptor.MockResponseOptions 31 | ): MockScope; 32 | /** Mock an undici request by throwing the defined reply error. */ 33 | replyWithError(error: TError): MockScope; 34 | /** Set default reply headers on the interceptor for subsequent mocked replies. */ 35 | defaultReplyHeaders(headers: IncomingHttpHeaders): MockInterceptor; 36 | /** Set default reply trailers on the interceptor for subsequent mocked replies. */ 37 | defaultReplyTrailers(trailers: Record): MockInterceptor; 38 | /** Set automatically calculated content-length header on subsequent mocked replies. */ 39 | replyContentLength(): MockInterceptor; 40 | } 41 | 42 | declare namespace MockInterceptor { 43 | /** MockInterceptor options. */ 44 | export interface Options { 45 | /** Path to intercept on. */ 46 | path: string | RegExp | ((path: string) => boolean); 47 | /** Method to intercept on. Defaults to GET. */ 48 | method?: string | RegExp | ((method: string) => boolean); 49 | /** Body to intercept on. */ 50 | body?: string | RegExp | ((body: string) => boolean); 51 | /** Headers to intercept on. */ 52 | headers?: Record boolean)> | ((headers: Record) => boolean); 53 | /** Query params to intercept on */ 54 | query?: Record; 55 | } 56 | export interface MockDispatch extends Options { 57 | times: number | null; 58 | persist: boolean; 59 | consumed: boolean; 60 | data: MockDispatchData; 61 | } 62 | export interface MockDispatchData extends MockResponseOptions { 63 | error: TError | null; 64 | statusCode?: number; 65 | data?: TData | string; 66 | } 67 | export interface MockResponseOptions { 68 | headers?: IncomingHttpHeaders; 69 | trailers?: Record; 70 | } 71 | 72 | export interface MockResponseCallbackOptions { 73 | path: string; 74 | origin: string; 75 | method: string; 76 | body?: BodyInit | Dispatcher.DispatchOptions['body']; 77 | headers: Headers | Record; 78 | maxRedirections: number; 79 | } 80 | 81 | export type MockResponseDataHandler = ( 82 | opts: MockResponseCallbackOptions 83 | ) => TData | Buffer | string; 84 | 85 | export type MockReplyOptionsCallback = ( 86 | opts: MockResponseCallbackOptions 87 | ) => { statusCode: number, data?: TData | Buffer | string, responseOptions?: MockResponseOptions } 88 | } 89 | 90 | interface Interceptable extends Dispatcher { 91 | /** Intercepts any matching requests that use the same origin as this mock client. */ 92 | intercept(options: MockInterceptor.Options): MockInterceptor; 93 | } 94 | -------------------------------------------------------------------------------- /node_modules/undici-types/mock-pool.d.ts: -------------------------------------------------------------------------------- 1 | import Pool from './pool' 2 | import MockAgent from './mock-agent' 3 | import { Interceptable, MockInterceptor } from './mock-interceptor' 4 | import Dispatcher from './dispatcher' 5 | 6 | export default MockPool 7 | 8 | /** MockPool extends the Pool API and allows one to mock requests. */ 9 | declare class MockPool extends Pool implements Interceptable { 10 | constructor(origin: string, options: MockPool.Options); 11 | /** Intercepts any matching requests that use the same origin as this mock pool. */ 12 | intercept(options: MockInterceptor.Options): MockInterceptor; 13 | /** Dispatches a mocked request. */ 14 | dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandlers): boolean; 15 | /** Closes the mock pool and gracefully waits for enqueued requests to complete. */ 16 | close(): Promise; 17 | } 18 | 19 | declare namespace MockPool { 20 | /** MockPool options. */ 21 | export interface Options extends Pool.Options { 22 | /** The agent to associate this MockPool with. */ 23 | agent: MockAgent; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/undici-types/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "undici-types", 3 | "version": "5.26.5", 4 | "description": "A stand-alone types package for Undici", 5 | "homepage": "https://undici.nodejs.org", 6 | "bugs": { 7 | "url": "https://github.com/nodejs/undici/issues" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/nodejs/undici.git" 12 | }, 13 | "license": "MIT", 14 | "types": "index.d.ts", 15 | "files": [ 16 | "*.d.ts" 17 | ], 18 | "contributors": [ 19 | { 20 | "name": "Daniele Belardi", 21 | "url": "https://github.com/dnlup", 22 | "author": true 23 | }, 24 | { 25 | "name": "Ethan Arrowood", 26 | "url": "https://github.com/ethan-arrowood", 27 | "author": true 28 | }, 29 | { 30 | "name": "Matteo Collina", 31 | "url": "https://github.com/mcollina", 32 | "author": true 33 | }, 34 | { 35 | "name": "Matthew Aitken", 36 | "url": "https://github.com/KhafraDev", 37 | "author": true 38 | }, 39 | { 40 | "name": "Robert Nagy", 41 | "url": "https://github.com/ronag", 42 | "author": true 43 | }, 44 | { 45 | "name": "Szymon Marczak", 46 | "url": "https://github.com/szmarczak", 47 | "author": true 48 | }, 49 | { 50 | "name": "Tomas Della Vedova", 51 | "url": "https://github.com/delvedor", 52 | "author": true 53 | } 54 | ] 55 | } -------------------------------------------------------------------------------- /node_modules/undici-types/patch.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | // See https://github.com/nodejs/undici/issues/1740 4 | 5 | export type DOMException = typeof globalThis extends { DOMException: infer T } 6 | ? T 7 | : any 8 | 9 | export type EventTarget = typeof globalThis extends { EventTarget: infer T } 10 | ? T 11 | : { 12 | addEventListener( 13 | type: string, 14 | listener: any, 15 | options?: any, 16 | ): void 17 | dispatchEvent(event: Event): boolean 18 | removeEventListener( 19 | type: string, 20 | listener: any, 21 | options?: any | boolean, 22 | ): void 23 | } 24 | 25 | export type Event = typeof globalThis extends { Event: infer T } 26 | ? T 27 | : { 28 | readonly bubbles: boolean 29 | cancelBubble: () => void 30 | readonly cancelable: boolean 31 | readonly composed: boolean 32 | composedPath(): [EventTarget?] 33 | readonly currentTarget: EventTarget | null 34 | readonly defaultPrevented: boolean 35 | readonly eventPhase: 0 | 2 36 | readonly isTrusted: boolean 37 | preventDefault(): void 38 | returnValue: boolean 39 | readonly srcElement: EventTarget | null 40 | stopImmediatePropagation(): void 41 | stopPropagation(): void 42 | readonly target: EventTarget | null 43 | readonly timeStamp: number 44 | readonly type: string 45 | } 46 | 47 | export interface EventInit { 48 | bubbles?: boolean 49 | cancelable?: boolean 50 | composed?: boolean 51 | } 52 | 53 | export interface EventListenerOptions { 54 | capture?: boolean 55 | } 56 | 57 | export interface AddEventListenerOptions extends EventListenerOptions { 58 | once?: boolean 59 | passive?: boolean 60 | signal?: AbortSignal 61 | } 62 | 63 | export type EventListenerOrEventListenerObject = EventListener | EventListenerObject 64 | 65 | export interface EventListenerObject { 66 | handleEvent (object: Event): void 67 | } 68 | 69 | export interface EventListener { 70 | (evt: Event): void 71 | } 72 | -------------------------------------------------------------------------------- /node_modules/undici-types/pool-stats.d.ts: -------------------------------------------------------------------------------- 1 | import Pool from "./pool" 2 | 3 | export default PoolStats 4 | 5 | declare class PoolStats { 6 | constructor(pool: Pool); 7 | /** Number of open socket connections in this pool. */ 8 | connected: number; 9 | /** Number of open socket connections in this pool that do not have an active request. */ 10 | free: number; 11 | /** Number of pending requests across all clients in this pool. */ 12 | pending: number; 13 | /** Number of queued requests across all clients in this pool. */ 14 | queued: number; 15 | /** Number of currently active requests across all clients in this pool. */ 16 | running: number; 17 | /** Number of active, pending, or queued requests across all clients in this pool. */ 18 | size: number; 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/undici-types/pool.d.ts: -------------------------------------------------------------------------------- 1 | import Client from './client' 2 | import TPoolStats from './pool-stats' 3 | import { URL } from 'url' 4 | import Dispatcher from "./dispatcher"; 5 | 6 | export default Pool 7 | 8 | declare class Pool extends Dispatcher { 9 | constructor(url: string | URL, options?: Pool.Options) 10 | /** `true` after `pool.close()` has been called. */ 11 | closed: boolean; 12 | /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ 13 | destroyed: boolean; 14 | /** Aggregate stats for a Pool. */ 15 | readonly stats: TPoolStats; 16 | } 17 | 18 | declare namespace Pool { 19 | export type PoolStats = TPoolStats; 20 | export interface Options extends Client.Options { 21 | /** Default: `(origin, opts) => new Client(origin, opts)`. */ 22 | factory?(origin: URL, opts: object): Dispatcher; 23 | /** The max number of clients to create. `null` if no limit. Default `null`. */ 24 | connections?: number | null; 25 | 26 | interceptors?: { Pool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options["interceptors"] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /node_modules/undici-types/proxy-agent.d.ts: -------------------------------------------------------------------------------- 1 | import Agent from './agent' 2 | import buildConnector from './connector'; 3 | import Client from './client' 4 | import Dispatcher from './dispatcher' 5 | import { IncomingHttpHeaders } from './header' 6 | import Pool from './pool' 7 | 8 | export default ProxyAgent 9 | 10 | declare class ProxyAgent extends Dispatcher { 11 | constructor(options: ProxyAgent.Options | string) 12 | 13 | dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean; 14 | close(): Promise; 15 | } 16 | 17 | declare namespace ProxyAgent { 18 | export interface Options extends Agent.Options { 19 | uri: string; 20 | /** 21 | * @deprecated use opts.token 22 | */ 23 | auth?: string; 24 | token?: string; 25 | headers?: IncomingHttpHeaders; 26 | requestTls?: buildConnector.BuildOptions; 27 | proxyTls?: buildConnector.BuildOptions; 28 | clientFactory?(origin: URL, opts: object): Dispatcher; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /node_modules/undici-types/readable.d.ts: -------------------------------------------------------------------------------- 1 | import { Readable } from "stream"; 2 | import { Blob } from 'buffer' 3 | 4 | export default BodyReadable 5 | 6 | declare class BodyReadable extends Readable { 7 | constructor( 8 | resume?: (this: Readable, size: number) => void | null, 9 | abort?: () => void | null, 10 | contentType?: string 11 | ) 12 | 13 | /** Consumes and returns the body as a string 14 | * https://fetch.spec.whatwg.org/#dom-body-text 15 | */ 16 | text(): Promise 17 | 18 | /** Consumes and returns the body as a JavaScript Object 19 | * https://fetch.spec.whatwg.org/#dom-body-json 20 | */ 21 | json(): Promise 22 | 23 | /** Consumes and returns the body as a Blob 24 | * https://fetch.spec.whatwg.org/#dom-body-blob 25 | */ 26 | blob(): Promise 27 | 28 | /** Consumes and returns the body as an ArrayBuffer 29 | * https://fetch.spec.whatwg.org/#dom-body-arraybuffer 30 | */ 31 | arrayBuffer(): Promise 32 | 33 | /** Not implemented 34 | * 35 | * https://fetch.spec.whatwg.org/#dom-body-formdata 36 | */ 37 | formData(): Promise 38 | 39 | /** Returns true if the body is not null and the body has been consumed 40 | * 41 | * Otherwise, returns false 42 | * 43 | * https://fetch.spec.whatwg.org/#dom-body-bodyused 44 | */ 45 | readonly bodyUsed: boolean 46 | 47 | /** Throws on node 16.6.0 48 | * 49 | * If body is null, it should return null as the body 50 | * 51 | * If body is not null, should return the body as a ReadableStream 52 | * 53 | * https://fetch.spec.whatwg.org/#dom-body-body 54 | */ 55 | readonly body: never | undefined 56 | 57 | /** Dumps the response body by reading `limit` number of bytes. 58 | * @param opts.limit Number of bytes to read (optional) - Default: 262144 59 | */ 60 | dump(opts?: { limit: number }): Promise 61 | } 62 | -------------------------------------------------------------------------------- /node_modules/undici-types/websocket.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | import type { Blob } from 'buffer' 4 | import type { MessagePort } from 'worker_threads' 5 | import { 6 | EventTarget, 7 | Event, 8 | EventInit, 9 | EventListenerOptions, 10 | AddEventListenerOptions, 11 | EventListenerOrEventListenerObject 12 | } from './patch' 13 | import Dispatcher from './dispatcher' 14 | import { HeadersInit } from './fetch' 15 | 16 | export type BinaryType = 'blob' | 'arraybuffer' 17 | 18 | interface WebSocketEventMap { 19 | close: CloseEvent 20 | error: Event 21 | message: MessageEvent 22 | open: Event 23 | } 24 | 25 | interface WebSocket extends EventTarget { 26 | binaryType: BinaryType 27 | 28 | readonly bufferedAmount: number 29 | readonly extensions: string 30 | 31 | onclose: ((this: WebSocket, ev: WebSocketEventMap['close']) => any) | null 32 | onerror: ((this: WebSocket, ev: WebSocketEventMap['error']) => any) | null 33 | onmessage: ((this: WebSocket, ev: WebSocketEventMap['message']) => any) | null 34 | onopen: ((this: WebSocket, ev: WebSocketEventMap['open']) => any) | null 35 | 36 | readonly protocol: string 37 | readonly readyState: number 38 | readonly url: string 39 | 40 | close(code?: number, reason?: string): void 41 | send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void 42 | 43 | readonly CLOSED: number 44 | readonly CLOSING: number 45 | readonly CONNECTING: number 46 | readonly OPEN: number 47 | 48 | addEventListener( 49 | type: K, 50 | listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, 51 | options?: boolean | AddEventListenerOptions 52 | ): void 53 | addEventListener( 54 | type: string, 55 | listener: EventListenerOrEventListenerObject, 56 | options?: boolean | AddEventListenerOptions 57 | ): void 58 | removeEventListener( 59 | type: K, 60 | listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, 61 | options?: boolean | EventListenerOptions 62 | ): void 63 | removeEventListener( 64 | type: string, 65 | listener: EventListenerOrEventListenerObject, 66 | options?: boolean | EventListenerOptions 67 | ): void 68 | } 69 | 70 | export declare const WebSocket: { 71 | prototype: WebSocket 72 | new (url: string | URL, protocols?: string | string[] | WebSocketInit): WebSocket 73 | readonly CLOSED: number 74 | readonly CLOSING: number 75 | readonly CONNECTING: number 76 | readonly OPEN: number 77 | } 78 | 79 | interface CloseEventInit extends EventInit { 80 | code?: number 81 | reason?: string 82 | wasClean?: boolean 83 | } 84 | 85 | interface CloseEvent extends Event { 86 | readonly code: number 87 | readonly reason: string 88 | readonly wasClean: boolean 89 | } 90 | 91 | export declare const CloseEvent: { 92 | prototype: CloseEvent 93 | new (type: string, eventInitDict?: CloseEventInit): CloseEvent 94 | } 95 | 96 | interface MessageEventInit extends EventInit { 97 | data?: T 98 | lastEventId?: string 99 | origin?: string 100 | ports?: (typeof MessagePort)[] 101 | source?: typeof MessagePort | null 102 | } 103 | 104 | interface MessageEvent extends Event { 105 | readonly data: T 106 | readonly lastEventId: string 107 | readonly origin: string 108 | readonly ports: ReadonlyArray 109 | readonly source: typeof MessagePort | null 110 | initMessageEvent( 111 | type: string, 112 | bubbles?: boolean, 113 | cancelable?: boolean, 114 | data?: any, 115 | origin?: string, 116 | lastEventId?: string, 117 | source?: typeof MessagePort | null, 118 | ports?: (typeof MessagePort)[] 119 | ): void; 120 | } 121 | 122 | export declare const MessageEvent: { 123 | prototype: MessageEvent 124 | new(type: string, eventInitDict?: MessageEventInit): MessageEvent 125 | } 126 | 127 | interface WebSocketInit { 128 | protocols?: string | string[], 129 | dispatcher?: Dispatcher, 130 | headers?: HeadersInit 131 | } 132 | -------------------------------------------------------------------------------- /node_modules/uuid/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library! 4 | 5 | ## Testing 6 | 7 | ```shell 8 | npm test 9 | ``` 10 | 11 | ## Releasing 12 | 13 | Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version): 14 | 15 | ```shell 16 | npm run release -- --dry-run # verify output manually 17 | npm run release # follow the instructions from the output of this command 18 | ``` 19 | -------------------------------------------------------------------------------- /node_modules/uuid/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2010-2020 Robert Kieffer and other contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /node_modules/uuid/dist/bin/uuid: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../uuid-bin'); 3 | -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-browser/index.js: -------------------------------------------------------------------------------- 1 | export { default as v1 } from './v1.js'; 2 | export { default as v3 } from './v3.js'; 3 | export { default as v4 } from './v4.js'; 4 | export { default as v5 } from './v5.js'; 5 | export { default as NIL } from './nil.js'; 6 | export { default as version } from './version.js'; 7 | export { default as validate } from './validate.js'; 8 | export { default as stringify } from './stringify.js'; 9 | export { default as parse } from './parse.js'; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-browser/nil.js: -------------------------------------------------------------------------------- 1 | export default '00000000-0000-0000-0000-000000000000'; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-browser/parse.js: -------------------------------------------------------------------------------- 1 | import validate from './validate.js'; 2 | 3 | function parse(uuid) { 4 | if (!validate(uuid)) { 5 | throw TypeError('Invalid UUID'); 6 | } 7 | 8 | var v; 9 | var arr = new Uint8Array(16); // Parse ########-....-....-....-............ 10 | 11 | arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; 12 | arr[1] = v >>> 16 & 0xff; 13 | arr[2] = v >>> 8 & 0xff; 14 | arr[3] = v & 0xff; // Parse ........-####-....-....-............ 15 | 16 | arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; 17 | arr[5] = v & 0xff; // Parse ........-....-####-....-............ 18 | 19 | arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; 20 | arr[7] = v & 0xff; // Parse ........-....-....-####-............ 21 | 22 | arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; 23 | arr[9] = v & 0xff; // Parse ........-....-....-....-############ 24 | // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) 25 | 26 | arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; 27 | arr[11] = v / 0x100000000 & 0xff; 28 | arr[12] = v >>> 24 & 0xff; 29 | arr[13] = v >>> 16 & 0xff; 30 | arr[14] = v >>> 8 & 0xff; 31 | arr[15] = v & 0xff; 32 | return arr; 33 | } 34 | 35 | export default parse; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-browser/regex.js: -------------------------------------------------------------------------------- 1 | export 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; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-browser/rng.js: -------------------------------------------------------------------------------- 1 | // Unique ID creation requires a high quality random # generator. In the browser we therefore 2 | // require the crypto API and do not support built-in fallback to lower quality random number 3 | // generators (like Math.random()). 4 | var getRandomValues; 5 | var rnds8 = new Uint8Array(16); 6 | export default function rng() { 7 | // lazy load so that environments that need to polyfill have a chance to do so 8 | if (!getRandomValues) { 9 | // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also, 10 | // find the complete implementation of crypto (msCrypto) on IE11. 11 | getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto); 12 | 13 | if (!getRandomValues) { 14 | throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); 15 | } 16 | } 17 | 18 | return getRandomValues(rnds8); 19 | } -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-browser/sha1.js: -------------------------------------------------------------------------------- 1 | // Adapted from Chris Veness' SHA1 code at 2 | // http://www.movable-type.co.uk/scripts/sha1.html 3 | function f(s, x, y, z) { 4 | switch (s) { 5 | case 0: 6 | return x & y ^ ~x & z; 7 | 8 | case 1: 9 | return x ^ y ^ z; 10 | 11 | case 2: 12 | return x & y ^ x & z ^ y & z; 13 | 14 | case 3: 15 | return x ^ y ^ z; 16 | } 17 | } 18 | 19 | function ROTL(x, n) { 20 | return x << n | x >>> 32 - n; 21 | } 22 | 23 | function sha1(bytes) { 24 | var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; 25 | var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; 26 | 27 | if (typeof bytes === 'string') { 28 | var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape 29 | 30 | bytes = []; 31 | 32 | for (var i = 0; i < msg.length; ++i) { 33 | bytes.push(msg.charCodeAt(i)); 34 | } 35 | } else if (!Array.isArray(bytes)) { 36 | // Convert Array-like to Array 37 | bytes = Array.prototype.slice.call(bytes); 38 | } 39 | 40 | bytes.push(0x80); 41 | var l = bytes.length / 4 + 2; 42 | var N = Math.ceil(l / 16); 43 | var M = new Array(N); 44 | 45 | for (var _i = 0; _i < N; ++_i) { 46 | var arr = new Uint32Array(16); 47 | 48 | for (var j = 0; j < 16; ++j) { 49 | arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3]; 50 | } 51 | 52 | M[_i] = arr; 53 | } 54 | 55 | M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); 56 | M[N - 1][14] = Math.floor(M[N - 1][14]); 57 | M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; 58 | 59 | for (var _i2 = 0; _i2 < N; ++_i2) { 60 | var W = new Uint32Array(80); 61 | 62 | for (var t = 0; t < 16; ++t) { 63 | W[t] = M[_i2][t]; 64 | } 65 | 66 | for (var _t = 16; _t < 80; ++_t) { 67 | W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1); 68 | } 69 | 70 | var a = H[0]; 71 | var b = H[1]; 72 | var c = H[2]; 73 | var d = H[3]; 74 | var e = H[4]; 75 | 76 | for (var _t2 = 0; _t2 < 80; ++_t2) { 77 | var s = Math.floor(_t2 / 20); 78 | var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0; 79 | e = d; 80 | d = c; 81 | c = ROTL(b, 30) >>> 0; 82 | b = a; 83 | a = T; 84 | } 85 | 86 | H[0] = H[0] + a >>> 0; 87 | H[1] = H[1] + b >>> 0; 88 | H[2] = H[2] + c >>> 0; 89 | H[3] = H[3] + d >>> 0; 90 | H[4] = H[4] + e >>> 0; 91 | } 92 | 93 | return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; 94 | } 95 | 96 | export default sha1; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-browser/stringify.js: -------------------------------------------------------------------------------- 1 | import validate from './validate.js'; 2 | /** 3 | * Convert array of 16 byte values to UUID string format of the form: 4 | * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX 5 | */ 6 | 7 | var byteToHex = []; 8 | 9 | for (var i = 0; i < 256; ++i) { 10 | byteToHex.push((i + 0x100).toString(16).substr(1)); 11 | } 12 | 13 | function stringify(arr) { 14 | var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; 15 | // Note: Be careful editing this code! It's been tuned for performance 16 | // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 17 | var 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 18 | // of the following: 19 | // - One or more input array values don't map to a hex octet (leading to 20 | // "undefined" in the uuid) 21 | // - Invalid input values for the RFC `version` or `variant` fields 22 | 23 | if (!validate(uuid)) { 24 | throw TypeError('Stringified UUID is invalid'); 25 | } 26 | 27 | return uuid; 28 | } 29 | 30 | export default stringify; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-browser/v1.js: -------------------------------------------------------------------------------- 1 | import rng from './rng.js'; 2 | import stringify from './stringify.js'; // **`v1()` - Generate time-based UUID** 3 | // 4 | // Inspired by https://github.com/LiosK/UUID.js 5 | // and http://docs.python.org/library/uuid.html 6 | 7 | var _nodeId; 8 | 9 | var _clockseq; // Previous uuid creation time 10 | 11 | 12 | var _lastMSecs = 0; 13 | var _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details 14 | 15 | function v1(options, buf, offset) { 16 | var i = buf && offset || 0; 17 | var b = buf || new Array(16); 18 | options = options || {}; 19 | var node = options.node || _nodeId; 20 | var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not 21 | // specified. We do this lazily to minimize issues related to insufficient 22 | // system entropy. See #189 23 | 24 | if (node == null || clockseq == null) { 25 | var seedBytes = options.random || (options.rng || rng)(); 26 | 27 | if (node == null) { 28 | // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) 29 | node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; 30 | } 31 | 32 | if (clockseq == null) { 33 | // Per 4.2.2, randomize (14 bit) clockseq 34 | clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; 35 | } 36 | } // UUID timestamps are 100 nano-second units since the Gregorian epoch, 37 | // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so 38 | // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' 39 | // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. 40 | 41 | 42 | var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock 43 | // cycle to simulate higher resolution clock 44 | 45 | var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) 46 | 47 | var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression 48 | 49 | if (dt < 0 && options.clockseq === undefined) { 50 | clockseq = clockseq + 1 & 0x3fff; 51 | } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new 52 | // time interval 53 | 54 | 55 | if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { 56 | nsecs = 0; 57 | } // Per 4.2.1.2 Throw error if too many uuids are requested 58 | 59 | 60 | if (nsecs >= 10000) { 61 | throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); 62 | } 63 | 64 | _lastMSecs = msecs; 65 | _lastNSecs = nsecs; 66 | _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch 67 | 68 | msecs += 12219292800000; // `time_low` 69 | 70 | var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; 71 | b[i++] = tl >>> 24 & 0xff; 72 | b[i++] = tl >>> 16 & 0xff; 73 | b[i++] = tl >>> 8 & 0xff; 74 | b[i++] = tl & 0xff; // `time_mid` 75 | 76 | var tmh = msecs / 0x100000000 * 10000 & 0xfffffff; 77 | b[i++] = tmh >>> 8 & 0xff; 78 | b[i++] = tmh & 0xff; // `time_high_and_version` 79 | 80 | b[i++] = tmh >>> 24 & 0xf | 0x10; // include version 81 | 82 | b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) 83 | 84 | b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` 85 | 86 | b[i++] = clockseq & 0xff; // `node` 87 | 88 | for (var n = 0; n < 6; ++n) { 89 | b[i + n] = node[n]; 90 | } 91 | 92 | return buf || stringify(b); 93 | } 94 | 95 | export default v1; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-browser/v3.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import md5 from './md5.js'; 3 | var v3 = v35('v3', 0x30, md5); 4 | export default v3; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-browser/v35.js: -------------------------------------------------------------------------------- 1 | import stringify from './stringify.js'; 2 | import parse from './parse.js'; 3 | 4 | function stringToBytes(str) { 5 | str = unescape(encodeURIComponent(str)); // UTF8 escape 6 | 7 | var bytes = []; 8 | 9 | for (var i = 0; i < str.length; ++i) { 10 | bytes.push(str.charCodeAt(i)); 11 | } 12 | 13 | return bytes; 14 | } 15 | 16 | export var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; 17 | export var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; 18 | export default function (name, version, hashfunc) { 19 | function generateUUID(value, namespace, buf, offset) { 20 | if (typeof value === 'string') { 21 | value = stringToBytes(value); 22 | } 23 | 24 | if (typeof namespace === 'string') { 25 | namespace = parse(namespace); 26 | } 27 | 28 | if (namespace.length !== 16) { 29 | throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); 30 | } // Compute hash of namespace and value, Per 4.3 31 | // Future: Use spread syntax when supported on all platforms, e.g. `bytes = 32 | // hashfunc([...namespace, ... value])` 33 | 34 | 35 | var bytes = new Uint8Array(16 + value.length); 36 | bytes.set(namespace); 37 | bytes.set(value, namespace.length); 38 | bytes = hashfunc(bytes); 39 | bytes[6] = bytes[6] & 0x0f | version; 40 | bytes[8] = bytes[8] & 0x3f | 0x80; 41 | 42 | if (buf) { 43 | offset = offset || 0; 44 | 45 | for (var i = 0; i < 16; ++i) { 46 | buf[offset + i] = bytes[i]; 47 | } 48 | 49 | return buf; 50 | } 51 | 52 | return stringify(bytes); 53 | } // Function#name is not settable on some platforms (#270) 54 | 55 | 56 | try { 57 | generateUUID.name = name; // eslint-disable-next-line no-empty 58 | } catch (err) {} // For CommonJS default export support 59 | 60 | 61 | generateUUID.DNS = DNS; 62 | generateUUID.URL = URL; 63 | return generateUUID; 64 | } -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-browser/v4.js: -------------------------------------------------------------------------------- 1 | import rng from './rng.js'; 2 | import stringify from './stringify.js'; 3 | 4 | function v4(options, buf, offset) { 5 | options = options || {}; 6 | var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` 7 | 8 | rnds[6] = rnds[6] & 0x0f | 0x40; 9 | rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided 10 | 11 | if (buf) { 12 | offset = offset || 0; 13 | 14 | for (var i = 0; i < 16; ++i) { 15 | buf[offset + i] = rnds[i]; 16 | } 17 | 18 | return buf; 19 | } 20 | 21 | return stringify(rnds); 22 | } 23 | 24 | export default v4; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-browser/v5.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import sha1 from './sha1.js'; 3 | var v5 = v35('v5', 0x50, sha1); 4 | export default v5; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-browser/validate.js: -------------------------------------------------------------------------------- 1 | import REGEX from './regex.js'; 2 | 3 | function validate(uuid) { 4 | return typeof uuid === 'string' && REGEX.test(uuid); 5 | } 6 | 7 | export default validate; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-browser/version.js: -------------------------------------------------------------------------------- 1 | import validate from './validate.js'; 2 | 3 | function version(uuid) { 4 | if (!validate(uuid)) { 5 | throw TypeError('Invalid UUID'); 6 | } 7 | 8 | return parseInt(uuid.substr(14, 1), 16); 9 | } 10 | 11 | export default version; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/index.js: -------------------------------------------------------------------------------- 1 | export { default as v1 } from './v1.js'; 2 | export { default as v3 } from './v3.js'; 3 | export { default as v4 } from './v4.js'; 4 | export { default as v5 } from './v5.js'; 5 | export { default as NIL } from './nil.js'; 6 | export { default as version } from './version.js'; 7 | export { default as validate } from './validate.js'; 8 | export { default as stringify } from './stringify.js'; 9 | export { default as parse } from './parse.js'; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/md5.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | function md5(bytes) { 4 | if (Array.isArray(bytes)) { 5 | bytes = Buffer.from(bytes); 6 | } else if (typeof bytes === 'string') { 7 | bytes = Buffer.from(bytes, 'utf8'); 8 | } 9 | 10 | return crypto.createHash('md5').update(bytes).digest(); 11 | } 12 | 13 | export default md5; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/nil.js: -------------------------------------------------------------------------------- 1 | export default '00000000-0000-0000-0000-000000000000'; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/parse.js: -------------------------------------------------------------------------------- 1 | import validate from './validate.js'; 2 | 3 | function parse(uuid) { 4 | if (!validate(uuid)) { 5 | throw TypeError('Invalid UUID'); 6 | } 7 | 8 | let v; 9 | const arr = new Uint8Array(16); // Parse ########-....-....-....-............ 10 | 11 | arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; 12 | arr[1] = v >>> 16 & 0xff; 13 | arr[2] = v >>> 8 & 0xff; 14 | arr[3] = v & 0xff; // Parse ........-####-....-....-............ 15 | 16 | arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; 17 | arr[5] = v & 0xff; // Parse ........-....-####-....-............ 18 | 19 | arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; 20 | arr[7] = v & 0xff; // Parse ........-....-....-####-............ 21 | 22 | arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; 23 | arr[9] = v & 0xff; // Parse ........-....-....-....-############ 24 | // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) 25 | 26 | arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; 27 | arr[11] = v / 0x100000000 & 0xff; 28 | arr[12] = v >>> 24 & 0xff; 29 | arr[13] = v >>> 16 & 0xff; 30 | arr[14] = v >>> 8 & 0xff; 31 | arr[15] = v & 0xff; 32 | return arr; 33 | } 34 | 35 | export default parse; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/regex.js: -------------------------------------------------------------------------------- 1 | export 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; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/rng.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate 3 | 4 | let poolPtr = rnds8Pool.length; 5 | export default function rng() { 6 | if (poolPtr > rnds8Pool.length - 16) { 7 | crypto.randomFillSync(rnds8Pool); 8 | poolPtr = 0; 9 | } 10 | 11 | return rnds8Pool.slice(poolPtr, poolPtr += 16); 12 | } -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/sha1.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | function sha1(bytes) { 4 | if (Array.isArray(bytes)) { 5 | bytes = Buffer.from(bytes); 6 | } else if (typeof bytes === 'string') { 7 | bytes = Buffer.from(bytes, 'utf8'); 8 | } 9 | 10 | return crypto.createHash('sha1').update(bytes).digest(); 11 | } 12 | 13 | export default sha1; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/stringify.js: -------------------------------------------------------------------------------- 1 | import validate from './validate.js'; 2 | /** 3 | * Convert array of 16 byte values to UUID string format of the form: 4 | * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX 5 | */ 6 | 7 | const byteToHex = []; 8 | 9 | for (let i = 0; i < 256; ++i) { 10 | byteToHex.push((i + 0x100).toString(16).substr(1)); 11 | } 12 | 13 | function stringify(arr, offset = 0) { 14 | // Note: Be careful editing this code! It's been tuned for performance 15 | // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 16 | 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 17 | // of the following: 18 | // - One or more input array values don't map to a hex octet (leading to 19 | // "undefined" in the uuid) 20 | // - Invalid input values for the RFC `version` or `variant` fields 21 | 22 | if (!validate(uuid)) { 23 | throw TypeError('Stringified UUID is invalid'); 24 | } 25 | 26 | return uuid; 27 | } 28 | 29 | export default stringify; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/v1.js: -------------------------------------------------------------------------------- 1 | import rng from './rng.js'; 2 | import stringify from './stringify.js'; // **`v1()` - Generate time-based UUID** 3 | // 4 | // Inspired by https://github.com/LiosK/UUID.js 5 | // and http://docs.python.org/library/uuid.html 6 | 7 | let _nodeId; 8 | 9 | let _clockseq; // Previous uuid creation time 10 | 11 | 12 | let _lastMSecs = 0; 13 | let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details 14 | 15 | function v1(options, buf, offset) { 16 | let i = buf && offset || 0; 17 | const b = buf || new Array(16); 18 | options = options || {}; 19 | let node = options.node || _nodeId; 20 | let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not 21 | // specified. We do this lazily to minimize issues related to insufficient 22 | // system entropy. See #189 23 | 24 | if (node == null || clockseq == null) { 25 | const seedBytes = options.random || (options.rng || rng)(); 26 | 27 | if (node == null) { 28 | // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) 29 | node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; 30 | } 31 | 32 | if (clockseq == null) { 33 | // Per 4.2.2, randomize (14 bit) clockseq 34 | clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; 35 | } 36 | } // UUID timestamps are 100 nano-second units since the Gregorian epoch, 37 | // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so 38 | // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' 39 | // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. 40 | 41 | 42 | let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock 43 | // cycle to simulate higher resolution clock 44 | 45 | let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) 46 | 47 | const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression 48 | 49 | if (dt < 0 && options.clockseq === undefined) { 50 | clockseq = clockseq + 1 & 0x3fff; 51 | } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new 52 | // time interval 53 | 54 | 55 | if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { 56 | nsecs = 0; 57 | } // Per 4.2.1.2 Throw error if too many uuids are requested 58 | 59 | 60 | if (nsecs >= 10000) { 61 | throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); 62 | } 63 | 64 | _lastMSecs = msecs; 65 | _lastNSecs = nsecs; 66 | _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch 67 | 68 | msecs += 12219292800000; // `time_low` 69 | 70 | const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; 71 | b[i++] = tl >>> 24 & 0xff; 72 | b[i++] = tl >>> 16 & 0xff; 73 | b[i++] = tl >>> 8 & 0xff; 74 | b[i++] = tl & 0xff; // `time_mid` 75 | 76 | const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; 77 | b[i++] = tmh >>> 8 & 0xff; 78 | b[i++] = tmh & 0xff; // `time_high_and_version` 79 | 80 | b[i++] = tmh >>> 24 & 0xf | 0x10; // include version 81 | 82 | b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) 83 | 84 | b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` 85 | 86 | b[i++] = clockseq & 0xff; // `node` 87 | 88 | for (let n = 0; n < 6; ++n) { 89 | b[i + n] = node[n]; 90 | } 91 | 92 | return buf || stringify(b); 93 | } 94 | 95 | export default v1; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/v3.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import md5 from './md5.js'; 3 | const v3 = v35('v3', 0x30, md5); 4 | export default v3; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/v35.js: -------------------------------------------------------------------------------- 1 | import stringify from './stringify.js'; 2 | import parse from './parse.js'; 3 | 4 | function stringToBytes(str) { 5 | str = unescape(encodeURIComponent(str)); // UTF8 escape 6 | 7 | const bytes = []; 8 | 9 | for (let i = 0; i < str.length; ++i) { 10 | bytes.push(str.charCodeAt(i)); 11 | } 12 | 13 | return bytes; 14 | } 15 | 16 | export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; 17 | export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; 18 | export default function (name, version, hashfunc) { 19 | function generateUUID(value, namespace, buf, offset) { 20 | if (typeof value === 'string') { 21 | value = stringToBytes(value); 22 | } 23 | 24 | if (typeof namespace === 'string') { 25 | namespace = parse(namespace); 26 | } 27 | 28 | if (namespace.length !== 16) { 29 | throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); 30 | } // Compute hash of namespace and value, Per 4.3 31 | // Future: Use spread syntax when supported on all platforms, e.g. `bytes = 32 | // hashfunc([...namespace, ... value])` 33 | 34 | 35 | let bytes = new Uint8Array(16 + value.length); 36 | bytes.set(namespace); 37 | bytes.set(value, namespace.length); 38 | bytes = hashfunc(bytes); 39 | bytes[6] = bytes[6] & 0x0f | version; 40 | bytes[8] = bytes[8] & 0x3f | 0x80; 41 | 42 | if (buf) { 43 | offset = offset || 0; 44 | 45 | for (let i = 0; i < 16; ++i) { 46 | buf[offset + i] = bytes[i]; 47 | } 48 | 49 | return buf; 50 | } 51 | 52 | return stringify(bytes); 53 | } // Function#name is not settable on some platforms (#270) 54 | 55 | 56 | try { 57 | generateUUID.name = name; // eslint-disable-next-line no-empty 58 | } catch (err) {} // For CommonJS default export support 59 | 60 | 61 | generateUUID.DNS = DNS; 62 | generateUUID.URL = URL; 63 | return generateUUID; 64 | } -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/v4.js: -------------------------------------------------------------------------------- 1 | import rng from './rng.js'; 2 | import stringify from './stringify.js'; 3 | 4 | function v4(options, buf, offset) { 5 | options = options || {}; 6 | const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` 7 | 8 | rnds[6] = rnds[6] & 0x0f | 0x40; 9 | rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided 10 | 11 | if (buf) { 12 | offset = offset || 0; 13 | 14 | for (let i = 0; i < 16; ++i) { 15 | buf[offset + i] = rnds[i]; 16 | } 17 | 18 | return buf; 19 | } 20 | 21 | return stringify(rnds); 22 | } 23 | 24 | export default v4; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/v5.js: -------------------------------------------------------------------------------- 1 | import v35 from './v35.js'; 2 | import sha1 from './sha1.js'; 3 | const v5 = v35('v5', 0x50, sha1); 4 | export default v5; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/validate.js: -------------------------------------------------------------------------------- 1 | import REGEX from './regex.js'; 2 | 3 | function validate(uuid) { 4 | return typeof uuid === 'string' && REGEX.test(uuid); 5 | } 6 | 7 | export default validate; -------------------------------------------------------------------------------- /node_modules/uuid/dist/esm-node/version.js: -------------------------------------------------------------------------------- 1 | import validate from './validate.js'; 2 | 3 | function version(uuid) { 4 | if (!validate(uuid)) { 5 | throw TypeError('Invalid UUID'); 6 | } 7 | 8 | return parseInt(uuid.substr(14, 1), 16); 9 | } 10 | 11 | export default version; -------------------------------------------------------------------------------- /node_modules/uuid/dist/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | Object.defineProperty(exports, "v1", { 7 | enumerable: true, 8 | get: function () { 9 | return _v.default; 10 | } 11 | }); 12 | Object.defineProperty(exports, "v3", { 13 | enumerable: true, 14 | get: function () { 15 | return _v2.default; 16 | } 17 | }); 18 | Object.defineProperty(exports, "v4", { 19 | enumerable: true, 20 | get: function () { 21 | return _v3.default; 22 | } 23 | }); 24 | Object.defineProperty(exports, "v5", { 25 | enumerable: true, 26 | get: function () { 27 | return _v4.default; 28 | } 29 | }); 30 | Object.defineProperty(exports, "NIL", { 31 | enumerable: true, 32 | get: function () { 33 | return _nil.default; 34 | } 35 | }); 36 | Object.defineProperty(exports, "version", { 37 | enumerable: true, 38 | get: function () { 39 | return _version.default; 40 | } 41 | }); 42 | Object.defineProperty(exports, "validate", { 43 | enumerable: true, 44 | get: function () { 45 | return _validate.default; 46 | } 47 | }); 48 | Object.defineProperty(exports, "stringify", { 49 | enumerable: true, 50 | get: function () { 51 | return _stringify.default; 52 | } 53 | }); 54 | Object.defineProperty(exports, "parse", { 55 | enumerable: true, 56 | get: function () { 57 | return _parse.default; 58 | } 59 | }); 60 | 61 | var _v = _interopRequireDefault(require("./v1.js")); 62 | 63 | var _v2 = _interopRequireDefault(require("./v3.js")); 64 | 65 | var _v3 = _interopRequireDefault(require("./v4.js")); 66 | 67 | var _v4 = _interopRequireDefault(require("./v5.js")); 68 | 69 | var _nil = _interopRequireDefault(require("./nil.js")); 70 | 71 | var _version = _interopRequireDefault(require("./version.js")); 72 | 73 | var _validate = _interopRequireDefault(require("./validate.js")); 74 | 75 | var _stringify = _interopRequireDefault(require("./stringify.js")); 76 | 77 | var _parse = _interopRequireDefault(require("./parse.js")); 78 | 79 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -------------------------------------------------------------------------------- /node_modules/uuid/dist/md5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function md5(bytes) { 13 | if (Array.isArray(bytes)) { 14 | bytes = Buffer.from(bytes); 15 | } else if (typeof bytes === 'string') { 16 | bytes = Buffer.from(bytes, 'utf8'); 17 | } 18 | 19 | return _crypto.default.createHash('md5').update(bytes).digest(); 20 | } 21 | 22 | var _default = md5; 23 | exports.default = _default; -------------------------------------------------------------------------------- /node_modules/uuid/dist/nil.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | var _default = '00000000-0000-0000-0000-000000000000'; 8 | exports.default = _default; -------------------------------------------------------------------------------- /node_modules/uuid/dist/parse.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _validate = _interopRequireDefault(require("./validate.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function parse(uuid) { 13 | if (!(0, _validate.default)(uuid)) { 14 | throw TypeError('Invalid UUID'); 15 | } 16 | 17 | let v; 18 | const arr = new Uint8Array(16); // Parse ########-....-....-....-............ 19 | 20 | arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; 21 | arr[1] = v >>> 16 & 0xff; 22 | arr[2] = v >>> 8 & 0xff; 23 | arr[3] = v & 0xff; // Parse ........-####-....-....-............ 24 | 25 | arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; 26 | arr[5] = v & 0xff; // Parse ........-....-####-....-............ 27 | 28 | arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; 29 | arr[7] = v & 0xff; // Parse ........-....-....-####-............ 30 | 31 | arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; 32 | arr[9] = v & 0xff; // Parse ........-....-....-....-############ 33 | // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) 34 | 35 | arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; 36 | arr[11] = v / 0x100000000 & 0xff; 37 | arr[12] = v >>> 24 & 0xff; 38 | arr[13] = v >>> 16 & 0xff; 39 | arr[14] = v >>> 8 & 0xff; 40 | arr[15] = v & 0xff; 41 | return arr; 42 | } 43 | 44 | var _default = parse; 45 | exports.default = _default; -------------------------------------------------------------------------------- /node_modules/uuid/dist/regex.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 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; 8 | exports.default = _default; -------------------------------------------------------------------------------- /node_modules/uuid/dist/rng-browser.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = rng; 7 | // Unique ID creation requires a high quality random # generator. In the browser we therefore 8 | // require the crypto API and do not support built-in fallback to lower quality random number 9 | // generators (like Math.random()). 10 | let getRandomValues; 11 | const rnds8 = new Uint8Array(16); 12 | 13 | function rng() { 14 | // lazy load so that environments that need to polyfill have a chance to do so 15 | if (!getRandomValues) { 16 | // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also, 17 | // find the complete implementation of crypto (msCrypto) on IE11. 18 | getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto); 19 | 20 | if (!getRandomValues) { 21 | throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); 22 | } 23 | } 24 | 25 | return getRandomValues(rnds8); 26 | } -------------------------------------------------------------------------------- /node_modules/uuid/dist/rng.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = rng; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate 13 | 14 | let poolPtr = rnds8Pool.length; 15 | 16 | function rng() { 17 | if (poolPtr > rnds8Pool.length - 16) { 18 | _crypto.default.randomFillSync(rnds8Pool); 19 | 20 | poolPtr = 0; 21 | } 22 | 23 | return rnds8Pool.slice(poolPtr, poolPtr += 16); 24 | } -------------------------------------------------------------------------------- /node_modules/uuid/dist/sha1-browser.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | // Adapted from Chris Veness' SHA1 code at 9 | // http://www.movable-type.co.uk/scripts/sha1.html 10 | function f(s, x, y, z) { 11 | switch (s) { 12 | case 0: 13 | return x & y ^ ~x & z; 14 | 15 | case 1: 16 | return x ^ y ^ z; 17 | 18 | case 2: 19 | return x & y ^ x & z ^ y & z; 20 | 21 | case 3: 22 | return x ^ y ^ z; 23 | } 24 | } 25 | 26 | function ROTL(x, n) { 27 | return x << n | x >>> 32 - n; 28 | } 29 | 30 | function sha1(bytes) { 31 | const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; 32 | const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; 33 | 34 | if (typeof bytes === 'string') { 35 | const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape 36 | 37 | bytes = []; 38 | 39 | for (let i = 0; i < msg.length; ++i) { 40 | bytes.push(msg.charCodeAt(i)); 41 | } 42 | } else if (!Array.isArray(bytes)) { 43 | // Convert Array-like to Array 44 | bytes = Array.prototype.slice.call(bytes); 45 | } 46 | 47 | bytes.push(0x80); 48 | const l = bytes.length / 4 + 2; 49 | const N = Math.ceil(l / 16); 50 | const M = new Array(N); 51 | 52 | for (let i = 0; i < N; ++i) { 53 | const arr = new Uint32Array(16); 54 | 55 | for (let j = 0; j < 16; ++j) { 56 | arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3]; 57 | } 58 | 59 | M[i] = arr; 60 | } 61 | 62 | M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); 63 | M[N - 1][14] = Math.floor(M[N - 1][14]); 64 | M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; 65 | 66 | for (let i = 0; i < N; ++i) { 67 | const W = new Uint32Array(80); 68 | 69 | for (let t = 0; t < 16; ++t) { 70 | W[t] = M[i][t]; 71 | } 72 | 73 | for (let t = 16; t < 80; ++t) { 74 | W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1); 75 | } 76 | 77 | let a = H[0]; 78 | let b = H[1]; 79 | let c = H[2]; 80 | let d = H[3]; 81 | let e = H[4]; 82 | 83 | for (let t = 0; t < 80; ++t) { 84 | const s = Math.floor(t / 20); 85 | const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0; 86 | e = d; 87 | d = c; 88 | c = ROTL(b, 30) >>> 0; 89 | b = a; 90 | a = T; 91 | } 92 | 93 | H[0] = H[0] + a >>> 0; 94 | H[1] = H[1] + b >>> 0; 95 | H[2] = H[2] + c >>> 0; 96 | H[3] = H[3] + d >>> 0; 97 | H[4] = H[4] + e >>> 0; 98 | } 99 | 100 | return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; 101 | } 102 | 103 | var _default = sha1; 104 | exports.default = _default; -------------------------------------------------------------------------------- /node_modules/uuid/dist/sha1.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _crypto = _interopRequireDefault(require("crypto")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function sha1(bytes) { 13 | if (Array.isArray(bytes)) { 14 | bytes = Buffer.from(bytes); 15 | } else if (typeof bytes === 'string') { 16 | bytes = Buffer.from(bytes, 'utf8'); 17 | } 18 | 19 | return _crypto.default.createHash('sha1').update(bytes).digest(); 20 | } 21 | 22 | var _default = sha1; 23 | exports.default = _default; -------------------------------------------------------------------------------- /node_modules/uuid/dist/stringify.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _validate = _interopRequireDefault(require("./validate.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | /** 13 | * Convert array of 16 byte values to UUID string format of the form: 14 | * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX 15 | */ 16 | const byteToHex = []; 17 | 18 | for (let i = 0; i < 256; ++i) { 19 | byteToHex.push((i + 0x100).toString(16).substr(1)); 20 | } 21 | 22 | function stringify(arr, offset = 0) { 23 | // Note: Be careful editing this code! It's been tuned for performance 24 | // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 25 | 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 26 | // of the following: 27 | // - One or more input array values don't map to a hex octet (leading to 28 | // "undefined" in the uuid) 29 | // - Invalid input values for the RFC `version` or `variant` fields 30 | 31 | if (!(0, _validate.default)(uuid)) { 32 | throw TypeError('Stringified UUID is invalid'); 33 | } 34 | 35 | return uuid; 36 | } 37 | 38 | var _default = stringify; 39 | exports.default = _default; -------------------------------------------------------------------------------- /node_modules/uuid/dist/umd/uuidNIL.min.js: -------------------------------------------------------------------------------- 1 | !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidNIL=n()}(this,(function(){"use strict";return"00000000-0000-0000-0000-000000000000"})); -------------------------------------------------------------------------------- /node_modules/uuid/dist/umd/uuidParse.min.js: -------------------------------------------------------------------------------- 1 | !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidParse=n()}(this,(function(){"use strict";var e=/^(?:[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;return function(n){if(!function(n){return"string"==typeof n&&e.test(n)}(n))throw TypeError("Invalid UUID");var t,i=new Uint8Array(16);return i[0]=(t=parseInt(n.slice(0,8),16))>>>24,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i[4]=(t=parseInt(n.slice(9,13),16))>>>8,i[5]=255&t,i[6]=(t=parseInt(n.slice(14,18),16))>>>8,i[7]=255&t,i[8]=(t=parseInt(n.slice(19,23),16))>>>8,i[9]=255&t,i[10]=(t=parseInt(n.slice(24,36),16))/1099511627776&255,i[11]=t/4294967296&255,i[12]=t>>>24&255,i[13]=t>>>16&255,i[14]=t>>>8&255,i[15]=255&t,i}})); -------------------------------------------------------------------------------- /node_modules/uuid/dist/umd/uuidStringify.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidStringify=t()}(this,(function(){"use strict";var e=/^(?:[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;function t(t){return"string"==typeof t&&e.test(t)}for(var i=[],n=0;n<256;++n)i.push((n+256).toString(16).substr(1));return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,f=(i[e[n+0]]+i[e[n+1]]+i[e[n+2]]+i[e[n+3]]+"-"+i[e[n+4]]+i[e[n+5]]+"-"+i[e[n+6]]+i[e[n+7]]+"-"+i[e[n+8]]+i[e[n+9]]+"-"+i[e[n+10]]+i[e[n+11]]+i[e[n+12]]+i[e[n+13]]+i[e[n+14]]+i[e[n+15]]).toLowerCase();if(!t(f))throw TypeError("Stringified UUID is invalid");return f}})); -------------------------------------------------------------------------------- /node_modules/uuid/dist/umd/uuidValidate.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidValidate=t()}(this,(function(){"use strict";var e=/^(?:[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;return function(t){return"string"==typeof t&&e.test(t)}})); -------------------------------------------------------------------------------- /node_modules/uuid/dist/umd/uuidVersion.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidVersion=t()}(this,(function(){"use strict";var e=/^(?:[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;return function(t){if(!function(t){return"string"==typeof t&&e.test(t)}(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}})); -------------------------------------------------------------------------------- /node_modules/uuid/dist/umd/uuidv1.min.js: -------------------------------------------------------------------------------- 1 | !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidv1=o()}(this,(function(){"use strict";var e,o=new Uint8Array(16);function t(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(o)}var n=/^(?:[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;function r(e){return"string"==typeof e&&n.test(e)}for(var i,u,s=[],a=0;a<256;++a)s.push((a+256).toString(16).substr(1));var d=0,f=0;return function(e,o,n){var a=o&&n||0,c=o||new Array(16),l=(e=e||{}).node||i,p=void 0!==e.clockseq?e.clockseq:u;if(null==l||null==p){var v=e.random||(e.rng||t)();null==l&&(l=i=[1|v[0],v[1],v[2],v[3],v[4],v[5]]),null==p&&(p=u=16383&(v[6]<<8|v[7]))}var y=void 0!==e.msecs?e.msecs:Date.now(),m=void 0!==e.nsecs?e.nsecs:f+1,g=y-d+(m-f)/1e4;if(g<0&&void 0===e.clockseq&&(p=p+1&16383),(g<0||y>d)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=y,f=m,u=p;var h=(1e4*(268435455&(y+=122192928e5))+m)%4294967296;c[a++]=h>>>24&255,c[a++]=h>>>16&255,c[a++]=h>>>8&255,c[a++]=255&h;var w=y/4294967296*1e4&268435455;c[a++]=w>>>8&255,c[a++]=255&w,c[a++]=w>>>24&15|16,c[a++]=w>>>16&255,c[a++]=p>>>8|128,c[a++]=255&p;for(var b=0;b<6;++b)c[a+b]=l[b];return o||function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=(s[e[o+0]]+s[e[o+1]]+s[e[o+2]]+s[e[o+3]]+"-"+s[e[o+4]]+s[e[o+5]]+"-"+s[e[o+6]]+s[e[o+7]]+"-"+s[e[o+8]]+s[e[o+9]]+"-"+s[e[o+10]]+s[e[o+11]]+s[e[o+12]]+s[e[o+13]]+s[e[o+14]]+s[e[o+15]]).toLowerCase();if(!r(t))throw TypeError("Stringified UUID is invalid");return t}(c)}})); -------------------------------------------------------------------------------- /node_modules/uuid/dist/umd/uuidv4.min.js: -------------------------------------------------------------------------------- 1 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).uuidv4=e()}(this,(function(){"use strict";var t,e=new Uint8Array(16);function o(){if(!t&&!(t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(e)}var n=/^(?:[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;function r(t){return"string"==typeof t&&n.test(t)}for(var i=[],u=0;u<256;++u)i.push((u+256).toString(16).substr(1));return function(t,e,n){var u=(t=t||{}).random||(t.rng||o)();if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,e){n=n||0;for(var f=0;f<16;++f)e[n+f]=u[f];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=(i[t[e+0]]+i[t[e+1]]+i[t[e+2]]+i[t[e+3]]+"-"+i[t[e+4]]+i[t[e+5]]+"-"+i[t[e+6]]+i[t[e+7]]+"-"+i[t[e+8]]+i[t[e+9]]+"-"+i[t[e+10]]+i[t[e+11]]+i[t[e+12]]+i[t[e+13]]+i[t[e+14]]+i[t[e+15]]).toLowerCase();if(!r(o))throw TypeError("Stringified UUID is invalid");return o}(u)}})); -------------------------------------------------------------------------------- /node_modules/uuid/dist/umd/uuidv5.min.js: -------------------------------------------------------------------------------- 1 | !function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r="undefined"!=typeof globalThis?globalThis:r||self).uuidv5=e()}(this,(function(){"use strict";var r=/^(?:[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;function e(e){return"string"==typeof e&&r.test(e)}for(var t=[],n=0;n<256;++n)t.push((n+256).toString(16).substr(1));function a(r,e,t,n){switch(r){case 0:return e&t^~e&n;case 1:return e^t^n;case 2:return e&t^e&n^t&n;case 3:return e^t^n}}function o(r,e){return r<>>32-e}return function(r,n,a){function o(r,o,i,f){if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var e=[],t=0;t>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(r.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(r.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(r.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+r.length);if(s.set(o),s.set(r,o.length),(s=a(s))[6]=15&s[6]|n,s[8]=63&s[8]|128,i){f=f||0;for(var u=0;u<16;++u)i[f+u]=s[u];return i}return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=(t[r[n+0]]+t[r[n+1]]+t[r[n+2]]+t[r[n+3]]+"-"+t[r[n+4]]+t[r[n+5]]+"-"+t[r[n+6]]+t[r[n+7]]+"-"+t[r[n+8]]+t[r[n+9]]+"-"+t[r[n+10]]+t[r[n+11]]+t[r[n+12]]+t[r[n+13]]+t[r[n+14]]+t[r[n+15]]).toLowerCase();if(!e(a))throw TypeError("Stringified UUID is invalid");return a}(s)}try{o.name=r}catch(r){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var n=unescape(encodeURIComponent(r));r=[];for(var i=0;i>>0;A=U,U=w,w=o(b,30)>>>0,b=g,g=C}t[0]=t[0]+g>>>0,t[1]=t[1]+b>>>0,t[2]=t[2]+w>>>0,t[3]=t[3]+U>>>0,t[4]=t[4]+A>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,255&t[0],t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,255&t[1],t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,255&t[2],t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,255&t[3],t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,255&t[4]]}))})); -------------------------------------------------------------------------------- /node_modules/uuid/dist/uuid-bin.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var _assert = _interopRequireDefault(require("assert")); 4 | 5 | var _v = _interopRequireDefault(require("./v1.js")); 6 | 7 | var _v2 = _interopRequireDefault(require("./v3.js")); 8 | 9 | var _v3 = _interopRequireDefault(require("./v4.js")); 10 | 11 | var _v4 = _interopRequireDefault(require("./v5.js")); 12 | 13 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 14 | 15 | function usage() { 16 | console.log('Usage:'); 17 | console.log(' uuid'); 18 | console.log(' uuid v1'); 19 | console.log(' uuid v3 '); 20 | console.log(' uuid v4'); 21 | console.log(' uuid v5 '); 22 | console.log(' uuid --help'); 23 | console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'); 24 | } 25 | 26 | const args = process.argv.slice(2); 27 | 28 | if (args.indexOf('--help') >= 0) { 29 | usage(); 30 | process.exit(0); 31 | } 32 | 33 | const version = args.shift() || 'v4'; 34 | 35 | switch (version) { 36 | case 'v1': 37 | console.log((0, _v.default)()); 38 | break; 39 | 40 | case 'v3': 41 | { 42 | const name = args.shift(); 43 | let namespace = args.shift(); 44 | (0, _assert.default)(name != null, 'v3 name not specified'); 45 | (0, _assert.default)(namespace != null, 'v3 namespace not specified'); 46 | 47 | if (namespace === 'URL') { 48 | namespace = _v2.default.URL; 49 | } 50 | 51 | if (namespace === 'DNS') { 52 | namespace = _v2.default.DNS; 53 | } 54 | 55 | console.log((0, _v2.default)(name, namespace)); 56 | break; 57 | } 58 | 59 | case 'v4': 60 | console.log((0, _v3.default)()); 61 | break; 62 | 63 | case 'v5': 64 | { 65 | const name = args.shift(); 66 | let namespace = args.shift(); 67 | (0, _assert.default)(name != null, 'v5 name not specified'); 68 | (0, _assert.default)(namespace != null, 'v5 namespace not specified'); 69 | 70 | if (namespace === 'URL') { 71 | namespace = _v4.default.URL; 72 | } 73 | 74 | if (namespace === 'DNS') { 75 | namespace = _v4.default.DNS; 76 | } 77 | 78 | console.log((0, _v4.default)(name, namespace)); 79 | break; 80 | } 81 | 82 | default: 83 | usage(); 84 | process.exit(1); 85 | } -------------------------------------------------------------------------------- /node_modules/uuid/dist/v1.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _rng = _interopRequireDefault(require("./rng.js")); 9 | 10 | var _stringify = _interopRequireDefault(require("./stringify.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | // **`v1()` - Generate time-based UUID** 15 | // 16 | // Inspired by https://github.com/LiosK/UUID.js 17 | // and http://docs.python.org/library/uuid.html 18 | let _nodeId; 19 | 20 | let _clockseq; // Previous uuid creation time 21 | 22 | 23 | let _lastMSecs = 0; 24 | let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details 25 | 26 | function v1(options, buf, offset) { 27 | let i = buf && offset || 0; 28 | const b = buf || new Array(16); 29 | options = options || {}; 30 | let node = options.node || _nodeId; 31 | let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not 32 | // specified. We do this lazily to minimize issues related to insufficient 33 | // system entropy. See #189 34 | 35 | if (node == null || clockseq == null) { 36 | const seedBytes = options.random || (options.rng || _rng.default)(); 37 | 38 | if (node == null) { 39 | // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) 40 | node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; 41 | } 42 | 43 | if (clockseq == null) { 44 | // Per 4.2.2, randomize (14 bit) clockseq 45 | clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; 46 | } 47 | } // UUID timestamps are 100 nano-second units since the Gregorian epoch, 48 | // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so 49 | // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' 50 | // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. 51 | 52 | 53 | let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock 54 | // cycle to simulate higher resolution clock 55 | 56 | let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) 57 | 58 | const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression 59 | 60 | if (dt < 0 && options.clockseq === undefined) { 61 | clockseq = clockseq + 1 & 0x3fff; 62 | } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new 63 | // time interval 64 | 65 | 66 | if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { 67 | nsecs = 0; 68 | } // Per 4.2.1.2 Throw error if too many uuids are requested 69 | 70 | 71 | if (nsecs >= 10000) { 72 | throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); 73 | } 74 | 75 | _lastMSecs = msecs; 76 | _lastNSecs = nsecs; 77 | _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch 78 | 79 | msecs += 12219292800000; // `time_low` 80 | 81 | const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; 82 | b[i++] = tl >>> 24 & 0xff; 83 | b[i++] = tl >>> 16 & 0xff; 84 | b[i++] = tl >>> 8 & 0xff; 85 | b[i++] = tl & 0xff; // `time_mid` 86 | 87 | const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; 88 | b[i++] = tmh >>> 8 & 0xff; 89 | b[i++] = tmh & 0xff; // `time_high_and_version` 90 | 91 | b[i++] = tmh >>> 24 & 0xf | 0x10; // include version 92 | 93 | b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) 94 | 95 | b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` 96 | 97 | b[i++] = clockseq & 0xff; // `node` 98 | 99 | for (let n = 0; n < 6; ++n) { 100 | b[i + n] = node[n]; 101 | } 102 | 103 | return buf || (0, _stringify.default)(b); 104 | } 105 | 106 | var _default = v1; 107 | exports.default = _default; -------------------------------------------------------------------------------- /node_modules/uuid/dist/v3.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _md = _interopRequireDefault(require("./md5.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v3 = (0, _v.default)('v3', 0x30, _md.default); 15 | var _default = v3; 16 | exports.default = _default; -------------------------------------------------------------------------------- /node_modules/uuid/dist/v35.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = _default; 7 | exports.URL = exports.DNS = void 0; 8 | 9 | var _stringify = _interopRequireDefault(require("./stringify.js")); 10 | 11 | var _parse = _interopRequireDefault(require("./parse.js")); 12 | 13 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 14 | 15 | function stringToBytes(str) { 16 | str = unescape(encodeURIComponent(str)); // UTF8 escape 17 | 18 | const bytes = []; 19 | 20 | for (let i = 0; i < str.length; ++i) { 21 | bytes.push(str.charCodeAt(i)); 22 | } 23 | 24 | return bytes; 25 | } 26 | 27 | const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; 28 | exports.DNS = DNS; 29 | const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; 30 | exports.URL = URL; 31 | 32 | function _default(name, version, hashfunc) { 33 | function generateUUID(value, namespace, buf, offset) { 34 | if (typeof value === 'string') { 35 | value = stringToBytes(value); 36 | } 37 | 38 | if (typeof namespace === 'string') { 39 | namespace = (0, _parse.default)(namespace); 40 | } 41 | 42 | if (namespace.length !== 16) { 43 | throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); 44 | } // Compute hash of namespace and value, Per 4.3 45 | // Future: Use spread syntax when supported on all platforms, e.g. `bytes = 46 | // hashfunc([...namespace, ... value])` 47 | 48 | 49 | let bytes = new Uint8Array(16 + value.length); 50 | bytes.set(namespace); 51 | bytes.set(value, namespace.length); 52 | bytes = hashfunc(bytes); 53 | bytes[6] = bytes[6] & 0x0f | version; 54 | bytes[8] = bytes[8] & 0x3f | 0x80; 55 | 56 | if (buf) { 57 | offset = offset || 0; 58 | 59 | for (let i = 0; i < 16; ++i) { 60 | buf[offset + i] = bytes[i]; 61 | } 62 | 63 | return buf; 64 | } 65 | 66 | return (0, _stringify.default)(bytes); 67 | } // Function#name is not settable on some platforms (#270) 68 | 69 | 70 | try { 71 | generateUUID.name = name; // eslint-disable-next-line no-empty 72 | } catch (err) {} // For CommonJS default export support 73 | 74 | 75 | generateUUID.DNS = DNS; 76 | generateUUID.URL = URL; 77 | return generateUUID; 78 | } -------------------------------------------------------------------------------- /node_modules/uuid/dist/v4.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _rng = _interopRequireDefault(require("./rng.js")); 9 | 10 | var _stringify = _interopRequireDefault(require("./stringify.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | function v4(options, buf, offset) { 15 | options = options || {}; 16 | 17 | const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` 18 | 19 | 20 | rnds[6] = rnds[6] & 0x0f | 0x40; 21 | rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided 22 | 23 | if (buf) { 24 | offset = offset || 0; 25 | 26 | for (let i = 0; i < 16; ++i) { 27 | buf[offset + i] = rnds[i]; 28 | } 29 | 30 | return buf; 31 | } 32 | 33 | return (0, _stringify.default)(rnds); 34 | } 35 | 36 | var _default = v4; 37 | exports.default = _default; -------------------------------------------------------------------------------- /node_modules/uuid/dist/v5.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _v = _interopRequireDefault(require("./v35.js")); 9 | 10 | var _sha = _interopRequireDefault(require("./sha1.js")); 11 | 12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 | 14 | const v5 = (0, _v.default)('v5', 0x50, _sha.default); 15 | var _default = v5; 16 | exports.default = _default; -------------------------------------------------------------------------------- /node_modules/uuid/dist/validate.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _regex = _interopRequireDefault(require("./regex.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function validate(uuid) { 13 | return typeof uuid === 'string' && _regex.default.test(uuid); 14 | } 15 | 16 | var _default = validate; 17 | exports.default = _default; -------------------------------------------------------------------------------- /node_modules/uuid/dist/version.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | Object.defineProperty(exports, "__esModule", { 4 | value: true 5 | }); 6 | exports.default = void 0; 7 | 8 | var _validate = _interopRequireDefault(require("./validate.js")); 9 | 10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 11 | 12 | function version(uuid) { 13 | if (!(0, _validate.default)(uuid)) { 14 | throw TypeError('Invalid UUID'); 15 | } 16 | 17 | return parseInt(uuid.substr(14, 1), 16); 18 | } 19 | 20 | var _default = version; 21 | exports.default = _default; -------------------------------------------------------------------------------- /node_modules/uuid/wrapper.mjs: -------------------------------------------------------------------------------- 1 | import uuid from './dist/index.js'; 2 | export const v1 = uuid.v1; 3 | export const v3 = uuid.v3; 4 | export const v4 = uuid.v4; 5 | export const v5 = uuid.v5; 6 | export const NIL = uuid.NIL; 7 | export const version = uuid.version; 8 | export const validate = uuid.validate; 9 | export const stringify = uuid.stringify; 10 | export const parse = uuid.parse; 11 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "github-action-setup-ddev", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "github-action-setup-ddev", 9 | "version": "1.0.0", 10 | "license": "GPL v3", 11 | "dependencies": { 12 | "@actions/core": "^1.10.0", 13 | "@types/node": "^20.11.25" 14 | }, 15 | "engines": { 16 | "node": "^20.11.0" 17 | } 18 | }, 19 | "node_modules/@actions/core": { 20 | "version": "1.10.0", 21 | "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", 22 | "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", 23 | "dependencies": { 24 | "@actions/http-client": "^2.0.1", 25 | "uuid": "^8.3.2" 26 | } 27 | }, 28 | "node_modules/@actions/http-client": { 29 | "version": "2.0.1", 30 | "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", 31 | "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", 32 | "license": "MIT", 33 | "dependencies": { 34 | "tunnel": "^0.0.6" 35 | } 36 | }, 37 | "node_modules/@types/node": { 38 | "version": "20.11.25", 39 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", 40 | "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", 41 | "dependencies": { 42 | "undici-types": "~5.26.4" 43 | } 44 | }, 45 | "node_modules/tunnel": { 46 | "version": "0.0.6", 47 | "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", 48 | "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", 49 | "license": "MIT", 50 | "engines": { 51 | "node": ">=0.6.11 <=0.7.0 || >=0.7.3" 52 | } 53 | }, 54 | "node_modules/undici-types": { 55 | "version": "5.26.5", 56 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", 57 | "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" 58 | }, 59 | "node_modules/uuid": { 60 | "version": "8.3.2", 61 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 62 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", 63 | "bin": { 64 | "uuid": "dist/bin/uuid" 65 | } 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "github-action-setup-ddev", 3 | "version": "1.0.0", 4 | "private": true, 5 | "license": "GPL v3", 6 | "description": "", 7 | "main": "lib/main.js", 8 | "repository": { 9 | "type": "git", 10 | "url": "git+https://github.com/ddev/github-action-setup-ddev.git" 11 | }, 12 | "keywords": [ 13 | "actions", 14 | "ddev", 15 | "setup" 16 | ], 17 | "engines": { 18 | "node": "^20.11.0" 19 | }, 20 | "author": "Jonas Eberle", 21 | "dependencies": { 22 | "@actions/core": "^1.10.0", 23 | "@types/node": "^20.11.25" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/fixtures/ddevProj1/index.html: -------------------------------------------------------------------------------- 1 | index.html test output 2 | --------------------------------------------------------------------------------