├── .devcontainer └── devcontainer.json ├── .github ├── dependabot.yml └── workflows │ └── test.yml ├── LICENSE ├── README.md ├── action.yml ├── main.js ├── node_modules ├── .bin │ └── yaml ├── .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 │ │ │ ├── platform.d.ts │ │ │ ├── platform.js │ │ │ ├── platform.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 ├── 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 │ │ │ ├── constants.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 └── yaml │ ├── LICENSE │ ├── README.md │ ├── bin.mjs │ ├── browser │ ├── dist │ │ ├── compose │ │ │ ├── compose-collection.js │ │ │ ├── compose-doc.js │ │ │ ├── compose-node.js │ │ │ ├── compose-scalar.js │ │ │ ├── composer.js │ │ │ ├── resolve-block-map.js │ │ │ ├── resolve-block-scalar.js │ │ │ ├── resolve-block-seq.js │ │ │ ├── resolve-end.js │ │ │ ├── resolve-flow-collection.js │ │ │ ├── resolve-flow-scalar.js │ │ │ ├── resolve-props.js │ │ │ ├── util-contains-newline.js │ │ │ ├── util-empty-scalar-position.js │ │ │ ├── util-flow-indent-check.js │ │ │ └── util-map-includes.js │ │ ├── doc │ │ │ ├── Document.js │ │ │ ├── anchors.js │ │ │ ├── applyReviver.js │ │ │ ├── createNode.js │ │ │ └── directives.js │ │ ├── errors.js │ │ ├── index.js │ │ ├── log.js │ │ ├── nodes │ │ │ ├── Alias.js │ │ │ ├── Collection.js │ │ │ ├── Node.js │ │ │ ├── Pair.js │ │ │ ├── Scalar.js │ │ │ ├── YAMLMap.js │ │ │ ├── YAMLSeq.js │ │ │ ├── addPairToJSMap.js │ │ │ ├── identity.js │ │ │ └── toJS.js │ │ ├── parse │ │ │ ├── cst-scalar.js │ │ │ ├── cst-stringify.js │ │ │ ├── cst-visit.js │ │ │ ├── cst.js │ │ │ ├── lexer.js │ │ │ ├── line-counter.js │ │ │ └── parser.js │ │ ├── public-api.js │ │ ├── schema │ │ │ ├── Schema.js │ │ │ ├── common │ │ │ │ ├── map.js │ │ │ │ ├── null.js │ │ │ │ ├── seq.js │ │ │ │ └── string.js │ │ │ ├── core │ │ │ │ ├── bool.js │ │ │ │ ├── float.js │ │ │ │ ├── int.js │ │ │ │ └── schema.js │ │ │ ├── json │ │ │ │ └── schema.js │ │ │ ├── tags.js │ │ │ └── yaml-1.1 │ │ │ │ ├── binary.js │ │ │ │ ├── bool.js │ │ │ │ ├── float.js │ │ │ │ ├── int.js │ │ │ │ ├── merge.js │ │ │ │ ├── omap.js │ │ │ │ ├── pairs.js │ │ │ │ ├── schema.js │ │ │ │ ├── set.js │ │ │ │ └── timestamp.js │ │ ├── stringify │ │ │ ├── foldFlowLines.js │ │ │ ├── stringify.js │ │ │ ├── stringifyCollection.js │ │ │ ├── stringifyComment.js │ │ │ ├── stringifyDocument.js │ │ │ ├── stringifyNumber.js │ │ │ ├── stringifyPair.js │ │ │ └── stringifyString.js │ │ ├── util.js │ │ └── visit.js │ ├── index.js │ └── package.json │ ├── dist │ ├── cli.d.ts │ ├── cli.mjs │ ├── compose │ │ ├── compose-collection.d.ts │ │ ├── compose-collection.js │ │ ├── compose-doc.d.ts │ │ ├── compose-doc.js │ │ ├── compose-node.d.ts │ │ ├── compose-node.js │ │ ├── compose-scalar.d.ts │ │ ├── compose-scalar.js │ │ ├── composer.d.ts │ │ ├── composer.js │ │ ├── resolve-block-map.d.ts │ │ ├── resolve-block-map.js │ │ ├── resolve-block-scalar.d.ts │ │ ├── resolve-block-scalar.js │ │ ├── resolve-block-seq.d.ts │ │ ├── resolve-block-seq.js │ │ ├── resolve-end.d.ts │ │ ├── resolve-end.js │ │ ├── resolve-flow-collection.d.ts │ │ ├── resolve-flow-collection.js │ │ ├── resolve-flow-scalar.d.ts │ │ ├── resolve-flow-scalar.js │ │ ├── resolve-props.d.ts │ │ ├── resolve-props.js │ │ ├── util-contains-newline.d.ts │ │ ├── util-contains-newline.js │ │ ├── util-empty-scalar-position.d.ts │ │ ├── util-empty-scalar-position.js │ │ ├── util-flow-indent-check.d.ts │ │ ├── util-flow-indent-check.js │ │ ├── util-map-includes.d.ts │ │ └── util-map-includes.js │ ├── doc │ │ ├── Document.d.ts │ │ ├── Document.js │ │ ├── anchors.d.ts │ │ ├── anchors.js │ │ ├── applyReviver.d.ts │ │ ├── applyReviver.js │ │ ├── createNode.d.ts │ │ ├── createNode.js │ │ ├── directives.d.ts │ │ └── directives.js │ ├── errors.d.ts │ ├── errors.js │ ├── index.d.ts │ ├── index.js │ ├── log.d.ts │ ├── log.js │ ├── nodes │ │ ├── Alias.d.ts │ │ ├── Alias.js │ │ ├── Collection.d.ts │ │ ├── Collection.js │ │ ├── Node.d.ts │ │ ├── Node.js │ │ ├── Pair.d.ts │ │ ├── Pair.js │ │ ├── Scalar.d.ts │ │ ├── Scalar.js │ │ ├── YAMLMap.d.ts │ │ ├── YAMLMap.js │ │ ├── YAMLSeq.d.ts │ │ ├── YAMLSeq.js │ │ ├── addPairToJSMap.d.ts │ │ ├── addPairToJSMap.js │ │ ├── identity.d.ts │ │ ├── identity.js │ │ ├── toJS.d.ts │ │ └── toJS.js │ ├── options.d.ts │ ├── parse │ │ ├── cst-scalar.d.ts │ │ ├── cst-scalar.js │ │ ├── cst-stringify.d.ts │ │ ├── cst-stringify.js │ │ ├── cst-visit.d.ts │ │ ├── cst-visit.js │ │ ├── cst.d.ts │ │ ├── cst.js │ │ ├── lexer.d.ts │ │ ├── lexer.js │ │ ├── line-counter.d.ts │ │ ├── line-counter.js │ │ ├── parser.d.ts │ │ └── parser.js │ ├── public-api.d.ts │ ├── public-api.js │ ├── schema │ │ ├── Schema.d.ts │ │ ├── Schema.js │ │ ├── common │ │ │ ├── map.d.ts │ │ │ ├── map.js │ │ │ ├── null.d.ts │ │ │ ├── null.js │ │ │ ├── seq.d.ts │ │ │ ├── seq.js │ │ │ ├── string.d.ts │ │ │ └── string.js │ │ ├── core │ │ │ ├── bool.d.ts │ │ │ ├── bool.js │ │ │ ├── float.d.ts │ │ │ ├── float.js │ │ │ ├── int.d.ts │ │ │ ├── int.js │ │ │ ├── schema.d.ts │ │ │ └── schema.js │ │ ├── json-schema.d.ts │ │ ├── json │ │ │ ├── schema.d.ts │ │ │ └── schema.js │ │ ├── tags.d.ts │ │ ├── tags.js │ │ ├── types.d.ts │ │ └── yaml-1.1 │ │ │ ├── binary.d.ts │ │ │ ├── binary.js │ │ │ ├── bool.d.ts │ │ │ ├── bool.js │ │ │ ├── float.d.ts │ │ │ ├── float.js │ │ │ ├── int.d.ts │ │ │ ├── int.js │ │ │ ├── merge.d.ts │ │ │ ├── merge.js │ │ │ ├── omap.d.ts │ │ │ ├── omap.js │ │ │ ├── pairs.d.ts │ │ │ ├── pairs.js │ │ │ ├── schema.d.ts │ │ │ ├── schema.js │ │ │ ├── set.d.ts │ │ │ ├── set.js │ │ │ ├── timestamp.d.ts │ │ │ └── timestamp.js │ ├── stringify │ │ ├── foldFlowLines.d.ts │ │ ├── foldFlowLines.js │ │ ├── stringify.d.ts │ │ ├── stringify.js │ │ ├── stringifyCollection.d.ts │ │ ├── stringifyCollection.js │ │ ├── stringifyComment.d.ts │ │ ├── stringifyComment.js │ │ ├── stringifyDocument.d.ts │ │ ├── stringifyDocument.js │ │ ├── stringifyNumber.d.ts │ │ ├── stringifyNumber.js │ │ ├── stringifyPair.d.ts │ │ ├── stringifyPair.js │ │ ├── stringifyString.d.ts │ │ └── stringifyString.js │ ├── test-events.d.ts │ ├── test-events.js │ ├── util.d.ts │ ├── util.js │ ├── visit.d.ts │ └── visit.js │ ├── package.json │ └── util.js ├── package-lock.json ├── package.json ├── post.js └── test ├── ansible.cfg ├── hosts ├── playbook.yml ├── requirements-bundle.yml └── requirements.yml /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node 3 | { 4 | "name": "Node.js & TypeScript", 5 | "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", 6 | "customizations": { 7 | "vscode": { 8 | "extensions": [ 9 | "GitHub.vscode-github-actions", 10 | "esbenp.prettier-vscode", 11 | "mads-hartmann.bash-ide-vscode", 12 | "ms-azuretools.vscode-containers" 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.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 | - package-ecosystem: github-actions 12 | directory: "/" 13 | schedule: 14 | interval: daily 15 | time: "04:00" 16 | pull-request-branch-name: 17 | separator: "-" 18 | open-pull-requests-limit: 10 19 | -------------------------------------------------------------------------------- /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 | # Run Ansible playbook GitHub Action 2 | 3 | An Action that executes given Ansible playbook on selected hosts. 4 | 5 | Should work on any OS, if `ansible-playbook` command is available in `PATH`. 6 | 7 | ## Usage 8 | 9 | ```yaml 10 | - name: Run playbook 11 | uses: dawidd6/action-ansible-playbook@v5 12 | with: 13 | # Required, playbook filepath 14 | playbook: deploy.yml 15 | # Optional, directory where playbooks live 16 | directory: ./ 17 | # Optional, ansible configuration file content (ansible.cfg) 18 | configuration: | 19 | [defaults] 20 | callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer 21 | stdout_callback = yaml 22 | nocows = false 23 | # Optional, SSH private key 24 | key: ${{secrets.SSH_PRIVATE_KEY}} 25 | # Optional, literal inventory file contents 26 | inventory: | 27 | [all] 28 | example.com 29 | 30 | [group1] 31 | example.com 32 | # Optional, SSH known hosts file content 33 | known_hosts: | 34 | example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl 35 | # Optional, encrypted vault password 36 | vault_password: ${{secrets.VAULT_PASSWORD}} 37 | # Optional, galaxy requirements filepath 38 | requirements: galaxy-requirements.yml 39 | # Optional, additional flags to pass to ansible-playbook 40 | options: | 41 | --inventory .hosts 42 | --limit group1 43 | --extra-vars hello=there 44 | --verbose 45 | ``` 46 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: Run Ansible playbook 2 | description: Execute Ansible playbook on selected hosts 3 | branding: 4 | color: red 5 | icon: play 6 | inputs: 7 | playbook: 8 | description: Ansible playbook filepath 9 | required: true 10 | requirements: 11 | description: Ansible Galaxy requirements filepath 12 | required: false 13 | directory: 14 | description: Root directory of Ansible project (defaults to current) 15 | required: false 16 | configuration: 17 | description: Ansible configuration file content (ansible.cfg) 18 | required: false 19 | key: 20 | description: SSH private key used to connect to the host 21 | required: false 22 | inventory: 23 | description: Custom content to write into hosts 24 | required: false 25 | vault_password: 26 | description: The password used for decrypting vaulted files 27 | required: false 28 | known_hosts: 29 | description: Contents of SSH known_hosts file 30 | required: false 31 | options: 32 | description: Extra options that should be passed to ansible-playbook command 33 | required: false 34 | sudo: 35 | description: Set to "true" if root is required for running your playbook 36 | required: false 37 | default: false 38 | no_color: 39 | description: Set to "true" if the Ansible output should not include colors (defaults to "false") 40 | required: false 41 | default: false 42 | check_mode: 43 | description: Set to "true" to enable check (dry-run) mode 44 | required: false 45 | default: false 46 | outputs: 47 | output: 48 | description: The captured output of both stdout and stderr from the Ansible Playbook run 49 | runs: 50 | using: node20 51 | main: main.js 52 | post: post.js 53 | -------------------------------------------------------------------------------- /node_modules/.bin/yaml: -------------------------------------------------------------------------------- 1 | ../yaml/bin.mjs -------------------------------------------------------------------------------- /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/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.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"file-command.js","sourceRoot":"","sources":["../src/file-command.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvC,mCAAmC;AACnC,uDAAuD;AAEvD,+CAAgC;AAChC,uCAAwB;AACxB,uCAAwB;AACxB,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,IAAA,sBAAc,EAAC,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,MAAM,CAAC,UAAU,EAAE,EAAE,CAAA;IACvD,MAAM,cAAc,GAAG,IAAA,sBAAc,EAAC,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,GAAG,MAAA,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,IAAA,YAAK,EAAC,mBAAmB,YAAY,EAAE,CAAC,CAAA;gBAExC,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;gBACvD,IAAA,gBAAS,EAAC,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.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/platform.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export declare const platform: NodeJS.Platform; 3 | export declare const arch: string; 4 | export declare const isWindows: boolean; 5 | export declare const isMacOS: boolean; 6 | export declare const isLinux: boolean; 7 | export declare function getDetails(): Promise<{ 8 | name: string; 9 | platform: string; 10 | arch: string; 11 | version: string; 12 | isWindows: boolean; 13 | isMacOS: boolean; 14 | isLinux: boolean; 15 | }>; 16 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/platform.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAmB;AACnB,oDAAqC;AAErC,MAAM,cAAc,GAAG,GAAmD,EAAE;IAC1E,MAAM,EAAC,MAAM,EAAE,OAAO,EAAC,GAAG,MAAM,IAAI,CAAC,aAAa,CAChD,kFAAkF,EAClF,SAAS,EACT;QACE,MAAM,EAAE,IAAI;KACb,CACF,CAAA;IAED,MAAM,EAAC,MAAM,EAAE,IAAI,EAAC,GAAG,MAAM,IAAI,CAAC,aAAa,CAC7C,kFAAkF,EAClF,SAAS,EACT;QACE,MAAM,EAAE,IAAI;KACb,CACF,CAAA;IAED,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;QACjB,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE;KACxB,CAAA;AACH,CAAC,CAAA,CAAA;AAED,MAAM,YAAY,GAAG,GAGlB,EAAE;;IACH,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,SAAS,EAAE;QAC9D,MAAM,EAAE,IAAI;KACb,CAAC,CAAA;IAEF,MAAM,OAAO,GAAG,MAAA,MAAA,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,0CAAG,CAAC,CAAC,mCAAI,EAAE,CAAA;IACjE,MAAM,IAAI,GAAG,MAAA,MAAA,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,0CAAG,CAAC,CAAC,mCAAI,EAAE,CAAA;IAE3D,OAAO;QACL,IAAI;QACJ,OAAO;KACR,CAAA;AACH,CAAC,CAAA,CAAA;AAED,MAAM,YAAY,GAAG,GAGlB,EAAE;IACH,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE;QAC3E,MAAM,EAAE,IAAI;KACb,CAAC,CAAA;IAEF,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAEjD,OAAO;QACL,IAAI;QACJ,OAAO;KACR,CAAA;AACH,CAAC,CAAA,CAAA;AAEY,QAAA,QAAQ,GAAG,YAAE,CAAC,QAAQ,EAAE,CAAA;AACxB,QAAA,IAAI,GAAG,YAAE,CAAC,IAAI,EAAE,CAAA;AAChB,QAAA,SAAS,GAAG,gBAAQ,KAAK,OAAO,CAAA;AAChC,QAAA,OAAO,GAAG,gBAAQ,KAAK,QAAQ,CAAA;AAC/B,QAAA,OAAO,GAAG,gBAAQ,KAAK,OAAO,CAAA;AAE3C,SAAsB,UAAU;;QAS9B,uCACK,CAAC,MAAM,CAAC,iBAAS;YAClB,CAAC,CAAC,cAAc,EAAE;YAClB,CAAC,CAAC,eAAO;gBACT,CAAC,CAAC,YAAY,EAAE;gBAChB,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,KACpB,QAAQ,EAAR,gBAAQ;YACR,IAAI,EAAJ,YAAI;YACJ,SAAS,EAAT,iBAAS;YACT,OAAO,EAAP,eAAO;YACP,OAAO,EAAP,eAAO,IACR;IACH,CAAC;CAAA;AArBD,gCAqBC"} -------------------------------------------------------------------------------- /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.11.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/exec": "^1.1.1", 40 | "@actions/http-client": "^2.0.1" 41 | }, 42 | "devDependencies": { 43 | "@types/node": "^16.18.112" 44 | } 45 | } -------------------------------------------------------------------------------- /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.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/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.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/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@actions/http-client", 3 | "version": "2.2.3", 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 | } -------------------------------------------------------------------------------- /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/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/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/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/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/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-ansible-playbook/82b249279e5377034f1fd1c113a495991f7ceed3/node_modules/undici/docs/assets/lifecycle-diagram.png -------------------------------------------------------------------------------- /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/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/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-ansible-playbook/82b249279e5377034f1fd1c113a495991f7ceed3/node_modules/undici/lib/llhttp/llhttp.wasm -------------------------------------------------------------------------------- /node_modules/undici/lib/llhttp/llhttp_simd.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawidd6/action-ansible-playbook/82b249279e5377034f1fd1c113a495991f7ceed3/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/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/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/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-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/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/yaml/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Eemeli Aro 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any purpose 4 | with or without fee is hereby granted, provided that the above copyright notice 5 | and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 8 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 9 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 10 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 11 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 12 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 13 | THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /node_modules/yaml/bin.mjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { UserError, cli, help } from './dist/cli.mjs' 4 | 5 | cli(process.stdin, error => { 6 | if (error instanceof UserError) { 7 | if (error.code === UserError.ARGS) console.error(`${help}\n`) 8 | console.error(error.message) 9 | process.exitCode = error.code 10 | } else if (error) throw error 11 | }) 12 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/compose/compose-doc.js: -------------------------------------------------------------------------------- 1 | import { Document } from '../doc/Document.js'; 2 | import { composeNode, composeEmptyNode } from './compose-node.js'; 3 | import { resolveEnd } from './resolve-end.js'; 4 | import { resolveProps } from './resolve-props.js'; 5 | 6 | function composeDoc(options, directives, { offset, start, value, end }, onError) { 7 | const opts = Object.assign({ _directives: directives }, options); 8 | const doc = new Document(undefined, opts); 9 | const ctx = { 10 | atKey: false, 11 | atRoot: true, 12 | directives: doc.directives, 13 | options: doc.options, 14 | schema: doc.schema 15 | }; 16 | const props = resolveProps(start, { 17 | indicator: 'doc-start', 18 | next: value ?? end?.[0], 19 | offset, 20 | onError, 21 | parentIndent: 0, 22 | startOnNewline: true 23 | }); 24 | if (props.found) { 25 | doc.directives.docStart = true; 26 | if (value && 27 | (value.type === 'block-map' || value.type === 'block-seq') && 28 | !props.hasNewline) 29 | onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker'); 30 | } 31 | // @ts-expect-error If Contents is set, let's trust the user 32 | doc.contents = value 33 | ? composeNode(ctx, value, props, onError) 34 | : composeEmptyNode(ctx, props.end, start, null, props, onError); 35 | const contentEnd = doc.contents.range[2]; 36 | const re = resolveEnd(end, contentEnd, false, onError); 37 | if (re.comment) 38 | doc.comment = re.comment; 39 | doc.range = [offset, contentEnd, re.offset]; 40 | return doc; 41 | } 42 | 43 | export { composeDoc }; 44 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/compose/resolve-end.js: -------------------------------------------------------------------------------- 1 | function resolveEnd(end, offset, reqSpace, onError) { 2 | let comment = ''; 3 | if (end) { 4 | let hasSpace = false; 5 | let sep = ''; 6 | for (const token of end) { 7 | const { source, type } = token; 8 | switch (type) { 9 | case 'space': 10 | hasSpace = true; 11 | break; 12 | case 'comment': { 13 | if (reqSpace && !hasSpace) 14 | onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters'); 15 | const cb = source.substring(1) || ' '; 16 | if (!comment) 17 | comment = cb; 18 | else 19 | comment += sep + cb; 20 | sep = ''; 21 | break; 22 | } 23 | case 'newline': 24 | if (comment) 25 | sep += source; 26 | hasSpace = true; 27 | break; 28 | default: 29 | onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`); 30 | } 31 | offset += source.length; 32 | } 33 | } 34 | return { comment, offset }; 35 | } 36 | 37 | export { resolveEnd }; 38 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/compose/util-contains-newline.js: -------------------------------------------------------------------------------- 1 | function containsNewline(key) { 2 | if (!key) 3 | return null; 4 | switch (key.type) { 5 | case 'alias': 6 | case 'scalar': 7 | case 'double-quoted-scalar': 8 | case 'single-quoted-scalar': 9 | if (key.source.includes('\n')) 10 | return true; 11 | if (key.end) 12 | for (const st of key.end) 13 | if (st.type === 'newline') 14 | return true; 15 | return false; 16 | case 'flow-collection': 17 | for (const it of key.items) { 18 | for (const st of it.start) 19 | if (st.type === 'newline') 20 | return true; 21 | if (it.sep) 22 | for (const st of it.sep) 23 | if (st.type === 'newline') 24 | return true; 25 | if (containsNewline(it.key) || containsNewline(it.value)) 26 | return true; 27 | } 28 | return false; 29 | default: 30 | return true; 31 | } 32 | } 33 | 34 | export { containsNewline }; 35 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js: -------------------------------------------------------------------------------- 1 | function emptyScalarPosition(offset, before, pos) { 2 | if (before) { 3 | pos ?? (pos = before.length); 4 | for (let i = pos - 1; i >= 0; --i) { 5 | let st = before[i]; 6 | switch (st.type) { 7 | case 'space': 8 | case 'comment': 9 | case 'newline': 10 | offset -= st.source.length; 11 | continue; 12 | } 13 | // Technically, an empty scalar is immediately after the last non-empty 14 | // node, but it's more useful to place it after any whitespace. 15 | st = before[++i]; 16 | while (st?.type === 'space') { 17 | offset += st.source.length; 18 | st = before[++i]; 19 | } 20 | break; 21 | } 22 | } 23 | return offset; 24 | } 25 | 26 | export { emptyScalarPosition }; 27 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/compose/util-flow-indent-check.js: -------------------------------------------------------------------------------- 1 | import { containsNewline } from './util-contains-newline.js'; 2 | 3 | function flowIndentCheck(indent, fc, onError) { 4 | if (fc?.type === 'flow-collection') { 5 | const end = fc.end[0]; 6 | if (end.indent === indent && 7 | (end.source === ']' || end.source === '}') && 8 | containsNewline(fc)) { 9 | const msg = 'Flow end indicator should be more indented than parent'; 10 | onError(end, 'BAD_INDENT', msg, true); 11 | } 12 | } 13 | } 14 | 15 | export { flowIndentCheck }; 16 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/compose/util-map-includes.js: -------------------------------------------------------------------------------- 1 | import { isScalar } from '../nodes/identity.js'; 2 | 3 | function mapIncludes(ctx, items, search) { 4 | const { uniqueKeys } = ctx.options; 5 | if (uniqueKeys === false) 6 | return false; 7 | const isEqual = typeof uniqueKeys === 'function' 8 | ? uniqueKeys 9 | : (a, b) => a === b || (isScalar(a) && isScalar(b) && a.value === b.value); 10 | return items.some(pair => isEqual(pair.key, search)); 11 | } 12 | 13 | export { mapIncludes }; 14 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/index.js: -------------------------------------------------------------------------------- 1 | export { Composer } from './compose/composer.js'; 2 | export { Document } from './doc/Document.js'; 3 | export { Schema } from './schema/Schema.js'; 4 | export { YAMLError, YAMLParseError, YAMLWarning } from './errors.js'; 5 | export { Alias } from './nodes/Alias.js'; 6 | export { isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq } from './nodes/identity.js'; 7 | export { Pair } from './nodes/Pair.js'; 8 | export { Scalar } from './nodes/Scalar.js'; 9 | export { YAMLMap } from './nodes/YAMLMap.js'; 10 | export { YAMLSeq } from './nodes/YAMLSeq.js'; 11 | import * as cst from './parse/cst.js'; 12 | export { cst as CST }; 13 | export { Lexer } from './parse/lexer.js'; 14 | export { LineCounter } from './parse/line-counter.js'; 15 | export { Parser } from './parse/parser.js'; 16 | export { parse, parseAllDocuments, parseDocument, stringify } from './public-api.js'; 17 | export { visit, visitAsync } from './visit.js'; 18 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/log.js: -------------------------------------------------------------------------------- 1 | function debug(logLevel, ...messages) { 2 | if (logLevel === 'debug') 3 | console.log(...messages); 4 | } 5 | function warn(logLevel, warning) { 6 | if (logLevel === 'debug' || logLevel === 'warn') { 7 | console.warn(warning); 8 | } 9 | } 10 | 11 | export { debug, warn }; 12 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/nodes/Node.js: -------------------------------------------------------------------------------- 1 | import { applyReviver } from '../doc/applyReviver.js'; 2 | import { NODE_TYPE, isDocument } from './identity.js'; 3 | import { toJS } from './toJS.js'; 4 | 5 | class NodeBase { 6 | constructor(type) { 7 | Object.defineProperty(this, NODE_TYPE, { value: type }); 8 | } 9 | /** Create a copy of this node. */ 10 | clone() { 11 | const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); 12 | if (this.range) 13 | copy.range = this.range.slice(); 14 | return copy; 15 | } 16 | /** A plain JavaScript representation of this node. */ 17 | toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { 18 | if (!isDocument(doc)) 19 | throw new TypeError('A document argument is required'); 20 | const ctx = { 21 | anchors: new Map(), 22 | doc, 23 | keep: true, 24 | mapAsMap: mapAsMap === true, 25 | mapKeyWarned: false, 26 | maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100 27 | }; 28 | const res = toJS(this, '', ctx); 29 | if (typeof onAnchor === 'function') 30 | for (const { count, res } of ctx.anchors.values()) 31 | onAnchor(res, count); 32 | return typeof reviver === 'function' 33 | ? applyReviver(reviver, { '': res }, '', res) 34 | : res; 35 | } 36 | } 37 | 38 | export { NodeBase }; 39 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/nodes/Pair.js: -------------------------------------------------------------------------------- 1 | import { createNode } from '../doc/createNode.js'; 2 | import { stringifyPair } from '../stringify/stringifyPair.js'; 3 | import { addPairToJSMap } from './addPairToJSMap.js'; 4 | import { NODE_TYPE, PAIR, isNode } from './identity.js'; 5 | 6 | function createPair(key, value, ctx) { 7 | const k = createNode(key, undefined, ctx); 8 | const v = createNode(value, undefined, ctx); 9 | return new Pair(k, v); 10 | } 11 | class Pair { 12 | constructor(key, value = null) { 13 | Object.defineProperty(this, NODE_TYPE, { value: PAIR }); 14 | this.key = key; 15 | this.value = value; 16 | } 17 | clone(schema) { 18 | let { key, value } = this; 19 | if (isNode(key)) 20 | key = key.clone(schema); 21 | if (isNode(value)) 22 | value = value.clone(schema); 23 | return new Pair(key, value); 24 | } 25 | toJSON(_, ctx) { 26 | const pair = ctx?.mapAsMap ? new Map() : {}; 27 | return addPairToJSMap(ctx, pair, this); 28 | } 29 | toString(ctx, onComment, onChompKeep) { 30 | return ctx?.doc 31 | ? stringifyPair(this, ctx, onComment, onChompKeep) 32 | : JSON.stringify(this); 33 | } 34 | } 35 | 36 | export { Pair, createPair }; 37 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/nodes/Scalar.js: -------------------------------------------------------------------------------- 1 | import { SCALAR } from './identity.js'; 2 | import { NodeBase } from './Node.js'; 3 | import { toJS } from './toJS.js'; 4 | 5 | const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object'); 6 | class Scalar extends NodeBase { 7 | constructor(value) { 8 | super(SCALAR); 9 | this.value = value; 10 | } 11 | toJSON(arg, ctx) { 12 | return ctx?.keep ? this.value : toJS(this.value, arg, ctx); 13 | } 14 | toString() { 15 | return String(this.value); 16 | } 17 | } 18 | Scalar.BLOCK_FOLDED = 'BLOCK_FOLDED'; 19 | Scalar.BLOCK_LITERAL = 'BLOCK_LITERAL'; 20 | Scalar.PLAIN = 'PLAIN'; 21 | Scalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE'; 22 | Scalar.QUOTE_SINGLE = 'QUOTE_SINGLE'; 23 | 24 | export { Scalar, isScalarValue }; 25 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/nodes/identity.js: -------------------------------------------------------------------------------- 1 | const ALIAS = Symbol.for('yaml.alias'); 2 | const DOC = Symbol.for('yaml.document'); 3 | const MAP = Symbol.for('yaml.map'); 4 | const PAIR = Symbol.for('yaml.pair'); 5 | const SCALAR = Symbol.for('yaml.scalar'); 6 | const SEQ = Symbol.for('yaml.seq'); 7 | const NODE_TYPE = Symbol.for('yaml.node.type'); 8 | const isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS; 9 | const isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC; 10 | const isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP; 11 | const isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR; 12 | const isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR; 13 | const isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ; 14 | function isCollection(node) { 15 | if (node && typeof node === 'object') 16 | switch (node[NODE_TYPE]) { 17 | case MAP: 18 | case SEQ: 19 | return true; 20 | } 21 | return false; 22 | } 23 | function isNode(node) { 24 | if (node && typeof node === 'object') 25 | switch (node[NODE_TYPE]) { 26 | case ALIAS: 27 | case MAP: 28 | case SCALAR: 29 | case SEQ: 30 | return true; 31 | } 32 | return false; 33 | } 34 | const hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor; 35 | 36 | export { ALIAS, DOC, MAP, NODE_TYPE, PAIR, SCALAR, SEQ, hasAnchor, isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq }; 37 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/nodes/toJS.js: -------------------------------------------------------------------------------- 1 | import { hasAnchor } from './identity.js'; 2 | 3 | /** 4 | * Recursively convert any node or its contents to native JavaScript 5 | * 6 | * @param value - The input value 7 | * @param arg - If `value` defines a `toJSON()` method, use this 8 | * as its first argument 9 | * @param ctx - Conversion context, originally set in Document#toJS(). If 10 | * `{ keep: true }` is not set, output should be suitable for JSON 11 | * stringification. 12 | */ 13 | function toJS(value, arg, ctx) { 14 | // eslint-disable-next-line @typescript-eslint/no-unsafe-return 15 | if (Array.isArray(value)) 16 | return value.map((v, i) => toJS(v, String(i), ctx)); 17 | if (value && typeof value.toJSON === 'function') { 18 | // eslint-disable-next-line @typescript-eslint/no-unsafe-call 19 | if (!ctx || !hasAnchor(value)) 20 | return value.toJSON(arg, ctx); 21 | const data = { aliasCount: 0, count: 1, res: undefined }; 22 | ctx.anchors.set(value, data); 23 | ctx.onCreate = res => { 24 | data.res = res; 25 | delete ctx.onCreate; 26 | }; 27 | const res = value.toJSON(arg, ctx); 28 | if (ctx.onCreate) 29 | ctx.onCreate(res); 30 | return res; 31 | } 32 | if (typeof value === 'bigint' && !ctx?.keep) 33 | return Number(value); 34 | return value; 35 | } 36 | 37 | export { toJS }; 38 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/parse/line-counter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Tracks newlines during parsing in order to provide an efficient API for 3 | * determining the one-indexed `{ line, col }` position for any offset 4 | * within the input. 5 | */ 6 | class LineCounter { 7 | constructor() { 8 | this.lineStarts = []; 9 | /** 10 | * Should be called in ascending order. Otherwise, call 11 | * `lineCounter.lineStarts.sort()` before calling `linePos()`. 12 | */ 13 | this.addNewLine = (offset) => this.lineStarts.push(offset); 14 | /** 15 | * Performs a binary search and returns the 1-indexed { line, col } 16 | * position of `offset`. If `line === 0`, `addNewLine` has never been 17 | * called or `offset` is before the first known newline. 18 | */ 19 | this.linePos = (offset) => { 20 | let low = 0; 21 | let high = this.lineStarts.length; 22 | while (low < high) { 23 | const mid = (low + high) >> 1; // Math.floor((low + high) / 2) 24 | if (this.lineStarts[mid] < offset) 25 | low = mid + 1; 26 | else 27 | high = mid; 28 | } 29 | if (this.lineStarts[low] === offset) 30 | return { line: low + 1, col: 1 }; 31 | if (low === 0) 32 | return { line: 0, col: offset }; 33 | const start = this.lineStarts[low - 1]; 34 | return { line: low, col: offset - start + 1 }; 35 | }; 36 | } 37 | } 38 | 39 | export { LineCounter }; 40 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/schema/Schema.js: -------------------------------------------------------------------------------- 1 | import { MAP, SCALAR, SEQ } from '../nodes/identity.js'; 2 | import { map } from './common/map.js'; 3 | import { seq } from './common/seq.js'; 4 | import { string } from './common/string.js'; 5 | import { getTags, coreKnownTags } from './tags.js'; 6 | 7 | const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0; 8 | class Schema { 9 | constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) { 10 | this.compat = Array.isArray(compat) 11 | ? getTags(compat, 'compat') 12 | : compat 13 | ? getTags(null, compat) 14 | : null; 15 | this.name = (typeof schema === 'string' && schema) || 'core'; 16 | this.knownTags = resolveKnownTags ? coreKnownTags : {}; 17 | this.tags = getTags(customTags, this.name, merge); 18 | this.toStringOptions = toStringDefaults ?? null; 19 | Object.defineProperty(this, MAP, { value: map }); 20 | Object.defineProperty(this, SCALAR, { value: string }); 21 | Object.defineProperty(this, SEQ, { value: seq }); 22 | // Used by createMap() 23 | this.sortMapEntries = 24 | typeof sortMapEntries === 'function' 25 | ? sortMapEntries 26 | : sortMapEntries === true 27 | ? sortMapEntriesByKey 28 | : null; 29 | } 30 | clone() { 31 | const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this)); 32 | copy.tags = this.tags.slice(); 33 | return copy; 34 | } 35 | } 36 | 37 | export { Schema }; 38 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/schema/common/map.js: -------------------------------------------------------------------------------- 1 | import { isMap } from '../../nodes/identity.js'; 2 | import { YAMLMap } from '../../nodes/YAMLMap.js'; 3 | 4 | const map = { 5 | collection: 'map', 6 | default: true, 7 | nodeClass: YAMLMap, 8 | tag: 'tag:yaml.org,2002:map', 9 | resolve(map, onError) { 10 | if (!isMap(map)) 11 | onError('Expected a mapping for this tag'); 12 | return map; 13 | }, 14 | createNode: (schema, obj, ctx) => YAMLMap.from(schema, obj, ctx) 15 | }; 16 | 17 | export { map }; 18 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/schema/common/null.js: -------------------------------------------------------------------------------- 1 | import { Scalar } from '../../nodes/Scalar.js'; 2 | 3 | const nullTag = { 4 | identify: value => value == null, 5 | createNode: () => new Scalar(null), 6 | default: true, 7 | tag: 'tag:yaml.org,2002:null', 8 | test: /^(?:~|[Nn]ull|NULL)?$/, 9 | resolve: () => new Scalar(null), 10 | stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source) 11 | ? source 12 | : ctx.options.nullStr 13 | }; 14 | 15 | export { nullTag }; 16 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/schema/common/seq.js: -------------------------------------------------------------------------------- 1 | import { isSeq } from '../../nodes/identity.js'; 2 | import { YAMLSeq } from '../../nodes/YAMLSeq.js'; 3 | 4 | const seq = { 5 | collection: 'seq', 6 | default: true, 7 | nodeClass: YAMLSeq, 8 | tag: 'tag:yaml.org,2002:seq', 9 | resolve(seq, onError) { 10 | if (!isSeq(seq)) 11 | onError('Expected a sequence for this tag'); 12 | return seq; 13 | }, 14 | createNode: (schema, obj, ctx) => YAMLSeq.from(schema, obj, ctx) 15 | }; 16 | 17 | export { seq }; 18 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/schema/common/string.js: -------------------------------------------------------------------------------- 1 | import { stringifyString } from '../../stringify/stringifyString.js'; 2 | 3 | const string = { 4 | identify: value => typeof value === 'string', 5 | default: true, 6 | tag: 'tag:yaml.org,2002:str', 7 | resolve: str => str, 8 | stringify(item, ctx, onComment, onChompKeep) { 9 | ctx = Object.assign({ actualString: true }, ctx); 10 | return stringifyString(item, ctx, onComment, onChompKeep); 11 | } 12 | }; 13 | 14 | export { string }; 15 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/schema/core/bool.js: -------------------------------------------------------------------------------- 1 | import { Scalar } from '../../nodes/Scalar.js'; 2 | 3 | const boolTag = { 4 | identify: value => typeof value === 'boolean', 5 | default: true, 6 | tag: 'tag:yaml.org,2002:bool', 7 | test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, 8 | resolve: str => new Scalar(str[0] === 't' || str[0] === 'T'), 9 | stringify({ source, value }, ctx) { 10 | if (source && boolTag.test.test(source)) { 11 | const sv = source[0] === 't' || source[0] === 'T'; 12 | if (value === sv) 13 | return source; 14 | } 15 | return value ? ctx.options.trueStr : ctx.options.falseStr; 16 | } 17 | }; 18 | 19 | export { boolTag }; 20 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/schema/core/float.js: -------------------------------------------------------------------------------- 1 | import { Scalar } from '../../nodes/Scalar.js'; 2 | import { stringifyNumber } from '../../stringify/stringifyNumber.js'; 3 | 4 | const floatNaN = { 5 | identify: value => typeof value === 'number', 6 | default: true, 7 | tag: 'tag:yaml.org,2002:float', 8 | test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, 9 | resolve: str => str.slice(-3).toLowerCase() === 'nan' 10 | ? NaN 11 | : str[0] === '-' 12 | ? Number.NEGATIVE_INFINITY 13 | : Number.POSITIVE_INFINITY, 14 | stringify: stringifyNumber 15 | }; 16 | const floatExp = { 17 | identify: value => typeof value === 'number', 18 | default: true, 19 | tag: 'tag:yaml.org,2002:float', 20 | format: 'EXP', 21 | test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, 22 | resolve: str => parseFloat(str), 23 | stringify(node) { 24 | const num = Number(node.value); 25 | return isFinite(num) ? num.toExponential() : stringifyNumber(node); 26 | } 27 | }; 28 | const float = { 29 | identify: value => typeof value === 'number', 30 | default: true, 31 | tag: 'tag:yaml.org,2002:float', 32 | test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/, 33 | resolve(str) { 34 | const node = new Scalar(parseFloat(str)); 35 | const dot = str.indexOf('.'); 36 | if (dot !== -1 && str[str.length - 1] === '0') 37 | node.minFractionDigits = str.length - dot - 1; 38 | return node; 39 | }, 40 | stringify: stringifyNumber 41 | }; 42 | 43 | export { float, floatExp, floatNaN }; 44 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/schema/core/int.js: -------------------------------------------------------------------------------- 1 | import { stringifyNumber } from '../../stringify/stringifyNumber.js'; 2 | 3 | const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value); 4 | const intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix)); 5 | function intStringify(node, radix, prefix) { 6 | const { value } = node; 7 | if (intIdentify(value) && value >= 0) 8 | return prefix + value.toString(radix); 9 | return stringifyNumber(node); 10 | } 11 | const intOct = { 12 | identify: value => intIdentify(value) && value >= 0, 13 | default: true, 14 | tag: 'tag:yaml.org,2002:int', 15 | format: 'OCT', 16 | test: /^0o[0-7]+$/, 17 | resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt), 18 | stringify: node => intStringify(node, 8, '0o') 19 | }; 20 | const int = { 21 | identify: intIdentify, 22 | default: true, 23 | tag: 'tag:yaml.org,2002:int', 24 | test: /^[-+]?[0-9]+$/, 25 | resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), 26 | stringify: stringifyNumber 27 | }; 28 | const intHex = { 29 | identify: value => intIdentify(value) && value >= 0, 30 | default: true, 31 | tag: 'tag:yaml.org,2002:int', 32 | format: 'HEX', 33 | test: /^0x[0-9a-fA-F]+$/, 34 | resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), 35 | stringify: node => intStringify(node, 16, '0x') 36 | }; 37 | 38 | export { int, intHex, intOct }; 39 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/schema/core/schema.js: -------------------------------------------------------------------------------- 1 | import { map } from '../common/map.js'; 2 | import { nullTag } from '../common/null.js'; 3 | import { seq } from '../common/seq.js'; 4 | import { string } from '../common/string.js'; 5 | import { boolTag } from './bool.js'; 6 | import { floatNaN, floatExp, float } from './float.js'; 7 | import { intOct, int, intHex } from './int.js'; 8 | 9 | const schema = [ 10 | map, 11 | seq, 12 | string, 13 | nullTag, 14 | boolTag, 15 | intOct, 16 | int, 17 | intHex, 18 | floatNaN, 19 | floatExp, 20 | float 21 | ]; 22 | 23 | export { schema }; 24 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js: -------------------------------------------------------------------------------- 1 | import { Scalar } from '../../nodes/Scalar.js'; 2 | 3 | function boolStringify({ value, source }, ctx) { 4 | const boolObj = value ? trueTag : falseTag; 5 | if (source && boolObj.test.test(source)) 6 | return source; 7 | return value ? ctx.options.trueStr : ctx.options.falseStr; 8 | } 9 | const trueTag = { 10 | identify: value => value === true, 11 | default: true, 12 | tag: 'tag:yaml.org,2002:bool', 13 | test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, 14 | resolve: () => new Scalar(true), 15 | stringify: boolStringify 16 | }; 17 | const falseTag = { 18 | identify: value => value === false, 19 | default: true, 20 | tag: 'tag:yaml.org,2002:bool', 21 | test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/, 22 | resolve: () => new Scalar(false), 23 | stringify: boolStringify 24 | }; 25 | 26 | export { falseTag, trueTag }; 27 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/schema/yaml-1.1/float.js: -------------------------------------------------------------------------------- 1 | import { Scalar } from '../../nodes/Scalar.js'; 2 | import { stringifyNumber } from '../../stringify/stringifyNumber.js'; 3 | 4 | const floatNaN = { 5 | identify: value => typeof value === 'number', 6 | default: true, 7 | tag: 'tag:yaml.org,2002:float', 8 | test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, 9 | resolve: (str) => str.slice(-3).toLowerCase() === 'nan' 10 | ? NaN 11 | : str[0] === '-' 12 | ? Number.NEGATIVE_INFINITY 13 | : Number.POSITIVE_INFINITY, 14 | stringify: stringifyNumber 15 | }; 16 | const floatExp = { 17 | identify: value => typeof value === 'number', 18 | default: true, 19 | tag: 'tag:yaml.org,2002:float', 20 | format: 'EXP', 21 | test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/, 22 | resolve: (str) => parseFloat(str.replace(/_/g, '')), 23 | stringify(node) { 24 | const num = Number(node.value); 25 | return isFinite(num) ? num.toExponential() : stringifyNumber(node); 26 | } 27 | }; 28 | const float = { 29 | identify: value => typeof value === 'number', 30 | default: true, 31 | tag: 'tag:yaml.org,2002:float', 32 | test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/, 33 | resolve(str) { 34 | const node = new Scalar(parseFloat(str.replace(/_/g, ''))); 35 | const dot = str.indexOf('.'); 36 | if (dot !== -1) { 37 | const f = str.substring(dot + 1).replace(/_/g, ''); 38 | if (f[f.length - 1] === '0') 39 | node.minFractionDigits = f.length; 40 | } 41 | return node; 42 | }, 43 | stringify: stringifyNumber 44 | }; 45 | 46 | export { float, floatExp, floatNaN }; 47 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js: -------------------------------------------------------------------------------- 1 | import { map } from '../common/map.js'; 2 | import { nullTag } from '../common/null.js'; 3 | import { seq } from '../common/seq.js'; 4 | import { string } from '../common/string.js'; 5 | import { binary } from './binary.js'; 6 | import { trueTag, falseTag } from './bool.js'; 7 | import { floatNaN, floatExp, float } from './float.js'; 8 | import { intBin, intOct, int, intHex } from './int.js'; 9 | import { merge } from './merge.js'; 10 | import { omap } from './omap.js'; 11 | import { pairs } from './pairs.js'; 12 | import { set } from './set.js'; 13 | import { intTime, floatTime, timestamp } from './timestamp.js'; 14 | 15 | const schema = [ 16 | map, 17 | seq, 18 | string, 19 | nullTag, 20 | trueTag, 21 | falseTag, 22 | intBin, 23 | intOct, 24 | int, 25 | intHex, 26 | floatNaN, 27 | floatExp, 28 | float, 29 | binary, 30 | merge, 31 | omap, 32 | pairs, 33 | set, 34 | intTime, 35 | floatTime, 36 | timestamp 37 | ]; 38 | 39 | export { schema }; 40 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/stringify/stringifyComment.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Stringifies a comment. 3 | * 4 | * Empty comment lines are left empty, 5 | * lines consisting of a single space are replaced by `#`, 6 | * and all other lines are prefixed with a `#`. 7 | */ 8 | const stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#'); 9 | function indentComment(comment, indent) { 10 | if (/^\n+$/.test(comment)) 11 | return comment.substring(1); 12 | return indent ? comment.replace(/^(?! *$)/gm, indent) : comment; 13 | } 14 | const lineComment = (str, indent, comment) => str.endsWith('\n') 15 | ? indentComment(comment, indent) 16 | : comment.includes('\n') 17 | ? '\n' + indentComment(comment, indent) 18 | : (str.endsWith(' ') ? '' : ' ') + comment; 19 | 20 | export { indentComment, lineComment, stringifyComment }; 21 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/stringify/stringifyNumber.js: -------------------------------------------------------------------------------- 1 | function stringifyNumber({ format, minFractionDigits, tag, value }) { 2 | if (typeof value === 'bigint') 3 | return String(value); 4 | const num = typeof value === 'number' ? value : Number(value); 5 | if (!isFinite(num)) 6 | return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf'; 7 | let n = JSON.stringify(value); 8 | if (!format && 9 | minFractionDigits && 10 | (!tag || tag === 'tag:yaml.org,2002:float') && 11 | /^\d/.test(n)) { 12 | let i = n.indexOf('.'); 13 | if (i < 0) { 14 | i = n.length; 15 | n += '.'; 16 | } 17 | let d = minFractionDigits - (n.length - i - 1); 18 | while (d-- > 0) 19 | n += '0'; 20 | } 21 | return n; 22 | } 23 | 24 | export { stringifyNumber }; 25 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/dist/util.js: -------------------------------------------------------------------------------- 1 | export { createNode } from './doc/createNode.js'; 2 | export { debug, warn } from './log.js'; 3 | export { createPair } from './nodes/Pair.js'; 4 | export { toJS } from './nodes/toJS.js'; 5 | export { findPair } from './nodes/YAMLMap.js'; 6 | export { map as mapTag } from './schema/common/map.js'; 7 | export { seq as seqTag } from './schema/common/seq.js'; 8 | export { string as stringTag } from './schema/common/string.js'; 9 | export { foldFlowLines } from './stringify/foldFlowLines.js'; 10 | export { stringifyNumber } from './stringify/stringifyNumber.js'; 11 | export { stringifyString } from './stringify/stringifyString.js'; 12 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/index.js: -------------------------------------------------------------------------------- 1 | // `export * as default from ...` fails on Webpack v4 2 | // https://github.com/eemeli/yaml/issues/228 3 | import * as YAML from './dist/index.js' 4 | export default YAML 5 | export * from './dist/index.js' 6 | -------------------------------------------------------------------------------- /node_modules/yaml/browser/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/cli.d.ts: -------------------------------------------------------------------------------- 1 | export declare const help = "yaml: A command-line YAML processor and inspector\n\nReads stdin and writes output to stdout and errors & warnings to stderr.\n\nUsage:\n yaml Process a YAML stream, outputting it as YAML\n yaml cst Parse the CST of a YAML stream\n yaml lex Parse the lexical tokens of a YAML stream\n yaml valid Validate a YAML stream, returning 0 on success\n\nOptions:\n --help, -h Show this message.\n --json, -j Output JSON.\n --indent 2 Output pretty-printed data, indented by the given number of spaces.\n --merge, -m Enable support for \"<<\" merge keys.\n\nAdditional options for bare \"yaml\" command:\n --doc, -d Output pretty-printed JS Document objects.\n --single, -1 Require the input to consist of a single YAML document.\n --strict, -s Stop on errors.\n --visit, -v Apply a visitor to each document (requires a path to import)\n --yaml 1.1 Set the YAML version. (default: 1.2)"; 2 | export declare class UserError extends Error { 3 | static ARGS: number; 4 | static SINGLE: number; 5 | code: number; 6 | constructor(code: number, message: string); 7 | } 8 | export declare function cli(stdin: NodeJS.ReadableStream, done: (error?: Error) => void, argv?: string[]): Promise; 9 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/compose-collection.d.ts: -------------------------------------------------------------------------------- 1 | import type { ParsedNode } from '../nodes/Node'; 2 | import type { BlockMap, BlockSequence, FlowCollection, SourceToken } from '../parse/cst'; 3 | import type { ComposeContext, ComposeNode } from './compose-node'; 4 | import type { ComposeErrorHandler } from './composer'; 5 | interface Props { 6 | anchor: SourceToken | null; 7 | tag: SourceToken | null; 8 | newlineAfterProp: SourceToken | null; 9 | } 10 | export declare function composeCollection(CN: ComposeNode, ctx: ComposeContext, token: BlockMap | BlockSequence | FlowCollection, props: Props, onError: ComposeErrorHandler): ParsedNode; 11 | export {}; 12 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/compose-doc.d.ts: -------------------------------------------------------------------------------- 1 | import type { Directives } from '../doc/directives'; 2 | import { Document } from '../doc/Document'; 3 | import type { ParsedNode } from '../nodes/Node'; 4 | import type { DocumentOptions, ParseOptions, SchemaOptions } from '../options'; 5 | import type * as CST from '../parse/cst'; 6 | import type { ComposeErrorHandler } from './composer'; 7 | export declare function composeDoc(options: ParseOptions & DocumentOptions & SchemaOptions, directives: Directives, { offset, start, value, end }: CST.Document, onError: ComposeErrorHandler): Document.Parsed; 8 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/compose-doc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Document = require('../doc/Document.js'); 4 | var composeNode = require('./compose-node.js'); 5 | var resolveEnd = require('./resolve-end.js'); 6 | var resolveProps = require('./resolve-props.js'); 7 | 8 | function composeDoc(options, directives, { offset, start, value, end }, onError) { 9 | const opts = Object.assign({ _directives: directives }, options); 10 | const doc = new Document.Document(undefined, opts); 11 | const ctx = { 12 | atKey: false, 13 | atRoot: true, 14 | directives: doc.directives, 15 | options: doc.options, 16 | schema: doc.schema 17 | }; 18 | const props = resolveProps.resolveProps(start, { 19 | indicator: 'doc-start', 20 | next: value ?? end?.[0], 21 | offset, 22 | onError, 23 | parentIndent: 0, 24 | startOnNewline: true 25 | }); 26 | if (props.found) { 27 | doc.directives.docStart = true; 28 | if (value && 29 | (value.type === 'block-map' || value.type === 'block-seq') && 30 | !props.hasNewline) 31 | onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker'); 32 | } 33 | // @ts-expect-error If Contents is set, let's trust the user 34 | doc.contents = value 35 | ? composeNode.composeNode(ctx, value, props, onError) 36 | : composeNode.composeEmptyNode(ctx, props.end, start, null, props, onError); 37 | const contentEnd = doc.contents.range[2]; 38 | const re = resolveEnd.resolveEnd(end, contentEnd, false, onError); 39 | if (re.comment) 40 | doc.comment = re.comment; 41 | doc.range = [offset, contentEnd, re.offset]; 42 | return doc; 43 | } 44 | 45 | exports.composeDoc = composeDoc; 46 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/compose-node.d.ts: -------------------------------------------------------------------------------- 1 | import type { Directives } from '../doc/directives'; 2 | import type { ParsedNode } from '../nodes/Node'; 3 | import type { ParseOptions } from '../options'; 4 | import type { SourceToken, Token } from '../parse/cst'; 5 | import type { Schema } from '../schema/Schema'; 6 | import type { ComposeErrorHandler } from './composer'; 7 | export interface ComposeContext { 8 | atKey: boolean; 9 | atRoot: boolean; 10 | directives: Directives; 11 | options: Readonly>>; 12 | schema: Readonly; 13 | } 14 | interface Props { 15 | spaceBefore: boolean; 16 | comment: string; 17 | anchor: SourceToken | null; 18 | tag: SourceToken | null; 19 | newlineAfterProp: SourceToken | null; 20 | end: number; 21 | } 22 | declare const CN: { 23 | composeNode: typeof composeNode; 24 | composeEmptyNode: typeof composeEmptyNode; 25 | }; 26 | export type ComposeNode = typeof CN; 27 | export declare function composeNode(ctx: ComposeContext, token: Token, props: Props, onError: ComposeErrorHandler): ParsedNode; 28 | export declare function composeEmptyNode(ctx: ComposeContext, offset: number, before: Token[] | undefined, pos: number | null, { spaceBefore, comment, anchor, tag, end }: Props, onError: ComposeErrorHandler): import('../index').Scalar.Parsed; 29 | export {}; 30 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/compose-scalar.d.ts: -------------------------------------------------------------------------------- 1 | import { Scalar } from '../nodes/Scalar'; 2 | import type { BlockScalar, FlowScalar, SourceToken } from '../parse/cst'; 3 | import type { ComposeContext } from './compose-node'; 4 | import type { ComposeErrorHandler } from './composer'; 5 | export declare function composeScalar(ctx: ComposeContext, token: FlowScalar | BlockScalar, tagToken: SourceToken | null, onError: ComposeErrorHandler): Scalar.Parsed; 6 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/resolve-block-map.d.ts: -------------------------------------------------------------------------------- 1 | import { YAMLMap } from '../nodes/YAMLMap'; 2 | import type { BlockMap } from '../parse/cst'; 3 | import type { CollectionTag } from '../schema/types'; 4 | import type { ComposeContext, ComposeNode } from './compose-node'; 5 | import type { ComposeErrorHandler } from './composer'; 6 | export declare function resolveBlockMap({ composeNode, composeEmptyNode }: ComposeNode, ctx: ComposeContext, bm: BlockMap, onError: ComposeErrorHandler, tag?: CollectionTag): YAMLMap.Parsed; 7 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/resolve-block-scalar.d.ts: -------------------------------------------------------------------------------- 1 | import type { Range } from '../nodes/Node'; 2 | import { Scalar } from '../nodes/Scalar'; 3 | import type { BlockScalar } from '../parse/cst'; 4 | import type { ComposeContext } from './compose-node'; 5 | import type { ComposeErrorHandler } from './composer'; 6 | export declare function resolveBlockScalar(ctx: ComposeContext, scalar: BlockScalar, onError: ComposeErrorHandler): { 7 | value: string; 8 | type: Scalar.BLOCK_FOLDED | Scalar.BLOCK_LITERAL | null; 9 | comment: string; 10 | range: Range; 11 | }; 12 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/resolve-block-seq.d.ts: -------------------------------------------------------------------------------- 1 | import { YAMLSeq } from '../nodes/YAMLSeq'; 2 | import type { BlockSequence } from '../parse/cst'; 3 | import type { CollectionTag } from '../schema/types'; 4 | import type { ComposeContext, ComposeNode } from './compose-node'; 5 | import type { ComposeErrorHandler } from './composer'; 6 | export declare function resolveBlockSeq({ composeNode, composeEmptyNode }: ComposeNode, ctx: ComposeContext, bs: BlockSequence, onError: ComposeErrorHandler, tag?: CollectionTag): YAMLSeq.Parsed; 7 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/resolve-end.d.ts: -------------------------------------------------------------------------------- 1 | import type { SourceToken } from '../parse/cst'; 2 | import type { ComposeErrorHandler } from './composer'; 3 | export declare function resolveEnd(end: SourceToken[] | undefined, offset: number, reqSpace: boolean, onError: ComposeErrorHandler): { 4 | comment: string; 5 | offset: number; 6 | }; 7 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/resolve-end.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function resolveEnd(end, offset, reqSpace, onError) { 4 | let comment = ''; 5 | if (end) { 6 | let hasSpace = false; 7 | let sep = ''; 8 | for (const token of end) { 9 | const { source, type } = token; 10 | switch (type) { 11 | case 'space': 12 | hasSpace = true; 13 | break; 14 | case 'comment': { 15 | if (reqSpace && !hasSpace) 16 | onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters'); 17 | const cb = source.substring(1) || ' '; 18 | if (!comment) 19 | comment = cb; 20 | else 21 | comment += sep + cb; 22 | sep = ''; 23 | break; 24 | } 25 | case 'newline': 26 | if (comment) 27 | sep += source; 28 | hasSpace = true; 29 | break; 30 | default: 31 | onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`); 32 | } 33 | offset += source.length; 34 | } 35 | } 36 | return { comment, offset }; 37 | } 38 | 39 | exports.resolveEnd = resolveEnd; 40 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/resolve-flow-collection.d.ts: -------------------------------------------------------------------------------- 1 | import { YAMLMap } from '../nodes/YAMLMap'; 2 | import { YAMLSeq } from '../nodes/YAMLSeq'; 3 | import type { FlowCollection } from '../parse/cst'; 4 | import type { CollectionTag } from '../schema/types'; 5 | import type { ComposeContext, ComposeNode } from './compose-node'; 6 | import type { ComposeErrorHandler } from './composer'; 7 | export declare function resolveFlowCollection({ composeNode, composeEmptyNode }: ComposeNode, ctx: ComposeContext, fc: FlowCollection, onError: ComposeErrorHandler, tag?: CollectionTag): YAMLMap.Parsed | YAMLSeq.Parsed; 8 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts: -------------------------------------------------------------------------------- 1 | import type { Range } from '../nodes/Node'; 2 | import { Scalar } from '../nodes/Scalar'; 3 | import type { FlowScalar } from '../parse/cst'; 4 | import type { ComposeErrorHandler } from './composer'; 5 | export declare function resolveFlowScalar(scalar: FlowScalar, strict: boolean, onError: ComposeErrorHandler): { 6 | value: string; 7 | type: Scalar.PLAIN | Scalar.QUOTE_DOUBLE | Scalar.QUOTE_SINGLE | null; 8 | comment: string; 9 | range: Range; 10 | }; 11 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/resolve-props.d.ts: -------------------------------------------------------------------------------- 1 | import type { SourceToken, Token } from '../parse/cst'; 2 | import type { ComposeErrorHandler } from './composer'; 3 | export interface ResolvePropsArg { 4 | flow?: 'flow map' | 'flow sequence'; 5 | indicator: 'doc-start' | 'explicit-key-ind' | 'map-value-ind' | 'seq-item-ind'; 6 | next: Token | null | undefined; 7 | offset: number; 8 | onError: ComposeErrorHandler; 9 | parentIndent: number; 10 | startOnNewline: boolean; 11 | } 12 | export declare function resolveProps(tokens: SourceToken[], { flow, indicator, next, offset, onError, parentIndent, startOnNewline }: ResolvePropsArg): { 13 | comma: SourceToken | null; 14 | found: SourceToken | null; 15 | spaceBefore: boolean; 16 | comment: string; 17 | hasNewline: boolean; 18 | anchor: SourceToken | null; 19 | tag: SourceToken | null; 20 | newlineAfterProp: SourceToken | null; 21 | end: number; 22 | start: number; 23 | }; 24 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/util-contains-newline.d.ts: -------------------------------------------------------------------------------- 1 | import type { Token } from '../parse/cst'; 2 | export declare function containsNewline(key: Token | null | undefined): boolean | null; 3 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/util-contains-newline.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function containsNewline(key) { 4 | if (!key) 5 | return null; 6 | switch (key.type) { 7 | case 'alias': 8 | case 'scalar': 9 | case 'double-quoted-scalar': 10 | case 'single-quoted-scalar': 11 | if (key.source.includes('\n')) 12 | return true; 13 | if (key.end) 14 | for (const st of key.end) 15 | if (st.type === 'newline') 16 | return true; 17 | return false; 18 | case 'flow-collection': 19 | for (const it of key.items) { 20 | for (const st of it.start) 21 | if (st.type === 'newline') 22 | return true; 23 | if (it.sep) 24 | for (const st of it.sep) 25 | if (st.type === 'newline') 26 | return true; 27 | if (containsNewline(it.key) || containsNewline(it.value)) 28 | return true; 29 | } 30 | return false; 31 | default: 32 | return true; 33 | } 34 | } 35 | 36 | exports.containsNewline = containsNewline; 37 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts: -------------------------------------------------------------------------------- 1 | import type { Token } from '../parse/cst'; 2 | export declare function emptyScalarPosition(offset: number, before: Token[] | undefined, pos: number | null): number; 3 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/util-empty-scalar-position.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function emptyScalarPosition(offset, before, pos) { 4 | if (before) { 5 | pos ?? (pos = before.length); 6 | for (let i = pos - 1; i >= 0; --i) { 7 | let st = before[i]; 8 | switch (st.type) { 9 | case 'space': 10 | case 'comment': 11 | case 'newline': 12 | offset -= st.source.length; 13 | continue; 14 | } 15 | // Technically, an empty scalar is immediately after the last non-empty 16 | // node, but it's more useful to place it after any whitespace. 17 | st = before[++i]; 18 | while (st?.type === 'space') { 19 | offset += st.source.length; 20 | st = before[++i]; 21 | } 22 | break; 23 | } 24 | } 25 | return offset; 26 | } 27 | 28 | exports.emptyScalarPosition = emptyScalarPosition; 29 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/util-flow-indent-check.d.ts: -------------------------------------------------------------------------------- 1 | import type { Token } from '../parse/cst'; 2 | import type { ComposeErrorHandler } from './composer'; 3 | export declare function flowIndentCheck(indent: number, fc: Token | null | undefined, onError: ComposeErrorHandler): void; 4 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/util-flow-indent-check.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utilContainsNewline = require('./util-contains-newline.js'); 4 | 5 | function flowIndentCheck(indent, fc, onError) { 6 | if (fc?.type === 'flow-collection') { 7 | const end = fc.end[0]; 8 | if (end.indent === indent && 9 | (end.source === ']' || end.source === '}') && 10 | utilContainsNewline.containsNewline(fc)) { 11 | const msg = 'Flow end indicator should be more indented than parent'; 12 | onError(end, 'BAD_INDENT', msg, true); 13 | } 14 | } 15 | } 16 | 17 | exports.flowIndentCheck = flowIndentCheck; 18 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/util-map-includes.d.ts: -------------------------------------------------------------------------------- 1 | import type { ParsedNode } from '../nodes/Node'; 2 | import type { Pair } from '../nodes/Pair'; 3 | import type { ComposeContext } from './compose-node'; 4 | export declare function mapIncludes(ctx: ComposeContext, items: Pair[], search: ParsedNode): boolean; 5 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/compose/util-map-includes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var identity = require('../nodes/identity.js'); 4 | 5 | function mapIncludes(ctx, items, search) { 6 | const { uniqueKeys } = ctx.options; 7 | if (uniqueKeys === false) 8 | return false; 9 | const isEqual = typeof uniqueKeys === 'function' 10 | ? uniqueKeys 11 | : (a, b) => a === b || (identity.isScalar(a) && identity.isScalar(b) && a.value === b.value); 12 | return items.some(pair => isEqual(pair.key, search)); 13 | } 14 | 15 | exports.mapIncludes = mapIncludes; 16 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/doc/anchors.d.ts: -------------------------------------------------------------------------------- 1 | import type { Node } from '../nodes/Node'; 2 | import type { Document } from './Document'; 3 | /** 4 | * Verify that the input string is a valid anchor. 5 | * 6 | * Will throw on errors. 7 | */ 8 | export declare function anchorIsValid(anchor: string): true; 9 | export declare function anchorNames(root: Document | Node): Set; 10 | /** Find a new anchor name with the given `prefix` and a one-indexed suffix. */ 11 | export declare function findNewAnchor(prefix: string, exclude: Set): string; 12 | export declare function createNodeAnchors(doc: Document, prefix: string): { 13 | onAnchor: (source: unknown) => string; 14 | /** 15 | * With circular references, the source node is only resolved after all 16 | * of its child nodes are. This is why anchors are set only after all of 17 | * the nodes have been created. 18 | */ 19 | setAnchors: () => void; 20 | sourceObjects: Map; 24 | }; 25 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/doc/applyReviver.d.ts: -------------------------------------------------------------------------------- 1 | export type Reviver = (key: unknown, value: unknown) => unknown; 2 | /** 3 | * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec, 4 | * in section 24.5.1.1 "Runtime Semantics: InternalizeJSONProperty" of the 5 | * 2021 edition: https://tc39.es/ecma262/#sec-json.parse 6 | * 7 | * Includes extensions for handling Map and Set objects. 8 | */ 9 | export declare function applyReviver(reviver: Reviver, obj: unknown, key: unknown, val: any): unknown; 10 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/doc/createNode.d.ts: -------------------------------------------------------------------------------- 1 | import type { Node } from '../nodes/Node'; 2 | import type { Schema } from '../schema/Schema'; 3 | import type { CollectionTag, ScalarTag } from '../schema/types'; 4 | import type { Replacer } from './Document'; 5 | export interface CreateNodeContext { 6 | aliasDuplicateObjects: boolean; 7 | keepUndefined: boolean; 8 | onAnchor: (source: unknown) => string; 9 | onTagObj?: (tagObj: ScalarTag | CollectionTag) => void; 10 | sourceObjects: Map; 14 | replacer?: Replacer; 15 | schema: Schema; 16 | } 17 | export declare function createNode(value: unknown, tagName: string | undefined, ctx: CreateNodeContext): Node; 18 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/errors.d.ts: -------------------------------------------------------------------------------- 1 | import type { LineCounter } from './parse/line-counter'; 2 | export type ErrorCode = 'ALIAS_PROPS' | 'BAD_ALIAS' | 'BAD_DIRECTIVE' | 'BAD_DQ_ESCAPE' | 'BAD_INDENT' | 'BAD_PROP_ORDER' | 'BAD_SCALAR_START' | 'BLOCK_AS_IMPLICIT_KEY' | 'BLOCK_IN_FLOW' | 'DUPLICATE_KEY' | 'IMPOSSIBLE' | 'KEY_OVER_1024_CHARS' | 'MISSING_CHAR' | 'MULTILINE_IMPLICIT_KEY' | 'MULTIPLE_ANCHORS' | 'MULTIPLE_DOCS' | 'MULTIPLE_TAGS' | 'NON_STRING_KEY' | 'TAB_AS_INDENT' | 'TAG_RESOLVE_FAILED' | 'UNEXPECTED_TOKEN' | 'BAD_COLLECTION_TYPE'; 3 | export type LinePos = { 4 | line: number; 5 | col: number; 6 | }; 7 | export declare class YAMLError extends Error { 8 | name: 'YAMLParseError' | 'YAMLWarning'; 9 | code: ErrorCode; 10 | message: string; 11 | pos: [number, number]; 12 | linePos?: [LinePos] | [LinePos, LinePos]; 13 | constructor(name: YAMLError['name'], pos: [number, number], code: ErrorCode, message: string); 14 | } 15 | export declare class YAMLParseError extends YAMLError { 16 | constructor(pos: [number, number], code: ErrorCode, message: string); 17 | } 18 | export declare class YAMLWarning extends YAMLError { 19 | constructor(pos: [number, number], code: ErrorCode, message: string); 20 | } 21 | export declare const prettifyError: (src: string, lc: LineCounter) => (error: YAMLError) => void; 22 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/index.d.ts: -------------------------------------------------------------------------------- 1 | export { Composer } from './compose/composer'; 2 | export { Document } from './doc/Document'; 3 | export { Schema } from './schema/Schema'; 4 | export type { ErrorCode } from './errors'; 5 | export { YAMLError, YAMLParseError, YAMLWarning } from './errors'; 6 | export { Alias } from './nodes/Alias'; 7 | export { isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq } from './nodes/identity'; 8 | export type { Node, ParsedNode, Range } from './nodes/Node'; 9 | export { Pair } from './nodes/Pair'; 10 | export { Scalar } from './nodes/Scalar'; 11 | export { YAMLMap } from './nodes/YAMLMap'; 12 | export { YAMLSeq } from './nodes/YAMLSeq'; 13 | export type { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions, ToStringOptions } from './options'; 14 | export * as CST from './parse/cst'; 15 | export { Lexer } from './parse/lexer'; 16 | export { LineCounter } from './parse/line-counter'; 17 | export { Parser } from './parse/parser'; 18 | export type { EmptyStream } from './public-api'; 19 | export { parse, parseAllDocuments, parseDocument, stringify } from './public-api'; 20 | export type { TagId, Tags } from './schema/tags'; 21 | export type { CollectionTag, ScalarTag } from './schema/types'; 22 | export type { YAMLOMap } from './schema/yaml-1.1/omap'; 23 | export type { YAMLSet } from './schema/yaml-1.1/set'; 24 | export type { asyncVisitor, asyncVisitorFn, visitor, visitorFn } from './visit'; 25 | export { visit, visitAsync } from './visit'; 26 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/log.d.ts: -------------------------------------------------------------------------------- 1 | export type LogLevelId = 'silent' | 'error' | 'warn' | 'debug'; 2 | export declare function debug(logLevel: LogLevelId, ...messages: any[]): void; 3 | export declare function warn(logLevel: LogLevelId, warning: string | Error): void; 4 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/log.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var node_process = require('process'); 4 | 5 | function debug(logLevel, ...messages) { 6 | if (logLevel === 'debug') 7 | console.log(...messages); 8 | } 9 | function warn(logLevel, warning) { 10 | if (logLevel === 'debug' || logLevel === 'warn') { 11 | if (typeof node_process.emitWarning === 'function') 12 | node_process.emitWarning(warning); 13 | else 14 | console.warn(warning); 15 | } 16 | } 17 | 18 | exports.debug = debug; 19 | exports.warn = warn; 20 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/nodes/Alias.d.ts: -------------------------------------------------------------------------------- 1 | import type { Document } from '../doc/Document'; 2 | import type { FlowScalar } from '../parse/cst'; 3 | import type { StringifyContext } from '../stringify/stringify'; 4 | import type { Range } from './Node'; 5 | import { NodeBase } from './Node'; 6 | import type { Scalar } from './Scalar'; 7 | import type { ToJSContext } from './toJS'; 8 | import type { YAMLMap } from './YAMLMap'; 9 | import type { YAMLSeq } from './YAMLSeq'; 10 | export declare namespace Alias { 11 | interface Parsed extends Alias { 12 | range: Range; 13 | srcToken?: FlowScalar & { 14 | type: 'alias'; 15 | }; 16 | } 17 | } 18 | export declare class Alias extends NodeBase { 19 | source: string; 20 | anchor?: never; 21 | constructor(source: string); 22 | /** 23 | * Resolve the value of this alias within `doc`, finding the last 24 | * instance of the `source` anchor before this node. 25 | */ 26 | resolve(doc: Document, ctx?: ToJSContext): Scalar | YAMLMap | YAMLSeq | undefined; 27 | toJSON(_arg?: unknown, ctx?: ToJSContext): unknown; 28 | toString(ctx?: StringifyContext, _onComment?: () => void, _onChompKeep?: () => void): string; 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/nodes/Node.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var applyReviver = require('../doc/applyReviver.js'); 4 | var identity = require('./identity.js'); 5 | var toJS = require('./toJS.js'); 6 | 7 | class NodeBase { 8 | constructor(type) { 9 | Object.defineProperty(this, identity.NODE_TYPE, { value: type }); 10 | } 11 | /** Create a copy of this node. */ 12 | clone() { 13 | const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); 14 | if (this.range) 15 | copy.range = this.range.slice(); 16 | return copy; 17 | } 18 | /** A plain JavaScript representation of this node. */ 19 | toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { 20 | if (!identity.isDocument(doc)) 21 | throw new TypeError('A document argument is required'); 22 | const ctx = { 23 | anchors: new Map(), 24 | doc, 25 | keep: true, 26 | mapAsMap: mapAsMap === true, 27 | mapKeyWarned: false, 28 | maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100 29 | }; 30 | const res = toJS.toJS(this, '', ctx); 31 | if (typeof onAnchor === 'function') 32 | for (const { count, res } of ctx.anchors.values()) 33 | onAnchor(res, count); 34 | return typeof reviver === 'function' 35 | ? applyReviver.applyReviver(reviver, { '': res }, '', res) 36 | : res; 37 | } 38 | } 39 | 40 | exports.NodeBase = NodeBase; 41 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/nodes/Pair.d.ts: -------------------------------------------------------------------------------- 1 | import type { CreateNodeContext } from '../doc/createNode'; 2 | import type { CollectionItem } from '../parse/cst'; 3 | import type { Schema } from '../schema/Schema'; 4 | import type { StringifyContext } from '../stringify/stringify'; 5 | import { addPairToJSMap } from './addPairToJSMap'; 6 | import { NODE_TYPE } from './identity'; 7 | import type { Node } from './Node'; 8 | import type { ToJSContext } from './toJS'; 9 | export declare function createPair(key: unknown, value: unknown, ctx: CreateNodeContext): Pair; 10 | export declare class Pair { 11 | readonly [NODE_TYPE]: symbol; 12 | /** Always Node or null when parsed, but can be set to anything. */ 13 | key: K; 14 | /** Always Node or null when parsed, but can be set to anything. */ 15 | value: V | null; 16 | /** The CST token that was composed into this pair. */ 17 | srcToken?: CollectionItem; 18 | constructor(key: K, value?: V | null); 19 | clone(schema?: Schema): Pair; 20 | toJSON(_?: unknown, ctx?: ToJSContext): ReturnType; 21 | toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/nodes/Pair.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var createNode = require('../doc/createNode.js'); 4 | var stringifyPair = require('../stringify/stringifyPair.js'); 5 | var addPairToJSMap = require('./addPairToJSMap.js'); 6 | var identity = require('./identity.js'); 7 | 8 | function createPair(key, value, ctx) { 9 | const k = createNode.createNode(key, undefined, ctx); 10 | const v = createNode.createNode(value, undefined, ctx); 11 | return new Pair(k, v); 12 | } 13 | class Pair { 14 | constructor(key, value = null) { 15 | Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR }); 16 | this.key = key; 17 | this.value = value; 18 | } 19 | clone(schema) { 20 | let { key, value } = this; 21 | if (identity.isNode(key)) 22 | key = key.clone(schema); 23 | if (identity.isNode(value)) 24 | value = value.clone(schema); 25 | return new Pair(key, value); 26 | } 27 | toJSON(_, ctx) { 28 | const pair = ctx?.mapAsMap ? new Map() : {}; 29 | return addPairToJSMap.addPairToJSMap(ctx, pair, this); 30 | } 31 | toString(ctx, onComment, onChompKeep) { 32 | return ctx?.doc 33 | ? stringifyPair.stringifyPair(this, ctx, onComment, onChompKeep) 34 | : JSON.stringify(this); 35 | } 36 | } 37 | 38 | exports.Pair = Pair; 39 | exports.createPair = createPair; 40 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/nodes/Scalar.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var identity = require('./identity.js'); 4 | var Node = require('./Node.js'); 5 | var toJS = require('./toJS.js'); 6 | 7 | const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object'); 8 | class Scalar extends Node.NodeBase { 9 | constructor(value) { 10 | super(identity.SCALAR); 11 | this.value = value; 12 | } 13 | toJSON(arg, ctx) { 14 | return ctx?.keep ? this.value : toJS.toJS(this.value, arg, ctx); 15 | } 16 | toString() { 17 | return String(this.value); 18 | } 19 | } 20 | Scalar.BLOCK_FOLDED = 'BLOCK_FOLDED'; 21 | Scalar.BLOCK_LITERAL = 'BLOCK_LITERAL'; 22 | Scalar.PLAIN = 'PLAIN'; 23 | Scalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE'; 24 | Scalar.QUOTE_SINGLE = 'QUOTE_SINGLE'; 25 | 26 | exports.Scalar = Scalar; 27 | exports.isScalarValue = isScalarValue; 28 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/nodes/addPairToJSMap.d.ts: -------------------------------------------------------------------------------- 1 | import type { Pair } from './Pair'; 2 | import type { ToJSContext } from './toJS'; 3 | import type { MapLike } from './YAMLMap'; 4 | export declare function addPairToJSMap(ctx: ToJSContext | undefined, map: MapLike, { key, value }: Pair): MapLike; 5 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/nodes/identity.d.ts: -------------------------------------------------------------------------------- 1 | import type { Document } from '../doc/Document'; 2 | import type { Alias } from './Alias'; 3 | import type { Node } from './Node'; 4 | import type { Pair } from './Pair'; 5 | import type { Scalar } from './Scalar'; 6 | import type { YAMLMap } from './YAMLMap'; 7 | import type { YAMLSeq } from './YAMLSeq'; 8 | export declare const ALIAS: unique symbol; 9 | export declare const DOC: unique symbol; 10 | export declare const MAP: unique symbol; 11 | export declare const PAIR: unique symbol; 12 | export declare const SCALAR: unique symbol; 13 | export declare const SEQ: unique symbol; 14 | export declare const NODE_TYPE: unique symbol; 15 | export declare const isAlias: (node: any) => node is Alias; 16 | export declare const isDocument: (node: any) => node is Document; 17 | export declare const isMap: (node: any) => node is YAMLMap; 18 | export declare const isPair: (node: any) => node is Pair; 19 | export declare const isScalar: (node: any) => node is Scalar; 20 | export declare const isSeq: (node: any) => node is YAMLSeq; 21 | export declare function isCollection(node: any): node is YAMLMap | YAMLSeq; 22 | export declare function isNode(node: any): node is Node; 23 | export declare const hasAnchor: (node: unknown) => node is Scalar | YAMLMap | YAMLSeq; 24 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/nodes/toJS.d.ts: -------------------------------------------------------------------------------- 1 | import type { Document } from '../doc/Document'; 2 | import type { Node } from './Node'; 3 | export interface AnchorData { 4 | aliasCount: number; 5 | count: number; 6 | res: unknown; 7 | } 8 | export interface ToJSContext { 9 | anchors: Map; 10 | /** Cached anchor and alias nodes in the order they occur in the document */ 11 | aliasResolveCache?: Node[]; 12 | doc: Document; 13 | keep: boolean; 14 | mapAsMap: boolean; 15 | mapKeyWarned: boolean; 16 | maxAliasCount: number; 17 | onCreate?: (res: unknown) => void; 18 | } 19 | /** 20 | * Recursively convert any node or its contents to native JavaScript 21 | * 22 | * @param value - The input value 23 | * @param arg - If `value` defines a `toJSON()` method, use this 24 | * as its first argument 25 | * @param ctx - Conversion context, originally set in Document#toJS(). If 26 | * `{ keep: true }` is not set, output should be suitable for JSON 27 | * stringification. 28 | */ 29 | export declare function toJS(value: any, arg: string | null, ctx?: ToJSContext): any; 30 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/nodes/toJS.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var identity = require('./identity.js'); 4 | 5 | /** 6 | * Recursively convert any node or its contents to native JavaScript 7 | * 8 | * @param value - The input value 9 | * @param arg - If `value` defines a `toJSON()` method, use this 10 | * as its first argument 11 | * @param ctx - Conversion context, originally set in Document#toJS(). If 12 | * `{ keep: true }` is not set, output should be suitable for JSON 13 | * stringification. 14 | */ 15 | function toJS(value, arg, ctx) { 16 | // eslint-disable-next-line @typescript-eslint/no-unsafe-return 17 | if (Array.isArray(value)) 18 | return value.map((v, i) => toJS(v, String(i), ctx)); 19 | if (value && typeof value.toJSON === 'function') { 20 | // eslint-disable-next-line @typescript-eslint/no-unsafe-call 21 | if (!ctx || !identity.hasAnchor(value)) 22 | return value.toJSON(arg, ctx); 23 | const data = { aliasCount: 0, count: 1, res: undefined }; 24 | ctx.anchors.set(value, data); 25 | ctx.onCreate = res => { 26 | data.res = res; 27 | delete ctx.onCreate; 28 | }; 29 | const res = value.toJSON(arg, ctx); 30 | if (ctx.onCreate) 31 | ctx.onCreate(res); 32 | return res; 33 | } 34 | if (typeof value === 'bigint' && !ctx?.keep) 35 | return Number(value); 36 | return value; 37 | } 38 | 39 | exports.toJS = toJS; 40 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/parse/cst-stringify.d.ts: -------------------------------------------------------------------------------- 1 | import type { CollectionItem, Token } from './cst'; 2 | /** 3 | * Stringify a CST document, token, or collection item 4 | * 5 | * Fair warning: This applies no validation whatsoever, and 6 | * simply concatenates the sources in their logical order. 7 | */ 8 | export declare const stringify: (cst: Token | CollectionItem) => string; 9 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/parse/line-counter.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Tracks newlines during parsing in order to provide an efficient API for 3 | * determining the one-indexed `{ line, col }` position for any offset 4 | * within the input. 5 | */ 6 | export declare class LineCounter { 7 | lineStarts: number[]; 8 | /** 9 | * Should be called in ascending order. Otherwise, call 10 | * `lineCounter.lineStarts.sort()` before calling `linePos()`. 11 | */ 12 | addNewLine: (offset: number) => number; 13 | /** 14 | * Performs a binary search and returns the 1-indexed { line, col } 15 | * position of `offset`. If `line === 0`, `addNewLine` has never been 16 | * called or `offset` is before the first known newline. 17 | */ 18 | linePos: (offset: number) => { 19 | line: number; 20 | col: number; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/parse/line-counter.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Tracks newlines during parsing in order to provide an efficient API for 5 | * determining the one-indexed `{ line, col }` position for any offset 6 | * within the input. 7 | */ 8 | class LineCounter { 9 | constructor() { 10 | this.lineStarts = []; 11 | /** 12 | * Should be called in ascending order. Otherwise, call 13 | * `lineCounter.lineStarts.sort()` before calling `linePos()`. 14 | */ 15 | this.addNewLine = (offset) => this.lineStarts.push(offset); 16 | /** 17 | * Performs a binary search and returns the 1-indexed { line, col } 18 | * position of `offset`. If `line === 0`, `addNewLine` has never been 19 | * called or `offset` is before the first known newline. 20 | */ 21 | this.linePos = (offset) => { 22 | let low = 0; 23 | let high = this.lineStarts.length; 24 | while (low < high) { 25 | const mid = (low + high) >> 1; // Math.floor((low + high) / 2) 26 | if (this.lineStarts[mid] < offset) 27 | low = mid + 1; 28 | else 29 | high = mid; 30 | } 31 | if (this.lineStarts[low] === offset) 32 | return { line: low + 1, col: 1 }; 33 | if (low === 0) 34 | return { line: 0, col: offset }; 35 | const start = this.lineStarts[low - 1]; 36 | return { line: low, col: offset - start + 1 }; 37 | }; 38 | } 39 | } 40 | 41 | exports.LineCounter = LineCounter; 42 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/Schema.d.ts: -------------------------------------------------------------------------------- 1 | import { MAP, SCALAR, SEQ } from '../nodes/identity'; 2 | import type { Pair } from '../nodes/Pair'; 3 | import type { SchemaOptions, ToStringOptions } from '../options'; 4 | import type { CollectionTag, ScalarTag } from './types'; 5 | export declare class Schema { 6 | compat: Array | null; 7 | knownTags: Record; 8 | name: string; 9 | sortMapEntries: ((a: Pair, b: Pair) => number) | null; 10 | tags: Array; 11 | toStringOptions: Readonly | null; 12 | readonly [MAP]: CollectionTag; 13 | readonly [SCALAR]: ScalarTag; 14 | readonly [SEQ]: CollectionTag; 15 | constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }: SchemaOptions); 16 | clone(): Schema; 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/Schema.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var identity = require('../nodes/identity.js'); 4 | var map = require('./common/map.js'); 5 | var seq = require('./common/seq.js'); 6 | var string = require('./common/string.js'); 7 | var tags = require('./tags.js'); 8 | 9 | const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0; 10 | class Schema { 11 | constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) { 12 | this.compat = Array.isArray(compat) 13 | ? tags.getTags(compat, 'compat') 14 | : compat 15 | ? tags.getTags(null, compat) 16 | : null; 17 | this.name = (typeof schema === 'string' && schema) || 'core'; 18 | this.knownTags = resolveKnownTags ? tags.coreKnownTags : {}; 19 | this.tags = tags.getTags(customTags, this.name, merge); 20 | this.toStringOptions = toStringDefaults ?? null; 21 | Object.defineProperty(this, identity.MAP, { value: map.map }); 22 | Object.defineProperty(this, identity.SCALAR, { value: string.string }); 23 | Object.defineProperty(this, identity.SEQ, { value: seq.seq }); 24 | // Used by createMap() 25 | this.sortMapEntries = 26 | typeof sortMapEntries === 'function' 27 | ? sortMapEntries 28 | : sortMapEntries === true 29 | ? sortMapEntriesByKey 30 | : null; 31 | } 32 | clone() { 33 | const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this)); 34 | copy.tags = this.tags.slice(); 35 | return copy; 36 | } 37 | } 38 | 39 | exports.Schema = Schema; 40 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/common/map.d.ts: -------------------------------------------------------------------------------- 1 | import type { CollectionTag } from '../types'; 2 | export declare const map: CollectionTag; 3 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/common/map.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var identity = require('../../nodes/identity.js'); 4 | var YAMLMap = require('../../nodes/YAMLMap.js'); 5 | 6 | const map = { 7 | collection: 'map', 8 | default: true, 9 | nodeClass: YAMLMap.YAMLMap, 10 | tag: 'tag:yaml.org,2002:map', 11 | resolve(map, onError) { 12 | if (!identity.isMap(map)) 13 | onError('Expected a mapping for this tag'); 14 | return map; 15 | }, 16 | createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx) 17 | }; 18 | 19 | exports.map = map; 20 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/common/null.d.ts: -------------------------------------------------------------------------------- 1 | import type { ScalarTag } from '../types'; 2 | export declare const nullTag: ScalarTag & { 3 | test: RegExp; 4 | }; 5 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/common/null.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Scalar = require('../../nodes/Scalar.js'); 4 | 5 | const nullTag = { 6 | identify: value => value == null, 7 | createNode: () => new Scalar.Scalar(null), 8 | default: true, 9 | tag: 'tag:yaml.org,2002:null', 10 | test: /^(?:~|[Nn]ull|NULL)?$/, 11 | resolve: () => new Scalar.Scalar(null), 12 | stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source) 13 | ? source 14 | : ctx.options.nullStr 15 | }; 16 | 17 | exports.nullTag = nullTag; 18 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/common/seq.d.ts: -------------------------------------------------------------------------------- 1 | import type { CollectionTag } from '../types'; 2 | export declare const seq: CollectionTag; 3 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/common/seq.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var identity = require('../../nodes/identity.js'); 4 | var YAMLSeq = require('../../nodes/YAMLSeq.js'); 5 | 6 | const seq = { 7 | collection: 'seq', 8 | default: true, 9 | nodeClass: YAMLSeq.YAMLSeq, 10 | tag: 'tag:yaml.org,2002:seq', 11 | resolve(seq, onError) { 12 | if (!identity.isSeq(seq)) 13 | onError('Expected a sequence for this tag'); 14 | return seq; 15 | }, 16 | createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx) 17 | }; 18 | 19 | exports.seq = seq; 20 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/common/string.d.ts: -------------------------------------------------------------------------------- 1 | import type { ScalarTag } from '../types'; 2 | export declare const string: ScalarTag; 3 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/common/string.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var stringifyString = require('../../stringify/stringifyString.js'); 4 | 5 | const string = { 6 | identify: value => typeof value === 'string', 7 | default: true, 8 | tag: 'tag:yaml.org,2002:str', 9 | resolve: str => str, 10 | stringify(item, ctx, onComment, onChompKeep) { 11 | ctx = Object.assign({ actualString: true }, ctx); 12 | return stringifyString.stringifyString(item, ctx, onComment, onChompKeep); 13 | } 14 | }; 15 | 16 | exports.string = string; 17 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/core/bool.d.ts: -------------------------------------------------------------------------------- 1 | import type { ScalarTag } from '../types'; 2 | export declare const boolTag: ScalarTag & { 3 | test: RegExp; 4 | }; 5 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/core/bool.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Scalar = require('../../nodes/Scalar.js'); 4 | 5 | const boolTag = { 6 | identify: value => typeof value === 'boolean', 7 | default: true, 8 | tag: 'tag:yaml.org,2002:bool', 9 | test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, 10 | resolve: str => new Scalar.Scalar(str[0] === 't' || str[0] === 'T'), 11 | stringify({ source, value }, ctx) { 12 | if (source && boolTag.test.test(source)) { 13 | const sv = source[0] === 't' || source[0] === 'T'; 14 | if (value === sv) 15 | return source; 16 | } 17 | return value ? ctx.options.trueStr : ctx.options.falseStr; 18 | } 19 | }; 20 | 21 | exports.boolTag = boolTag; 22 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/core/float.d.ts: -------------------------------------------------------------------------------- 1 | import type { ScalarTag } from '../types'; 2 | export declare const floatNaN: ScalarTag; 3 | export declare const floatExp: ScalarTag; 4 | export declare const float: ScalarTag; 5 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/core/float.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Scalar = require('../../nodes/Scalar.js'); 4 | var stringifyNumber = require('../../stringify/stringifyNumber.js'); 5 | 6 | const floatNaN = { 7 | identify: value => typeof value === 'number', 8 | default: true, 9 | tag: 'tag:yaml.org,2002:float', 10 | test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, 11 | resolve: str => str.slice(-3).toLowerCase() === 'nan' 12 | ? NaN 13 | : str[0] === '-' 14 | ? Number.NEGATIVE_INFINITY 15 | : Number.POSITIVE_INFINITY, 16 | stringify: stringifyNumber.stringifyNumber 17 | }; 18 | const floatExp = { 19 | identify: value => typeof value === 'number', 20 | default: true, 21 | tag: 'tag:yaml.org,2002:float', 22 | format: 'EXP', 23 | test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, 24 | resolve: str => parseFloat(str), 25 | stringify(node) { 26 | const num = Number(node.value); 27 | return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); 28 | } 29 | }; 30 | const float = { 31 | identify: value => typeof value === 'number', 32 | default: true, 33 | tag: 'tag:yaml.org,2002:float', 34 | test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/, 35 | resolve(str) { 36 | const node = new Scalar.Scalar(parseFloat(str)); 37 | const dot = str.indexOf('.'); 38 | if (dot !== -1 && str[str.length - 1] === '0') 39 | node.minFractionDigits = str.length - dot - 1; 40 | return node; 41 | }, 42 | stringify: stringifyNumber.stringifyNumber 43 | }; 44 | 45 | exports.float = float; 46 | exports.floatExp = floatExp; 47 | exports.floatNaN = floatNaN; 48 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/core/int.d.ts: -------------------------------------------------------------------------------- 1 | import type { ScalarTag } from '../types'; 2 | export declare const intOct: ScalarTag; 3 | export declare const int: ScalarTag; 4 | export declare const intHex: ScalarTag; 5 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/core/int.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var stringifyNumber = require('../../stringify/stringifyNumber.js'); 4 | 5 | const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value); 6 | const intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix)); 7 | function intStringify(node, radix, prefix) { 8 | const { value } = node; 9 | if (intIdentify(value) && value >= 0) 10 | return prefix + value.toString(radix); 11 | return stringifyNumber.stringifyNumber(node); 12 | } 13 | const intOct = { 14 | identify: value => intIdentify(value) && value >= 0, 15 | default: true, 16 | tag: 'tag:yaml.org,2002:int', 17 | format: 'OCT', 18 | test: /^0o[0-7]+$/, 19 | resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt), 20 | stringify: node => intStringify(node, 8, '0o') 21 | }; 22 | const int = { 23 | identify: intIdentify, 24 | default: true, 25 | tag: 'tag:yaml.org,2002:int', 26 | test: /^[-+]?[0-9]+$/, 27 | resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), 28 | stringify: stringifyNumber.stringifyNumber 29 | }; 30 | const intHex = { 31 | identify: value => intIdentify(value) && value >= 0, 32 | default: true, 33 | tag: 'tag:yaml.org,2002:int', 34 | format: 'HEX', 35 | test: /^0x[0-9a-fA-F]+$/, 36 | resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), 37 | stringify: node => intStringify(node, 16, '0x') 38 | }; 39 | 40 | exports.int = int; 41 | exports.intHex = intHex; 42 | exports.intOct = intOct; 43 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/core/schema.d.ts: -------------------------------------------------------------------------------- 1 | export declare const schema: (import('../types').CollectionTag | import('../types').ScalarTag)[]; 2 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/core/schema.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var map = require('../common/map.js'); 4 | var _null = require('../common/null.js'); 5 | var seq = require('../common/seq.js'); 6 | var string = require('../common/string.js'); 7 | var bool = require('./bool.js'); 8 | var float = require('./float.js'); 9 | var int = require('./int.js'); 10 | 11 | const schema = [ 12 | map.map, 13 | seq.seq, 14 | string.string, 15 | _null.nullTag, 16 | bool.boolTag, 17 | int.intOct, 18 | int.int, 19 | int.intHex, 20 | float.floatNaN, 21 | float.floatExp, 22 | float.float 23 | ]; 24 | 25 | exports.schema = schema; 26 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/json/schema.d.ts: -------------------------------------------------------------------------------- 1 | import type { CollectionTag, ScalarTag } from '../types'; 2 | export declare const schema: (CollectionTag | ScalarTag)[]; 3 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/tags.d.ts: -------------------------------------------------------------------------------- 1 | import type { SchemaOptions } from '../options'; 2 | import type { CollectionTag, ScalarTag } from './types'; 3 | declare const tagsByName: { 4 | binary: ScalarTag; 5 | bool: ScalarTag & { 6 | test: RegExp; 7 | }; 8 | float: ScalarTag; 9 | floatExp: ScalarTag; 10 | floatNaN: ScalarTag; 11 | floatTime: ScalarTag; 12 | int: ScalarTag; 13 | intHex: ScalarTag; 14 | intOct: ScalarTag; 15 | intTime: ScalarTag; 16 | map: CollectionTag; 17 | merge: ScalarTag & { 18 | identify(value: unknown): boolean; 19 | test: RegExp; 20 | }; 21 | null: ScalarTag & { 22 | test: RegExp; 23 | }; 24 | omap: CollectionTag; 25 | pairs: CollectionTag; 26 | seq: CollectionTag; 27 | set: CollectionTag; 28 | timestamp: ScalarTag & { 29 | test: RegExp; 30 | }; 31 | }; 32 | export type TagId = keyof typeof tagsByName; 33 | export type Tags = Array; 34 | export declare const coreKnownTags: { 35 | 'tag:yaml.org,2002:binary': ScalarTag; 36 | 'tag:yaml.org,2002:merge': ScalarTag & { 37 | identify(value: unknown): boolean; 38 | test: RegExp; 39 | }; 40 | 'tag:yaml.org,2002:omap': CollectionTag; 41 | 'tag:yaml.org,2002:pairs': CollectionTag; 42 | 'tag:yaml.org,2002:set': CollectionTag; 43 | 'tag:yaml.org,2002:timestamp': ScalarTag & { 44 | test: RegExp; 45 | }; 46 | }; 47 | export declare function getTags(customTags: SchemaOptions['customTags'] | undefined, schemaName: string, addMergeTag?: boolean): (CollectionTag | ScalarTag)[]; 48 | export {}; 49 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts: -------------------------------------------------------------------------------- 1 | import type { ScalarTag } from '../types'; 2 | export declare const binary: ScalarTag; 3 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts: -------------------------------------------------------------------------------- 1 | import type { ScalarTag } from '../types'; 2 | export declare const trueTag: ScalarTag & { 3 | test: RegExp; 4 | }; 5 | export declare const falseTag: ScalarTag & { 6 | test: RegExp; 7 | }; 8 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/yaml-1.1/bool.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Scalar = require('../../nodes/Scalar.js'); 4 | 5 | function boolStringify({ value, source }, ctx) { 6 | const boolObj = value ? trueTag : falseTag; 7 | if (source && boolObj.test.test(source)) 8 | return source; 9 | return value ? ctx.options.trueStr : ctx.options.falseStr; 10 | } 11 | const trueTag = { 12 | identify: value => value === true, 13 | default: true, 14 | tag: 'tag:yaml.org,2002:bool', 15 | test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, 16 | resolve: () => new Scalar.Scalar(true), 17 | stringify: boolStringify 18 | }; 19 | const falseTag = { 20 | identify: value => value === false, 21 | default: true, 22 | tag: 'tag:yaml.org,2002:bool', 23 | test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/, 24 | resolve: () => new Scalar.Scalar(false), 25 | stringify: boolStringify 26 | }; 27 | 28 | exports.falseTag = falseTag; 29 | exports.trueTag = trueTag; 30 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/yaml-1.1/float.d.ts: -------------------------------------------------------------------------------- 1 | import type { ScalarTag } from '../types'; 2 | export declare const floatNaN: ScalarTag; 3 | export declare const floatExp: ScalarTag; 4 | export declare const float: ScalarTag; 5 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/yaml-1.1/int.d.ts: -------------------------------------------------------------------------------- 1 | import type { ScalarTag } from '../types'; 2 | export declare const intBin: ScalarTag; 3 | export declare const intOct: ScalarTag; 4 | export declare const int: ScalarTag; 5 | export declare const intHex: ScalarTag; 6 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts: -------------------------------------------------------------------------------- 1 | import type { ToJSContext } from '../../nodes/toJS'; 2 | import type { MapLike } from '../../nodes/YAMLMap'; 3 | import type { ScalarTag } from '../types'; 4 | export declare const merge: ScalarTag & { 5 | identify(value: unknown): boolean; 6 | test: RegExp; 7 | }; 8 | export declare const isMergeKey: (ctx: ToJSContext | undefined, key: unknown) => boolean | undefined; 9 | export declare function addMergeToJSMap(ctx: ToJSContext | undefined, map: MapLike, value: unknown): void; 10 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts: -------------------------------------------------------------------------------- 1 | import type { ToJSContext } from '../../nodes/toJS'; 2 | import { YAMLMap } from '../../nodes/YAMLMap'; 3 | import { YAMLSeq } from '../../nodes/YAMLSeq'; 4 | import type { CreateNodeContext } from '../../util'; 5 | import type { Schema } from '../Schema'; 6 | import type { CollectionTag } from '../types'; 7 | export declare class YAMLOMap extends YAMLSeq { 8 | static tag: string; 9 | constructor(); 10 | add: typeof YAMLMap.prototype.add; 11 | delete: typeof YAMLMap.prototype.delete; 12 | get: typeof YAMLMap.prototype.get; 13 | has: typeof YAMLMap.prototype.has; 14 | set: typeof YAMLMap.prototype.set; 15 | /** 16 | * If `ctx` is given, the return type is actually `Map`, 17 | * but TypeScript won't allow widening the signature of a child method. 18 | */ 19 | toJSON(_?: unknown, ctx?: ToJSContext): unknown[]; 20 | static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLOMap; 21 | } 22 | export declare const omap: CollectionTag; 23 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts: -------------------------------------------------------------------------------- 1 | import type { CreateNodeContext } from '../../doc/createNode'; 2 | import type { ParsedNode } from '../../nodes/Node'; 3 | import { Pair } from '../../nodes/Pair'; 4 | import type { YAMLMap } from '../../nodes/YAMLMap'; 5 | import { YAMLSeq } from '../../nodes/YAMLSeq'; 6 | import type { Schema } from '../../schema/Schema'; 7 | import type { CollectionTag } from '../types'; 8 | export declare function resolvePairs(seq: YAMLSeq.Parsed> | YAMLMap.Parsed, onError: (message: string) => void): YAMLSeq.Parsed>; 9 | export declare function createPairs(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSeq; 10 | export declare const pairs: CollectionTag; 11 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts: -------------------------------------------------------------------------------- 1 | export declare const schema: (import('../types').CollectionTag | import('../types').ScalarTag)[]; 2 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/yaml-1.1/schema.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var map = require('../common/map.js'); 4 | var _null = require('../common/null.js'); 5 | var seq = require('../common/seq.js'); 6 | var string = require('../common/string.js'); 7 | var binary = require('./binary.js'); 8 | var bool = require('./bool.js'); 9 | var float = require('./float.js'); 10 | var int = require('./int.js'); 11 | var merge = require('./merge.js'); 12 | var omap = require('./omap.js'); 13 | var pairs = require('./pairs.js'); 14 | var set = require('./set.js'); 15 | var timestamp = require('./timestamp.js'); 16 | 17 | const schema = [ 18 | map.map, 19 | seq.seq, 20 | string.string, 21 | _null.nullTag, 22 | bool.trueTag, 23 | bool.falseTag, 24 | int.intBin, 25 | int.intOct, 26 | int.int, 27 | int.intHex, 28 | float.floatNaN, 29 | float.floatExp, 30 | float.float, 31 | binary.binary, 32 | merge.merge, 33 | omap.omap, 34 | pairs.pairs, 35 | set.set, 36 | timestamp.intTime, 37 | timestamp.floatTime, 38 | timestamp.timestamp 39 | ]; 40 | 41 | exports.schema = schema; 42 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/yaml-1.1/set.d.ts: -------------------------------------------------------------------------------- 1 | import { Pair } from '../../nodes/Pair'; 2 | import type { Scalar } from '../../nodes/Scalar'; 3 | import type { ToJSContext } from '../../nodes/toJS'; 4 | import { YAMLMap } from '../../nodes/YAMLMap'; 5 | import type { Schema } from '../../schema/Schema'; 6 | import type { StringifyContext } from '../../stringify/stringify'; 7 | import type { CreateNodeContext } from '../../util'; 8 | import type { CollectionTag } from '../types'; 9 | export declare class YAMLSet extends YAMLMap | null> { 10 | static tag: string; 11 | constructor(schema?: Schema); 12 | add(key: T | Pair | null> | { 13 | key: T; 14 | value: Scalar | null; 15 | }): void; 16 | /** 17 | * If `keepPair` is `true`, returns the Pair matching `key`. 18 | * Otherwise, returns the value of that Pair's key. 19 | */ 20 | get(key: unknown, keepPair?: boolean): any; 21 | set(key: T, value: boolean): void; 22 | /** @deprecated Will throw; `value` must be boolean */ 23 | set(key: T, value: null): void; 24 | toJSON(_?: unknown, ctx?: ToJSContext): any; 25 | toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; 26 | static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSet; 27 | } 28 | export declare const set: CollectionTag; 29 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts: -------------------------------------------------------------------------------- 1 | import type { ScalarTag } from '../types'; 2 | export declare const intTime: ScalarTag; 3 | export declare const floatTime: ScalarTag; 4 | export declare const timestamp: ScalarTag & { 5 | test: RegExp; 6 | }; 7 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/stringify/foldFlowLines.d.ts: -------------------------------------------------------------------------------- 1 | export declare const FOLD_FLOW = "flow"; 2 | export declare const FOLD_BLOCK = "block"; 3 | export declare const FOLD_QUOTED = "quoted"; 4 | /** 5 | * `'block'` prevents more-indented lines from being folded; 6 | * `'quoted'` allows for `\` escapes, including escaped newlines 7 | */ 8 | export type FoldMode = 'flow' | 'block' | 'quoted'; 9 | export interface FoldOptions { 10 | /** 11 | * Accounts for leading contents on the first line, defaulting to 12 | * `indent.length` 13 | */ 14 | indentAtStart?: number; 15 | /** Default: `80` */ 16 | lineWidth?: number; 17 | /** 18 | * Allow highly indented lines to stretch the line width or indent content 19 | * from the start. 20 | * 21 | * Default: `20` 22 | */ 23 | minContentWidth?: number; 24 | /** Called once if the text is folded */ 25 | onFold?: () => void; 26 | /** Called once if any line of text exceeds lineWidth characters */ 27 | onOverflow?: () => void; 28 | } 29 | /** 30 | * Tries to keep input at up to `lineWidth` characters, splitting only on spaces 31 | * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are 32 | * terminated with `\n` and started with `indent`. 33 | */ 34 | export declare function foldFlowLines(text: string, indent: string, mode?: FoldMode, { indentAtStart, lineWidth, minContentWidth, onFold, onOverflow }?: FoldOptions): string; 35 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/stringify/stringify.d.ts: -------------------------------------------------------------------------------- 1 | import type { Document } from '../doc/Document'; 2 | import type { Alias } from '../nodes/Alias'; 3 | import type { ToStringOptions } from '../options'; 4 | export type StringifyContext = { 5 | actualString?: boolean; 6 | allNullValues?: boolean; 7 | anchors: Set; 8 | doc: Document; 9 | forceBlockIndent?: boolean; 10 | implicitKey?: boolean; 11 | indent: string; 12 | indentStep: string; 13 | indentAtStart?: number; 14 | inFlow: boolean | null; 15 | inStringifyKey?: boolean; 16 | flowCollectionPadding: string; 17 | options: Readonly>>; 18 | resolvedAliases?: Set; 19 | }; 20 | export declare function createStringifyContext(doc: Document, options: ToStringOptions): StringifyContext; 21 | export declare function stringify(item: unknown, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; 22 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/stringify/stringifyCollection.d.ts: -------------------------------------------------------------------------------- 1 | import type { Collection } from '../nodes/Collection'; 2 | import type { StringifyContext } from './stringify'; 3 | interface StringifyCollectionOptions { 4 | blockItemPrefix: string; 5 | flowChars: { 6 | start: '{'; 7 | end: '}'; 8 | } | { 9 | start: '['; 10 | end: ']'; 11 | }; 12 | itemIndent: string; 13 | onChompKeep?: () => void; 14 | onComment?: () => void; 15 | } 16 | export declare function stringifyCollection(collection: Readonly, ctx: StringifyContext, options: StringifyCollectionOptions): string; 17 | export {}; 18 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/stringify/stringifyComment.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Stringifies a comment. 3 | * 4 | * Empty comment lines are left empty, 5 | * lines consisting of a single space are replaced by `#`, 6 | * and all other lines are prefixed with a `#`. 7 | */ 8 | export declare const stringifyComment: (str: string) => string; 9 | export declare function indentComment(comment: string, indent: string): string; 10 | export declare const lineComment: (str: string, indent: string, comment: string) => string; 11 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/stringify/stringifyComment.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Stringifies a comment. 5 | * 6 | * Empty comment lines are left empty, 7 | * lines consisting of a single space are replaced by `#`, 8 | * and all other lines are prefixed with a `#`. 9 | */ 10 | const stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#'); 11 | function indentComment(comment, indent) { 12 | if (/^\n+$/.test(comment)) 13 | return comment.substring(1); 14 | return indent ? comment.replace(/^(?! *$)/gm, indent) : comment; 15 | } 16 | const lineComment = (str, indent, comment) => str.endsWith('\n') 17 | ? indentComment(comment, indent) 18 | : comment.includes('\n') 19 | ? '\n' + indentComment(comment, indent) 20 | : (str.endsWith(' ') ? '' : ' ') + comment; 21 | 22 | exports.indentComment = indentComment; 23 | exports.lineComment = lineComment; 24 | exports.stringifyComment = stringifyComment; 25 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/stringify/stringifyDocument.d.ts: -------------------------------------------------------------------------------- 1 | import type { Document } from '../doc/Document'; 2 | import type { Node } from '../nodes/Node'; 3 | import type { ToStringOptions } from '../options'; 4 | export declare function stringifyDocument(doc: Readonly>, options: ToStringOptions): string; 5 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/stringify/stringifyNumber.d.ts: -------------------------------------------------------------------------------- 1 | import type { Scalar } from '../nodes/Scalar'; 2 | export declare function stringifyNumber({ format, minFractionDigits, tag, value }: Scalar): string; 3 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/stringify/stringifyNumber.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function stringifyNumber({ format, minFractionDigits, tag, value }) { 4 | if (typeof value === 'bigint') 5 | return String(value); 6 | const num = typeof value === 'number' ? value : Number(value); 7 | if (!isFinite(num)) 8 | return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf'; 9 | let n = JSON.stringify(value); 10 | if (!format && 11 | minFractionDigits && 12 | (!tag || tag === 'tag:yaml.org,2002:float') && 13 | /^\d/.test(n)) { 14 | let i = n.indexOf('.'); 15 | if (i < 0) { 16 | i = n.length; 17 | n += '.'; 18 | } 19 | let d = minFractionDigits - (n.length - i - 1); 20 | while (d-- > 0) 21 | n += '0'; 22 | } 23 | return n; 24 | } 25 | 26 | exports.stringifyNumber = stringifyNumber; 27 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/stringify/stringifyPair.d.ts: -------------------------------------------------------------------------------- 1 | import type { Pair } from '../nodes/Pair'; 2 | import type { StringifyContext } from './stringify'; 3 | export declare function stringifyPair({ key, value }: Readonly, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; 4 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/stringify/stringifyString.d.ts: -------------------------------------------------------------------------------- 1 | import { Scalar } from '../nodes/Scalar'; 2 | import type { StringifyContext } from './stringify'; 3 | interface StringifyScalar { 4 | value: string; 5 | comment?: string | null; 6 | type?: string; 7 | } 8 | export declare function stringifyString(item: Scalar | StringifyScalar, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; 9 | export {}; 10 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/test-events.d.ts: -------------------------------------------------------------------------------- 1 | export declare function testEvents(src: string): { 2 | events: string[]; 3 | error: unknown; 4 | }; 5 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/util.d.ts: -------------------------------------------------------------------------------- 1 | export { createNode } from './doc/createNode'; 2 | export type { CreateNodeContext } from './doc/createNode'; 3 | export { debug, warn } from './log'; 4 | export type { LogLevelId } from './log'; 5 | export { createPair } from './nodes/Pair'; 6 | export { toJS } from './nodes/toJS'; 7 | export type { ToJSContext } from './nodes/toJS'; 8 | export { findPair } from './nodes/YAMLMap'; 9 | export { map as mapTag } from './schema/common/map'; 10 | export { seq as seqTag } from './schema/common/seq'; 11 | export { string as stringTag } from './schema/common/string'; 12 | export { foldFlowLines } from './stringify/foldFlowLines'; 13 | export type { FoldOptions } from './stringify/foldFlowLines'; 14 | export type { StringifyContext } from './stringify/stringify'; 15 | export { stringifyNumber } from './stringify/stringifyNumber'; 16 | export { stringifyString } from './stringify/stringifyString'; 17 | -------------------------------------------------------------------------------- /node_modules/yaml/dist/util.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var createNode = require('./doc/createNode.js'); 4 | var log = require('./log.js'); 5 | var Pair = require('./nodes/Pair.js'); 6 | var toJS = require('./nodes/toJS.js'); 7 | var YAMLMap = require('./nodes/YAMLMap.js'); 8 | var map = require('./schema/common/map.js'); 9 | var seq = require('./schema/common/seq.js'); 10 | var string = require('./schema/common/string.js'); 11 | var foldFlowLines = require('./stringify/foldFlowLines.js'); 12 | var stringifyNumber = require('./stringify/stringifyNumber.js'); 13 | var stringifyString = require('./stringify/stringifyString.js'); 14 | 15 | 16 | 17 | exports.createNode = createNode.createNode; 18 | exports.debug = log.debug; 19 | exports.warn = log.warn; 20 | exports.createPair = Pair.createPair; 21 | exports.toJS = toJS.toJS; 22 | exports.findPair = YAMLMap.findPair; 23 | exports.mapTag = map.map; 24 | exports.seqTag = seq.seq; 25 | exports.stringTag = string.string; 26 | exports.foldFlowLines = foldFlowLines.foldFlowLines; 27 | exports.stringifyNumber = stringifyNumber.stringifyNumber; 28 | exports.stringifyString = stringifyString.stringifyString; 29 | -------------------------------------------------------------------------------- /node_modules/yaml/util.js: -------------------------------------------------------------------------------- 1 | // Re-exporter for Node.js < 12.16.0 2 | module.exports = require('./dist/util.js') 3 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "action-ansible-playbook", 3 | "main": "main.js", 4 | "dependencies": { 5 | "@actions/core": "^1.11.1", 6 | "@actions/exec": "^1.1.1", 7 | "yaml": "^2.8.1" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /post.js: -------------------------------------------------------------------------------- 1 | const core = require('@actions/core') 2 | const fs = require('fs') 3 | 4 | function rm(file) { 5 | if (fs.existsSync(file)) { 6 | core.info(`Deleting "${file}" file`) 7 | fs.unlinkSync(file) 8 | } 9 | } 10 | 11 | async function main() { 12 | try { 13 | const directory = core.getState("directory") 14 | const ansibleConfigurationFile = core.getState("ansibleConfigurationFile") 15 | const keyFile = core.getState("keyFile") 16 | const inventoryFile = core.getState("inventoryFile") 17 | const vaultPasswordFile = core.getState("vaultPasswordFile") 18 | const knownHostsFile = core.getState("knownHostsFile") 19 | 20 | if (directory) 21 | process.chdir(directory) 22 | 23 | if (ansibleConfigurationFile) 24 | rm(ansibleConfigurationFile) 25 | 26 | if (keyFile) 27 | rm(keyFile) 28 | 29 | if (inventoryFile) 30 | rm(inventoryFile) 31 | 32 | if (vaultPasswordFile) 33 | rm(vaultPasswordFile) 34 | 35 | if (knownHostsFile) 36 | rm(knownHostsFile) 37 | 38 | } catch (error) { 39 | core.setFailed(error.message) 40 | } 41 | } 42 | 43 | main() 44 | -------------------------------------------------------------------------------- /test/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer 3 | stdout_callback = yaml 4 | nocows = false 5 | -------------------------------------------------------------------------------- /test/hosts: -------------------------------------------------------------------------------- 1 | [local] 2 | localhost ansible_connection=local -------------------------------------------------------------------------------- /test/playbook.yml: -------------------------------------------------------------------------------- 1 | - name: Test Action 2 | hosts: all 3 | tasks: 4 | - name: Copy file 5 | copy: 6 | src: requirements.yml 7 | dest: /tmp/requirements.yml 8 | - name: Install cowsay 9 | become: yes 10 | apt: 11 | name: cowsay 12 | update_cache: yes 13 | -------------------------------------------------------------------------------- /test/requirements-bundle.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/user_guide/collections_using.html 2 | roles: 3 | # Install a role from Ansible Galaxy. 4 | - name: geerlingguy.java 5 | version: 1.9.6 6 | 7 | collections: 8 | # Install a collection from Ansible Galaxy. 9 | - name: geerlingguy.php_roles 10 | version: 0.9.3 11 | source: https://galaxy.ansible.com 12 | -------------------------------------------------------------------------------- /test/requirements.yml: -------------------------------------------------------------------------------- 1 | # https://galaxy.ansible.com/docs/using/installing.html 2 | - src: https://github.com/bennojoy/nginx 3 | version: master 4 | name: nginx_role 5 | --------------------------------------------------------------------------------