├── .gitattributes ├── .github └── workflows │ ├── check-dist.yml │ └── test.yml ├── .gitignore ├── LICENSE ├── README.md ├── action.yml ├── dist ├── index.js ├── index.js.map ├── licenses.txt └── sourcemap-register.js ├── examples ├── basic.yml ├── multi-repo.yml └── sage.yml ├── index.js ├── index.test.js ├── package-lock.json ├── package.json └── renovate.json /.gitattributes: -------------------------------------------------------------------------------- 1 | dist/** -diff linguist-generated=true -------------------------------------------------------------------------------- /.github/workflows/check-dist.yml: -------------------------------------------------------------------------------- 1 | name: Check dist/ 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths-ignore: 8 | - '**.md' 9 | pull_request: 10 | paths-ignore: 11 | - '**.md' 12 | workflow_dispatch: 13 | 14 | jobs: 15 | check-dist: 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | - uses: actions/checkout@v4 20 | 21 | - uses: actions/setup-node@v4 22 | with: 23 | node-version: 22.x 24 | 25 | - name: Install dependencies 26 | run: npm ci 27 | 28 | - name: Rebuild the dist/ directory 29 | run: npm run prepare 30 | 31 | - name: Compare the expected and actual dist/ directories 32 | run: | 33 | if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then 34 | echo "Detected uncommitted changes after build. See status below:" 35 | git diff 36 | exit 1 37 | fi 38 | id: diff 39 | 40 | # If index.js was different than expected, upload the expected version as an artifact 41 | - uses: actions/upload-artifact@v4 42 | if: ${{ failure() && steps.diff.conclusion == 'failure' }} 43 | with: 44 | name: dist 45 | path: dist/ 46 | overwrite: true 47 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | on: 3 | pull_request: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | test: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | with: 14 | fetch-depth: 0 15 | - uses: actions/setup-node@v4 16 | with: 17 | node-version: 22.x 18 | - run: mkdir trellis 19 | - uses: ./ 20 | with: 21 | ansible-vault-password: fake 22 | auto-init: false 23 | galaxy-install: false 24 | repo-token: ${{ secrets.GITHUB_TOKEN }} 25 | test-with-trellis: 26 | runs-on: ubuntu-latest 27 | steps: 28 | - uses: actions/checkout@v4 29 | with: 30 | fetch-depth: 0 31 | - uses: actions/setup-node@v4 32 | with: 33 | node-version: 20.x 34 | - run: git clone https://github.com/roots/trellis.git 35 | - uses: ./ 36 | with: 37 | ansible-vault-password: fake 38 | repo-token: ${{ secrets.GITHUB_TOKEN }} 39 | test-with-trellis-no-galaxy: 40 | runs-on: ubuntu-latest 41 | steps: 42 | - uses: actions/checkout@v4 43 | with: 44 | fetch-depth: 0 45 | - uses: actions/setup-node@v4 46 | with: 47 | node-version: 20.x 48 | - run: git clone https://github.com/roots/trellis.git 49 | - uses: ./ 50 | with: 51 | ansible-vault-password: fake 52 | galaxy-install: false 53 | repo-token: ${{ secrets.GITHUB_TOKEN }} 54 | test-with-trellis-no-auto-init: 55 | runs-on: ubuntu-latest 56 | steps: 57 | - uses: actions/checkout@v4 58 | with: 59 | fetch-depth: 0 60 | - uses: actions/setup-node@v4 61 | with: 62 | node-version: 20.x 63 | - run: git clone https://github.com/roots/trellis.git 64 | - uses: ./ 65 | with: 66 | ansible-vault-password: fake 67 | auto-init: false 68 | repo-token: ${{ secrets.GITHUB_TOKEN }} 69 | test-with-trellis-no-cache-virtualenv: 70 | runs-on: ubuntu-latest 71 | steps: 72 | - uses: actions/checkout@v4 73 | with: 74 | fetch-depth: 0 75 | - uses: actions/setup-node@v4 76 | with: 77 | node-version: 20.x 78 | - run: git clone https://github.com/roots/trellis.git 79 | - uses: ./ 80 | with: 81 | ansible-vault-password: fake 82 | cache-virtualenv: false 83 | repo-token: ${{ secrets.GITHUB_TOKEN }} 84 | test-no-repo-token: 85 | runs-on: ubuntu-latest 86 | steps: 87 | - uses: actions/checkout@v4 88 | with: 89 | fetch-depth: 0 90 | - uses: actions/setup-node@v4 91 | with: 92 | node-version: 20.x 93 | - run: mkdir trellis 94 | - uses: ./ 95 | with: 96 | ansible-vault-password: fake 97 | auto-init: false 98 | galaxy-install: false 99 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | 3 | # Logs 4 | logs 5 | *.log 6 | npm-debug.log* 7 | yarn-debug.log* 8 | yarn-error.log* 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Roots Software LLC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # setup-trellis-cli 2 | 3 | [![Build status](https://img.shields.io/github/actions/workflow/status/roots/setup-trellis-cli/test.yml?branch=main&style=flat-square)](https://github.com/roots/setup-trellis-cli/actions) 4 | ![GitHub release](https://img.shields.io/github/release/roots/setup-trellis-cli?style=flat-square) 5 | 6 | The `roots/setup-trellis-cli` action is a JavaScript action that sets up [Trellis CLI](https://github.com/roots/trellis-cli) in your GitHub Actions workflow by: 7 | 8 | * Downloading a specific version of trellis-cli (defaults the latest) and adding it to the `PATH`. 9 | * Creating a `.vault_pass` file with your Ansible Vault password input. 10 | * Initializing the [Trellis](https://github.com/roots/trellis) project in the GitHub repo by running the `trellis init` command. 11 | * Creates a virtual environment and installs dependencies (mainly Ansible) with automatic caching. 12 | * Installs Ansible galaxy roles by running `trellis galaxy install` with automatic caching. 13 | 14 | See the [**Deploying Trellis WordPress Sites with GitHub Actions guide**](https://roots.io/trellis/docs/deploy-with-github-actions/). 15 | 16 | ## Example usage 17 | 18 | ```yaml 19 | runs-on: ubuntu-latest 20 | steps: 21 | - uses: actions/checkout@v2 22 | - uses: roots/setup-trellis-cli@v1 23 | with: 24 | ansible-vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} 25 | repo-token: ${{ secrets.GITHUB_TOKEN }} 26 | - run: trellis deploy production 27 | ``` 28 | 29 | See the [examples](./examples) for some full workflow examples including a site 30 | with a [Sage](https://github.com/roots/sage)-based theme and a project 31 | with a [multi-repo](https://github.com/roots/trellis/issues/883#issuecomment-329054858) [setup](https://github.com/roots/trellis/issues/883#issuecomment-329052189). 32 | 33 | See [Workflow syntax for GitHub Actions](https://help.github.com/en/articles/workflow-syntax-for-github-actions) for more details on writing GitHub workflows. 34 | 35 | ## Setup 36 | 37 | ## Inputs 38 | 39 | #### `ansible-vault-password` 40 | **Required** Ansible Vault password. Use a [GitHub secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets) for this value (example in usage 41 | above). 42 | 43 | This can also be set using the GitHub CLI: 44 | 45 | ```bash 46 | gh secret set ANSIBLE_VAULT_PASSWORD -b $(cat trellis/.vault_pass) 47 | ``` 48 | 49 | Note: this is a required input even if you don't use Ansible Vault. Just set 50 | this to any random placeholder string. 51 | 52 | #### `repo-token` 53 | Optionally set the GitHub token for API authorization. Setting this token will avoid any potential API rate limits. 54 | 55 | The best option is to set this to the default token secret which GitHub automatically sets: `secrets.GITHUB_TOKEN`. 56 | 57 | See https://docs.github.com/en/actions/security-guides/automatic-token-authentication 58 | 59 | #### `auto-init` 60 | Whether to automatically run the `trellis init` command after install. 61 | 62 | **Default**: `true` 63 | 64 | If you want to manage dependencies manually yourself, disable this option. 65 | 66 | #### `cache-virtualenv` 67 | When enabled, the virtualenv created by the `trellis init` command is automatically 68 | cached. 69 | 70 | **Default**: `true` 71 | 72 | #### `galaxy-install` 73 | Whether to automatically run the `trellis galaxy install` command to install 74 | Ansible Galaxy roles. 75 | 76 | **Default**: `true` 77 | 78 | #### `trellis-directory` 79 | Path to the Trellis project directory. This defaults to `trellis` to match the default directory structure of a project created with `trellis new`. 80 | 81 | **Default**: `trellis` 82 | 83 | #### `version` 84 | Version of Trellis CLI to install. See 85 | [Releases](https://github.com/roots/trellis-cli/releases) for all possible 86 | versions. 87 | 88 | Note: if you want a specific version, include the 'v' in the version name (eg: 89 | `v1.5.1`). 90 | 91 | **Default**: `latest` 92 | 93 | ## SSH known hosts 94 | Most usages of this action will require SSH known hosts to be set, including the example workflow which uses `shimataro/ssh-key-action`. 95 | 96 | Since the GitHub Action runner will be the client SSHing into your remote Trellis server, this is needed to allow a connection from GitHub -> your server, which means the known host is for the remote server hostname. 97 | 98 | This value is _not_ just the hostname/IP, it needs be in OpenSSH format which looks like this: 99 | 100 | ```plain 101 | example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl 102 | ``` 103 | 104 | Or the hashed output: 105 | ```plain 106 | |1|nLf9avvc+tz8nFgUW/3tPwjTA4Q=|dLZn1guXUrBjLg4s23ird724guA= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl 107 | ``` 108 | 109 | There's a few ways to get this value: 110 | 111 | 1. using trellis-cli: 112 | ```bash 113 | trellis key generate 114 | ``` 115 | 2. manually using `ssh-keyscan`: 116 | ```bash 117 | ssh-keyscan -t ed25519 -H MY_SERVER_HOSTNAME 118 | ``` 119 | 3. from your `~/.ssh/known_hosts` file (if you've previously SSH'd into the server): 120 | 121 | Note: always use a GitHub secret to store this value. Do not hardcode the plain 122 | text value in your workflow file. `trellis key generate` will use a secret 123 | automatically. 124 | 125 | ## Outputs 126 | 127 | #### `version` 128 | The Trellis CLI version installed. Example: `v1.5.1` 129 | 130 | ## Contributing 131 | 132 | Contributions are welcome from everyone. We have [contributing guidelines](https://github.com/roots/guidelines/blob/master/CONTRIBUTING.md) to help you get started. 133 | 134 | ## Community 135 | 136 | Keep track of development and community news. 137 | 138 | - Join us on Roots Slack by becoming a [GitHub sponsor](https://github.com/sponsors/roots) or [patron](https://www.patreon.com/rootsdev) 139 | - Participate on the [Roots Discourse](https://discourse.roots.io/) 140 | - Follow [@rootswp on Twitter](https://twitter.com/rootswp) 141 | - Read and subscribe to the [Roots Blog](https://roots.io/blog/) 142 | - Subscribe to the [Roots Newsletter](https://roots.io/subscribe/) 143 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Roots - Setup trellis-cli' 2 | description: 'Sets up Trellis CLI in your GitHub Actions workflow.' 3 | author: Scott Walkinshaw 4 | branding: 5 | icon: 'package' 6 | color: 'blue' 7 | inputs: 8 | auto-init: 9 | description: 'Whether to automatically run the `init` command after install (default: true).' 10 | required: false 11 | default: true 12 | ansible-vault-password: 13 | description: 'Ansible Vault password (use a GitHub secret for this value). If you do not use Vault, set a placeholder string value anyway.' 14 | required: true 15 | cache-virtualenv: 16 | description: 'Caches the trellis-cli managed virtualenv (default: true).' 17 | required: false 18 | default: true 19 | galaxy-install: 20 | description: 'Whether to automatically run `trellix galaxy install` (default: true).' 21 | required: false 22 | default: true 23 | repo-token: 24 | description: 'GitHub repository access token used for API authentication. Set this to avoid API rate limits.' 25 | required: false 26 | trellis-directory: 27 | description: 'Path to Trellis project directory' 28 | required: false 29 | default: 'trellis' 30 | version: 31 | description: 'Version of Trellis CLI to install' 32 | required: false 33 | default: 'latest' 34 | outputs: 35 | version: 36 | description: 'The CLI version installed' 37 | runs: 38 | using: 'node20' 39 | main: 'dist/index.js' 40 | -------------------------------------------------------------------------------- /dist/licenses.txt: -------------------------------------------------------------------------------- 1 | @actions/cache 2 | MIT 3 | The MIT License (MIT) 4 | 5 | Copyright 2019 GitHub 6 | 7 | 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: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 10 | 11 | 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. 12 | 13 | @actions/core 14 | MIT 15 | The MIT License (MIT) 16 | 17 | Copyright 2019 GitHub 18 | 19 | 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: 20 | 21 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 22 | 23 | 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. 24 | 25 | @actions/exec 26 | MIT 27 | The MIT License (MIT) 28 | 29 | Copyright 2019 GitHub 30 | 31 | 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: 32 | 33 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 34 | 35 | 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. 36 | 37 | @actions/glob 38 | MIT 39 | The MIT License (MIT) 40 | 41 | Copyright 2019 GitHub 42 | 43 | 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: 44 | 45 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 46 | 47 | 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. 48 | 49 | @actions/http-client 50 | MIT 51 | Actions Http Client for Node.js 52 | 53 | Copyright (c) GitHub, Inc. 54 | 55 | All rights reserved. 56 | 57 | MIT License 58 | 59 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 60 | associated documentation files (the "Software"), to deal in the Software without restriction, 61 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 62 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 63 | subject to the following conditions: 64 | 65 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 66 | 67 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 68 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 69 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 70 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 71 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 72 | 73 | 74 | @actions/io 75 | MIT 76 | The MIT License (MIT) 77 | 78 | Copyright 2019 GitHub 79 | 80 | 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: 81 | 82 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 83 | 84 | 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. 85 | 86 | @actions/tool-cache 87 | MIT 88 | The MIT License (MIT) 89 | 90 | Copyright 2019 GitHub 91 | 92 | 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: 93 | 94 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 95 | 96 | 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. 97 | 98 | @azure/abort-controller 99 | MIT 100 | The MIT License (MIT) 101 | 102 | Copyright (c) 2020 Microsoft 103 | 104 | Permission is hereby granted, free of charge, to any person obtaining a copy 105 | of this software and associated documentation files (the "Software"), to deal 106 | in the Software without restriction, including without limitation the rights 107 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 108 | copies of the Software, and to permit persons to whom the Software is 109 | furnished to do so, subject to the following conditions: 110 | 111 | The above copyright notice and this permission notice shall be included in all 112 | copies or substantial portions of the Software. 113 | 114 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 115 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 116 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 117 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 118 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 119 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 120 | SOFTWARE. 121 | 122 | 123 | @azure/core-auth 124 | MIT 125 | The MIT License (MIT) 126 | 127 | Copyright (c) 2020 Microsoft 128 | 129 | Permission is hereby granted, free of charge, to any person obtaining a copy 130 | of this software and associated documentation files (the "Software"), to deal 131 | in the Software without restriction, including without limitation the rights 132 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 133 | copies of the Software, and to permit persons to whom the Software is 134 | furnished to do so, subject to the following conditions: 135 | 136 | The above copyright notice and this permission notice shall be included in all 137 | copies or substantial portions of the Software. 138 | 139 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 140 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 141 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 142 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 143 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 144 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 145 | SOFTWARE. 146 | 147 | 148 | @azure/core-client 149 | MIT 150 | The MIT License (MIT) 151 | 152 | Copyright (c) 2020 Microsoft 153 | 154 | Permission is hereby granted, free of charge, to any person obtaining a copy 155 | of this software and associated documentation files (the "Software"), to deal 156 | in the Software without restriction, including without limitation the rights 157 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 158 | copies of the Software, and to permit persons to whom the Software is 159 | furnished to do so, subject to the following conditions: 160 | 161 | The above copyright notice and this permission notice shall be included in all 162 | copies or substantial portions of the Software. 163 | 164 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 165 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 166 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 167 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 168 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 169 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 170 | SOFTWARE. 171 | 172 | 173 | @azure/core-http-compat 174 | MIT 175 | The MIT License (MIT) 176 | 177 | Copyright (c) 2020 Microsoft 178 | 179 | Permission is hereby granted, free of charge, to any person obtaining a copy 180 | of this software and associated documentation files (the "Software"), to deal 181 | in the Software without restriction, including without limitation the rights 182 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 183 | copies of the Software, and to permit persons to whom the Software is 184 | furnished to do so, subject to the following conditions: 185 | 186 | The above copyright notice and this permission notice shall be included in all 187 | copies or substantial portions of the Software. 188 | 189 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 190 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 191 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 192 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 193 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 194 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 195 | SOFTWARE. 196 | 197 | 198 | @azure/core-lro 199 | MIT 200 | The MIT License (MIT) 201 | 202 | Copyright (c) 2020 Microsoft 203 | 204 | Permission is hereby granted, free of charge, to any person obtaining a copy 205 | of this software and associated documentation files (the "Software"), to deal 206 | in the Software without restriction, including without limitation the rights 207 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 208 | copies of the Software, and to permit persons to whom the Software is 209 | furnished to do so, subject to the following conditions: 210 | 211 | The above copyright notice and this permission notice shall be included in all 212 | copies or substantial portions of the Software. 213 | 214 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 215 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 216 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 217 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 218 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 219 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 220 | SOFTWARE. 221 | 222 | 223 | @azure/core-rest-pipeline 224 | MIT 225 | The MIT License (MIT) 226 | 227 | Copyright (c) 2020 Microsoft 228 | 229 | Permission is hereby granted, free of charge, to any person obtaining a copy 230 | of this software and associated documentation files (the "Software"), to deal 231 | in the Software without restriction, including without limitation the rights 232 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 233 | copies of the Software, and to permit persons to whom the Software is 234 | furnished to do so, subject to the following conditions: 235 | 236 | The above copyright notice and this permission notice shall be included in all 237 | copies or substantial portions of the Software. 238 | 239 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 240 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 241 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 242 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 243 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 244 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 245 | SOFTWARE. 246 | 247 | 248 | @azure/core-tracing 249 | MIT 250 | The MIT License (MIT) 251 | 252 | Copyright (c) 2020 Microsoft 253 | 254 | Permission is hereby granted, free of charge, to any person obtaining a copy 255 | of this software and associated documentation files (the "Software"), to deal 256 | in the Software without restriction, including without limitation the rights 257 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 258 | copies of the Software, and to permit persons to whom the Software is 259 | furnished to do so, subject to the following conditions: 260 | 261 | The above copyright notice and this permission notice shall be included in all 262 | copies or substantial portions of the Software. 263 | 264 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 265 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 266 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 267 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 268 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 269 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 270 | SOFTWARE. 271 | 272 | 273 | @azure/core-util 274 | MIT 275 | The MIT License (MIT) 276 | 277 | Copyright (c) 2020 Microsoft 278 | 279 | Permission is hereby granted, free of charge, to any person obtaining a copy 280 | of this software and associated documentation files (the "Software"), to deal 281 | in the Software without restriction, including without limitation the rights 282 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 283 | copies of the Software, and to permit persons to whom the Software is 284 | furnished to do so, subject to the following conditions: 285 | 286 | The above copyright notice and this permission notice shall be included in all 287 | copies or substantial portions of the Software. 288 | 289 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 290 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 291 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 292 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 293 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 294 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 295 | SOFTWARE. 296 | 297 | 298 | @azure/core-xml 299 | MIT 300 | The MIT License (MIT) 301 | 302 | Copyright (c) 2020 Microsoft 303 | 304 | Permission is hereby granted, free of charge, to any person obtaining a copy 305 | of this software and associated documentation files (the "Software"), to deal 306 | in the Software without restriction, including without limitation the rights 307 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 308 | copies of the Software, and to permit persons to whom the Software is 309 | furnished to do so, subject to the following conditions: 310 | 311 | The above copyright notice and this permission notice shall be included in all 312 | copies or substantial portions of the Software. 313 | 314 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 315 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 316 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 317 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 318 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 319 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 320 | SOFTWARE. 321 | 322 | 323 | @azure/logger 324 | MIT 325 | The MIT License (MIT) 326 | 327 | Copyright (c) 2020 Microsoft 328 | 329 | Permission is hereby granted, free of charge, to any person obtaining a copy 330 | of this software and associated documentation files (the "Software"), to deal 331 | in the Software without restriction, including without limitation the rights 332 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 333 | copies of the Software, and to permit persons to whom the Software is 334 | furnished to do so, subject to the following conditions: 335 | 336 | The above copyright notice and this permission notice shall be included in all 337 | copies or substantial portions of the Software. 338 | 339 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 340 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 341 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 342 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 343 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 344 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 345 | SOFTWARE. 346 | 347 | 348 | @azure/storage-blob 349 | MIT 350 | The MIT License (MIT) 351 | 352 | Copyright (c) 2020 Microsoft 353 | 354 | Permission is hereby granted, free of charge, to any person obtaining a copy 355 | of this software and associated documentation files (the "Software"), to deal 356 | in the Software without restriction, including without limitation the rights 357 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 358 | copies of the Software, and to permit persons to whom the Software is 359 | furnished to do so, subject to the following conditions: 360 | 361 | The above copyright notice and this permission notice shall be included in all 362 | copies or substantial portions of the Software. 363 | 364 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 365 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 366 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 367 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 368 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 369 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 370 | SOFTWARE. 371 | 372 | 373 | @fastify/busboy 374 | MIT 375 | Copyright Brian White. All rights reserved. 376 | 377 | Permission is hereby granted, free of charge, to any person obtaining a copy 378 | of this software and associated documentation files (the "Software"), to 379 | deal in the Software without restriction, including without limitation the 380 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 381 | sell copies of the Software, and to permit persons to whom the Software is 382 | furnished to do so, subject to the following conditions: 383 | 384 | The above copyright notice and this permission notice shall be included in 385 | all copies or substantial portions of the Software. 386 | 387 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 388 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 389 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 390 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 391 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 392 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 393 | IN THE SOFTWARE. 394 | 395 | @protobuf-ts/runtime 396 | (Apache-2.0 AND BSD-3-Clause) 397 | Apache License 398 | Version 2.0, January 2004 399 | http://www.apache.org/licenses/ 400 | 401 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 402 | 403 | 1. Definitions. 404 | 405 | "License" shall mean the terms and conditions for use, reproduction, 406 | and distribution as defined by Sections 1 through 9 of this document. 407 | 408 | "Licensor" shall mean the copyright owner or entity authorized by 409 | the copyright owner that is granting the License. 410 | 411 | "Legal Entity" shall mean the union of the acting entity and all 412 | other entities that control, are controlled by, or are under common 413 | control with that entity. For the purposes of this definition, 414 | "control" means (i) the power, direct or indirect, to cause the 415 | direction or management of such entity, whether by contract or 416 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 417 | outstanding shares, or (iii) beneficial ownership of such entity. 418 | 419 | "You" (or "Your") shall mean an individual or Legal Entity 420 | exercising permissions granted by this License. 421 | 422 | "Source" form shall mean the preferred form for making modifications, 423 | including but not limited to software source code, documentation 424 | source, and configuration files. 425 | 426 | "Object" form shall mean any form resulting from mechanical 427 | transformation or translation of a Source form, including but 428 | not limited to compiled object code, generated documentation, 429 | and conversions to other media types. 430 | 431 | "Work" shall mean the work of authorship, whether in Source or 432 | Object form, made available under the License, as indicated by a 433 | copyright notice that is included in or attached to the work 434 | (an example is provided in the Appendix below). 435 | 436 | "Derivative Works" shall mean any work, whether in Source or Object 437 | form, that is based on (or derived from) the Work and for which the 438 | editorial revisions, annotations, elaborations, or other modifications 439 | represent, as a whole, an original work of authorship. For the purposes 440 | of this License, Derivative Works shall not include works that remain 441 | separable from, or merely link (or bind by name) to the interfaces of, 442 | the Work and Derivative Works thereof. 443 | 444 | "Contribution" shall mean any work of authorship, including 445 | the original version of the Work and any modifications or additions 446 | to that Work or Derivative Works thereof, that is intentionally 447 | submitted to Licensor for inclusion in the Work by the copyright owner 448 | or by an individual or Legal Entity authorized to submit on behalf of 449 | the copyright owner. For the purposes of this definition, "submitted" 450 | means any form of electronic, verbal, or written communication sent 451 | to the Licensor or its representatives, including but not limited to 452 | communication on electronic mailing lists, source code control systems, 453 | and issue tracking systems that are managed by, or on behalf of, the 454 | Licensor for the purpose of discussing and improving the Work, but 455 | excluding communication that is conspicuously marked or otherwise 456 | designated in writing by the copyright owner as "Not a Contribution." 457 | 458 | "Contributor" shall mean Licensor and any individual or Legal Entity 459 | on behalf of whom a Contribution has been received by Licensor and 460 | subsequently incorporated within the Work. 461 | 462 | 2. Grant of Copyright License. Subject to the terms and conditions of 463 | this License, each Contributor hereby grants to You a perpetual, 464 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 465 | copyright license to reproduce, prepare Derivative Works of, 466 | publicly display, publicly perform, sublicense, and distribute the 467 | Work and such Derivative Works in Source or Object form. 468 | 469 | 3. Grant of Patent License. Subject to the terms and conditions of 470 | this License, each Contributor hereby grants to You a perpetual, 471 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 472 | (except as stated in this section) patent license to make, have made, 473 | use, offer to sell, sell, import, and otherwise transfer the Work, 474 | where such license applies only to those patent claims licensable 475 | by such Contributor that are necessarily infringed by their 476 | Contribution(s) alone or by combination of their Contribution(s) 477 | with the Work to which such Contribution(s) was submitted. If You 478 | institute patent litigation against any entity (including a 479 | cross-claim or counterclaim in a lawsuit) alleging that the Work 480 | or a Contribution incorporated within the Work constitutes direct 481 | or contributory patent infringement, then any patent licenses 482 | granted to You under this License for that Work shall terminate 483 | as of the date such litigation is filed. 484 | 485 | 4. Redistribution. You may reproduce and distribute copies of the 486 | Work or Derivative Works thereof in any medium, with or without 487 | modifications, and in Source or Object form, provided that You 488 | meet the following conditions: 489 | 490 | (a) You must give any other recipients of the Work or 491 | Derivative Works a copy of this License; and 492 | 493 | (b) You must cause any modified files to carry prominent notices 494 | stating that You changed the files; and 495 | 496 | (c) You must retain, in the Source form of any Derivative Works 497 | that You distribute, all copyright, patent, trademark, and 498 | attribution notices from the Source form of the Work, 499 | excluding those notices that do not pertain to any part of 500 | the Derivative Works; and 501 | 502 | (d) If the Work includes a "NOTICE" text file as part of its 503 | distribution, then any Derivative Works that You distribute must 504 | include a readable copy of the attribution notices contained 505 | within such NOTICE file, excluding those notices that do not 506 | pertain to any part of the Derivative Works, in at least one 507 | of the following places: within a NOTICE text file distributed 508 | as part of the Derivative Works; within the Source form or 509 | documentation, if provided along with the Derivative Works; or, 510 | within a display generated by the Derivative Works, if and 511 | wherever such third-party notices normally appear. The contents 512 | of the NOTICE file are for informational purposes only and 513 | do not modify the License. You may add Your own attribution 514 | notices within Derivative Works that You distribute, alongside 515 | or as an addendum to the NOTICE text from the Work, provided 516 | that such additional attribution notices cannot be construed 517 | as modifying the License. 518 | 519 | You may add Your own copyright statement to Your modifications and 520 | may provide additional or different license terms and conditions 521 | for use, reproduction, or distribution of Your modifications, or 522 | for any such Derivative Works as a whole, provided Your use, 523 | reproduction, and distribution of the Work otherwise complies with 524 | the conditions stated in this License. 525 | 526 | 5. Submission of Contributions. Unless You explicitly state otherwise, 527 | any Contribution intentionally submitted for inclusion in the Work 528 | by You to the Licensor shall be under the terms and conditions of 529 | this License, without any additional terms or conditions. 530 | Notwithstanding the above, nothing herein shall supersede or modify 531 | the terms of any separate license agreement you may have executed 532 | with Licensor regarding such Contributions. 533 | 534 | 6. Trademarks. This License does not grant permission to use the trade 535 | names, trademarks, service marks, or product names of the Licensor, 536 | except as required for reasonable and customary use in describing the 537 | origin of the Work and reproducing the content of the NOTICE file. 538 | 539 | 7. Disclaimer of Warranty. Unless required by applicable law or 540 | agreed to in writing, Licensor provides the Work (and each 541 | Contributor provides its Contributions) on an "AS IS" BASIS, 542 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 543 | implied, including, without limitation, any warranties or conditions 544 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 545 | PARTICULAR PURPOSE. You are solely responsible for determining the 546 | appropriateness of using or redistributing the Work and assume any 547 | risks associated with Your exercise of permissions under this License. 548 | 549 | 8. Limitation of Liability. In no event and under no legal theory, 550 | whether in tort (including negligence), contract, or otherwise, 551 | unless required by applicable law (such as deliberate and grossly 552 | negligent acts) or agreed to in writing, shall any Contributor be 553 | liable to You for damages, including any direct, indirect, special, 554 | incidental, or consequential damages of any character arising as a 555 | result of this License or out of the use or inability to use the 556 | Work (including but not limited to damages for loss of goodwill, 557 | work stoppage, computer failure or malfunction, or any and all 558 | other commercial damages or losses), even if such Contributor 559 | has been advised of the possibility of such damages. 560 | 561 | 9. Accepting Warranty or Additional Liability. While redistributing 562 | the Work or Derivative Works thereof, You may choose to offer, 563 | and charge a fee for, acceptance of support, warranty, indemnity, 564 | or other liability obligations and/or rights consistent with this 565 | License. However, in accepting such obligations, You may act only 566 | on Your own behalf and on Your sole responsibility, not on behalf 567 | of any other Contributor, and only if You agree to indemnify, 568 | defend, and hold each Contributor harmless for any liability 569 | incurred by, or claims asserted against, such Contributor by reason 570 | of your accepting any such warranty or additional liability. 571 | 572 | 573 | @protobuf-ts/runtime-rpc 574 | Apache-2.0 575 | Apache License 576 | Version 2.0, January 2004 577 | http://www.apache.org/licenses/ 578 | 579 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 580 | 581 | 1. Definitions. 582 | 583 | "License" shall mean the terms and conditions for use, reproduction, 584 | and distribution as defined by Sections 1 through 9 of this document. 585 | 586 | "Licensor" shall mean the copyright owner or entity authorized by 587 | the copyright owner that is granting the License. 588 | 589 | "Legal Entity" shall mean the union of the acting entity and all 590 | other entities that control, are controlled by, or are under common 591 | control with that entity. For the purposes of this definition, 592 | "control" means (i) the power, direct or indirect, to cause the 593 | direction or management of such entity, whether by contract or 594 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 595 | outstanding shares, or (iii) beneficial ownership of such entity. 596 | 597 | "You" (or "Your") shall mean an individual or Legal Entity 598 | exercising permissions granted by this License. 599 | 600 | "Source" form shall mean the preferred form for making modifications, 601 | including but not limited to software source code, documentation 602 | source, and configuration files. 603 | 604 | "Object" form shall mean any form resulting from mechanical 605 | transformation or translation of a Source form, including but 606 | not limited to compiled object code, generated documentation, 607 | and conversions to other media types. 608 | 609 | "Work" shall mean the work of authorship, whether in Source or 610 | Object form, made available under the License, as indicated by a 611 | copyright notice that is included in or attached to the work 612 | (an example is provided in the Appendix below). 613 | 614 | "Derivative Works" shall mean any work, whether in Source or Object 615 | form, that is based on (or derived from) the Work and for which the 616 | editorial revisions, annotations, elaborations, or other modifications 617 | represent, as a whole, an original work of authorship. For the purposes 618 | of this License, Derivative Works shall not include works that remain 619 | separable from, or merely link (or bind by name) to the interfaces of, 620 | the Work and Derivative Works thereof. 621 | 622 | "Contribution" shall mean any work of authorship, including 623 | the original version of the Work and any modifications or additions 624 | to that Work or Derivative Works thereof, that is intentionally 625 | submitted to Licensor for inclusion in the Work by the copyright owner 626 | or by an individual or Legal Entity authorized to submit on behalf of 627 | the copyright owner. For the purposes of this definition, "submitted" 628 | means any form of electronic, verbal, or written communication sent 629 | to the Licensor or its representatives, including but not limited to 630 | communication on electronic mailing lists, source code control systems, 631 | and issue tracking systems that are managed by, or on behalf of, the 632 | Licensor for the purpose of discussing and improving the Work, but 633 | excluding communication that is conspicuously marked or otherwise 634 | designated in writing by the copyright owner as "Not a Contribution." 635 | 636 | "Contributor" shall mean Licensor and any individual or Legal Entity 637 | on behalf of whom a Contribution has been received by Licensor and 638 | subsequently incorporated within the Work. 639 | 640 | 2. Grant of Copyright License. Subject to the terms and conditions of 641 | this License, each Contributor hereby grants to You a perpetual, 642 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 643 | copyright license to reproduce, prepare Derivative Works of, 644 | publicly display, publicly perform, sublicense, and distribute the 645 | Work and such Derivative Works in Source or Object form. 646 | 647 | 3. Grant of Patent License. Subject to the terms and conditions of 648 | this License, each Contributor hereby grants to You a perpetual, 649 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 650 | (except as stated in this section) patent license to make, have made, 651 | use, offer to sell, sell, import, and otherwise transfer the Work, 652 | where such license applies only to those patent claims licensable 653 | by such Contributor that are necessarily infringed by their 654 | Contribution(s) alone or by combination of their Contribution(s) 655 | with the Work to which such Contribution(s) was submitted. If You 656 | institute patent litigation against any entity (including a 657 | cross-claim or counterclaim in a lawsuit) alleging that the Work 658 | or a Contribution incorporated within the Work constitutes direct 659 | or contributory patent infringement, then any patent licenses 660 | granted to You under this License for that Work shall terminate 661 | as of the date such litigation is filed. 662 | 663 | 4. Redistribution. You may reproduce and distribute copies of the 664 | Work or Derivative Works thereof in any medium, with or without 665 | modifications, and in Source or Object form, provided that You 666 | meet the following conditions: 667 | 668 | (a) You must give any other recipients of the Work or 669 | Derivative Works a copy of this License; and 670 | 671 | (b) You must cause any modified files to carry prominent notices 672 | stating that You changed the files; and 673 | 674 | (c) You must retain, in the Source form of any Derivative Works 675 | that You distribute, all copyright, patent, trademark, and 676 | attribution notices from the Source form of the Work, 677 | excluding those notices that do not pertain to any part of 678 | the Derivative Works; and 679 | 680 | (d) If the Work includes a "NOTICE" text file as part of its 681 | distribution, then any Derivative Works that You distribute must 682 | include a readable copy of the attribution notices contained 683 | within such NOTICE file, excluding those notices that do not 684 | pertain to any part of the Derivative Works, in at least one 685 | of the following places: within a NOTICE text file distributed 686 | as part of the Derivative Works; within the Source form or 687 | documentation, if provided along with the Derivative Works; or, 688 | within a display generated by the Derivative Works, if and 689 | wherever such third-party notices normally appear. The contents 690 | of the NOTICE file are for informational purposes only and 691 | do not modify the License. You may add Your own attribution 692 | notices within Derivative Works that You distribute, alongside 693 | or as an addendum to the NOTICE text from the Work, provided 694 | that such additional attribution notices cannot be construed 695 | as modifying the License. 696 | 697 | You may add Your own copyright statement to Your modifications and 698 | may provide additional or different license terms and conditions 699 | for use, reproduction, or distribution of Your modifications, or 700 | for any such Derivative Works as a whole, provided Your use, 701 | reproduction, and distribution of the Work otherwise complies with 702 | the conditions stated in this License. 703 | 704 | 5. Submission of Contributions. Unless You explicitly state otherwise, 705 | any Contribution intentionally submitted for inclusion in the Work 706 | by You to the Licensor shall be under the terms and conditions of 707 | this License, without any additional terms or conditions. 708 | Notwithstanding the above, nothing herein shall supersede or modify 709 | the terms of any separate license agreement you may have executed 710 | with Licensor regarding such Contributions. 711 | 712 | 6. Trademarks. This License does not grant permission to use the trade 713 | names, trademarks, service marks, or product names of the Licensor, 714 | except as required for reasonable and customary use in describing the 715 | origin of the Work and reproducing the content of the NOTICE file. 716 | 717 | 7. Disclaimer of Warranty. Unless required by applicable law or 718 | agreed to in writing, Licensor provides the Work (and each 719 | Contributor provides its Contributions) on an "AS IS" BASIS, 720 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 721 | implied, including, without limitation, any warranties or conditions 722 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 723 | PARTICULAR PURPOSE. You are solely responsible for determining the 724 | appropriateness of using or redistributing the Work and assume any 725 | risks associated with Your exercise of permissions under this License. 726 | 727 | 8. Limitation of Liability. In no event and under no legal theory, 728 | whether in tort (including negligence), contract, or otherwise, 729 | unless required by applicable law (such as deliberate and grossly 730 | negligent acts) or agreed to in writing, shall any Contributor be 731 | liable to You for damages, including any direct, indirect, special, 732 | incidental, or consequential damages of any character arising as a 733 | result of this License or out of the use or inability to use the 734 | Work (including but not limited to damages for loss of goodwill, 735 | work stoppage, computer failure or malfunction, or any and all 736 | other commercial damages or losses), even if such Contributor 737 | has been advised of the possibility of such damages. 738 | 739 | 9. Accepting Warranty or Additional Liability. While redistributing 740 | the Work or Derivative Works thereof, You may choose to offer, 741 | and charge a fee for, acceptance of support, warranty, indemnity, 742 | or other liability obligations and/or rights consistent with this 743 | License. However, in accepting such obligations, You may act only 744 | on Your own behalf and on Your sole responsibility, not on behalf 745 | of any other Contributor, and only if You agree to indemnify, 746 | defend, and hold each Contributor harmless for any liability 747 | incurred by, or claims asserted against, such Contributor by reason 748 | of your accepting any such warranty or additional liability. 749 | 750 | 751 | agent-base 752 | MIT 753 | (The MIT License) 754 | 755 | Copyright (c) 2013 Nathan Rajlich 756 | 757 | Permission is hereby granted, free of charge, to any person obtaining 758 | a copy of this software and associated documentation files (the 759 | 'Software'), to deal in the Software without restriction, including 760 | without limitation the rights to use, copy, modify, merge, publish, 761 | distribute, sublicense, and/or sell copies of the Software, and to 762 | permit persons to whom the Software is furnished to do so, subject to 763 | the following conditions: 764 | 765 | The above copyright notice and this permission notice shall be 766 | included in all copies or substantial portions of the Software. 767 | 768 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 769 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 770 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 771 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 772 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 773 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 774 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 775 | 776 | balanced-match 777 | MIT 778 | (MIT) 779 | 780 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 781 | 782 | Permission is hereby granted, free of charge, to any person obtaining a copy of 783 | this software and associated documentation files (the "Software"), to deal in 784 | the Software without restriction, including without limitation the rights to 785 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 786 | of the Software, and to permit persons to whom the Software is furnished to do 787 | so, subject to the following conditions: 788 | 789 | The above copyright notice and this permission notice shall be included in all 790 | copies or substantial portions of the Software. 791 | 792 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 793 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 794 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 795 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 796 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 797 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 798 | SOFTWARE. 799 | 800 | 801 | brace-expansion 802 | MIT 803 | MIT License 804 | 805 | Copyright (c) 2013 Julian Gruber 806 | 807 | Permission is hereby granted, free of charge, to any person obtaining a copy 808 | of this software and associated documentation files (the "Software"), to deal 809 | in the Software without restriction, including without limitation the rights 810 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 811 | copies of the Software, and to permit persons to whom the Software is 812 | furnished to do so, subject to the following conditions: 813 | 814 | The above copyright notice and this permission notice shall be included in all 815 | copies or substantial portions of the Software. 816 | 817 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 818 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 819 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 820 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 821 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 822 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 823 | SOFTWARE. 824 | 825 | 826 | concat-map 827 | MIT 828 | This software is released under the MIT license: 829 | 830 | Permission is hereby granted, free of charge, to any person obtaining a copy of 831 | this software and associated documentation files (the "Software"), to deal in 832 | the Software without restriction, including without limitation the rights to 833 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 834 | the Software, and to permit persons to whom the Software is furnished to do so, 835 | subject to the following conditions: 836 | 837 | The above copyright notice and this permission notice shall be included in all 838 | copies or substantial portions of the Software. 839 | 840 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 841 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 842 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 843 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 844 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 845 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 846 | 847 | 848 | debug 849 | MIT 850 | (The MIT License) 851 | 852 | Copyright (c) 2014-2017 TJ Holowaychuk 853 | Copyright (c) 2018-2021 Josh Junon 854 | 855 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 856 | and associated documentation files (the 'Software'), to deal in the Software without restriction, 857 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 858 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 859 | subject to the following conditions: 860 | 861 | The above copyright notice and this permission notice shall be included in all copies or substantial 862 | portions of the Software. 863 | 864 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 865 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 866 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 867 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 868 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 869 | 870 | 871 | 872 | fast-xml-parser 873 | MIT 874 | MIT License 875 | 876 | Copyright (c) 2017 Amit Kumar Gupta 877 | 878 | Permission is hereby granted, free of charge, to any person obtaining a copy 879 | of this software and associated documentation files (the "Software"), to deal 880 | in the Software without restriction, including without limitation the rights 881 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 882 | copies of the Software, and to permit persons to whom the Software is 883 | furnished to do so, subject to the following conditions: 884 | 885 | The above copyright notice and this permission notice shall be included in all 886 | copies or substantial portions of the Software. 887 | 888 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 889 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 890 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 891 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 892 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 893 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 894 | SOFTWARE. 895 | 896 | 897 | has-flag 898 | MIT 899 | MIT License 900 | 901 | Copyright (c) Sindre Sorhus (sindresorhus.com) 902 | 903 | 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: 904 | 905 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 906 | 907 | 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. 908 | 909 | 910 | http-proxy-agent 911 | MIT 912 | (The MIT License) 913 | 914 | Copyright (c) 2013 Nathan Rajlich 915 | 916 | Permission is hereby granted, free of charge, to any person obtaining 917 | a copy of this software and associated documentation files (the 918 | 'Software'), to deal in the Software without restriction, including 919 | without limitation the rights to use, copy, modify, merge, publish, 920 | distribute, sublicense, and/or sell copies of the Software, and to 921 | permit persons to whom the Software is furnished to do so, subject to 922 | the following conditions: 923 | 924 | The above copyright notice and this permission notice shall be 925 | included in all copies or substantial portions of the Software. 926 | 927 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 928 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 929 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 930 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 931 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 932 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 933 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 934 | 935 | 936 | https-proxy-agent 937 | MIT 938 | (The MIT License) 939 | 940 | Copyright (c) 2013 Nathan Rajlich 941 | 942 | Permission is hereby granted, free of charge, to any person obtaining 943 | a copy of this software and associated documentation files (the 944 | 'Software'), to deal in the Software without restriction, including 945 | without limitation the rights to use, copy, modify, merge, publish, 946 | distribute, sublicense, and/or sell copies of the Software, and to 947 | permit persons to whom the Software is furnished to do so, subject to 948 | the following conditions: 949 | 950 | The above copyright notice and this permission notice shall be 951 | included in all copies or substantial portions of the Software. 952 | 953 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 954 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 955 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 956 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 957 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 958 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 959 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 960 | 961 | minimatch 962 | ISC 963 | The ISC License 964 | 965 | Copyright (c) Isaac Z. Schlueter and Contributors 966 | 967 | Permission to use, copy, modify, and/or distribute this software for any 968 | purpose with or without fee is hereby granted, provided that the above 969 | copyright notice and this permission notice appear in all copies. 970 | 971 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 972 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 973 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 974 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 975 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 976 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 977 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 978 | 979 | 980 | ms 981 | MIT 982 | The MIT License (MIT) 983 | 984 | Copyright (c) 2016 Zeit, Inc. 985 | 986 | Permission is hereby granted, free of charge, to any person obtaining a copy 987 | of this software and associated documentation files (the "Software"), to deal 988 | in the Software without restriction, including without limitation the rights 989 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 990 | copies of the Software, and to permit persons to whom the Software is 991 | furnished to do so, subject to the following conditions: 992 | 993 | The above copyright notice and this permission notice shall be included in all 994 | copies or substantial portions of the Software. 995 | 996 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 997 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 998 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 999 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1000 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1001 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1002 | SOFTWARE. 1003 | 1004 | 1005 | semver 1006 | ISC 1007 | The ISC License 1008 | 1009 | Copyright (c) Isaac Z. Schlueter and Contributors 1010 | 1011 | Permission to use, copy, modify, and/or distribute this software for any 1012 | purpose with or without fee is hereby granted, provided that the above 1013 | copyright notice and this permission notice appear in all copies. 1014 | 1015 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1016 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1017 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1018 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1019 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1020 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 1021 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1022 | 1023 | 1024 | strnum 1025 | MIT 1026 | MIT License 1027 | 1028 | Copyright (c) 2021 Natural Intelligence 1029 | 1030 | Permission is hereby granted, free of charge, to any person obtaining a copy 1031 | of this software and associated documentation files (the "Software"), to deal 1032 | in the Software without restriction, including without limitation the rights 1033 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1034 | copies of the Software, and to permit persons to whom the Software is 1035 | furnished to do so, subject to the following conditions: 1036 | 1037 | The above copyright notice and this permission notice shall be included in all 1038 | copies or substantial portions of the Software. 1039 | 1040 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1041 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1042 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1043 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1044 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1045 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1046 | SOFTWARE. 1047 | 1048 | 1049 | supports-color 1050 | MIT 1051 | MIT License 1052 | 1053 | Copyright (c) Sindre Sorhus (sindresorhus.com) 1054 | 1055 | 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: 1056 | 1057 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 1058 | 1059 | 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. 1060 | 1061 | 1062 | tslib 1063 | 0BSD 1064 | Copyright (c) Microsoft Corporation. 1065 | 1066 | Permission to use, copy, modify, and/or distribute this software for any 1067 | purpose with or without fee is hereby granted. 1068 | 1069 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 1070 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 1071 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 1072 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 1073 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 1074 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 1075 | PERFORMANCE OF THIS SOFTWARE. 1076 | 1077 | tunnel 1078 | MIT 1079 | The MIT License (MIT) 1080 | 1081 | Copyright (c) 2012 Koichi Kobayashi 1082 | 1083 | Permission is hereby granted, free of charge, to any person obtaining a copy 1084 | of this software and associated documentation files (the "Software"), to deal 1085 | in the Software without restriction, including without limitation the rights 1086 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1087 | copies of the Software, and to permit persons to whom the Software is 1088 | furnished to do so, subject to the following conditions: 1089 | 1090 | The above copyright notice and this permission notice shall be included in 1091 | all copies or substantial portions of the Software. 1092 | 1093 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1094 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1095 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1096 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1097 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1098 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 1099 | THE SOFTWARE. 1100 | 1101 | 1102 | undici 1103 | MIT 1104 | MIT License 1105 | 1106 | Copyright (c) Matteo Collina and Undici contributors 1107 | 1108 | Permission is hereby granted, free of charge, to any person obtaining a copy 1109 | of this software and associated documentation files (the "Software"), to deal 1110 | in the Software without restriction, including without limitation the rights 1111 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1112 | copies of the Software, and to permit persons to whom the Software is 1113 | furnished to do so, subject to the following conditions: 1114 | 1115 | The above copyright notice and this permission notice shall be included in all 1116 | copies or substantial portions of the Software. 1117 | 1118 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1119 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1120 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1121 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1122 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1123 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1124 | SOFTWARE. 1125 | -------------------------------------------------------------------------------- /dist/sourcemap-register.js: -------------------------------------------------------------------------------- 1 | (()=>{var e={296:e=>{var r=Object.prototype.toString;var n=typeof Buffer!=="undefined"&&typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return r.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,r,t){r>>>=0;var o=e.byteLength-r;if(o<0){throw new RangeError("'offset' is out of bounds")}if(t===undefined){t=o}else{t>>>=0;if(t>o){throw new RangeError("'length' is out of bounds")}}return n?Buffer.from(e.slice(r,r+t)):new Buffer(new Uint8Array(e.slice(r,r+t)))}function fromString(e,r){if(typeof r!=="string"||r===""){r="utf8"}if(!Buffer.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}return n?Buffer.from(e,r):new Buffer(e,r)}function bufferFrom(e,r,t){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,r,t)}if(typeof e==="string"){return fromString(e,r)}return n?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},599:(e,r,n)=>{e=n.nmd(e);var t=n(927).SourceMapConsumer;var o=n(928);var i;try{i=n(896);if(!i.existsSync||!i.readFileSync){i=null}}catch(e){}var a=n(296);function dynamicRequire(e,r){return e.require(r)}var u=false;var s=false;var l=false;var c="auto";var p={};var f={};var g=/^data:application\/json[^,]+base64,/;var d=[];var h=[];function isInBrowser(){if(c==="browser")return true;if(c==="node")return false;return typeof window!=="undefined"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function hasGlobalProcessEventEmitter(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function globalProcessVersion(){if(typeof process==="object"&&process!==null){return process.version}else{return""}}function globalProcessStderr(){if(typeof process==="object"&&process!==null){return process.stderr}}function globalProcessExit(e){if(typeof process==="object"&&process!==null&&typeof process.exit==="function"){return process.exit(e)}}function handlerExec(e){return function(r){for(var n=0;n"}var n=this.getLineNumber();if(n!=null){r+=":"+n;var t=this.getColumnNumber();if(t){r+=":"+t}}}var o="";var i=this.getFunctionName();var a=true;var u=this.isConstructor();var s=!(this.isToplevel()||u);if(s){var l=this.getTypeName();if(l==="[object Object]"){l="null"}var c=this.getMethodName();if(i){if(l&&i.indexOf(l)!=0){o+=l+"."}o+=i;if(c&&i.indexOf("."+c)!=i.length-c.length-1){o+=" [as "+c+"]"}}else{o+=l+"."+(c||"")}}else if(u){o+="new "+(i||"")}else if(i){o+=i}else{o+=r;a=false}if(a){o+=" ("+r+")"}return o}function cloneCallSite(e){var r={};Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(n){r[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]}));r.toString=CallSiteToString;return r}function wrapCallSite(e,r){if(r===undefined){r={nextPosition:null,curPosition:null}}if(e.isNative()){r.curPosition=null;return e}var n=e.getFileName()||e.getScriptNameOrSourceURL();if(n){var t=e.getLineNumber();var o=e.getColumnNumber()-1;var i=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;var a=i.test(globalProcessVersion())?0:62;if(t===1&&o>a&&!isInBrowser()&&!e.isEval()){o-=a}var u=mapSourcePosition({source:n,line:t,column:o});r.curPosition=u;e=cloneCallSite(e);var s=e.getFunctionName;e.getFunctionName=function(){if(r.nextPosition==null){return s()}return r.nextPosition.name||s()};e.getFileName=function(){return u.source};e.getLineNumber=function(){return u.line};e.getColumnNumber=function(){return u.column+1};e.getScriptNameOrSourceURL=function(){return u.source};return e}var l=e.isEval()&&e.getEvalOrigin();if(l){l=mapEvalOrigin(l);e=cloneCallSite(e);e.getEvalOrigin=function(){return l};return e}return e}function prepareStackTrace(e,r){if(l){p={};f={}}var n=e.name||"Error";var t=e.message||"";var o=n+": "+t;var i={nextPosition:null,curPosition:null};var a=[];for(var u=r.length-1;u>=0;u--){a.push("\n at "+wrapCallSite(r[u],i));i.nextPosition=i.curPosition}i.curPosition=i.nextPosition=null;return o+a.reverse().join("")}function getErrorSource(e){var r=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(r){var n=r[1];var t=+r[2];var o=+r[3];var a=p[n];if(!a&&i&&i.existsSync(n)){try{a=i.readFileSync(n,"utf8")}catch(e){a=""}}if(a){var u=a.split(/(?:\r\n|\r|\n)/)[t-1];if(u){return n+":"+t+"\n"+u+"\n"+new Array(o).join(" ")+"^"}}}return null}function printErrorAndExit(e){var r=getErrorSource(e);var n=globalProcessStderr();if(n&&n._handle&&n._handle.setBlocking){n._handle.setBlocking(true)}if(r){console.error();console.error(r)}console.error(e.stack);globalProcessExit(1)}function shimEmitUncaughtException(){var e=process.emit;process.emit=function(r){if(r==="uncaughtException"){var n=arguments[1]&&arguments[1].stack;var t=this.listeners(r).length>0;if(n&&!t){return printErrorAndExit(arguments[1])}}return e.apply(this,arguments)}}var S=d.slice(0);var _=h.slice(0);r.wrapCallSite=wrapCallSite;r.getErrorSource=getErrorSource;r.mapSourcePosition=mapSourcePosition;r.retrieveSourceMap=v;r.install=function(r){r=r||{};if(r.environment){c=r.environment;if(["node","browser","auto"].indexOf(c)===-1){throw new Error("environment "+c+" was unknown. Available options are {auto, browser, node}")}}if(r.retrieveFile){if(r.overrideRetrieveFile){d.length=0}d.unshift(r.retrieveFile)}if(r.retrieveSourceMap){if(r.overrideRetrieveSourceMap){h.length=0}h.unshift(r.retrieveSourceMap)}if(r.hookRequire&&!isInBrowser()){var n=dynamicRequire(e,"module");var t=n.prototype._compile;if(!t.__sourceMapSupport){n.prototype._compile=function(e,r){p[r]=e;f[r]=undefined;return t.call(this,e,r)};n.prototype._compile.__sourceMapSupport=true}}if(!l){l="emptyCacheBetweenOperations"in r?r.emptyCacheBetweenOperations:false}if(!u){u=true;Error.prepareStackTrace=prepareStackTrace}if(!s){var o="handleUncaughtExceptions"in r?r.handleUncaughtExceptions:true;try{var i=dynamicRequire(e,"worker_threads");if(i.isMainThread===false){o=false}}catch(e){}if(o&&hasGlobalProcessEventEmitter()){s=true;shimEmitUncaughtException()}}};r.resetRetrieveHandlers=function(){d.length=0;h.length=0;d=S.slice(0);h=_.slice(0);v=handlerExec(h);m=handlerExec(d)}},517:(e,r,n)=>{var t=n(297);var o=Object.prototype.hasOwnProperty;var i=typeof Map!=="undefined";function ArraySet(){this._array=[];this._set=i?new Map:Object.create(null)}ArraySet.fromArray=function ArraySet_fromArray(e,r){var n=new ArraySet;for(var t=0,o=e.length;t=0){return r}}else{var n=t.toSetString(e);if(o.call(this._set,n)){return this._set[n]}}throw new Error('"'+e+'" is not in the set.')};ArraySet.prototype.at=function ArraySet_at(e){if(e>=0&&e{var t=n(158);var o=5;var i=1<>1;return r?-n:n}r.encode=function base64VLQ_encode(e){var r="";var n;var i=toVLQSigned(e);do{n=i&a;i>>>=o;if(i>0){n|=u}r+=t.encode(n)}while(i>0);return r};r.decode=function base64VLQ_decode(e,r,n){var i=e.length;var s=0;var l=0;var c,p;do{if(r>=i){throw new Error("Expected more digits in base 64 VLQ value.")}p=t.decode(e.charCodeAt(r++));if(p===-1){throw new Error("Invalid base64 digit: "+e.charAt(r-1))}c=!!(p&u);p&=a;s=s+(p<{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e{r.GREATEST_LOWER_BOUND=1;r.LEAST_UPPER_BOUND=2;function recursiveSearch(e,n,t,o,i,a){var u=Math.floor((n-e)/2)+e;var s=i(t,o[u],true);if(s===0){return u}else if(s>0){if(n-u>1){return recursiveSearch(u,n,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return n1){return recursiveSearch(e,u,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return u}else{return e<0?-1:e}}}r.search=function search(e,n,t,o){if(n.length===0){return-1}var i=recursiveSearch(-1,n.length,e,n,t,o||r.GREATEST_LOWER_BOUND);if(i<0){return-1}while(i-1>=0){if(t(n[i],n[i-1],true)!==0){break}--i}return i}},24:(e,r,n)=>{var t=n(297);function generatedPositionAfter(e,r){var n=e.generatedLine;var o=r.generatedLine;var i=e.generatedColumn;var a=r.generatedColumn;return o>n||o==n&&a>=i||t.compareByGeneratedPositionsInflated(e,r)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(e,r){this._array.forEach(e,r)};MappingList.prototype.add=function MappingList_add(e){if(generatedPositionAfter(this._last,e)){this._last=e;this._array.push(e)}else{this._sorted=false;this._array.push(e)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(t.compareByGeneratedPositionsInflated);this._sorted=true}return this._array};r.P=MappingList},299:(e,r)=>{function swap(e,r,n){var t=e[r];e[r]=e[n];e[n]=t}function randomIntInRange(e,r){return Math.round(e+Math.random()*(r-e))}function doQuickSort(e,r,n,t){if(n{var t;var o=n(297);var i=n(197);var a=n(517).C;var u=n(818);var s=n(299).g;function SourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}return n.sections!=null?new IndexedSourceMapConsumer(n,r):new BasicSourceMapConsumer(n,r)}SourceMapConsumer.fromSourceMap=function(e,r){return BasicSourceMapConsumer.fromSourceMap(e,r)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){if(!this.__generatedMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){if(!this.__originalMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._charIsMappingSeparator=function SourceMapConsumer_charIsMappingSeparator(e,r){var n=e.charAt(r);return n===";"||n===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(e,r){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(e,r,n){var t=r||null;var i=n||SourceMapConsumer.GENERATED_ORDER;var a;switch(i){case SourceMapConsumer.GENERATED_ORDER:a=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;a.map((function(e){var r=e.source===null?null:this._sources.at(e.source);r=o.computeSourceURL(u,r,this._sourceMapURL);return{source:r,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}}),this).forEach(e,t)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(e){var r=o.getArg(e,"line");var n={source:o.getArg(e,"source"),originalLine:r,originalColumn:o.getArg(e,"column",0)};n.source=this._findSourceIndex(n.source);if(n.source<0){return[]}var t=[];var a=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(a>=0){var u=this._originalMappings[a];if(e.column===undefined){var s=u.originalLine;while(u&&u.originalLine===s){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}else{var l=u.originalColumn;while(u&&u.originalLine===r&&u.originalColumn==l){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}}return t};r.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sources");var u=o.getArg(n,"names",[]);var s=o.getArg(n,"sourceRoot",null);var l=o.getArg(n,"sourcesContent",null);var c=o.getArg(n,"mappings");var p=o.getArg(n,"file",null);if(t!=this._version){throw new Error("Unsupported version: "+t)}if(s){s=o.normalize(s)}i=i.map(String).map(o.normalize).map((function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}));this._names=a.fromArray(u.map(String),true);this._sources=a.fromArray(i,true);this._absoluteSources=this._sources.toArray().map((function(e){return o.computeSourceURL(s,e,r)}));this.sourceRoot=s;this.sourcesContent=l;this._mappings=c;this._sourceMapURL=r;this.file=p}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var r=e;if(this.sourceRoot!=null){r=o.relative(this.sourceRoot,r)}if(this._sources.has(r)){return this._sources.indexOf(r)}var n;for(n=0;n1){v.source=l+_[1];l+=_[1];v.originalLine=i+_[2];i=v.originalLine;v.originalLine+=1;v.originalColumn=a+_[3];a=v.originalColumn;if(_.length>4){v.name=c+_[4];c+=_[4]}}m.push(v);if(typeof v.originalLine==="number"){h.push(v)}}}s(m,o.compareByGeneratedPositionsDeflated);this.__generatedMappings=m;s(h,o.compareByOriginalPositions);this.__originalMappings=h};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(e,r,n,t,o,a){if(e[n]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+e[n])}if(e[t]<0){throw new TypeError("Column must be greater than or equal to 0, got "+e[t])}return i.search(e,r,o,a)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var e=0;e=0){var t=this._generatedMappings[n];if(t.generatedLine===r.generatedLine){var i=o.getArg(t,"source",null);if(i!==null){i=this._sources.at(i);i=o.computeSourceURL(this.sourceRoot,i,this._sourceMapURL)}var a=o.getArg(t,"name",null);if(a!==null){a=this._names.at(a)}return{source:i,line:o.getArg(t,"originalLine",null),column:o.getArg(t,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function BasicSourceMapConsumer_hasContentsOfAllSources(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return e==null}))};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(e,r){if(!this.sourcesContent){return null}var n=this._findSourceIndex(e);if(n>=0){return this.sourcesContent[n]}var t=e;if(this.sourceRoot!=null){t=o.relative(this.sourceRoot,t)}var i;if(this.sourceRoot!=null&&(i=o.urlParse(this.sourceRoot))){var a=t.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(a)){return this.sourcesContent[this._sources.indexOf(a)]}if((!i.path||i.path=="/")&&this._sources.has("/"+t)){return this.sourcesContent[this._sources.indexOf("/"+t)]}}if(r){return null}else{throw new Error('"'+t+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(e){var r=o.getArg(e,"source");r=this._findSourceIndex(r);if(r<0){return{line:null,column:null,lastColumn:null}}var n={source:r,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")};var t=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(t>=0){var i=this._originalMappings[t];if(i.source===n.source){return{line:o.getArg(i,"generatedLine",null),column:o.getArg(i,"generatedColumn",null),lastColumn:o.getArg(i,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};t=BasicSourceMapConsumer;function IndexedSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sections");if(t!=this._version){throw new Error("Unsupported version: "+t)}this._sources=new a;this._names=new a;var u={line:-1,column:0};this._sections=i.map((function(e){if(e.url){throw new Error("Support for url field in sections not implemented.")}var n=o.getArg(e,"offset");var t=o.getArg(n,"line");var i=o.getArg(n,"column");if(t{var t=n(818);var o=n(297);var i=n(517).C;var a=n(24).P;function SourceMapGenerator(e){if(!e){e={}}this._file=o.getArg(e,"file",null);this._sourceRoot=o.getArg(e,"sourceRoot",null);this._skipValidation=o.getArg(e,"skipValidation",false);this._sources=new i;this._names=new i;this._mappings=new a;this._sourcesContents=null}SourceMapGenerator.prototype._version=3;SourceMapGenerator.fromSourceMap=function SourceMapGenerator_fromSourceMap(e){var r=e.sourceRoot;var n=new SourceMapGenerator({file:e.file,sourceRoot:r});e.eachMapping((function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){t.source=e.source;if(r!=null){t.source=o.relative(r,t.source)}t.original={line:e.originalLine,column:e.originalColumn};if(e.name!=null){t.name=e.name}}n.addMapping(t)}));e.sources.forEach((function(t){var i=t;if(r!==null){i=o.relative(r,t)}if(!n._sources.has(i)){n._sources.add(i)}var a=e.sourceContentFor(t);if(a!=null){n.setSourceContent(t,a)}}));return n};SourceMapGenerator.prototype.addMapping=function SourceMapGenerator_addMapping(e){var r=o.getArg(e,"generated");var n=o.getArg(e,"original",null);var t=o.getArg(e,"source",null);var i=o.getArg(e,"name",null);if(!this._skipValidation){this._validateMapping(r,n,t,i)}if(t!=null){t=String(t);if(!this._sources.has(t)){this._sources.add(t)}}if(i!=null){i=String(i);if(!this._names.has(i)){this._names.add(i)}}this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:t,name:i})};SourceMapGenerator.prototype.setSourceContent=function SourceMapGenerator_setSourceContent(e,r){var n=e;if(this._sourceRoot!=null){n=o.relative(this._sourceRoot,n)}if(r!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[o.toSetString(n)]=r}else if(this._sourcesContents){delete this._sourcesContents[o.toSetString(n)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}};SourceMapGenerator.prototype.applySourceMap=function SourceMapGenerator_applySourceMap(e,r,n){var t=r;if(r==null){if(e.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}t=e.file}var a=this._sourceRoot;if(a!=null){t=o.relative(a,t)}var u=new i;var s=new i;this._mappings.unsortedForEach((function(r){if(r.source===t&&r.originalLine!=null){var i=e.originalPositionFor({line:r.originalLine,column:r.originalColumn});if(i.source!=null){r.source=i.source;if(n!=null){r.source=o.join(n,r.source)}if(a!=null){r.source=o.relative(a,r.source)}r.originalLine=i.line;r.originalColumn=i.column;if(i.name!=null){r.name=i.name}}}var l=r.source;if(l!=null&&!u.has(l)){u.add(l)}var c=r.name;if(c!=null&&!s.has(c)){s.add(c)}}),this);this._sources=u;this._names=s;e.sources.forEach((function(r){var t=e.sourceContentFor(r);if(t!=null){if(n!=null){r=o.join(n,r)}if(a!=null){r=o.relative(a,r)}this.setSourceContent(r,t)}}),this)};SourceMapGenerator.prototype._validateMapping=function SourceMapGenerator_validateMapping(e,r,n,t){if(r&&typeof r.line!=="number"&&typeof r.column!=="number"){throw new Error("original.line and original.column are not numbers -- you probably meant to omit "+"the original mapping entirely and only map the generated position. If so, pass "+"null for the original mapping instead of an object with empty or null values.")}if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!t){return}else if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:t}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var e=0;var r=1;var n=0;var i=0;var a=0;var u=0;var s="";var l;var c;var p;var f;var g=this._mappings.toArray();for(var d=0,h=g.length;d0){if(!o.compareByGeneratedPositionsInflated(c,g[d-1])){continue}l+=","}}l+=t.encode(c.generatedColumn-e);e=c.generatedColumn;if(c.source!=null){f=this._sources.indexOf(c.source);l+=t.encode(f-u);u=f;l+=t.encode(c.originalLine-1-i);i=c.originalLine-1;l+=t.encode(c.originalColumn-n);n=c.originalColumn;if(c.name!=null){p=this._names.indexOf(c.name);l+=t.encode(p-a);a=p}}s+=l}return s};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(e,r){return e.map((function(e){if(!this._sourcesContents){return null}if(r!=null){e=o.relative(r,e)}var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){e.file=this._file}if(this._sourceRoot!=null){e.sourceRoot=this._sourceRoot}if(this._sourcesContents){e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)}return e};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};r.x=SourceMapGenerator},565:(e,r,n)=>{var t;var o=n(163).x;var i=n(297);var a=/(\r?\n)/;var u=10;var s="$$$isSourceNode$$$";function SourceNode(e,r,n,t,o){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=r==null?null:r;this.source=n==null?null:n;this.name=o==null?null:o;this[s]=true;if(t!=null)this.add(t)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(e,r,n){var t=new SourceNode;var o=e.split(a);var u=0;var shiftNextLine=function(){var e=getNextLine();var r=getNextLine()||"";return e+r;function getNextLine(){return u=0;r--){this.prepend(e[r])}}else if(e[s]||typeof e==="string"){this.children.unshift(e)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this};SourceNode.prototype.walk=function SourceNode_walk(e){var r;for(var n=0,t=this.children.length;n0){r=[];for(n=0;n{function getArg(e,r,n){if(r in e){return e[r]}else if(arguments.length===3){return n}else{throw new Error('"'+r+'" is a required argument.')}}r.getArg=getArg;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var t=/^data:.+\,.+$/;function urlParse(e){var r=e.match(n);if(!r){return null}return{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}}r.urlParse=urlParse;function urlGenerate(e){var r="";if(e.scheme){r+=e.scheme+":"}r+="//";if(e.auth){r+=e.auth+"@"}if(e.host){r+=e.host}if(e.port){r+=":"+e.port}if(e.path){r+=e.path}return r}r.urlGenerate=urlGenerate;function normalize(e){var n=e;var t=urlParse(e);if(t){if(!t.path){return e}n=t.path}var o=r.isAbsolute(n);var i=n.split(/\/+/);for(var a,u=0,s=i.length-1;s>=0;s--){a=i[s];if(a==="."){i.splice(s,1)}else if(a===".."){u++}else if(u>0){if(a===""){i.splice(s+1,u);u=0}else{i.splice(s,2);u--}}}n=i.join("/");if(n===""){n=o?"/":"."}if(t){t.path=n;return urlGenerate(t)}return n}r.normalize=normalize;function join(e,r){if(e===""){e="."}if(r===""){r="."}var n=urlParse(r);var o=urlParse(e);if(o){e=o.path||"/"}if(n&&!n.scheme){if(o){n.scheme=o.scheme}return urlGenerate(n)}if(n||r.match(t)){return r}if(o&&!o.host&&!o.path){o.host=r;return urlGenerate(o)}var i=r.charAt(0)==="/"?r:normalize(e.replace(/\/+$/,"")+"/"+r);if(o){o.path=i;return urlGenerate(o)}return i}r.join=join;r.isAbsolute=function(e){return e.charAt(0)==="/"||n.test(e)};function relative(e,r){if(e===""){e="."}e=e.replace(/\/$/,"");var n=0;while(r.indexOf(e+"/")!==0){var t=e.lastIndexOf("/");if(t<0){return r}e=e.slice(0,t);if(e.match(/^([^\/]+:\/)?\/*$/)){return r}++n}return Array(n+1).join("../")+r.substr(e.length+1)}r.relative=relative;var o=function(){var e=Object.create(null);return!("__proto__"in e)}();function identity(e){return e}function toSetString(e){if(isProtoString(e)){return"$"+e}return e}r.toSetString=o?identity:toSetString;function fromSetString(e){if(isProtoString(e)){return e.slice(1)}return e}r.fromSetString=o?identity:fromSetString;function isProtoString(e){if(!e){return false}var r=e.length;if(r<9){return false}if(e.charCodeAt(r-1)!==95||e.charCodeAt(r-2)!==95||e.charCodeAt(r-3)!==111||e.charCodeAt(r-4)!==116||e.charCodeAt(r-5)!==111||e.charCodeAt(r-6)!==114||e.charCodeAt(r-7)!==112||e.charCodeAt(r-8)!==95||e.charCodeAt(r-9)!==95){return false}for(var n=r-10;n>=0;n--){if(e.charCodeAt(n)!==36){return false}}return true}function compareByOriginalPositions(e,r,n){var t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0||n){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0){return t}t=e.generatedLine-r.generatedLine;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByOriginalPositions=compareByOriginalPositions;function compareByGeneratedPositionsDeflated(e,r,n){var t=e.generatedLine-r.generatedLine;if(t!==0){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0||n){return t}t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsDeflated=compareByGeneratedPositionsDeflated;function strcmp(e,r){if(e===r){return 0}if(e===null){return 1}if(r===null){return-1}if(e>r){return 1}return-1}function compareByGeneratedPositionsInflated(e,r){var n=e.generatedLine-r.generatedLine;if(n!==0){return n}n=e.generatedColumn-r.generatedColumn;if(n!==0){return n}n=strcmp(e.source,r.source);if(n!==0){return n}n=e.originalLine-r.originalLine;if(n!==0){return n}n=e.originalColumn-r.originalColumn;if(n!==0){return n}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}r.parseSourceMapInput=parseSourceMapInput;function computeSourceURL(e,r,n){r=r||"";if(e){if(e[e.length-1]!=="/"&&r[0]!=="/"){e+="/"}r=e+r}if(n){var t=urlParse(n);if(!t){throw new Error("sourceMapURL could not be parsed")}if(t.path){var o=t.path.lastIndexOf("/");if(o>=0){t.path=t.path.substring(0,o+1)}}r=join(urlGenerate(t),r)}return normalize(r)}r.computeSourceURL=computeSourceURL},927:(e,r,n)=>{n(163).x;r.SourceMapConsumer=n(684).SourceMapConsumer;n(565)},896:e=>{"use strict";e.exports=require("fs")},928:e=>{"use strict";e.exports=require("path")}};var r={};function __webpack_require__(n){var t=r[n];if(t!==undefined){return t.exports}var o=r[n]={id:n,loaded:false,exports:{}};var i=true;try{e[n](o,o.exports,__webpack_require__);i=false}finally{if(i)delete r[n]}o.loaded=true;return o.exports}(()=>{__webpack_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __webpack_require__!=="undefined")__webpack_require__.ab=__dirname+"/";var n={};__webpack_require__(599).install();module.exports=n})(); -------------------------------------------------------------------------------- /examples/basic.yml: -------------------------------------------------------------------------------- 1 | # Placeholder `setup-trellis-cli` action for deploying Trellis sites 2 | 3 | name: Deploy site 4 | 5 | on: 6 | workflow_dispatch: 7 | push: 8 | branches: [main] 9 | 10 | jobs: 11 | deploy: 12 | runs-on: ubuntu-latest 13 | timeout-minutes: 15 14 | steps: 15 | - uses: actions/checkout@v4 16 | - uses: shimataro/ssh-key-action@v2 17 | with: 18 | key: ${{ secrets.TRELLIS_DEPLOY_SSH_PRIVATE_KEY }} 19 | known_hosts: ${{ secrets.TRELLIS_DEPLOY_SSH_KNOWN_HOSTS }} 20 | - uses: webfactory/ssh-agent@v0.9.0 21 | with: 22 | ssh-private-key: ${{ secrets.TRELLIS_DEPLOY_SSH_PRIVATE_KEY }} 23 | - uses: actions/setup-python@v5 24 | with: 25 | python-version: '3.12' 26 | - uses: roots/setup-trellis-cli@v1 27 | with: 28 | repo-token: ${{ secrets.GITHUB_TOKEN }} 29 | ansible-vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} 30 | - name: Deploy Production 31 | run: trellis deploy production 32 | -------------------------------------------------------------------------------- /examples/multi-repo.yml: -------------------------------------------------------------------------------- 1 | # Placeholder `setup-trellis-cli` action for deploying Trellis sites using multiple repositories 2 | # 3 | # ⚠️ This example assumes your theme is using Sage 10 4 | # 5 | # Replace `sage` with your theme folder 6 | # Replace `example/example.com` with your github repository 7 | 8 | name: Deploy site 9 | 10 | on: 11 | workflow_dispatch: 12 | push: 13 | branches: [main] 14 | 15 | jobs: 16 | deploy: 17 | runs-on: ubuntu-latest 18 | 19 | steps: 20 | - uses: actions/checkout@v4 21 | with: 22 | path: site 23 | - uses: actions/setup-node@v4 24 | with: 25 | node-version: '20' 26 | cache: yarn 27 | cache-dependency-path: site/web/app/themes/sage/yarn.lock 28 | - uses: actions/checkout@v4 29 | with: 30 | repository: example/example.com 31 | path: trellis 32 | token: ${{ secrets.TRELLIS_REPOSITORY_PERSONAL_ACCESS_TOKEN }} 33 | - uses: shimataro/ssh-key-action@v2 34 | with: 35 | key: ${{ secrets.TRELLIS_DEPLOY_SSH_PRIVATE_KEY }} 36 | known_hosts: ${{ secrets.TRELLIS_DEPLOY_SSH_KNOWN_HOSTS }} 37 | - uses: webfactory/ssh-agent@v0.9.0 38 | with: 39 | ssh-private-key: ${{ secrets.TRELLIS_DEPLOY_SSH_PRIVATE_KEY }} 40 | - uses: actions/setup-python@v5 41 | with: 42 | python-version: '3.12' 43 | - uses: roots/setup-trellis-cli@v1 44 | with: 45 | repo-token: ${{ secrets.GITHUB_TOKEN }} 46 | ansible-vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} 47 | - name: Deploy 48 | run: trellis deploy production 49 | working-directory: trellis 50 | -------------------------------------------------------------------------------- /examples/sage.yml: -------------------------------------------------------------------------------- 1 | # Placeholder `setup-trellis-cli` action for deploying Trellis sites with Sage based themes 2 | # 3 | # ⚠️ This example assumes your theme is using Sage 11 4 | # 5 | # Replace `sage` with your theme folder 6 | 7 | name: Deploy site 8 | 9 | on: 10 | workflow_dispatch: 11 | push: 12 | branches: [main] 13 | 14 | jobs: 15 | deploy: 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | - uses: actions/checkout@v4 20 | - uses: actions/setup-node@v4 21 | with: 22 | node-version: '20' 23 | cache: npm 24 | cache-dependency-path: site/web/app/themes/sage/package-lock.json 25 | - uses: shimataro/ssh-key-action@v2 26 | with: 27 | key: ${{ secrets.TRELLIS_DEPLOY_SSH_PRIVATE_KEY }} 28 | known_hosts: ${{ secrets.TRELLIS_DEPLOY_SSH_KNOWN_HOSTS }} 29 | - uses: webfactory/ssh-agent@v0.9.0 30 | with: 31 | ssh-private-key: ${{ secrets.TRELLIS_DEPLOY_SSH_PRIVATE_KEY }} 32 | - uses: actions/setup-python@v5 33 | with: 34 | python-version: '3.12' 35 | - uses: roots/setup-trellis-cli@v1 36 | with: 37 | repo-token: ${{ secrets.GITHUB_TOKEN }} 38 | ansible-vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} 39 | - name: Deploy 40 | run: trellis deploy production 41 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const cache = require('@actions/cache'); 2 | const core = require('@actions/core'); 3 | const exec = require('@actions/exec'); 4 | const fs = require('fs'); 5 | const glob = require('@actions/glob'); 6 | const http = require('@actions/http-client'); 7 | const io = require('@actions/io'); 8 | const tc = require('@actions/tool-cache'); 9 | const os = require('os'); 10 | const path = require('path'); 11 | const process = require('process'); 12 | 13 | function isExactCacheKeyMatch(key, cacheKey) { 14 | return !!(cacheKey && cacheKey.localeCompare(key, undefined, { sensitivity: "accent" }) === 0); 15 | } 16 | 17 | async function getRelease(version, token) { 18 | let osPlatform = os.platform(); 19 | const platformMappings = { 20 | 'win32': 'windows' 21 | }; 22 | osPlatform = platformMappings[osPlatform] || osPlatform; 23 | 24 | let osArch = os.arch(); 25 | const archMappings = { 26 | x32: 'i386', 27 | x64: 'x86_64' 28 | }; 29 | osArch = archMappings[osArch] || osArch; 30 | 31 | core.debug(`Finding release for ${version} (${osPlatform}_${osArch})`); 32 | const release = await fetchRelease(version, token); 33 | 34 | if (!release.name) { 35 | core.warning(`API response: ${JSON.stringify(release)}`); 36 | core.warning(`If you are hitting API rate limits, see the README for instructions on using a GitHub token.`); 37 | throw new Error(`No trellis-cli release found for version ${version}`); 38 | } 39 | 40 | core.debug(`Release ${release.name} (tag: ${release.tag_name}) found.`); 41 | 42 | const asset = release.assets.find((asset) => { 43 | if (asset.browser_download_url.match(new RegExp(osArch, 'i')) && asset.browser_download_url.match(new RegExp(osPlatform, 'i'))) { 44 | return asset; 45 | } 46 | }); 47 | 48 | if (!asset) { 49 | throw new Error(`No trellis-cli binary found for platform ${osPlatform} or arch ${osArch}.`); 50 | } 51 | 52 | return { 53 | version: release.tag_name, 54 | url: asset.browser_download_url, 55 | } 56 | } 57 | 58 | async function fetchRelease(version, token) { 59 | const client = new http.HttpClient('setup-trellis-cli-client'); 60 | 61 | let headers = {}; 62 | if (token !== '') { 63 | headers['authorization'] = `Bearer ${token}`; 64 | } else { 65 | core.warning(`No repo-token provided. We recommend setting one to avoid rate limiting. See the README for instructions.`); 66 | } 67 | 68 | let url = null; 69 | 70 | if (version === 'latest' || version === '') { 71 | url = `https://api.github.com/repos/roots/trellis-cli/releases/latest`; 72 | } else { 73 | url = `https://api.github.com/repos/roots/trellis-cli/releases/tags/${version}`; 74 | } 75 | 76 | const response = await client.get(url, headers); 77 | const body = await response.readBody(); 78 | return JSON.parse(body); 79 | } 80 | 81 | async function downloadRelease(release) { 82 | const downloadPath = await tc.downloadTool(release.url); 83 | core.debug(`Downloaded to ${downloadPath}`); 84 | 85 | const cliPath = await tc.extractTar(downloadPath); 86 | core.debug(`Extracted to ${cliPath}`); 87 | 88 | const cachePath = await tc.cacheDir(cliPath, 'trellis-cli', release.version); 89 | core.debug(`Cached to ${cachePath}`); 90 | 91 | return cachePath; 92 | } 93 | 94 | async function ensurePython3() { 95 | try { 96 | const python3Path = await io.which('python3', true); 97 | core.debug(`python3 found at ${python3Path}`); 98 | 99 | if (core.isDebug()) { 100 | await exec.exec('python3 --version'); 101 | } 102 | } catch(error) { 103 | const msg = ` 104 | Python not found and is a required dependency for using trellis-cli and Trellis. 105 | 106 | Add a setup-python step like the one below *before* setup-trellis-cli. 107 | 108 | - uses: actions/setup-python@v2 109 | with: 110 | python-version: '3.9' 111 | ` 112 | throw new Error(msg); 113 | } 114 | } 115 | 116 | async function withCache(cacheable, paths, baseKey, hashPattern) { 117 | const keyPrefix = `${process.env.RUNNER_OS}-${baseKey}-`; 118 | const hash = await glob.hashFiles(hashPattern); 119 | const primaryKey = `${keyPrefix}${hash}`; 120 | const restoreKeys = [keyPrefix]; 121 | 122 | const cacheKey = await cache.restoreCache(paths, primaryKey, restoreKeys); 123 | 124 | if (!cacheKey) { 125 | core.info(`Cache not found for keys: ${[primaryKey, ...restoreKeys].join(", ")}`); 126 | } else { 127 | core.info(`Cache restored from key: ${cacheKey}`); 128 | } 129 | 130 | await cacheable(); 131 | 132 | if (isExactCacheKeyMatch(primaryKey, cacheKey)) { 133 | core.info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`); 134 | return; 135 | } 136 | 137 | try { 138 | await cache.saveCache(paths, primaryKey); 139 | } catch { 140 | await cache.saveCache(paths, primaryKey + "-retry"); 141 | } 142 | } 143 | 144 | async function cachedInit() { 145 | return await withCache(async () => { 146 | await exec.exec('trellis init') 147 | }, [path.join('.trellis', 'virtualenv')], 'trellis-venv', '**/requirements.txt'); 148 | } 149 | 150 | async function runGalaxyInstall() { 151 | return await withCache(async () => { 152 | await exec.exec('trellis galaxy install') 153 | }, [path.join('vendor', 'roles')], 'trellis-galaxy', '**/galaxy.yml'); 154 | } 155 | 156 | async function run() { 157 | try { 158 | const ansibleVaultPassword = core.getInput('ansible-vault-password', { required: true}); 159 | const autoInit = core.getBooleanInput('auto-init'); 160 | const cacheVirtualenv = core.getBooleanInput('cache-virtualenv'); 161 | const galaxyInstall = core.getBooleanInput('galaxy-install'); 162 | const trellisPath = core.getInput('trellis-directory') || 'trellis'; 163 | const version = core.getInput('version') || 'latest'; 164 | const token = core.getInput('repo-token'); 165 | 166 | await core.group('Install trellis-cli', async () => { 167 | const release = await getRelease(version, token); 168 | const cliPath = await downloadRelease(release); 169 | core.addPath(cliPath); 170 | core.debug(`Added ${cliPath} to PATH`); 171 | // don't check for trellis-cli updates 172 | core.exportVariable('TRELLIS_NO_UPDATE_NOTIFIER', 'true'); 173 | core.info(`trellis-cli ${release.version} installed successfully`); 174 | core.setOutput('version', release.version); 175 | }); 176 | 177 | await ensurePython3(); 178 | 179 | try { 180 | core.debug(`Changing directories to ${trellisPath}`); 181 | process.chdir(trellisPath) 182 | } catch (error) { 183 | throw new Error(`Could not change directory to ${trellisPath}. Ensure directory exists first.`); 184 | } 185 | 186 | core.startGroup('Create .vault_pass file') 187 | if (ansibleVaultPassword != '') { 188 | fs.writeFileSync('.vault_pass', ansibleVaultPassword, { mode: 0o644 }); 189 | core.info(`Vault password written to .vault_pass file`); 190 | } 191 | core.endGroup() 192 | 193 | if (autoInit) { 194 | core.debug(`auto-init enabled`); 195 | 196 | if (cacheVirtualenv) { 197 | core.debug(`cache-virtualenv enabled`); 198 | 199 | await core.group('Initialize project', async () => { 200 | await cachedInit(); 201 | }); 202 | } else { 203 | await core.group('Initialize project', async () => { 204 | await exec.exec('trellis init'); 205 | }); 206 | } 207 | } 208 | 209 | if (galaxyInstall) { 210 | core.debug(`galaxy-install enabled`); 211 | await core.group('Install Galaxy roles', async () => { 212 | await runGalaxyInstall(); 213 | }); 214 | } 215 | } catch (error) { 216 | if (error.name === cache.ReserveCacheError.name) { 217 | core.info(error.message); 218 | } else { 219 | core.setFailed(error.message); 220 | } 221 | } 222 | } 223 | 224 | run(); 225 | -------------------------------------------------------------------------------- /index.test.js: -------------------------------------------------------------------------------- 1 | const process = require('process'); 2 | const cp = require('child_process'); 3 | const path = require('path'); 4 | 5 | test('no-op', async () => { 6 | await expect(true).toEqual(true); 7 | }); 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "setup-trellis-cli", 3 | "version": "1.3.1", 4 | "description": "Sets up Trellis CLI for GitHub Action workflows", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "ncc build", 8 | "prepare": "ncc build -o dist --source-map --license licenses.txt", 9 | "test": "jest", 10 | "all": "npm run prepare && npm run test" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/roots/setup-trellis-cli.git" 15 | }, 16 | "keywords": [ 17 | "GitHub", 18 | "Actions", 19 | "Roots", 20 | "WordPress", 21 | "Trellis" 22 | ], 23 | "author": "Scott Walkinshaw ", 24 | "license": "MIT", 25 | "bugs": { 26 | "url": "https://github.com/roots/setup-trellis-cli/issues" 27 | }, 28 | "homepage": "https://github.com/roots/setup-trellis-cli", 29 | "dependencies": { 30 | "@actions/cache": "^4.0.3", 31 | "@actions/core": "^1.11.1", 32 | "@actions/exec": "^1.1.1", 33 | "@actions/glob": "^0.5.0", 34 | "@actions/http-client": "^2.2.3", 35 | "@actions/io": "^1.1.3", 36 | "@actions/tool-cache": "^2.0.2" 37 | }, 38 | "devDependencies": { 39 | "@vercel/ncc": "^0.38.3", 40 | "jest": "^29.7.0" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:recommended" 5 | ] 6 | } 7 | --------------------------------------------------------------------------------