├── .github ├── dependabot.yml └── workflows │ └── test.yml ├── LICENSE ├── README.md ├── action.yml ├── main.js ├── node_modules ├── .bin │ └── uuid ├── .package-lock.json ├── @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 │ ├── exec │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── lib │ │ │ ├── exec.d.ts │ │ │ ├── exec.js │ │ │ ├── exec.js.map │ │ │ ├── interfaces.d.ts │ │ │ ├── interfaces.js │ │ │ ├── interfaces.js.map │ │ │ ├── toolrunner.d.ts │ │ │ ├── toolrunner.js │ │ │ └── toolrunner.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 │ └── io │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── lib │ │ ├── io-util.d.ts │ │ ├── io-util.js │ │ ├── io-util.js.map │ │ ├── io.d.ts │ │ ├── io.js │ │ └── io.js.map │ │ └── package.json ├── @fastify │ └── busboy │ │ ├── LICENSE │ │ ├── README.md │ │ ├── deps │ │ ├── dicer │ │ │ ├── LICENSE │ │ │ └── lib │ │ │ │ ├── Dicer.js │ │ │ │ ├── HeaderParser.js │ │ │ │ ├── PartStream.js │ │ │ │ └── dicer.d.ts │ │ └── streamsearch │ │ │ └── sbmh.js │ │ ├── lib │ │ ├── main.d.ts │ │ ├── main.js │ │ ├── types │ │ │ ├── multipart.js │ │ │ └── urlencoded.js │ │ └── utils │ │ │ ├── Decoder.js │ │ │ ├── basename.js │ │ │ ├── decodeText.js │ │ │ ├── getLimit.js │ │ │ └── parseParams.js │ │ └── package.json ├── firstline │ ├── .eslintrc.json │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── test │ │ ├── mocha.opts │ │ ├── mocks.js │ │ └── test.js ├── tunnel │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ └── tunnel.js │ └── package.json ├── undici │ ├── LICENSE │ ├── README.md │ ├── docs │ │ ├── api │ │ │ ├── Agent.md │ │ │ ├── BalancedPool.md │ │ │ ├── CacheStorage.md │ │ │ ├── Client.md │ │ │ ├── Connector.md │ │ │ ├── ContentType.md │ │ │ ├── Cookies.md │ │ │ ├── DiagnosticsChannel.md │ │ │ ├── DispatchInterceptor.md │ │ │ ├── Dispatcher.md │ │ │ ├── Errors.md │ │ │ ├── Fetch.md │ │ │ ├── MockAgent.md │ │ │ ├── MockClient.md │ │ │ ├── MockErrors.md │ │ │ ├── MockPool.md │ │ │ ├── Pool.md │ │ │ ├── PoolStats.md │ │ │ ├── ProxyAgent.md │ │ │ ├── RetryHandler.md │ │ │ ├── WebSocket.md │ │ │ └── api-lifecycle.md │ │ ├── assets │ │ │ └── lifecycle-diagram.png │ │ └── best-practices │ │ │ ├── client-certificate.md │ │ │ ├── mocking-request.md │ │ │ ├── proxy.md │ │ │ └── writing-tests.md │ ├── index-fetch.js │ ├── index.d.ts │ ├── index.js │ ├── lib │ │ ├── agent.js │ │ ├── api │ │ │ ├── abort-signal.js │ │ │ ├── api-connect.js │ │ │ ├── api-pipeline.js │ │ │ ├── api-request.js │ │ │ ├── api-stream.js │ │ │ ├── api-upgrade.js │ │ │ ├── index.js │ │ │ ├── readable.js │ │ │ └── util.js │ │ ├── balanced-pool.js │ │ ├── cache │ │ │ ├── cache.js │ │ │ ├── cachestorage.js │ │ │ ├── symbols.js │ │ │ └── util.js │ │ ├── client.js │ │ ├── compat │ │ │ └── dispatcher-weakref.js │ │ ├── cookies │ │ │ ├── constants.js │ │ │ ├── index.js │ │ │ ├── parse.js │ │ │ └── util.js │ │ ├── core │ │ │ ├── connect.js │ │ │ ├── errors.js │ │ │ ├── request.js │ │ │ ├── symbols.js │ │ │ └── util.js │ │ ├── dispatcher-base.js │ │ ├── dispatcher.js │ │ ├── fetch │ │ │ ├── LICENSE │ │ │ ├── body.js │ │ │ ├── constants.js │ │ │ ├── dataURL.js │ │ │ ├── file.js │ │ │ ├── formdata.js │ │ │ ├── global.js │ │ │ ├── headers.js │ │ │ ├── index.js │ │ │ ├── request.js │ │ │ ├── response.js │ │ │ ├── symbols.js │ │ │ ├── util.js │ │ │ └── webidl.js │ │ ├── fileapi │ │ │ ├── encoding.js │ │ │ ├── filereader.js │ │ │ ├── progressevent.js │ │ │ ├── symbols.js │ │ │ └── util.js │ │ ├── global.js │ │ ├── handler │ │ │ ├── DecoratorHandler.js │ │ │ ├── RedirectHandler.js │ │ │ └── RetryHandler.js │ │ ├── interceptor │ │ │ └── redirectInterceptor.js │ │ ├── llhttp │ │ │ ├── constants.d.ts │ │ │ ├── constants.js │ │ │ ├── constants.js.map │ │ │ ├── llhttp-wasm.js │ │ │ ├── llhttp.wasm │ │ │ ├── llhttp_simd-wasm.js │ │ │ ├── llhttp_simd.wasm │ │ │ ├── utils.d.ts │ │ │ ├── utils.js │ │ │ ├── utils.js.map │ │ │ └── wasm_build_env.txt │ │ ├── mock │ │ │ ├── mock-agent.js │ │ │ ├── mock-client.js │ │ │ ├── mock-errors.js │ │ │ ├── mock-interceptor.js │ │ │ ├── mock-pool.js │ │ │ ├── mock-symbols.js │ │ │ ├── mock-utils.js │ │ │ ├── pending-interceptors-formatter.js │ │ │ └── pluralizer.js │ │ ├── node │ │ │ └── fixed-queue.js │ │ ├── pool-base.js │ │ ├── pool-stats.js │ │ ├── pool.js │ │ ├── proxy-agent.js │ │ ├── timers.js │ │ └── websocket │ │ │ ├── connection.js │ │ │ ├── constants.js │ │ │ ├── events.js │ │ │ ├── frame.js │ │ │ ├── receiver.js │ │ │ ├── symbols.js │ │ │ ├── util.js │ │ │ └── websocket.js │ ├── package.json │ └── 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 │ │ ├── patch.d.ts │ │ ├── pool-stats.d.ts │ │ ├── pool.d.ts │ │ ├── proxy-agent.d.ts │ │ ├── readable.d.ts │ │ ├── retry-handler.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 └── post.js /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "04:00" 8 | pull-request-branch-name: 9 | separator: "-" 10 | open-pull-requests-limit: 10 11 | ignore: 12 | - dependency-name: docker-hub-utils 13 | versions: 14 | - 1.10.38 15 | - package-ecosystem: github-actions 16 | directory: "/" 17 | schedule: 18 | interval: daily 19 | time: "04:00" 20 | pull-request-branch-name: 21 | separator: "-" 22 | open-pull-requests-limit: 10 23 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test Action 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | strategy: 13 | matrix: 14 | include: 15 | - package: at 16 | arch: arm 17 | repo: https://salsa.debian.org/debian/at.git 18 | ref: debian/3.2.2-1 19 | lintian_opts: "-v" 20 | lintian_run: false 21 | - package: lolcat 22 | arch: arm64 23 | repo: https://salsa.debian.org/ruby-team/lolcat.git 24 | ref: debian/100.0.1-2 25 | lintian_opts: "-v" 26 | - package: micro 27 | arch: amd64 28 | repo: https://salsa.debian.org/go-team/packages/micro.git 29 | ref: debian/2.0.6-2_bpo10+1 30 | lintian_opts: "-v" 31 | lintian_run: true 32 | - package: dropbear 33 | arch: amd64 34 | repo: https://salsa.debian.org/debian/dropbear.git 35 | ref: debian/2022.83-1_bpo11+1 36 | lintian_opts: "-v" 37 | - package: deber 38 | arch: arm64 39 | repo: https://github.com/dawidd6/deber.git 40 | ref: v1.0.0 41 | lintian_opts: "-v" 42 | install_skopeo: true 43 | - package: netcat-openbsd 44 | arch: arm64 45 | repo: https://git.launchpad.net/ubuntu/+source/netcat-openbsd 46 | ref: import/1.206-1ubuntu1 47 | lintian_opts: "-v" 48 | - package: iproute2 49 | arch: arm 50 | repo: https://git.launchpad.net/ubuntu/+source/iproute2 51 | ref: import/4.18.0-1ubuntu2_ubuntu18.04.1 52 | lintian_opts: "-v" 53 | steps: 54 | - name: Checkout code 55 | uses: actions/checkout@v4 56 | 57 | - name: Clone repo 58 | run: git clone --depth=1 ${{matrix.repo}} -b ${{matrix.ref}} ${{matrix.package}} 59 | 60 | - name: Remove skopeo (for testing installation) 61 | if: ${{matrix.install_skopeo}} 62 | run: sudo apt-get remove -y skopeo 63 | 64 | - name: Test run 65 | uses: ./ 66 | with: 67 | cpu_architecture: ${{matrix.arch}} 68 | source_directory: ${{matrix.package}} 69 | artifacts_directory: artifacts 70 | lintian_opts: ${{matrix.lintian_opts}} 71 | lintian_run: ${{matrix.lintian_run || false}} 72 | 73 | - name: Check files 74 | run: | 75 | ls -lh artifacts/${{matrix.package}}*.* 76 | ls -lh ${{matrix.package}}*.* && false || true 77 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2020 Dawid Dziurla 5 | 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 deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | 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 FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Build Debian package GitHub Action 2 | 3 | An action that builds a Debian package from source in a Docker container. 4 | 5 | ## Usage 6 | 7 | See `action.yml` file in this repository for available options. 8 | 9 | ```yaml 10 | - name: Build Debian package 11 | uses: dawidd6/action-debian-package@v1 12 | ``` 13 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: Build Debian package 2 | description: Build Debian package from source for selected target release 3 | branding: 4 | color: red 5 | icon: package 6 | inputs: 7 | cpu_architecture: 8 | description: Target CPU architecture (amd64, arm64, arm, ...) 9 | required: false 10 | default: amd64 11 | source_directory: 12 | description: Directory where Debian sources are, relative to workspace 13 | required: false 14 | default: ./ 15 | artifacts_directory: 16 | description: Directory where build artifacts will be placed, relative to workspace 17 | required: false 18 | default: ./ 19 | os_distribution: 20 | description: OS distribution name, value from `debian/changelog` is used if not defined 21 | required: false 22 | lintian_opts: 23 | description: Command line parameters provided to 'lintian' 24 | required: false 25 | default: "" 26 | lintian_run: 27 | description: Run lintian checks 28 | required: false 29 | default: false 30 | runs: 31 | using: node16 32 | main: main.js 33 | post: post.js 34 | -------------------------------------------------------------------------------- /node_modules/.bin/uuid: -------------------------------------------------------------------------------- 1 | ../uuid/dist/bin/uuid -------------------------------------------------------------------------------- /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.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.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,OAAO,EAAE,CAC/B,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.1", 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 -p tsconfig.json" 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 | } -------------------------------------------------------------------------------- /node_modules/@actions/exec/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/exec/README.md: -------------------------------------------------------------------------------- 1 | # `@actions/exec` 2 | 3 | ## Usage 4 | 5 | #### Basic 6 | 7 | You can use this package to execute tools in a cross platform way: 8 | 9 | ```js 10 | const exec = require('@actions/exec'); 11 | 12 | await exec.exec('node index.js'); 13 | ``` 14 | 15 | #### Args 16 | 17 | You can also pass in arg arrays: 18 | 19 | ```js 20 | const exec = require('@actions/exec'); 21 | 22 | await exec.exec('node', ['index.js', 'foo=bar']); 23 | ``` 24 | 25 | #### Output/options 26 | 27 | Capture output or specify [other options](https://github.com/actions/toolkit/blob/d9347d4ab99fd507c0b9104b2cf79fb44fcc827d/packages/exec/src/interfaces.ts#L5): 28 | 29 | ```js 30 | const exec = require('@actions/exec'); 31 | 32 | let myOutput = ''; 33 | let myError = ''; 34 | 35 | const options = {}; 36 | options.listeners = { 37 | stdout: (data: Buffer) => { 38 | myOutput += data.toString(); 39 | }, 40 | stderr: (data: Buffer) => { 41 | myError += data.toString(); 42 | } 43 | }; 44 | options.cwd = './lib'; 45 | 46 | await exec.exec('node', ['index.js', 'foo=bar'], options); 47 | ``` 48 | 49 | #### Exec tools not in the PATH 50 | 51 | You can specify the full path for tools not in the PATH: 52 | 53 | ```js 54 | const exec = require('@actions/exec'); 55 | 56 | await exec.exec('"/path/to/my-tool"', ['arg1']); 57 | ``` 58 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/exec.d.ts: -------------------------------------------------------------------------------- 1 | import { ExecOptions, ExecOutput, ExecListeners } from './interfaces'; 2 | export { ExecOptions, ExecOutput, ExecListeners }; 3 | /** 4 | * Exec a command. 5 | * Output will be streamed to the live console. 6 | * Returns promise with return code 7 | * 8 | * @param commandLine command to execute (can include additional args). Must be correctly escaped. 9 | * @param args optional arguments for tool. Escaping is handled by the lib. 10 | * @param options optional exec options. See ExecOptions 11 | * @returns Promise exit code 12 | */ 13 | export declare function exec(commandLine: string, args?: string[], options?: ExecOptions): Promise; 14 | /** 15 | * Exec a command and get the output. 16 | * Output will be streamed to the live console. 17 | * Returns promise with the exit code and collected stdout and stderr 18 | * 19 | * @param commandLine command to execute (can include additional args). Must be correctly escaped. 20 | * @param args optional arguments for tool. Escaping is handled by the lib. 21 | * @param options optional exec options. See ExecOptions 22 | * @returns Promise exit code, stdout, and stderr 23 | */ 24 | export declare function getExecOutput(commandLine: string, args?: string[], options?: ExecOptions): Promise; 25 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/exec.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"exec.js","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAA4C;AAE5C,iDAAkC;AAIlC;;;;;;;;;GASG;AACH,SAAsB,IAAI,CACxB,WAAmB,EACnB,IAAe,EACf,OAAqB;;QAErB,MAAM,WAAW,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAA;QACpD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;SACpE;QACD,8CAA8C;QAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAA;QAC/B,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;QAC9C,MAAM,MAAM,GAAkB,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QACxE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAA;IACtB,CAAC;CAAA;AAdD,oBAcC;AAED;;;;;;;;;GASG;AAEH,SAAsB,aAAa,CACjC,WAAmB,EACnB,IAAe,EACf,OAAqB;;;QAErB,IAAI,MAAM,GAAG,EAAE,CAAA;QACf,IAAI,MAAM,GAAG,EAAE,CAAA;QAEf,2EAA2E;QAC3E,MAAM,aAAa,GAAG,IAAI,8BAAa,CAAC,MAAM,CAAC,CAAA;QAC/C,MAAM,aAAa,GAAG,IAAI,8BAAa,CAAC,MAAM,CAAC,CAAA;QAE/C,MAAM,sBAAsB,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,0CAAE,MAAM,CAAA;QACzD,MAAM,sBAAsB,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,0CAAE,MAAM,CAAA;QAEzD,MAAM,cAAc,GAAG,CAAC,IAAY,EAAQ,EAAE;YAC5C,MAAM,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;YACnC,IAAI,sBAAsB,EAAE;gBAC1B,sBAAsB,CAAC,IAAI,CAAC,CAAA;aAC7B;QACH,CAAC,CAAA;QAED,MAAM,cAAc,GAAG,CAAC,IAAY,EAAQ,EAAE;YAC5C,MAAM,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;YACnC,IAAI,sBAAsB,EAAE;gBAC1B,sBAAsB,CAAC,IAAI,CAAC,CAAA;aAC7B;QACH,CAAC,CAAA;QAED,MAAM,SAAS,mCACV,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,KACrB,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,GACvB,CAAA;QAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,IAAI,kCAAM,OAAO,KAAE,SAAS,IAAE,CAAA;QAEvE,gCAAgC;QAChC,MAAM,IAAI,aAAa,CAAC,GAAG,EAAE,CAAA;QAC7B,MAAM,IAAI,aAAa,CAAC,GAAG,EAAE,CAAA;QAE7B,OAAO;YACL,QAAQ;YACR,MAAM;YACN,MAAM;SACP,CAAA;;CACF;AA9CD,sCA8CC"} -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/interfaces.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as stream from 'stream'; 3 | /** 4 | * Interface for exec options 5 | */ 6 | export interface ExecOptions { 7 | /** optional working directory. defaults to current */ 8 | cwd?: string; 9 | /** optional envvar dictionary. defaults to current process's env */ 10 | env?: { 11 | [key: string]: string; 12 | }; 13 | /** optional. defaults to false */ 14 | silent?: boolean; 15 | /** optional out stream to use. Defaults to process.stdout */ 16 | outStream?: stream.Writable; 17 | /** optional err stream to use. Defaults to process.stderr */ 18 | errStream?: stream.Writable; 19 | /** optional. whether to skip quoting/escaping arguments if needed. defaults to false. */ 20 | windowsVerbatimArguments?: boolean; 21 | /** optional. whether to fail if output to stderr. defaults to false */ 22 | failOnStdErr?: boolean; 23 | /** optional. defaults to failing on non zero. ignore will not fail leaving it up to the caller */ 24 | ignoreReturnCode?: boolean; 25 | /** optional. How long in ms to wait for STDIO streams to close after the exit event of the process before terminating. defaults to 10000 */ 26 | delay?: number; 27 | /** optional. input to write to the process on STDIN. */ 28 | input?: Buffer; 29 | /** optional. Listeners for output. Callback functions that will be called on these events */ 30 | listeners?: ExecListeners; 31 | } 32 | /** 33 | * Interface for the output of getExecOutput() 34 | */ 35 | export interface ExecOutput { 36 | /**The exit code of the process */ 37 | exitCode: number; 38 | /**The entire stdout of the process as a string */ 39 | stdout: string; 40 | /**The entire stderr of the process as a string */ 41 | stderr: string; 42 | } 43 | /** 44 | * The user defined listeners for an exec call 45 | */ 46 | export interface ExecListeners { 47 | /** A call back for each buffer of stdout */ 48 | stdout?: (data: Buffer) => void; 49 | /** A call back for each buffer of stderr */ 50 | stderr?: (data: Buffer) => void; 51 | /** A call back for each line of stdout */ 52 | stdline?: (data: string) => void; 53 | /** A call back for each line of stderr */ 54 | errline?: (data: string) => void; 55 | /** A call back for each debug log */ 56 | debug?: (data: string) => void; 57 | } 58 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/interfaces.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | //# sourceMappingURL=interfaces.js.map -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/interfaces.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/toolrunner.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as events from 'events'; 3 | import * as im from './interfaces'; 4 | export declare class ToolRunner extends events.EventEmitter { 5 | constructor(toolPath: string, args?: string[], options?: im.ExecOptions); 6 | private toolPath; 7 | private args; 8 | private options; 9 | private _debug; 10 | private _getCommandString; 11 | private _processLineBuffer; 12 | private _getSpawnFileName; 13 | private _getSpawnArgs; 14 | private _endsWith; 15 | private _isCmdFile; 16 | private _windowsQuoteCmdArg; 17 | private _uvQuoteCmdArg; 18 | private _cloneExecOptions; 19 | private _getSpawnOptions; 20 | /** 21 | * Exec a tool. 22 | * Output will be streamed to the live console. 23 | * Returns promise with return code 24 | * 25 | * @param tool path to tool to exec 26 | * @param options optional exec options. See ExecOptions 27 | * @returns number 28 | */ 29 | exec(): Promise; 30 | } 31 | /** 32 | * Convert an arg string to an array of args. Handles escaping 33 | * 34 | * @param argString string of arguments 35 | * @returns string[] array of arguments 36 | */ 37 | export declare function argStringToArray(argString: string): string[]; 38 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@actions/exec", 3 | "version": "1.1.1", 4 | "description": "Actions exec lib", 5 | "keywords": [ 6 | "github", 7 | "actions", 8 | "exec" 9 | ], 10 | "homepage": "https://github.com/actions/toolkit/tree/main/packages/exec", 11 | "license": "MIT", 12 | "main": "lib/exec.js", 13 | "types": "lib/exec.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/exec" 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/io": "^1.0.1" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /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.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;IAK/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;AA5BD,oFA4BC"} -------------------------------------------------------------------------------- /node_modules/@actions/http-client/lib/interfaces.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | import * as http from 'http'; 5 | import * as https from 'https'; 6 | import { HttpClientResponse } from './index'; 7 | export interface HttpClient { 8 | options(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; 9 | get(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; 10 | del(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; 11 | post(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; 12 | patch(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; 13 | put(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; 14 | sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: http.OutgoingHttpHeaders): Promise; 15 | request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: http.OutgoingHttpHeaders): Promise; 16 | requestRaw(info: RequestInfo, data: string | NodeJS.ReadableStream): Promise; 17 | requestRawWithCallback(info: RequestInfo, data: string | NodeJS.ReadableStream, onResult: (err?: Error, res?: HttpClientResponse) => void): void; 18 | } 19 | export interface RequestHandler { 20 | prepareRequest(options: http.RequestOptions): void; 21 | canHandleAuthentication(response: HttpClientResponse): boolean; 22 | handleAuthentication(httpClient: HttpClient, requestInfo: RequestInfo, data: string | NodeJS.ReadableStream | null): Promise; 23 | } 24 | export interface RequestInfo { 25 | options: http.RequestOptions; 26 | parsedUrl: URL; 27 | httpModule: typeof http | typeof https; 28 | } 29 | export interface RequestOptions { 30 | headers?: http.OutgoingHttpHeaders; 31 | socketTimeout?: number; 32 | ignoreSslError?: boolean; 33 | allowRedirects?: boolean; 34 | allowRedirectDowngrade?: boolean; 35 | maxRedirects?: number; 36 | maxSockets?: number; 37 | keepAlive?: boolean; 38 | deserializeDates?: boolean; 39 | allowRetries?: boolean; 40 | maxRetries?: number; 41 | } 42 | export interface TypedResponse { 43 | statusCode: number; 44 | result: T | null; 45 | headers: http.IncomingHttpHeaders; 46 | } 47 | -------------------------------------------------------------------------------- /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 | try { 19 | return new URL(proxyVar); 20 | } 21 | catch (_a) { 22 | if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) 23 | return new URL(`http://${proxyVar}`); 24 | } 25 | } 26 | else { 27 | return undefined; 28 | } 29 | } 30 | exports.getProxyUrl = getProxyUrl; 31 | function checkBypass(reqUrl) { 32 | if (!reqUrl.hostname) { 33 | return false; 34 | } 35 | const reqHost = reqUrl.hostname; 36 | if (isLoopbackAddress(reqHost)) { 37 | return true; 38 | } 39 | const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; 40 | if (!noProxy) { 41 | return false; 42 | } 43 | // Determine the request port 44 | let reqPort; 45 | if (reqUrl.port) { 46 | reqPort = Number(reqUrl.port); 47 | } 48 | else if (reqUrl.protocol === 'http:') { 49 | reqPort = 80; 50 | } 51 | else if (reqUrl.protocol === 'https:') { 52 | reqPort = 443; 53 | } 54 | // Format the request hostname and hostname with port 55 | const upperReqHosts = [reqUrl.hostname.toUpperCase()]; 56 | if (typeof reqPort === 'number') { 57 | upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); 58 | } 59 | // Compare request host against noproxy 60 | for (const upperNoProxyItem of noProxy 61 | .split(',') 62 | .map(x => x.trim().toUpperCase()) 63 | .filter(x => x)) { 64 | if (upperNoProxyItem === '*' || 65 | upperReqHosts.some(x => x === upperNoProxyItem || 66 | x.endsWith(`.${upperNoProxyItem}`) || 67 | (upperNoProxyItem.startsWith('.') && 68 | x.endsWith(`${upperNoProxyItem}`)))) { 69 | return true; 70 | } 71 | } 72 | return false; 73 | } 74 | exports.checkBypass = checkBypass; 75 | function isLoopbackAddress(host) { 76 | const hostLower = host.toLowerCase(); 77 | return (hostLower === 'localhost' || 78 | hostLower.startsWith('127.') || 79 | hostLower.startsWith('[::1]') || 80 | hostLower.startsWith('[0:0:0:0:0:0:0:1]')); 81 | } 82 | //# 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,IAAI;YACF,OAAO,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAA;SACzB;QAAC,WAAM;YACN,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC;gBACrE,OAAO,IAAI,GAAG,CAAC,UAAU,QAAQ,EAAE,CAAC,CAAA;SACvC;KACF;SAAM;QACL,OAAO,SAAS,CAAA;KACjB;AACH,CAAC;AAzBD,kCAyBC;AAED,SAAgB,WAAW,CAAC,MAAW;IACrC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QACpB,OAAO,KAAK,CAAA;KACb;IAED,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAA;IAC/B,IAAI,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAC9B,OAAO,IAAI,CAAA;KACZ;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,IACE,gBAAgB,KAAK,GAAG;YACxB,aAAa,CAAC,IAAI,CAChB,CAAC,CAAC,EAAE,CACF,CAAC,KAAK,gBAAgB;gBACtB,CAAC,CAAC,QAAQ,CAAC,IAAI,gBAAgB,EAAE,CAAC;gBAClC,CAAC,gBAAgB,CAAC,UAAU,CAAC,GAAG,CAAC;oBAC/B,CAAC,CAAC,QAAQ,CAAC,GAAG,gBAAgB,EAAE,CAAC,CAAC,CACvC,EACD;YACA,OAAO,IAAI,CAAA;SACZ;KACF;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AAnDD,kCAmDC;AAED,SAAS,iBAAiB,CAAC,IAAY;IACrC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;IACpC,OAAO,CACL,SAAS,KAAK,WAAW;QACzB,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC;QAC5B,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC;QAC7B,SAAS,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAC1C,CAAA;AACH,CAAC"} -------------------------------------------------------------------------------- /node_modules/@actions/http-client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@actions/http-client", 3 | "version": "2.2.0", 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/node": "20.7.1", 43 | "@types/tunnel": "0.0.3", 44 | "proxy": "^2.1.1", 45 | "@types/proxy": "^1.0.1" 46 | }, 47 | "dependencies": { 48 | "tunnel": "^0.0.6", 49 | "undici": "^5.25.4" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /node_modules/@actions/io/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/io/README.md: -------------------------------------------------------------------------------- 1 | # `@actions/io` 2 | 3 | > Core functions for cli filesystem scenarios 4 | 5 | ## Usage 6 | 7 | #### mkdir -p 8 | 9 | Recursively make a directory. Follows rules specified in [man mkdir](https://linux.die.net/man/1/mkdir) with the `-p` option specified: 10 | 11 | ```js 12 | const io = require('@actions/io'); 13 | 14 | await io.mkdirP('path/to/make'); 15 | ``` 16 | 17 | #### cp/mv 18 | 19 | Copy or move files or folders. Follows rules specified in [man cp](https://linux.die.net/man/1/cp) and [man mv](https://linux.die.net/man/1/mv): 20 | 21 | ```js 22 | const io = require('@actions/io'); 23 | 24 | // Recursive must be true for directories 25 | const options = { recursive: true, force: false } 26 | 27 | await io.cp('path/to/directory', 'path/to/dest', options); 28 | await io.mv('path/to/file', 'path/to/dest'); 29 | ``` 30 | 31 | #### rm -rf 32 | 33 | Remove a file or folder recursively. Follows rules specified in [man rm](https://linux.die.net/man/1/rm) with the `-r` and `-f` rules specified. 34 | 35 | ```js 36 | const io = require('@actions/io'); 37 | 38 | await io.rmRF('path/to/directory'); 39 | await io.rmRF('path/to/file'); 40 | ``` 41 | 42 | #### which 43 | 44 | Get the path to a tool and resolves via paths. Follows the rules specified in [man which](https://linux.die.net/man/1/which). 45 | 46 | ```js 47 | const exec = require('@actions/exec'); 48 | const io = require('@actions/io'); 49 | 50 | const pythonPath: string = await io.which('python', true) 51 | 52 | await exec.exec(`"${pythonPath}"`, ['main.py']); 53 | ``` 54 | -------------------------------------------------------------------------------- /node_modules/@actions/io/lib/io-util.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as fs from 'fs'; 3 | export declare const chmod: typeof fs.promises.chmod, copyFile: typeof fs.promises.copyFile, lstat: typeof fs.promises.lstat, mkdir: typeof fs.promises.mkdir, open: typeof fs.promises.open, readdir: typeof fs.promises.readdir, readlink: typeof fs.promises.readlink, rename: typeof fs.promises.rename, rm: typeof fs.promises.rm, rmdir: typeof fs.promises.rmdir, stat: typeof fs.promises.stat, symlink: typeof fs.promises.symlink, unlink: typeof fs.promises.unlink; 4 | export declare const IS_WINDOWS: boolean; 5 | export declare const UV_FS_O_EXLOCK = 268435456; 6 | export declare const READONLY: number; 7 | export declare function exists(fsPath: string): Promise; 8 | export declare function isDirectory(fsPath: string, useStat?: boolean): Promise; 9 | /** 10 | * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: 11 | * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). 12 | */ 13 | export declare function isRooted(p: string): boolean; 14 | /** 15 | * Best effort attempt to determine whether a file exists and is executable. 16 | * @param filePath file path to check 17 | * @param extensions additional file extensions to try 18 | * @return if file exists and is executable, returns the file path. otherwise empty string. 19 | */ 20 | export declare function tryGetExecutablePath(filePath: string, extensions: string[]): Promise; 21 | export declare function getCmdPath(): string; 22 | -------------------------------------------------------------------------------- /node_modules/@actions/io/lib/io.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Interface for cp/mv options 3 | */ 4 | export interface CopyOptions { 5 | /** Optional. Whether to recursively copy all subdirectories. Defaults to false */ 6 | recursive?: boolean; 7 | /** Optional. Whether to overwrite existing files in the destination. Defaults to true */ 8 | force?: boolean; 9 | /** Optional. Whether to copy the source directory along with all the files. Only takes effect when recursive=true and copying a directory. Default is true*/ 10 | copySourceDirectory?: boolean; 11 | } 12 | /** 13 | * Interface for cp/mv options 14 | */ 15 | export interface MoveOptions { 16 | /** Optional. Whether to overwrite existing files in the destination. Defaults to true */ 17 | force?: boolean; 18 | } 19 | /** 20 | * Copies a file or folder. 21 | * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js 22 | * 23 | * @param source source path 24 | * @param dest destination path 25 | * @param options optional. See CopyOptions. 26 | */ 27 | export declare function cp(source: string, dest: string, options?: CopyOptions): Promise; 28 | /** 29 | * Moves a path. 30 | * 31 | * @param source source path 32 | * @param dest destination path 33 | * @param options optional. See MoveOptions. 34 | */ 35 | export declare function mv(source: string, dest: string, options?: MoveOptions): Promise; 36 | /** 37 | * Remove a path recursively with force 38 | * 39 | * @param inputPath path to remove 40 | */ 41 | export declare function rmRF(inputPath: string): Promise; 42 | /** 43 | * Make a directory. Creates the full path with folders in between 44 | * Will throw if it fails 45 | * 46 | * @param fsPath path to create 47 | * @returns Promise 48 | */ 49 | export declare function mkdirP(fsPath: string): Promise; 50 | /** 51 | * Returns path of a tool had the tool actually been invoked. Resolves via paths. 52 | * If you check and the tool does not exist, it will throw. 53 | * 54 | * @param tool name of the tool 55 | * @param check whether to check if tool exists 56 | * @returns Promise path to tool 57 | */ 58 | export declare function which(tool: string, check?: boolean): Promise; 59 | /** 60 | * Returns a list of all occurrences of the given tool on the system path. 61 | * 62 | * @returns Promise the paths of the tool 63 | */ 64 | export declare function findInPath(tool: string): Promise; 65 | -------------------------------------------------------------------------------- /node_modules/@actions/io/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@actions/io", 3 | "version": "1.1.3", 4 | "description": "Actions io lib", 5 | "keywords": [ 6 | "github", 7 | "actions", 8 | "io" 9 | ], 10 | "homepage": "https://github.com/actions/toolkit/tree/main/packages/io", 11 | "license": "MIT", 12 | "main": "lib/io.js", 13 | "types": "lib/io.d.ts", 14 | "directories": { 15 | "lib": "lib", 16 | "test": "__tests__" 17 | }, 18 | "files": [ 19 | "lib" 20 | ], 21 | "publishConfig": { 22 | "access": "public" 23 | }, 24 | "repository": { 25 | "type": "git", 26 | "url": "git+https://github.com/actions/toolkit.git", 27 | "directory": "packages/io" 28 | }, 29 | "scripts": { 30 | "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", 31 | "test": "echo \"Error: run tests from root\" && exit 1", 32 | "tsc": "tsc" 33 | }, 34 | "bugs": { 35 | "url": "https://github.com/actions/toolkit/issues" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /node_modules/@fastify/busboy/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Brian White. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to 5 | deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | sell copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/@fastify/busboy/deps/dicer/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Brian White. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to 5 | deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | sell copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const inherits = require('node:util').inherits 4 | const ReadableStream = require('node:stream').Readable 5 | 6 | function PartStream (opts) { 7 | ReadableStream.call(this, opts) 8 | } 9 | inherits(PartStream, ReadableStream) 10 | 11 | PartStream.prototype._read = function (n) {} 12 | 13 | module.exports = PartStream 14 | -------------------------------------------------------------------------------- /node_modules/@fastify/busboy/lib/main.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const WritableStream = require('node:stream').Writable 4 | const { inherits } = require('node:util') 5 | const Dicer = require('../deps/dicer/lib/Dicer') 6 | 7 | const MultipartParser = require('./types/multipart') 8 | const UrlencodedParser = require('./types/urlencoded') 9 | const parseParams = require('./utils/parseParams') 10 | 11 | function Busboy (opts) { 12 | if (!(this instanceof Busboy)) { return new Busboy(opts) } 13 | 14 | if (typeof opts !== 'object') { 15 | throw new TypeError('Busboy expected an options-Object.') 16 | } 17 | if (typeof opts.headers !== 'object') { 18 | throw new TypeError('Busboy expected an options-Object with headers-attribute.') 19 | } 20 | if (typeof opts.headers['content-type'] !== 'string') { 21 | throw new TypeError('Missing Content-Type-header.') 22 | } 23 | 24 | const { 25 | headers, 26 | ...streamOptions 27 | } = opts 28 | 29 | this.opts = { 30 | autoDestroy: false, 31 | ...streamOptions 32 | } 33 | WritableStream.call(this, this.opts) 34 | 35 | this._done = false 36 | this._parser = this.getParserByHeaders(headers) 37 | this._finished = false 38 | } 39 | inherits(Busboy, WritableStream) 40 | 41 | Busboy.prototype.emit = function (ev) { 42 | if (ev === 'finish') { 43 | if (!this._done) { 44 | this._parser?.end() 45 | return 46 | } else if (this._finished) { 47 | return 48 | } 49 | this._finished = true 50 | } 51 | WritableStream.prototype.emit.apply(this, arguments) 52 | } 53 | 54 | Busboy.prototype.getParserByHeaders = function (headers) { 55 | const parsed = parseParams(headers['content-type']) 56 | 57 | const cfg = { 58 | defCharset: this.opts.defCharset, 59 | fileHwm: this.opts.fileHwm, 60 | headers, 61 | highWaterMark: this.opts.highWaterMark, 62 | isPartAFile: this.opts.isPartAFile, 63 | limits: this.opts.limits, 64 | parsedConType: parsed, 65 | preservePath: this.opts.preservePath 66 | } 67 | 68 | if (MultipartParser.detect.test(parsed[0])) { 69 | return new MultipartParser(this, cfg) 70 | } 71 | if (UrlencodedParser.detect.test(parsed[0])) { 72 | return new UrlencodedParser(this, cfg) 73 | } 74 | throw new Error('Unsupported Content-Type.') 75 | } 76 | 77 | Busboy.prototype._write = function (chunk, encoding, cb) { 78 | this._parser.write(chunk, cb) 79 | } 80 | 81 | module.exports = Busboy 82 | module.exports.default = Busboy 83 | module.exports.Busboy = Busboy 84 | 85 | module.exports.Dicer = Dicer 86 | -------------------------------------------------------------------------------- /node_modules/@fastify/busboy/lib/utils/Decoder.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const RE_PLUS = /\+/g 4 | 5 | const HEX = [ 6 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 10 | 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12 | 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 14 | ] 15 | 16 | function Decoder () { 17 | this.buffer = undefined 18 | } 19 | Decoder.prototype.write = function (str) { 20 | // Replace '+' with ' ' before decoding 21 | str = str.replace(RE_PLUS, ' ') 22 | let res = '' 23 | let i = 0; let p = 0; const len = str.length 24 | for (; i < len; ++i) { 25 | if (this.buffer !== undefined) { 26 | if (!HEX[str.charCodeAt(i)]) { 27 | res += '%' + this.buffer 28 | this.buffer = undefined 29 | --i // retry character 30 | } else { 31 | this.buffer += str[i] 32 | ++p 33 | if (this.buffer.length === 2) { 34 | res += String.fromCharCode(parseInt(this.buffer, 16)) 35 | this.buffer = undefined 36 | } 37 | } 38 | } else if (str[i] === '%') { 39 | if (i > p) { 40 | res += str.substring(p, i) 41 | p = i 42 | } 43 | this.buffer = '' 44 | ++p 45 | } 46 | } 47 | if (p < len && this.buffer === undefined) { res += str.substring(p) } 48 | return res 49 | } 50 | Decoder.prototype.reset = function () { 51 | this.buffer = undefined 52 | } 53 | 54 | module.exports = Decoder 55 | -------------------------------------------------------------------------------- /node_modules/@fastify/busboy/lib/utils/basename.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = function basename (path) { 4 | if (typeof path !== 'string') { return '' } 5 | for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var 6 | switch (path.charCodeAt(i)) { 7 | case 0x2F: // '/' 8 | case 0x5C: // '\' 9 | path = path.slice(i + 1) 10 | return (path === '..' || path === '.' ? '' : path) 11 | } 12 | } 13 | return (path === '..' || path === '.' ? '' : path) 14 | } 15 | -------------------------------------------------------------------------------- /node_modules/@fastify/busboy/lib/utils/getLimit.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = function getLimit (limits, name, defaultLimit) { 4 | if ( 5 | !limits || 6 | limits[name] === undefined || 7 | limits[name] === null 8 | ) { return defaultLimit } 9 | 10 | if ( 11 | typeof limits[name] !== 'number' || 12 | isNaN(limits[name]) 13 | ) { throw new TypeError('Limit ' + name + ' is not a valid number') } 14 | 15 | return limits[name] 16 | } 17 | -------------------------------------------------------------------------------- /node_modules/@fastify/busboy/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@fastify/busboy", 3 | "version": "2.1.0", 4 | "private": false, 5 | "author": "Brian White ", 6 | "contributors": [ 7 | { 8 | "name": "Igor Savin", 9 | "email": "kibertoad@gmail.com", 10 | "url": "https://github.com/kibertoad" 11 | }, 12 | { 13 | "name": "Aras Abbasi", 14 | "email": "aras.abbasi@gmail.com", 15 | "url": "https://github.com/uzlopak" 16 | } 17 | ], 18 | "description": "A streaming parser for HTML form data for node.js", 19 | "main": "lib/main", 20 | "type": "commonjs", 21 | "types": "lib/main.d.ts", 22 | "scripts": { 23 | "bench:busboy": "cd benchmarks && npm install && npm run benchmark-fastify", 24 | "bench:dicer": "node bench/dicer/dicer-bench-multipart-parser.js", 25 | "coveralls": "nyc report --reporter=lcov", 26 | "lint": "npm run lint:standard", 27 | "lint:everything": "npm run lint && npm run test:types", 28 | "lint:fix": "standard --fix", 29 | "lint:standard": "standard --verbose | snazzy", 30 | "test:mocha": "tap", 31 | "test:types": "tsd", 32 | "test:coverage": "nyc npm run test", 33 | "test": "npm run test:mocha" 34 | }, 35 | "engines": { 36 | "node": ">=14" 37 | }, 38 | "devDependencies": { 39 | "@types/node": "^20.1.0", 40 | "busboy": "^1.0.0", 41 | "photofinish": "^1.8.0", 42 | "snazzy": "^9.0.0", 43 | "standard": "^17.0.0", 44 | "tap": "^16.3.8", 45 | "tinybench": "^2.5.1", 46 | "tsd": "^0.29.0", 47 | "typescript": "^5.0.2" 48 | }, 49 | "keywords": [ 50 | "uploads", 51 | "forms", 52 | "multipart", 53 | "form-data" 54 | ], 55 | "license": "MIT", 56 | "repository": { 57 | "type": "git", 58 | "url": "https://github.com/fastify/busboy.git" 59 | }, 60 | "tsd": { 61 | "directory": "test/types", 62 | "compilerOptions": { 63 | "esModuleInterop": false, 64 | "module": "commonjs", 65 | "target": "ES2017" 66 | } 67 | }, 68 | "standard": { 69 | "globals": [ 70 | "describe", 71 | "it" 72 | ], 73 | "ignore": [ 74 | "bench" 75 | ] 76 | }, 77 | "files": [ 78 | "README.md", 79 | "LICENSE", 80 | "lib/*", 81 | "deps/encoding/*", 82 | "deps/dicer/lib", 83 | "deps/streamsearch/", 84 | "deps/dicer/LICENSE" 85 | ] 86 | } 87 | -------------------------------------------------------------------------------- /node_modules/firstline/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "es6": true, 4 | "node": true, 5 | "mocha": true 6 | }, 7 | "extends": "eslint:recommended", 8 | "parserOptions": {"sourceType": "module"}, 9 | "rules": { 10 | "indent": ["error", 2], 11 | "keyword-spacing": "error", 12 | "linebreak-style": "error", 13 | "quotes": ["error","single"], 14 | "semi": "error", 15 | "space-before-blocks": "error", 16 | "space-before-function-paren": "error" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /node_modules/firstline/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | cache: 3 | directories: 4 | - ~/.npm 5 | notifications: 6 | email: false 7 | node_js: 8 | - node 9 | - '6.4.0' 10 | after_success: 11 | - npm run coverage 12 | - npm run travis-deploy-once "npm run semantic-release" 13 | branches: 14 | except: 15 | - /^v\d+\.\d+\.\d+$/ 16 | -------------------------------------------------------------------------------- /node_modules/firstline/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Alessandro Zanardi 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 | 23 | -------------------------------------------------------------------------------- /node_modules/firstline/README.md: -------------------------------------------------------------------------------- 1 | # Firstline 2 | 3 | [![Build status](https://img.shields.io/travis/pensierinmusica/firstline.svg)](https://travis-ci.com/pensierinmusica/firstline) 4 | [![Test coverage](https://img.shields.io/coveralls/pensierinmusica/firstline.svg)](https://coveralls.io/r/pensierinmusica/firstline) 5 | [![Dependencies](https://img.shields.io/david/pensierinmusica/firstline.svg)](https://www.npmjs.com/package/firstline) 6 | [![Npm version](https://img.shields.io/npm/v/firstline.svg)](https://www.npmjs.com/package/firstline) 7 | [![License](https://img.shields.io/github/license/pensierinmusica/firstline.svg)](https://www.npmjs.com/package/firstline) 8 | 9 | ## Introduction 10 | 11 | Firstline is a [npm](http://npmjs.org) async module for [NodeJS](http://nodejs.org/), that **reads and returns the first line of any file**. It uses native JS promises and streams (requires Node >= v6.4.0). It is well tested and built for high performance. 12 | 13 | It is particularly suited when you need to programmatically access the first line of a large amount of files, while handling errors if they occur. 14 | 15 | ## Install 16 | 17 | `npm install firstline` 18 | 19 | ## Usage 20 | 21 | `firstline(filePath, [opts])` 22 | 23 | - filePath (String): the full path to the file you want to read. 24 | - opts (Object, optional): 25 | - encoding (String), set the file encoding (must be [supported by Node.js](https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings)). 26 | - lineEnding (String), the character used for line ending (defaults to `\n`). 27 | 28 | Incrementally reads data from `filePath` until it reaches the end of the first line. 29 | 30 | Returns a promise, eventually fulfilled with a string. 31 | 32 | ## Examples 33 | 34 | ```js 35 | // Imagine the file content is: 36 | // abc 37 | // def 38 | // ghi 39 | // 40 | 41 | firstline('./my-file.txt'); 42 | // -> Returns a promise that will be fulfilled with 'abc'. 43 | 44 | firstline('./my-file.txt', { lineEnding: '\r' }); 45 | // -> Same as above, but using '\r' as line ending. 46 | ``` 47 | 48 | *** 49 | 50 | MIT License -------------------------------------------------------------------------------- /node_modules/firstline/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs'); 4 | 5 | module.exports = (path, usrOpts) => { 6 | const opts = { 7 | encoding: 'utf8', 8 | lineEnding: '\n' 9 | }; 10 | Object.assign(opts, usrOpts); 11 | return new Promise((resolve, reject) => { 12 | const rs = fs.createReadStream(path, {encoding: opts.encoding}); 13 | let acc = ''; 14 | let pos = 0; 15 | let index; 16 | rs 17 | .on('data', chunk => { 18 | index = chunk.indexOf(opts.lineEnding); 19 | acc += chunk; 20 | if (index === -1) { 21 | pos += chunk.length; 22 | } else { 23 | pos += index; 24 | rs.close(); 25 | } 26 | }) 27 | .on('close', () => resolve(acc.slice(acc.charCodeAt(0) === 0xFEFF ? 1 : 0, pos))) 28 | .on('error', err => reject(err)); 29 | }); 30 | }; 31 | -------------------------------------------------------------------------------- /node_modules/firstline/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "firstline", 3 | "_id": "firstline@2.0.2", 4 | "_inBundle": false, 5 | "_integrity": "sha512-8KcmfI0jgSECnzdhucm0i7vrwef3BWwgjimW2YkRC5eSFwjb5DibVoA0YvgkYwwxuJi9c+7M7X3b3lX8o9B6wg==", 6 | "_location": "/firstline", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "tag", 10 | "registry": true, 11 | "raw": "firstline", 12 | "name": "firstline", 13 | "escapedName": "firstline", 14 | "rawSpec": "", 15 | "saveSpec": null, 16 | "fetchSpec": "latest" 17 | }, 18 | "_requiredBy": [ 19 | "#USER", 20 | "/" 21 | ], 22 | "_resolved": "https://registry.npmjs.org/firstline/-/firstline-2.0.2.tgz", 23 | "_shasum": "3fdfd894a80e181cd2fa478b07cadb8d446c53cd", 24 | "_spec": "firstline", 25 | "_where": "/home/dawidd6/github/dawidd6/action-debian-package", 26 | "author": { 27 | "name": "Alessandro Zanardi" 28 | }, 29 | "bugs": { 30 | "url": "https://github.com/pensierinmusica/firstline/issues" 31 | }, 32 | "bundleDependencies": false, 33 | "config": { 34 | "commitizen": { 35 | "path": "./node_modules/cz-conventional-changelog" 36 | } 37 | }, 38 | "deprecated": false, 39 | "description": "Async npm module for Node JS that reads the first line of a file", 40 | "devDependencies": { 41 | "chai": "^4.1.2", 42 | "chai-as-promised": "^7.1.1", 43 | "coveralls": "^3.0.0", 44 | "cz-conventional-changelog": "^2.1.0", 45 | "eslint": "^4.19.1", 46 | "husky": "^0.14.3", 47 | "js-promisify": "^1.1.0", 48 | "mocha": "^5.1.1", 49 | "nyc": "^11.7.1", 50 | "rimraf": "^2.6.2", 51 | "semantic-release": "^15.5.0", 52 | "travis-deploy-once": "^5.0.0" 53 | }, 54 | "engines": { 55 | "node": ">=6.4.0" 56 | }, 57 | "homepage": "https://github.com/pensierinmusica/firstline", 58 | "keywords": [ 59 | "read", 60 | "check", 61 | "file", 62 | "content", 63 | "filesystem", 64 | "io", 65 | "stream", 66 | "async", 67 | "promise" 68 | ], 69 | "license": "MIT", 70 | "main": "index.js", 71 | "name": "firstline", 72 | "repository": { 73 | "type": "git", 74 | "url": "git+https://github.com/pensierinmusica/firstline.git" 75 | }, 76 | "scripts": { 77 | "coverage": "nyc report --reporter=text-lcov | coveralls", 78 | "lint": "eslint .", 79 | "pre-commit": "npm test", 80 | "semantic-release": "semantic-release", 81 | "test": "npm run lint && nyc mocha", 82 | "travis-deploy-once": "travis-deploy-once --pro" 83 | }, 84 | "version": "2.0.2" 85 | } 86 | -------------------------------------------------------------------------------- /node_modules/firstline/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --reporter spec 2 | --ui bdd -------------------------------------------------------------------------------- /node_modules/firstline/test/test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const promisify = require('js-promisify'); 4 | const chai = require('chai'); 5 | const chaiAsPromised = require('chai-as-promised'); 6 | const fs = require('fs'); 7 | const path = require('path'); 8 | const rimraf = require('rimraf'); 9 | 10 | const firstline = require('../index.js'); 11 | const mocks = require('./mocks.js'); 12 | 13 | chai.should(); 14 | chai.use(chaiAsPromised); 15 | 16 | describe('firstline', () => { 17 | 18 | const dirPath = path.join(__dirname, 'tmp/'); 19 | const filePath = dirPath + 'test.txt'; 20 | const wrongFilePath = dirPath + 'no-test.txt'; 21 | 22 | before(() => fs.mkdirSync(dirPath)); // Make "tmp" folder 23 | 24 | after(() => rimraf.sync(dirPath)); // Delete "tmp" folder 25 | 26 | describe('#check', () => { 27 | 28 | afterEach(() => rimraf.sync(filePath)); // Delete mock CSV file 29 | 30 | it( 31 | 'should reject if the file does not exist', 32 | () => firstline(wrongFilePath).should.be.rejected 33 | ); 34 | 35 | it( 36 | 'should return the first line of a file and default to `\\n` line ending', 37 | () => promisify(fs.writeFile, [filePath, 'abc\ndef\nghi']) 38 | .then(() => firstline(filePath).should.eventually.equal('abc')) 39 | ); 40 | 41 | it( 42 | 'should work correctly if the first line is long', 43 | () => promisify(fs.writeFile, [filePath, mocks.longLine]) 44 | .then(() => firstline(filePath).should.eventually.equal(mocks.longLine.split('\n')[0])) 45 | ); 46 | 47 | it( 48 | 'should return an empty line if the file is empty', 49 | () => promisify(fs.writeFile, [filePath, '']) 50 | .then(() => firstline(filePath).should.eventually.equal('')) 51 | ); 52 | 53 | it( 54 | 'should work with a different encoding when specified correctly', 55 | () => promisify(fs.writeFile, [filePath, 'abc\ndef\nghi', { encoding: 'ascii' }]) 56 | .then(() => firstline(filePath, { encoding: 'ascii' }).should.eventually.equal('abc')) 57 | ); 58 | 59 | it( 60 | 'should work with a different line ending when specified correctly', 61 | () => promisify(fs.writeFile, [filePath, 'abc\rdef\rghi']) 62 | .then(() => firstline(filePath, { lineEnding: '\r' }).should.eventually.equal('abc')) 63 | ); 64 | 65 | it( 66 | 'should return the entire file if the specified line ending is wrong', 67 | () => promisify(fs.writeFile, [filePath, 'abc\ndef\nghi']) 68 | .then(() => firstline(filePath, { lineEnding: '\r' }).should.eventually.equal('abc\ndef\nghi')) 69 | ); 70 | 71 | it( 72 | 'should handle BOM', 73 | () => promisify(fs.writeFile, [filePath, '\uFEFFabc\ndef']) 74 | .then(() => firstline(filePath).should.eventually.equal('abc')) 75 | ); 76 | 77 | }); 78 | 79 | }); 80 | -------------------------------------------------------------------------------- /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/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Matteo Collina and Undici contributors 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/undici/docs/api/CacheStorage.md: -------------------------------------------------------------------------------- 1 | # CacheStorage 2 | 3 | Undici exposes a W3C spec-compliant implementation of [CacheStorage](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage) and [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache). 4 | 5 | ## Opening a Cache 6 | 7 | Undici exports a top-level CacheStorage instance. You can open a new Cache, or duplicate a Cache with an existing name, by using `CacheStorage.prototype.open`. If you open a Cache with the same name as an already-existing Cache, its list of cached Responses will be shared between both instances. 8 | 9 | ```mjs 10 | import { caches } from 'undici' 11 | 12 | const cache_1 = await caches.open('v1') 13 | const cache_2 = await caches.open('v1') 14 | 15 | // Although .open() creates a new instance, 16 | assert(cache_1 !== cache_2) 17 | // The same Response is matched in both. 18 | assert.deepStrictEqual(await cache_1.match('/req'), await cache_2.match('/req')) 19 | ``` 20 | 21 | ## Deleting a Cache 22 | 23 | If a Cache is deleted, the cached Responses/Requests can still be used. 24 | 25 | ```mjs 26 | const response = await cache_1.match('/req') 27 | await caches.delete('v1') 28 | 29 | await response.text() // the Response's body 30 | ``` 31 | -------------------------------------------------------------------------------- /node_modules/undici/docs/api/ContentType.md: -------------------------------------------------------------------------------- 1 | # MIME Type Parsing 2 | 3 | ## `MIMEType` interface 4 | 5 | * **type** `string` 6 | * **subtype** `string` 7 | * **parameters** `Map` 8 | * **essence** `string` 9 | 10 | ## `parseMIMEType(input)` 11 | 12 | Implements [parse a MIME type](https://mimesniff.spec.whatwg.org/#parse-a-mime-type). 13 | 14 | Parses a MIME type, returning its type, subtype, and any associated parameters. If the parser can't parse an input it returns the string literal `'failure'`. 15 | 16 | ```js 17 | import { parseMIMEType } from 'undici' 18 | 19 | parseMIMEType('text/html; charset=gbk') 20 | // { 21 | // type: 'text', 22 | // subtype: 'html', 23 | // parameters: Map(1) { 'charset' => 'gbk' }, 24 | // essence: 'text/html' 25 | // } 26 | ``` 27 | 28 | Arguments: 29 | 30 | * **input** `string` 31 | 32 | Returns: `MIMEType|'failure'` 33 | 34 | ## `serializeAMimeType(input)` 35 | 36 | Implements [serialize a MIME type](https://mimesniff.spec.whatwg.org/#serialize-a-mime-type). 37 | 38 | Serializes a MIMEType object. 39 | 40 | ```js 41 | import { serializeAMimeType } from 'undici' 42 | 43 | serializeAMimeType({ 44 | type: 'text', 45 | subtype: 'html', 46 | parameters: new Map([['charset', 'gbk']]), 47 | essence: 'text/html' 48 | }) 49 | // text/html;charset=gbk 50 | 51 | ``` 52 | 53 | Arguments: 54 | 55 | * **mimeType** `MIMEType` 56 | 57 | Returns: `string` 58 | -------------------------------------------------------------------------------- /node_modules/undici/docs/api/Cookies.md: -------------------------------------------------------------------------------- 1 | # Cookie Handling 2 | 3 | ## `Cookie` interface 4 | 5 | * **name** `string` 6 | * **value** `string` 7 | * **expires** `Date|number` (optional) 8 | * **maxAge** `number` (optional) 9 | * **domain** `string` (optional) 10 | * **path** `string` (optional) 11 | * **secure** `boolean` (optional) 12 | * **httpOnly** `boolean` (optional) 13 | * **sameSite** `'String'|'Lax'|'None'` (optional) 14 | * **unparsed** `string[]` (optional) Left over attributes that weren't parsed. 15 | 16 | ## `deleteCookie(headers, name[, attributes])` 17 | 18 | Sets the expiry time of the cookie to the unix epoch, causing browsers to delete it when received. 19 | 20 | ```js 21 | import { deleteCookie, Headers } from 'undici' 22 | 23 | const headers = new Headers() 24 | deleteCookie(headers, 'name') 25 | 26 | console.log(headers.get('set-cookie')) // name=; Expires=Thu, 01 Jan 1970 00:00:00 GMT 27 | ``` 28 | 29 | Arguments: 30 | 31 | * **headers** `Headers` 32 | * **name** `string` 33 | * **attributes** `{ path?: string, domain?: string }` (optional) 34 | 35 | Returns: `void` 36 | 37 | ## `getCookies(headers)` 38 | 39 | Parses the `Cookie` header and returns a list of attributes and values. 40 | 41 | ```js 42 | import { getCookies, Headers } from 'undici' 43 | 44 | const headers = new Headers({ 45 | cookie: 'get=cookies; and=attributes' 46 | }) 47 | 48 | console.log(getCookies(headers)) // { get: 'cookies', and: 'attributes' } 49 | ``` 50 | 51 | Arguments: 52 | 53 | * **headers** `Headers` 54 | 55 | Returns: `Record` 56 | 57 | ## `getSetCookies(headers)` 58 | 59 | Parses all `Set-Cookie` headers. 60 | 61 | ```js 62 | import { getSetCookies, Headers } from 'undici' 63 | 64 | const headers = new Headers({ 'set-cookie': 'undici=getSetCookies; Secure' }) 65 | 66 | console.log(getSetCookies(headers)) 67 | // [ 68 | // { 69 | // name: 'undici', 70 | // value: 'getSetCookies', 71 | // secure: true 72 | // } 73 | // ] 74 | 75 | ``` 76 | 77 | Arguments: 78 | 79 | * **headers** `Headers` 80 | 81 | Returns: `Cookie[]` 82 | 83 | ## `setCookie(headers, cookie)` 84 | 85 | Appends a cookie to the `Set-Cookie` header. 86 | 87 | ```js 88 | import { setCookie, Headers } from 'undici' 89 | 90 | const headers = new Headers() 91 | setCookie(headers, { name: 'undici', value: 'setCookie' }) 92 | 93 | console.log(headers.get('Set-Cookie')) // undici=setCookie 94 | ``` 95 | 96 | Arguments: 97 | 98 | * **headers** `Headers` 99 | * **cookie** `Cookie` 100 | 101 | Returns: `void` 102 | -------------------------------------------------------------------------------- /node_modules/undici/docs/api/DispatchInterceptor.md: -------------------------------------------------------------------------------- 1 | # Interface: DispatchInterceptor 2 | 3 | Extends: `Function` 4 | 5 | A function that can be applied to the `Dispatcher.Dispatch` function before it is invoked with a dispatch request. 6 | 7 | This allows one to write logic to intercept both the outgoing request, and the incoming response. 8 | 9 | ### Parameter: `Dispatcher.Dispatch` 10 | 11 | The base dispatch function you are decorating. 12 | 13 | ### ReturnType: `Dispatcher.Dispatch` 14 | 15 | A dispatch function that has been altered to provide additional logic 16 | 17 | ### Basic Example 18 | 19 | Here is an example of an interceptor being used to provide a JWT bearer token 20 | 21 | ```js 22 | 'use strict' 23 | 24 | const insertHeaderInterceptor = dispatch => { 25 | return function InterceptedDispatch(opts, handler){ 26 | opts.headers.push('Authorization', 'Bearer [Some token]') 27 | return dispatch(opts, handler) 28 | } 29 | } 30 | 31 | const client = new Client('https://localhost:3000', { 32 | interceptors: { Client: [insertHeaderInterceptor] } 33 | }) 34 | 35 | ``` 36 | 37 | ### Basic Example 2 38 | 39 | Here is a contrived example of an interceptor stripping the headers from a response. 40 | 41 | ```js 42 | 'use strict' 43 | 44 | const clearHeadersInterceptor = dispatch => { 45 | const { DecoratorHandler } = require('undici') 46 | class ResultInterceptor extends DecoratorHandler { 47 | onHeaders (statusCode, headers, resume) { 48 | return super.onHeaders(statusCode, [], resume) 49 | } 50 | } 51 | return function InterceptedDispatch(opts, handler){ 52 | return dispatch(opts, new ResultInterceptor(handler)) 53 | } 54 | } 55 | 56 | const client = new Client('https://localhost:3000', { 57 | interceptors: { Client: [clearHeadersInterceptor] } 58 | }) 59 | 60 | ``` 61 | -------------------------------------------------------------------------------- /node_modules/undici/docs/api/Fetch.md: -------------------------------------------------------------------------------- 1 | # Fetch 2 | 3 | Undici exposes a fetch() method starts the process of fetching a resource from the network. 4 | 5 | Documentation and examples can be found on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/fetch). 6 | 7 | ## File 8 | 9 | This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/File) 10 | 11 | In Node versions v18.13.0 and above and v19.2.0 and above, undici will default to using Node's [File](https://nodejs.org/api/buffer.html#class-file) class. In versions where it's not available, it will default to the undici one. 12 | 13 | ## FormData 14 | 15 | This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/FormData) 16 | 17 | ## Response 18 | 19 | This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Response) 20 | 21 | ## Request 22 | 23 | This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Request) 24 | 25 | ## Header 26 | 27 | This API is implemented as per the standard, you can find documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Headers) 28 | -------------------------------------------------------------------------------- /node_modules/undici/docs/api/MockClient.md: -------------------------------------------------------------------------------- 1 | # Class: MockClient 2 | 3 | Extends: `undici.Client` 4 | 5 | A mock client class that implements the same api as [MockPool](MockPool.md). 6 | 7 | ## `new MockClient(origin, [options])` 8 | 9 | Arguments: 10 | 11 | * **origin** `string` - It should only include the **protocol, hostname, and port**. 12 | * **options** `MockClientOptions` - It extends the `Client` options. 13 | 14 | Returns: `MockClient` 15 | 16 | ### Parameter: `MockClientOptions` 17 | 18 | Extends: `ClientOptions` 19 | 20 | * **agent** `Agent` - the agent to associate this MockClient with. 21 | 22 | ### Example - Basic MockClient instantiation 23 | 24 | We can use MockAgent to instantiate a MockClient ready to be used to intercept specified requests. It will not do anything until registered as the agent to use and any mock request are registered. 25 | 26 | ```js 27 | import { MockAgent } from 'undici' 28 | 29 | // Connections must be set to 1 to return a MockClient instance 30 | const mockAgent = new MockAgent({ connections: 1 }) 31 | 32 | const mockClient = mockAgent.get('http://localhost:3000') 33 | ``` 34 | 35 | ## Instance Methods 36 | 37 | ### `MockClient.intercept(options)` 38 | 39 | Implements: [`MockPool.intercept(options)`](MockPool.md#mockpoolinterceptoptions) 40 | 41 | ### `MockClient.close()` 42 | 43 | Implements: [`MockPool.close()`](MockPool.md#mockpoolclose) 44 | 45 | ### `MockClient.dispatch(options, handlers)` 46 | 47 | Implements [`Dispatcher.dispatch(options, handlers)`](Dispatcher.md#dispatcherdispatchoptions-handler). 48 | 49 | ### `MockClient.request(options[, callback])` 50 | 51 | See [`Dispatcher.request(options [, callback])`](Dispatcher.md#dispatcherrequestoptions-callback). 52 | 53 | #### Example - MockClient request 54 | 55 | ```js 56 | import { MockAgent } from 'undici' 57 | 58 | const mockAgent = new MockAgent({ connections: 1 }) 59 | 60 | const mockClient = mockAgent.get('http://localhost:3000') 61 | mockClient.intercept({ path: '/foo' }).reply(200, 'foo') 62 | 63 | const { 64 | statusCode, 65 | body 66 | } = await mockClient.request({ 67 | origin: 'http://localhost:3000', 68 | path: '/foo', 69 | method: 'GET' 70 | }) 71 | 72 | console.log('response received', statusCode) // response received 200 73 | 74 | for await (const data of body) { 75 | console.log('data', data.toString('utf8')) // data foo 76 | } 77 | ``` 78 | -------------------------------------------------------------------------------- /node_modules/undici/docs/api/MockErrors.md: -------------------------------------------------------------------------------- 1 | # MockErrors 2 | 3 | Undici exposes a variety of mock error objects that you can use to enhance your mock error handling. 4 | You can find all the mock error objects inside the `mockErrors` key. 5 | 6 | ```js 7 | import { mockErrors } from 'undici' 8 | ``` 9 | 10 | | Mock Error | Mock Error Codes | Description | 11 | | --------------------- | ------------------------------- | ---------------------------------------------------------- | 12 | | `MockNotMatchedError` | `UND_MOCK_ERR_MOCK_NOT_MATCHED` | The request does not match any registered mock dispatches. | 13 | -------------------------------------------------------------------------------- /node_modules/undici/docs/api/PoolStats.md: -------------------------------------------------------------------------------- 1 | # Class: PoolStats 2 | 3 | Aggregate stats for a [Pool](Pool.md) or [BalancedPool](BalancedPool.md). 4 | 5 | ## `new PoolStats(pool)` 6 | 7 | Arguments: 8 | 9 | * **pool** `Pool` - Pool or BalancedPool from which to return stats. 10 | 11 | ## Instance Properties 12 | 13 | ### `PoolStats.connected` 14 | 15 | Number of open socket connections in this pool. 16 | 17 | ### `PoolStats.free` 18 | 19 | Number of open socket connections in this pool that do not have an active request. 20 | 21 | ### `PoolStats.pending` 22 | 23 | Number of pending requests across all clients in this pool. 24 | 25 | ### `PoolStats.queued` 26 | 27 | Number of queued requests across all clients in this pool. 28 | 29 | ### `PoolStats.running` 30 | 31 | Number of currently active requests across all clients in this pool. 32 | 33 | ### `PoolStats.size` 34 | 35 | Number of active, pending, or queued requests across all clients in this pool. 36 | -------------------------------------------------------------------------------- /node_modules/undici/docs/api/WebSocket.md: -------------------------------------------------------------------------------- 1 | # Class: WebSocket 2 | 3 | > ⚠️ Warning: the WebSocket API is experimental. 4 | 5 | Extends: [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) 6 | 7 | The WebSocket object provides a way to manage a WebSocket connection to a server, allowing bidirectional communication. The API follows the [WebSocket spec](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) and [RFC 6455](https://datatracker.ietf.org/doc/html/rfc6455). 8 | 9 | ## `new WebSocket(url[, protocol])` 10 | 11 | Arguments: 12 | 13 | * **url** `URL | string` - The url's protocol *must* be `ws` or `wss`. 14 | * **protocol** `string | string[] | WebSocketInit` (optional) - Subprotocol(s) to request the server use, or a [`Dispatcher`](./Dispatcher.md). 15 | 16 | ### Example: 17 | 18 | This example will not work in browsers or other platforms that don't allow passing an object. 19 | 20 | ```mjs 21 | import { WebSocket, ProxyAgent } from 'undici' 22 | 23 | const proxyAgent = new ProxyAgent('my.proxy.server') 24 | 25 | const ws = new WebSocket('wss://echo.websocket.events', { 26 | dispatcher: proxyAgent, 27 | protocols: ['echo', 'chat'] 28 | }) 29 | ``` 30 | 31 | If you do not need a custom Dispatcher, it's recommended to use the following pattern: 32 | 33 | ```mjs 34 | import { WebSocket } from 'undici' 35 | 36 | const ws = new WebSocket('wss://echo.websocket.events', ['echo', 'chat']) 37 | ``` 38 | 39 | ## Read More 40 | 41 | - [MDN - WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) 42 | - [The WebSocket Specification](https://www.rfc-editor.org/rfc/rfc6455) 43 | - [The WHATWG WebSocket Specification](https://websockets.spec.whatwg.org/) 44 | -------------------------------------------------------------------------------- /node_modules/undici/docs/assets/lifecycle-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawidd6/action-debian-package/cf01d241f412d693d12f16c92279c4cde189011a/node_modules/undici/docs/assets/lifecycle-diagram.png -------------------------------------------------------------------------------- /node_modules/undici/docs/best-practices/client-certificate.md: -------------------------------------------------------------------------------- 1 | # Client certificate 2 | 3 | Client certificate authentication can be configured with the `Client`, the required options are passed along through the `connect` option. 4 | 5 | The client certificates must be signed by a trusted CA. The Node.js default is to trust the well-known CAs curated by Mozilla. 6 | 7 | Setting the server option `requestCert: true` tells the server to request the client certificate. 8 | 9 | The server option `rejectUnauthorized: false` allows us to handle any invalid certificate errors in client code. The `authorized` property on the socket of the incoming request will show if the client certificate was valid. The `authorizationError` property will give the reason if the certificate was not valid. 10 | 11 | ### Client Certificate Authentication 12 | 13 | ```js 14 | const { readFileSync } = require('fs') 15 | const { join } = require('path') 16 | const { createServer } = require('https') 17 | const { Client } = require('undici') 18 | 19 | const serverOptions = { 20 | ca: [ 21 | readFileSync(join(__dirname, 'client-ca-crt.pem'), 'utf8') 22 | ], 23 | key: readFileSync(join(__dirname, 'server-key.pem'), 'utf8'), 24 | cert: readFileSync(join(__dirname, 'server-crt.pem'), 'utf8'), 25 | requestCert: true, 26 | rejectUnauthorized: false 27 | } 28 | 29 | const server = createServer(serverOptions, (req, res) => { 30 | // true if client cert is valid 31 | if(req.client.authorized === true) { 32 | console.log('valid') 33 | } else { 34 | console.error(req.client.authorizationError) 35 | } 36 | res.end() 37 | }) 38 | 39 | server.listen(0, function () { 40 | const tls = { 41 | ca: [ 42 | readFileSync(join(__dirname, 'server-ca-crt.pem'), 'utf8') 43 | ], 44 | key: readFileSync(join(__dirname, 'client-key.pem'), 'utf8'), 45 | cert: readFileSync(join(__dirname, 'client-crt.pem'), 'utf8'), 46 | rejectUnauthorized: false, 47 | servername: 'agent1' 48 | } 49 | const client = new Client(`https://localhost:${server.address().port}`, { 50 | connect: tls 51 | }) 52 | 53 | client.request({ 54 | path: '/', 55 | method: 'GET' 56 | }, (err, { body }) => { 57 | body.on('data', (buf) => {}) 58 | body.on('end', () => { 59 | client.close() 60 | server.close() 61 | }) 62 | }) 63 | }) 64 | ``` 65 | -------------------------------------------------------------------------------- /node_modules/undici/docs/best-practices/writing-tests.md: -------------------------------------------------------------------------------- 1 | # Writing tests 2 | 3 | Undici is tuned for a production use case and its default will keep 4 | a socket open for a few seconds after an HTTP request is completed to 5 | remove the overhead of opening up a new socket. These settings that makes 6 | Undici shine in production are not a good fit for using Undici in automated 7 | tests, as it will result in longer execution times. 8 | 9 | The following are good defaults that will keep the socket open for only 10ms: 10 | 11 | ```js 12 | import { request, setGlobalDispatcher, Agent } from 'undici' 13 | 14 | const agent = new Agent({ 15 | keepAliveTimeout: 10, // milliseconds 16 | keepAliveMaxTimeout: 10 // milliseconds 17 | }) 18 | 19 | setGlobalDispatcher(agent) 20 | ``` 21 | -------------------------------------------------------------------------------- /node_modules/undici/index-fetch.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const fetchImpl = require('./lib/fetch').fetch 4 | 5 | module.exports.fetch = function fetch (resource, init = undefined) { 6 | return fetchImpl(resource, init).catch((err) => { 7 | Error.captureStackTrace(err, this) 8 | throw err 9 | }) 10 | } 11 | module.exports.FormData = require('./lib/fetch/formdata').FormData 12 | module.exports.Headers = require('./lib/fetch/headers').Headers 13 | module.exports.Response = require('./lib/fetch/response').Response 14 | module.exports.Request = require('./lib/fetch/request').Request 15 | module.exports.WebSocket = require('./lib/websocket/websocket').WebSocket 16 | -------------------------------------------------------------------------------- /node_modules/undici/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './types/index' 2 | import Undici from './types/index' 3 | export default Undici 4 | -------------------------------------------------------------------------------- /node_modules/undici/lib/api/abort-signal.js: -------------------------------------------------------------------------------- 1 | const { addAbortListener } = require('../core/util') 2 | const { RequestAbortedError } = require('../core/errors') 3 | 4 | const kListener = Symbol('kListener') 5 | const kSignal = Symbol('kSignal') 6 | 7 | function abort (self) { 8 | if (self.abort) { 9 | self.abort() 10 | } else { 11 | self.onError(new RequestAbortedError()) 12 | } 13 | } 14 | 15 | function addSignal (self, signal) { 16 | self[kSignal] = null 17 | self[kListener] = null 18 | 19 | if (!signal) { 20 | return 21 | } 22 | 23 | if (signal.aborted) { 24 | abort(self) 25 | return 26 | } 27 | 28 | self[kSignal] = signal 29 | self[kListener] = () => { 30 | abort(self) 31 | } 32 | 33 | addAbortListener(self[kSignal], self[kListener]) 34 | } 35 | 36 | function removeSignal (self) { 37 | if (!self[kSignal]) { 38 | return 39 | } 40 | 41 | if ('removeEventListener' in self[kSignal]) { 42 | self[kSignal].removeEventListener('abort', self[kListener]) 43 | } else { 44 | self[kSignal].removeListener('abort', self[kListener]) 45 | } 46 | 47 | self[kSignal] = null 48 | self[kListener] = null 49 | } 50 | 51 | module.exports = { 52 | addSignal, 53 | removeSignal 54 | } 55 | -------------------------------------------------------------------------------- /node_modules/undici/lib/api/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports.request = require('./api-request') 4 | module.exports.stream = require('./api-stream') 5 | module.exports.pipeline = require('./api-pipeline') 6 | module.exports.upgrade = require('./api-upgrade') 7 | module.exports.connect = require('./api-connect') 8 | -------------------------------------------------------------------------------- /node_modules/undici/lib/api/util.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert') 2 | const { 3 | ResponseStatusCodeError 4 | } = require('../core/errors') 5 | const { toUSVString } = require('../core/util') 6 | 7 | async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { 8 | assert(body) 9 | 10 | let chunks = [] 11 | let limit = 0 12 | 13 | for await (const chunk of body) { 14 | chunks.push(chunk) 15 | limit += chunk.length 16 | if (limit > 128 * 1024) { 17 | chunks = null 18 | break 19 | } 20 | } 21 | 22 | if (statusCode === 204 || !contentType || !chunks) { 23 | process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) 24 | return 25 | } 26 | 27 | try { 28 | if (contentType.startsWith('application/json')) { 29 | const payload = JSON.parse(toUSVString(Buffer.concat(chunks))) 30 | process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) 31 | return 32 | } 33 | 34 | if (contentType.startsWith('text/')) { 35 | const payload = toUSVString(Buffer.concat(chunks)) 36 | process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) 37 | return 38 | } 39 | } catch (err) { 40 | // Process in a fallback if error 41 | } 42 | 43 | process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) 44 | } 45 | 46 | module.exports = { getResolveErrorBodyCallback } 47 | -------------------------------------------------------------------------------- /node_modules/undici/lib/cache/symbols.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | kConstruct: require('../core/symbols').kConstruct 5 | } 6 | -------------------------------------------------------------------------------- /node_modules/undici/lib/cache/util.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const assert = require('assert') 4 | const { URLSerializer } = require('../fetch/dataURL') 5 | const { isValidHeaderName } = require('../fetch/util') 6 | 7 | /** 8 | * @see https://url.spec.whatwg.org/#concept-url-equals 9 | * @param {URL} A 10 | * @param {URL} B 11 | * @param {boolean | undefined} excludeFragment 12 | * @returns {boolean} 13 | */ 14 | function urlEquals (A, B, excludeFragment = false) { 15 | const serializedA = URLSerializer(A, excludeFragment) 16 | 17 | const serializedB = URLSerializer(B, excludeFragment) 18 | 19 | return serializedA === serializedB 20 | } 21 | 22 | /** 23 | * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 24 | * @param {string} header 25 | */ 26 | function fieldValues (header) { 27 | assert(header !== null) 28 | 29 | const values = [] 30 | 31 | for (let value of header.split(',')) { 32 | value = value.trim() 33 | 34 | if (!value.length) { 35 | continue 36 | } else if (!isValidHeaderName(value)) { 37 | continue 38 | } 39 | 40 | values.push(value) 41 | } 42 | 43 | return values 44 | } 45 | 46 | module.exports = { 47 | urlEquals, 48 | fieldValues 49 | } 50 | -------------------------------------------------------------------------------- /node_modules/undici/lib/compat/dispatcher-weakref.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /* istanbul ignore file: only for Node 12 */ 4 | 5 | const { kConnected, kSize } = require('../core/symbols') 6 | 7 | class CompatWeakRef { 8 | constructor (value) { 9 | this.value = value 10 | } 11 | 12 | deref () { 13 | return this.value[kConnected] === 0 && this.value[kSize] === 0 14 | ? undefined 15 | : this.value 16 | } 17 | } 18 | 19 | class CompatFinalizer { 20 | constructor (finalizer) { 21 | this.finalizer = finalizer 22 | } 23 | 24 | register (dispatcher, key) { 25 | if (dispatcher.on) { 26 | dispatcher.on('disconnect', () => { 27 | if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { 28 | this.finalizer(key) 29 | } 30 | }) 31 | } 32 | } 33 | } 34 | 35 | module.exports = function () { 36 | // FIXME: remove workaround when the Node bug is fixed 37 | // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 38 | if (process.env.NODE_V8_COVERAGE) { 39 | return { 40 | WeakRef: CompatWeakRef, 41 | FinalizationRegistry: CompatFinalizer 42 | } 43 | } 44 | return { 45 | WeakRef: global.WeakRef || CompatWeakRef, 46 | FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /node_modules/undici/lib/cookies/constants.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | // https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size 4 | const maxAttributeValueSize = 1024 5 | 6 | // https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size 7 | const maxNameValuePairSize = 4096 8 | 9 | module.exports = { 10 | maxAttributeValueSize, 11 | maxNameValuePairSize 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/undici/lib/core/symbols.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | kClose: Symbol('close'), 3 | kDestroy: Symbol('destroy'), 4 | kDispatch: Symbol('dispatch'), 5 | kUrl: Symbol('url'), 6 | kWriting: Symbol('writing'), 7 | kResuming: Symbol('resuming'), 8 | kQueue: Symbol('queue'), 9 | kConnect: Symbol('connect'), 10 | kConnecting: Symbol('connecting'), 11 | kHeadersList: Symbol('headers list'), 12 | kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'), 13 | kKeepAliveMaxTimeout: Symbol('max keep alive timeout'), 14 | kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'), 15 | kKeepAliveTimeoutValue: Symbol('keep alive timeout'), 16 | kKeepAlive: Symbol('keep alive'), 17 | kHeadersTimeout: Symbol('headers timeout'), 18 | kBodyTimeout: Symbol('body timeout'), 19 | kServerName: Symbol('server name'), 20 | kLocalAddress: Symbol('local address'), 21 | kHost: Symbol('host'), 22 | kNoRef: Symbol('no ref'), 23 | kBodyUsed: Symbol('used'), 24 | kRunning: Symbol('running'), 25 | kBlocking: Symbol('blocking'), 26 | kPending: Symbol('pending'), 27 | kSize: Symbol('size'), 28 | kBusy: Symbol('busy'), 29 | kQueued: Symbol('queued'), 30 | kFree: Symbol('free'), 31 | kConnected: Symbol('connected'), 32 | kClosed: Symbol('closed'), 33 | kNeedDrain: Symbol('need drain'), 34 | kReset: Symbol('reset'), 35 | kDestroyed: Symbol.for('nodejs.stream.destroyed'), 36 | kMaxHeadersSize: Symbol('max headers size'), 37 | kRunningIdx: Symbol('running index'), 38 | kPendingIdx: Symbol('pending index'), 39 | kError: Symbol('error'), 40 | kClients: Symbol('clients'), 41 | kClient: Symbol('client'), 42 | kParser: Symbol('parser'), 43 | kOnDestroyed: Symbol('destroy callbacks'), 44 | kPipelining: Symbol('pipelining'), 45 | kSocket: Symbol('socket'), 46 | kHostHeader: Symbol('host header'), 47 | kConnector: Symbol('connector'), 48 | kStrictContentLength: Symbol('strict content length'), 49 | kMaxRedirections: Symbol('maxRedirections'), 50 | kMaxRequests: Symbol('maxRequestsPerClient'), 51 | kProxy: Symbol('proxy agent options'), 52 | kCounter: Symbol('socket request counter'), 53 | kInterceptors: Symbol('dispatch interceptors'), 54 | kMaxResponseSize: Symbol('max response size'), 55 | kHTTP2Session: Symbol('http2Session'), 56 | kHTTP2SessionState: Symbol('http2Session state'), 57 | kHTTP2BuildRequest: Symbol('http2 build request'), 58 | kHTTP1BuildRequest: Symbol('http1 build request'), 59 | kHTTP2CopyHeaders: Symbol('http2 copy headers'), 60 | kHTTPConnVersion: Symbol('http connection version'), 61 | kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), 62 | kConstruct: Symbol('constructable') 63 | } 64 | -------------------------------------------------------------------------------- /node_modules/undici/lib/dispatcher.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const EventEmitter = require('events') 4 | 5 | class Dispatcher extends EventEmitter { 6 | dispatch () { 7 | throw new Error('not implemented') 8 | } 9 | 10 | close () { 11 | throw new Error('not implemented') 12 | } 13 | 14 | destroy () { 15 | throw new Error('not implemented') 16 | } 17 | } 18 | 19 | module.exports = Dispatcher 20 | -------------------------------------------------------------------------------- /node_modules/undici/lib/fetch/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Ethan Arrowood 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/undici/lib/fetch/global.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | // In case of breaking changes, increase the version 4 | // number to avoid conflicts. 5 | const globalOrigin = Symbol.for('undici.globalOrigin.1') 6 | 7 | function getGlobalOrigin () { 8 | return globalThis[globalOrigin] 9 | } 10 | 11 | function setGlobalOrigin (newOrigin) { 12 | if (newOrigin === undefined) { 13 | Object.defineProperty(globalThis, globalOrigin, { 14 | value: undefined, 15 | writable: true, 16 | enumerable: false, 17 | configurable: false 18 | }) 19 | 20 | return 21 | } 22 | 23 | const parsedURL = new URL(newOrigin) 24 | 25 | if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') { 26 | throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`) 27 | } 28 | 29 | Object.defineProperty(globalThis, globalOrigin, { 30 | value: parsedURL, 31 | writable: true, 32 | enumerable: false, 33 | configurable: false 34 | }) 35 | } 36 | 37 | module.exports = { 38 | getGlobalOrigin, 39 | setGlobalOrigin 40 | } 41 | -------------------------------------------------------------------------------- /node_modules/undici/lib/fetch/symbols.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | kUrl: Symbol('url'), 5 | kHeaders: Symbol('headers'), 6 | kSignal: Symbol('signal'), 7 | kState: Symbol('state'), 8 | kGuard: Symbol('guard'), 9 | kRealm: Symbol('realm') 10 | } 11 | -------------------------------------------------------------------------------- /node_modules/undici/lib/fileapi/progressevent.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { webidl } = require('../fetch/webidl') 4 | 5 | const kState = Symbol('ProgressEvent state') 6 | 7 | /** 8 | * @see https://xhr.spec.whatwg.org/#progressevent 9 | */ 10 | class ProgressEvent extends Event { 11 | constructor (type, eventInitDict = {}) { 12 | type = webidl.converters.DOMString(type) 13 | eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) 14 | 15 | super(type, eventInitDict) 16 | 17 | this[kState] = { 18 | lengthComputable: eventInitDict.lengthComputable, 19 | loaded: eventInitDict.loaded, 20 | total: eventInitDict.total 21 | } 22 | } 23 | 24 | get lengthComputable () { 25 | webidl.brandCheck(this, ProgressEvent) 26 | 27 | return this[kState].lengthComputable 28 | } 29 | 30 | get loaded () { 31 | webidl.brandCheck(this, ProgressEvent) 32 | 33 | return this[kState].loaded 34 | } 35 | 36 | get total () { 37 | webidl.brandCheck(this, ProgressEvent) 38 | 39 | return this[kState].total 40 | } 41 | } 42 | 43 | webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ 44 | { 45 | key: 'lengthComputable', 46 | converter: webidl.converters.boolean, 47 | defaultValue: false 48 | }, 49 | { 50 | key: 'loaded', 51 | converter: webidl.converters['unsigned long long'], 52 | defaultValue: 0 53 | }, 54 | { 55 | key: 'total', 56 | converter: webidl.converters['unsigned long long'], 57 | defaultValue: 0 58 | }, 59 | { 60 | key: 'bubbles', 61 | converter: webidl.converters.boolean, 62 | defaultValue: false 63 | }, 64 | { 65 | key: 'cancelable', 66 | converter: webidl.converters.boolean, 67 | defaultValue: false 68 | }, 69 | { 70 | key: 'composed', 71 | converter: webidl.converters.boolean, 72 | defaultValue: false 73 | } 74 | ]) 75 | 76 | module.exports = { 77 | ProgressEvent 78 | } 79 | -------------------------------------------------------------------------------- /node_modules/undici/lib/fileapi/symbols.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | kState: Symbol('FileReader state'), 5 | kResult: Symbol('FileReader result'), 6 | kError: Symbol('FileReader error'), 7 | kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), 8 | kEvents: Symbol('FileReader events'), 9 | kAborted: Symbol('FileReader aborted') 10 | } 11 | -------------------------------------------------------------------------------- /node_modules/undici/lib/global.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | // We include a version number for the Dispatcher API. In case of breaking changes, 4 | // this version number must be increased to avoid conflicts. 5 | const globalDispatcher = Symbol.for('undici.globalDispatcher.1') 6 | const { InvalidArgumentError } = require('./core/errors') 7 | const Agent = require('./agent') 8 | 9 | if (getGlobalDispatcher() === undefined) { 10 | setGlobalDispatcher(new Agent()) 11 | } 12 | 13 | function setGlobalDispatcher (agent) { 14 | if (!agent || typeof agent.dispatch !== 'function') { 15 | throw new InvalidArgumentError('Argument agent must implement Agent') 16 | } 17 | Object.defineProperty(globalThis, globalDispatcher, { 18 | value: agent, 19 | writable: true, 20 | enumerable: false, 21 | configurable: false 22 | }) 23 | } 24 | 25 | function getGlobalDispatcher () { 26 | return globalThis[globalDispatcher] 27 | } 28 | 29 | module.exports = { 30 | setGlobalDispatcher, 31 | getGlobalDispatcher 32 | } 33 | -------------------------------------------------------------------------------- /node_modules/undici/lib/handler/DecoratorHandler.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = class DecoratorHandler { 4 | constructor (handler) { 5 | this.handler = handler 6 | } 7 | 8 | onConnect (...args) { 9 | return this.handler.onConnect(...args) 10 | } 11 | 12 | onError (...args) { 13 | return this.handler.onError(...args) 14 | } 15 | 16 | onUpgrade (...args) { 17 | return this.handler.onUpgrade(...args) 18 | } 19 | 20 | onHeaders (...args) { 21 | return this.handler.onHeaders(...args) 22 | } 23 | 24 | onData (...args) { 25 | return this.handler.onData(...args) 26 | } 27 | 28 | onComplete (...args) { 29 | return this.handler.onComplete(...args) 30 | } 31 | 32 | onBodySent (...args) { 33 | return this.handler.onBodySent(...args) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /node_modules/undici/lib/interceptor/redirectInterceptor.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const RedirectHandler = require('../handler/RedirectHandler') 4 | 5 | function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { 6 | return (dispatch) => { 7 | return function Intercept (opts, handler) { 8 | const { maxRedirections = defaultMaxRedirections } = opts 9 | 10 | if (!maxRedirections) { 11 | return dispatch(opts, handler) 12 | } 13 | 14 | const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler) 15 | opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. 16 | return dispatch(opts, redirectHandler) 17 | } 18 | } 19 | } 20 | 21 | module.exports = createRedirectInterceptor 22 | -------------------------------------------------------------------------------- /node_modules/undici/lib/llhttp/llhttp.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawidd6/action-debian-package/cf01d241f412d693d12f16c92279c4cde189011a/node_modules/undici/lib/llhttp/llhttp.wasm -------------------------------------------------------------------------------- /node_modules/undici/lib/llhttp/llhttp_simd.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawidd6/action-debian-package/cf01d241f412d693d12f16c92279c4cde189011a/node_modules/undici/lib/llhttp/llhttp_simd.wasm -------------------------------------------------------------------------------- /node_modules/undici/lib/llhttp/utils.d.ts: -------------------------------------------------------------------------------- 1 | export interface IEnumMap { 2 | [key: string]: number; 3 | } 4 | export declare function enumToMap(obj: any): IEnumMap; 5 | -------------------------------------------------------------------------------- /node_modules/undici/lib/llhttp/utils.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.enumToMap = void 0; 4 | function enumToMap(obj) { 5 | const res = {}; 6 | Object.keys(obj).forEach((key) => { 7 | const value = obj[key]; 8 | if (typeof value === 'number') { 9 | res[key] = value; 10 | } 11 | }); 12 | return res; 13 | } 14 | exports.enumToMap = enumToMap; 15 | //# sourceMappingURL=utils.js.map -------------------------------------------------------------------------------- /node_modules/undici/lib/llhttp/utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/llhttp/utils.ts"],"names":[],"mappings":";;;AAIA,SAAgB,SAAS,CAAC,GAAQ;IAChC,MAAM,GAAG,GAAa,EAAE,CAAC;IAEzB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC/B,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;SAClB;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC;AAXD,8BAWC"} -------------------------------------------------------------------------------- /node_modules/undici/lib/llhttp/wasm_build_env.txt: -------------------------------------------------------------------------------- 1 | alpine-baselayout-data-3.4.0-r0 2 | musl-1.2.3-r4 3 | busybox-1.35.0-r29 4 | busybox-binsh-1.35.0-r29 5 | alpine-baselayout-3.4.0-r0 6 | alpine-keys-2.4-r1 7 | ca-certificates-bundle-20220614-r4 8 | libcrypto3-3.0.8-r3 9 | libssl3-3.0.8-r3 10 | ssl_client-1.35.0-r29 11 | zlib-1.2.13-r0 12 | apk-tools-2.12.10-r1 13 | scanelf-1.3.5-r1 14 | musl-utils-1.2.3-r4 15 | libc-utils-0.7.2-r3 16 | libgcc-12.2.1_git20220924-r4 17 | libstdc++-12.2.1_git20220924-r4 18 | libffi-3.4.4-r0 19 | xz-libs-5.2.9-r0 20 | libxml2-2.10.4-r0 21 | zstd-libs-1.5.5-r0 22 | llvm15-libs-15.0.7-r0 23 | clang15-libs-15.0.7-r0 24 | libstdc++-dev-12.2.1_git20220924-r4 25 | clang15-15.0.7-r0 26 | lld-libs-15.0.7-r0 27 | lld-15.0.7-r0 28 | wasi-libc-0.20220525-r1 29 | wasi-libcxx-15.0.7-r0 30 | wasi-libcxxabi-15.0.7-r0 31 | wasi-compiler-rt-15.0.7-r0 32 | wasi-sdk-16-r0 33 | -------------------------------------------------------------------------------- /node_modules/undici/lib/mock/mock-client.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { promisify } = require('util') 4 | const Client = require('../client') 5 | const { buildMockDispatch } = require('./mock-utils') 6 | const { 7 | kDispatches, 8 | kMockAgent, 9 | kClose, 10 | kOriginalClose, 11 | kOrigin, 12 | kOriginalDispatch, 13 | kConnected 14 | } = require('./mock-symbols') 15 | const { MockInterceptor } = require('./mock-interceptor') 16 | const Symbols = require('../core/symbols') 17 | const { InvalidArgumentError } = require('../core/errors') 18 | 19 | /** 20 | * MockClient provides an API that extends the Client to influence the mockDispatches. 21 | */ 22 | class MockClient extends Client { 23 | constructor (origin, opts) { 24 | super(origin, opts) 25 | 26 | if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { 27 | throw new InvalidArgumentError('Argument opts.agent must implement Agent') 28 | } 29 | 30 | this[kMockAgent] = opts.agent 31 | this[kOrigin] = origin 32 | this[kDispatches] = [] 33 | this[kConnected] = 1 34 | this[kOriginalDispatch] = this.dispatch 35 | this[kOriginalClose] = this.close.bind(this) 36 | 37 | this.dispatch = buildMockDispatch.call(this) 38 | this.close = this[kClose] 39 | } 40 | 41 | get [Symbols.kConnected] () { 42 | return this[kConnected] 43 | } 44 | 45 | /** 46 | * Sets up the base interceptor for mocking replies from undici. 47 | */ 48 | intercept (opts) { 49 | return new MockInterceptor(opts, this[kDispatches]) 50 | } 51 | 52 | async [kClose] () { 53 | await promisify(this[kOriginalClose])() 54 | this[kConnected] = 0 55 | this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) 56 | } 57 | } 58 | 59 | module.exports = MockClient 60 | -------------------------------------------------------------------------------- /node_modules/undici/lib/mock/mock-errors.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { UndiciError } = require('../core/errors') 4 | 5 | class MockNotMatchedError extends UndiciError { 6 | constructor (message) { 7 | super(message) 8 | Error.captureStackTrace(this, MockNotMatchedError) 9 | this.name = 'MockNotMatchedError' 10 | this.message = message || 'The request does not match any registered mock dispatches' 11 | this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' 12 | } 13 | } 14 | 15 | module.exports = { 16 | MockNotMatchedError 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/undici/lib/mock/mock-pool.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { promisify } = require('util') 4 | const Pool = require('../pool') 5 | const { buildMockDispatch } = require('./mock-utils') 6 | const { 7 | kDispatches, 8 | kMockAgent, 9 | kClose, 10 | kOriginalClose, 11 | kOrigin, 12 | kOriginalDispatch, 13 | kConnected 14 | } = require('./mock-symbols') 15 | const { MockInterceptor } = require('./mock-interceptor') 16 | const Symbols = require('../core/symbols') 17 | const { InvalidArgumentError } = require('../core/errors') 18 | 19 | /** 20 | * MockPool provides an API that extends the Pool to influence the mockDispatches. 21 | */ 22 | class MockPool extends Pool { 23 | constructor (origin, opts) { 24 | super(origin, opts) 25 | 26 | if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { 27 | throw new InvalidArgumentError('Argument opts.agent must implement Agent') 28 | } 29 | 30 | this[kMockAgent] = opts.agent 31 | this[kOrigin] = origin 32 | this[kDispatches] = [] 33 | this[kConnected] = 1 34 | this[kOriginalDispatch] = this.dispatch 35 | this[kOriginalClose] = this.close.bind(this) 36 | 37 | this.dispatch = buildMockDispatch.call(this) 38 | this.close = this[kClose] 39 | } 40 | 41 | get [Symbols.kConnected] () { 42 | return this[kConnected] 43 | } 44 | 45 | /** 46 | * Sets up the base interceptor for mocking replies from undici. 47 | */ 48 | intercept (opts) { 49 | return new MockInterceptor(opts, this[kDispatches]) 50 | } 51 | 52 | async [kClose] () { 53 | await promisify(this[kOriginalClose])() 54 | this[kConnected] = 0 55 | this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) 56 | } 57 | } 58 | 59 | module.exports = MockPool 60 | -------------------------------------------------------------------------------- /node_modules/undici/lib/mock/mock-symbols.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | kAgent: Symbol('agent'), 5 | kOptions: Symbol('options'), 6 | kFactory: Symbol('factory'), 7 | kDispatches: Symbol('dispatches'), 8 | kDispatchKey: Symbol('dispatch key'), 9 | kDefaultHeaders: Symbol('default headers'), 10 | kDefaultTrailers: Symbol('default trailers'), 11 | kContentLength: Symbol('content length'), 12 | kMockAgent: Symbol('mock agent'), 13 | kMockAgentSet: Symbol('mock agent set'), 14 | kMockAgentGet: Symbol('mock agent get'), 15 | kMockDispatch: Symbol('mock dispatch'), 16 | kClose: Symbol('close'), 17 | kOriginalClose: Symbol('original agent close'), 18 | kOrigin: Symbol('origin'), 19 | kIsMockActive: Symbol('is mock active'), 20 | kNetConnect: Symbol('net connect'), 21 | kGetNetConnect: Symbol('get net connect'), 22 | kConnected: Symbol('connected') 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/undici/lib/mock/pending-interceptors-formatter.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { Transform } = require('stream') 4 | const { Console } = require('console') 5 | 6 | /** 7 | * Gets the output of `console.table(…)` as a string. 8 | */ 9 | module.exports = class PendingInterceptorsFormatter { 10 | constructor ({ disableColors } = {}) { 11 | this.transform = new Transform({ 12 | transform (chunk, _enc, cb) { 13 | cb(null, chunk) 14 | } 15 | }) 16 | 17 | this.logger = new Console({ 18 | stdout: this.transform, 19 | inspectOptions: { 20 | colors: !disableColors && !process.env.CI 21 | } 22 | }) 23 | } 24 | 25 | format (pendingInterceptors) { 26 | const withPrettyHeaders = pendingInterceptors.map( 27 | ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ 28 | Method: method, 29 | Origin: origin, 30 | Path: path, 31 | 'Status code': statusCode, 32 | Persistent: persist ? '✅' : '❌', 33 | Invocations: timesInvoked, 34 | Remaining: persist ? Infinity : times - timesInvoked 35 | })) 36 | 37 | this.logger.table(withPrettyHeaders) 38 | return this.transform.read().toString() 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /node_modules/undici/lib/mock/pluralizer.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const singulars = { 4 | pronoun: 'it', 5 | is: 'is', 6 | was: 'was', 7 | this: 'this' 8 | } 9 | 10 | const plurals = { 11 | pronoun: 'they', 12 | is: 'are', 13 | was: 'were', 14 | this: 'these' 15 | } 16 | 17 | module.exports = class Pluralizer { 18 | constructor (singular, plural) { 19 | this.singular = singular 20 | this.plural = plural 21 | } 22 | 23 | pluralize (count) { 24 | const one = count === 1 25 | const keys = one ? singulars : plurals 26 | const noun = one ? this.singular : this.plural 27 | return { ...keys, count, noun } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/undici/lib/pool-stats.js: -------------------------------------------------------------------------------- 1 | const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require('./core/symbols') 2 | const kPool = Symbol('pool') 3 | 4 | class PoolStats { 5 | constructor (pool) { 6 | this[kPool] = pool 7 | } 8 | 9 | get connected () { 10 | return this[kPool][kConnected] 11 | } 12 | 13 | get free () { 14 | return this[kPool][kFree] 15 | } 16 | 17 | get pending () { 18 | return this[kPool][kPending] 19 | } 20 | 21 | get queued () { 22 | return this[kPool][kQueued] 23 | } 24 | 25 | get running () { 26 | return this[kPool][kRunning] 27 | } 28 | 29 | get size () { 30 | return this[kPool][kSize] 31 | } 32 | } 33 | 34 | module.exports = PoolStats 35 | -------------------------------------------------------------------------------- /node_modules/undici/lib/pool.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { 4 | PoolBase, 5 | kClients, 6 | kNeedDrain, 7 | kAddClient, 8 | kGetDispatcher 9 | } = require('./pool-base') 10 | const Client = require('./client') 11 | const { 12 | InvalidArgumentError 13 | } = require('./core/errors') 14 | const util = require('./core/util') 15 | const { kUrl, kInterceptors } = require('./core/symbols') 16 | const buildConnector = require('./core/connect') 17 | 18 | const kOptions = Symbol('options') 19 | const kConnections = Symbol('connections') 20 | const kFactory = Symbol('factory') 21 | 22 | function defaultFactory (origin, opts) { 23 | return new Client(origin, opts) 24 | } 25 | 26 | class Pool extends PoolBase { 27 | constructor (origin, { 28 | connections, 29 | factory = defaultFactory, 30 | connect, 31 | connectTimeout, 32 | tls, 33 | maxCachedSessions, 34 | socketPath, 35 | autoSelectFamily, 36 | autoSelectFamilyAttemptTimeout, 37 | allowH2, 38 | ...options 39 | } = {}) { 40 | super() 41 | 42 | if (connections != null && (!Number.isFinite(connections) || connections < 0)) { 43 | throw new InvalidArgumentError('invalid connections') 44 | } 45 | 46 | if (typeof factory !== 'function') { 47 | throw new InvalidArgumentError('factory must be a function.') 48 | } 49 | 50 | if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { 51 | throw new InvalidArgumentError('connect must be a function or an object') 52 | } 53 | 54 | if (typeof connect !== 'function') { 55 | connect = buildConnector({ 56 | ...tls, 57 | maxCachedSessions, 58 | allowH2, 59 | socketPath, 60 | timeout: connectTimeout, 61 | ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), 62 | ...connect 63 | }) 64 | } 65 | 66 | this[kInterceptors] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool) 67 | ? options.interceptors.Pool 68 | : [] 69 | this[kConnections] = connections || null 70 | this[kUrl] = util.parseOrigin(origin) 71 | this[kOptions] = { ...util.deepClone(options), connect, allowH2 } 72 | this[kOptions].interceptors = options.interceptors 73 | ? { ...options.interceptors } 74 | : undefined 75 | this[kFactory] = factory 76 | } 77 | 78 | [kGetDispatcher] () { 79 | let dispatcher = this[kClients].find(dispatcher => !dispatcher[kNeedDrain]) 80 | 81 | if (dispatcher) { 82 | return dispatcher 83 | } 84 | 85 | if (!this[kConnections] || this[kClients].length < this[kConnections]) { 86 | dispatcher = this[kFactory](this[kUrl], this[kOptions]) 87 | this[kAddClient](dispatcher) 88 | } 89 | 90 | return dispatcher 91 | } 92 | } 93 | 94 | module.exports = Pool 95 | -------------------------------------------------------------------------------- /node_modules/undici/lib/timers.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | let fastNow = Date.now() 4 | let fastNowTimeout 5 | 6 | const fastTimers = [] 7 | 8 | function onTimeout () { 9 | fastNow = Date.now() 10 | 11 | let len = fastTimers.length 12 | let idx = 0 13 | while (idx < len) { 14 | const timer = fastTimers[idx] 15 | 16 | if (timer.state === 0) { 17 | timer.state = fastNow + timer.delay 18 | } else if (timer.state > 0 && fastNow >= timer.state) { 19 | timer.state = -1 20 | timer.callback(timer.opaque) 21 | } 22 | 23 | if (timer.state === -1) { 24 | timer.state = -2 25 | if (idx !== len - 1) { 26 | fastTimers[idx] = fastTimers.pop() 27 | } else { 28 | fastTimers.pop() 29 | } 30 | len -= 1 31 | } else { 32 | idx += 1 33 | } 34 | } 35 | 36 | if (fastTimers.length > 0) { 37 | refreshTimeout() 38 | } 39 | } 40 | 41 | function refreshTimeout () { 42 | if (fastNowTimeout && fastNowTimeout.refresh) { 43 | fastNowTimeout.refresh() 44 | } else { 45 | clearTimeout(fastNowTimeout) 46 | fastNowTimeout = setTimeout(onTimeout, 1e3) 47 | if (fastNowTimeout.unref) { 48 | fastNowTimeout.unref() 49 | } 50 | } 51 | } 52 | 53 | class Timeout { 54 | constructor (callback, delay, opaque) { 55 | this.callback = callback 56 | this.delay = delay 57 | this.opaque = opaque 58 | 59 | // -2 not in timer list 60 | // -1 in timer list but inactive 61 | // 0 in timer list waiting for time 62 | // > 0 in timer list waiting for time to expire 63 | this.state = -2 64 | 65 | this.refresh() 66 | } 67 | 68 | refresh () { 69 | if (this.state === -2) { 70 | fastTimers.push(this) 71 | if (!fastNowTimeout || fastTimers.length === 1) { 72 | refreshTimeout() 73 | } 74 | } 75 | 76 | this.state = 0 77 | } 78 | 79 | clear () { 80 | this.state = -1 81 | } 82 | } 83 | 84 | module.exports = { 85 | setTimeout (callback, delay, opaque) { 86 | return delay < 1e3 87 | ? setTimeout(callback, delay, opaque) 88 | : new Timeout(callback, delay, opaque) 89 | }, 90 | clearTimeout (timeout) { 91 | if (timeout instanceof Timeout) { 92 | timeout.clear() 93 | } else { 94 | clearTimeout(timeout) 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /node_modules/undici/lib/websocket/constants.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | // This is a Globally Unique Identifier unique used 4 | // to validate that the endpoint accepts websocket 5 | // connections. 6 | // See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 7 | const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' 8 | 9 | /** @type {PropertyDescriptor} */ 10 | const staticPropertyDescriptors = { 11 | enumerable: true, 12 | writable: false, 13 | configurable: false 14 | } 15 | 16 | const states = { 17 | CONNECTING: 0, 18 | OPEN: 1, 19 | CLOSING: 2, 20 | CLOSED: 3 21 | } 22 | 23 | const opcodes = { 24 | CONTINUATION: 0x0, 25 | TEXT: 0x1, 26 | BINARY: 0x2, 27 | CLOSE: 0x8, 28 | PING: 0x9, 29 | PONG: 0xA 30 | } 31 | 32 | const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 33 | 34 | const parserStates = { 35 | INFO: 0, 36 | PAYLOADLENGTH_16: 2, 37 | PAYLOADLENGTH_64: 3, 38 | READ_DATA: 4 39 | } 40 | 41 | const emptyBuffer = Buffer.allocUnsafe(0) 42 | 43 | module.exports = { 44 | uid, 45 | staticPropertyDescriptors, 46 | states, 47 | opcodes, 48 | maxUnsigned16Bit, 49 | parserStates, 50 | emptyBuffer 51 | } 52 | -------------------------------------------------------------------------------- /node_modules/undici/lib/websocket/frame.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { maxUnsigned16Bit } = require('./constants') 4 | 5 | /** @type {import('crypto')} */ 6 | let crypto 7 | try { 8 | crypto = require('crypto') 9 | } catch { 10 | 11 | } 12 | 13 | class WebsocketFrameSend { 14 | /** 15 | * @param {Buffer|undefined} data 16 | */ 17 | constructor (data) { 18 | this.frameData = data 19 | this.maskKey = crypto.randomBytes(4) 20 | } 21 | 22 | createFrame (opcode) { 23 | const bodyLength = this.frameData?.byteLength ?? 0 24 | 25 | /** @type {number} */ 26 | let payloadLength = bodyLength // 0-125 27 | let offset = 6 28 | 29 | if (bodyLength > maxUnsigned16Bit) { 30 | offset += 8 // payload length is next 8 bytes 31 | payloadLength = 127 32 | } else if (bodyLength > 125) { 33 | offset += 2 // payload length is next 2 bytes 34 | payloadLength = 126 35 | } 36 | 37 | const buffer = Buffer.allocUnsafe(bodyLength + offset) 38 | 39 | // Clear first 2 bytes, everything else is overwritten 40 | buffer[0] = buffer[1] = 0 41 | buffer[0] |= 0x80 // FIN 42 | buffer[0] = (buffer[0] & 0xF0) + opcode // opcode 43 | 44 | /*! ws. MIT License. Einar Otto Stangvik */ 45 | buffer[offset - 4] = this.maskKey[0] 46 | buffer[offset - 3] = this.maskKey[1] 47 | buffer[offset - 2] = this.maskKey[2] 48 | buffer[offset - 1] = this.maskKey[3] 49 | 50 | buffer[1] = payloadLength 51 | 52 | if (payloadLength === 126) { 53 | buffer.writeUInt16BE(bodyLength, 2) 54 | } else if (payloadLength === 127) { 55 | // Clear extended payload length 56 | buffer[2] = buffer[3] = 0 57 | buffer.writeUIntBE(bodyLength, 4, 6) 58 | } 59 | 60 | buffer[1] |= 0x80 // MASK 61 | 62 | // mask body 63 | for (let i = 0; i < bodyLength; i++) { 64 | buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4] 65 | } 66 | 67 | return buffer 68 | } 69 | } 70 | 71 | module.exports = { 72 | WebsocketFrameSend 73 | } 74 | -------------------------------------------------------------------------------- /node_modules/undici/lib/websocket/symbols.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | kWebSocketURL: Symbol('url'), 5 | kReadyState: Symbol('ready state'), 6 | kController: Symbol('controller'), 7 | kResponse: Symbol('response'), 8 | kBinaryType: Symbol('binary type'), 9 | kSentClose: Symbol('sent close'), 10 | kReceivedClose: Symbol('received close'), 11 | kByteParser: Symbol('byte parser') 12 | } 13 | -------------------------------------------------------------------------------- /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/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/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/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-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/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/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/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/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/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.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/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/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.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "action-debian-package", 3 | "dependencies": { 4 | "@actions/core": "^1.10.1", 5 | "@actions/exec": "^1.1.1", 6 | "firstline": "^2.0.2" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /post.js: -------------------------------------------------------------------------------- 1 | const core = require("@actions/core") 2 | const exec = require("@actions/exec") 3 | 4 | async function main() { 5 | try { 6 | const container = core.getState("container") 7 | core.saveState("container", "") 8 | 9 | if (container) { 10 | await exec.exec("docker", [ 11 | "rm", 12 | "--force", 13 | container 14 | ]) 15 | } 16 | } catch (error) { 17 | core.setFailed(error.message) 18 | } 19 | } 20 | 21 | main() 22 | --------------------------------------------------------------------------------