├── .eslintrc.json
├── .gitignore
├── .husky
└── pre-commit
├── README.md
├── action.yml
├── assets
├── customize-button.png
├── github-app-in-the-gallery.png
└── github-attachment.png
├── dist
├── index.js
├── index.js.map
├── licenses.txt
└── sourcemap-register.js
├── example-workflow-file.yaml
├── jest.config.js
├── package-lock.json
├── package.json
├── src
├── constants
│ ├── errors.ts
│ ├── inputs.ts
│ ├── requests.ts
│ └── triggers.ts
├── index.ts
├── requests
│ └── axios.ts
└── utils
│ ├── index.test.ts
│ └── index.ts
└── tsconfig.json
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": ["jest", "@typescript-eslint", "prettier"],
3 | "extends": ["plugin:github/recommended", "prettier"],
4 | "parser": "@typescript-eslint/parser",
5 | "parserOptions": {
6 | "ecmaVersion": 9,
7 | "sourceType": "module",
8 | "project": "./tsconfig.json",
9 | "createDefaultProgram": true
10 | },
11 | "rules": {
12 | "no-console": "off",
13 | "import/no-namespace": "off",
14 | "i18n-text/no-en": "off",
15 | "filenames/match-regex": "off",
16 | "sort-imports": "off"
17 | },
18 | "env": {
19 | "node": true,
20 | "es6": true,
21 | "jest/globals": true
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | lerna-debug.log*
8 |
9 | .idea
10 | node_modules/
11 | lib
12 | # Diagnostic reports (https://nodejs.org/api/report.html)
13 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14 |
15 | # Runtime data
16 | pids
17 | *.pid
18 | *.seed
19 | *.pid.lock
20 |
21 | # Directory for instrumented libs generated by jscoverage/JSCover
22 | lib-cov
23 |
24 | # Coverage directory used by tools like istanbul
25 | coverage
26 | *.lcov
27 |
28 | # nyc test coverage
29 | .nyc_output
30 |
31 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
32 | .grunt
33 |
34 | # Bower dependency directory (https://bower.io/)
35 | bower_components
36 |
37 | # node-waf configuration
38 | .lock-wscript
39 |
40 | # Compiled binary addons (https://nodejs.org/api/addons.html)
41 | build/Release
42 |
43 | # Dependency directories
44 | node_modules/
45 | jspm_packages/
46 |
47 | # TypeScript v1 declaration files
48 | typings/
49 |
50 | # TypeScript cache
51 | *.tsbuildinfo
52 |
53 | # Optional npm cache directory
54 | .npm
55 |
56 | # Optional eslint cache
57 | .eslintcache
58 |
59 | # Microbundle cache
60 | .rpt2_cache/
61 | .rts2_cache_cjs/
62 | .rts2_cache_es/
63 | .rts2_cache_umd/
64 |
65 | # Optional REPL history
66 | .node_repl_history
67 |
68 | # Output of 'npm pack'
69 | *.tgz
70 |
71 | # Yarn Integrity file
72 | .yarn-integrity
73 |
74 | # dotenv environment variables file
75 | .env
76 | .env.test
77 |
78 | # parcel-bundler cache (https://parceljs.org/)
79 | .cache
80 |
81 | # Next.js build output
82 | .next
83 |
84 | # Nuxt.js build / generate output
85 | .nuxt
86 |
87 | # Gatsby files
88 | .cache/
89 | # Comment in the public line in if your project uses Gatsby and *not* Next.js
90 | # https://nextjs.org/blog/next-9-1#public-directory-support
91 | # public
92 |
93 | # vuepress build output
94 | .vuepress/dist
95 |
96 | # Serverless directories
97 | .serverless/
98 |
99 | # FuseBox cache
100 | .fusebox/
101 |
102 | # DynamoDB Local files
103 | .dynamodb/
104 |
105 | # TernJS port file
106 | .tern-port
107 | **/.DS_Store
108 | .DS_Store
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | npm test
5 | npm run lint
6 | npm run package
7 | git add "./dist"
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Connect pull request attachments from GitHub to Asana
2 |
3 | Always be in the loop on the status of a pull request with this GitHub Action, which connects an attachment to Asana.
4 |
5 | How does it work? The GitHub Action will check the description of the pull request for the specific Asana task URL and automatically create an attachment with the latest status from GitHub as the authenticated user.
6 |
7 | This is available to all Asana users on Premium, Business, and Enterprise plans.
8 |
9 | To get notified when the pull request status changes in Asana, check out [GitHub Action](https://github.com/Asana/comment-on-task-github-action).
10 |
11 | To learn more about using the GitHub + Asana integration, visit the [Asana Guide](https://asana.com/guide/help/api/github).
12 |
13 |
14 |
15 | ## Usage
16 |
17 | #### Step 1: Generate a secret token for your Action
18 |
19 | Skip this step if you've done this for a different GitHub action for this repository.
20 |
21 | * Go to https://github.integrations.asana.plus/auth?domainId=ghactions
22 | * Authorize the Asana app and the GitHub app
23 | * Copy the generated secret. **Do not share this secret with anyone!**
24 |
25 | At any point, you can revoke this generated token at https://github.integrations.asana.plus/auth?domainId=manage_tokens.
26 |
27 | #### Step 2: Set up a repository secret for the secret token
28 |
29 | Skip this step if you've done this for a different GitHub action for this repository.
30 |
31 | * Go to settings page for your repository
32 | * Click on *Secrets* on left sidebar
33 | * Click **New repository secret**
34 | * Create a new secret called `ASANA_SECRET` with value set to the secret token
35 | * Click **Add secret**
36 |
37 | #### Step 3: Create a workflow file
38 |
39 | ##### Quick Start for Unix Command Line
40 | To get started quickly, `cd` into the GitHub repository root and checkout the main branch
41 |
42 | ```sh
43 | cd
44 | git checkout main
45 | ```
46 |
47 | Then, run the commands below from the command line to create a workflow file, commit the change, and push it to GitHub.
48 |
49 | ```sh
50 | mkdir -p .github/workflows && curl https://raw.githubusercontent.com/Asana/create-app-attachment-github-action/main/example-workflow-file.yaml --output .github/workflows/create-asana-attachment.yaml
51 | git add .github/workflows/create-asana-attachment.yaml
52 | git commit -m "automatically create Asana app attachments when opening pull requests"
53 | git push
54 | ```
55 |
56 | The action should work after this step and attach pull requests to Asana tasks whenever they are opened or reopened. You should now see a file called `.github/workflows/create-asana-attachment.yaml` in your repository on GitHub. Find out how to edit what events trigger the action and see detailed explanation in the next section.
57 |
58 | ##### Step-by-Step
59 |
60 | Instead of running the commands in the previous section, you can create a YAML file with a name of your choosing in `.github/workflows/` directory (e.g., `.github/workflows/create-asana-attachment.yml`. You may have to create the directory.). We provide an example [`.github/workflows/create-asana-attachment.yml`](https://raw.githubusercontent.com/Asana/create-app-attachment-github-action/main/example-workflow-file.yaml) file below.
61 |
62 | ```yaml
63 | on:
64 | pull_request:
65 | types: [opened, reopened]
66 |
67 | jobs:
68 | create-asana-attachment-job:
69 | runs-on: ubuntu-latest
70 | name: Create pull request attachments on Asana tasks
71 | steps:
72 | - name: Create pull request attachments
73 | uses: Asana/create-app-attachment-github-action@latest
74 | id: postAttachment
75 | with:
76 | asana-secret: ${{ secrets.ASANA_SECRET }}
77 | - name: Log output status
78 | run: echo "Status is ${{ steps.postAttachment.outputs.status }}"
79 | ```
80 |
81 | The workflow set up in the file above will run whenever a pull request is opened or reopened. This GitHub action only runs in the context of a pull request so the event triggers must either be the [`pull_request`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request) event, the [`pull_request_target`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target) event, the [`pull_request_review_comment`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_review_comment) event, or the [`pull_request_review`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_review) event.
82 |
83 | Once this file is set up, commit and push your change to the **main branch of your repository.** The GitHub action is now set up, congratulations!
84 |
85 | #### Step 4: Enable the GitHub integration in your Asana project (optional)
86 |
87 |
88 |
89 | - Navigate to a project where you would like to activate the integration
90 | - Click on the Customize Menu drop-down in the right-hand corner (1)
91 | - Select **+Add app** (2)
92 |
93 |
94 |
95 | - Select **GitHub**
96 | - You’ll be prompted to authorize your GitHub account. Please follow the instructions
97 | - The GitHub integration will be installed at a project level. In the following screen, you can select the projects you would like to add the integration to
98 | - Now, you can use the GitHub integration in any of the projects to which it has been added
99 |
100 |
101 | #### Step 5: Adapt the GitHub Action to your workflow (optional)
102 |
103 | ##### Available parameters
104 |
105 | *Required*:
106 | * ```asana-secret``` - Should contain the Asana secret from Step 3
107 |
108 | *Optional*:
109 | * ```allowed-projects``` - List of Asana projects IDs where attachments can be added
110 | * ```blocked-projects``` - List of Asana projects IDs where attachments cannot be added
111 |
112 |
113 | If values are provided for neither the `allowed-projects` parameter or the `blocked-projects` parameter, the GitHub action will be able to add attachments to any task. Providing values for both ```allowed-projects``` and ```blocked-projects``` lists at the same time will result in an error.
114 |
115 | In the workflow file below, we provide an allowlist to the GitHub Action. The Action will only create pull request attachments on tasks that are in project 1125036528002799 or 1192160553314033.
116 |
117 | ```yaml
118 | jobs:
119 | create-asana-attachment-job:
120 | runs-on: ubuntu-latest
121 | name: Create pull request attachments on Asana tasks
122 | steps:
123 | - name: Create pull request attachments
124 | uses: Asana/create-app-attachment-github-action@v1.3
125 | id: postAttachment
126 | with:
127 | asana-secret: ${{ secrets.ASANA_SECRET }}
128 | allowed-projects: |
129 | 1125036528002799
130 | 1192160553314033
131 | - name: Get status
132 | run: echo "Status is ${{ steps.postAttachment.outputs.status }}"
133 | ```
134 |
135 | In the workflow file below, we provide a blocklist to the GitHub Action. The Action will only create pull request attachments on tasks that are **not** in project 1125036528002799 or 1192160553314033.
136 |
137 | ```yaml
138 | jobs:
139 | create-asana-attachment-job:
140 | runs-on: ubuntu-latest
141 | name: Create pull request attachments on Asana tasks
142 | steps:
143 | - name: Create pull request attachments
144 | uses: Asana/create-app-attachment-github-action@v1.3
145 | id: postAttachment
146 | with:
147 | asana-secret: ${{ secrets.ASANA_SECRET }}
148 | blocked-projects: |
149 | 1125036528002799
150 | 1192160553314033
151 | - name: Get status
152 | run: echo "Status is ${{ steps.postAttachment.outputs.status }}"
153 | ```
154 |
155 | #### Revoking your secret token
156 |
157 | If at any point you want to stop using your GitHub action or want to rotate your secret token, you may invalidate all of your tokens at https://github.integrations.asana.plus/auth?domainId=manage_tokens
158 |
159 | ## Contributing
160 |
161 | ### Unit tests
162 |
163 | Unit tests should be run via npm command:
164 |
165 | ```npm run test```
166 |
167 | ### Formatting and Linting
168 |
169 | ```npm run lint```
170 |
--------------------------------------------------------------------------------
/action.yml:
--------------------------------------------------------------------------------
1 | name: 'Attach pull request to Asana task'
2 | description: 'Check the pull request description for specific Asana task URLs and add the pull request as an attachment to those tasks'
3 | author: Asana
4 | branding:
5 | icon: circle
6 | color: green
7 | inputs:
8 | asana-secret:
9 | description: 'The Asana secret for the action. Read more about how to generate this secret at https://github.com/Asana/create-app-attachment-github-action#step-2-set-up-a-repository-secret-for-the-secret-token'
10 | required: true
11 | default: ''
12 | allowed-projects:
13 | description: 'List of allowed projects. The action will only add comments to tasks in these projects. Only one of allowed-projects or blocked-projects can be specified.'
14 | required: false
15 | default: ''
16 | blocked-projects:
17 | description: 'List of allowed projects. The action will not add comments to tasks or subtasks of tasks in any of these projects. Only one of allowed-projects or blocked-projects can be specified.'
18 | required: false
19 | default: ''
20 | outputs:
21 | status:
22 | description: 'status'
23 | runs:
24 | using: 'node20'
25 | main: 'dist/index.js'
26 |
--------------------------------------------------------------------------------
/assets/customize-button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Asana/create-app-attachment-github-action/d8b090a1304227bb4ecfd48d8b4921e2a15a41ba/assets/customize-button.png
--------------------------------------------------------------------------------
/assets/github-app-in-the-gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Asana/create-app-attachment-github-action/d8b090a1304227bb4ecfd48d8b4921e2a15a41ba/assets/github-app-in-the-gallery.png
--------------------------------------------------------------------------------
/assets/github-attachment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Asana/create-app-attachment-github-action/d8b090a1304227bb4ecfd48d8b4921e2a15a41ba/assets/github-attachment.png
--------------------------------------------------------------------------------
/dist/licenses.txt:
--------------------------------------------------------------------------------
1 | @actions/core
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/github
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/http-client
26 | MIT
27 | Actions Http Client for Node.js
28 |
29 | Copyright (c) GitHub, Inc.
30 |
31 | All rights reserved.
32 |
33 | MIT License
34 |
35 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
36 | associated documentation files (the "Software"), to deal in the Software without restriction,
37 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
38 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
39 | subject to the following conditions:
40 |
41 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
42 |
43 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
44 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
45 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
46 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
47 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
48 |
49 |
50 | @octokit/auth-token
51 | MIT
52 | The MIT License
53 |
54 | Copyright (c) 2019 Octokit contributors
55 |
56 | Permission is hereby granted, free of charge, to any person obtaining a copy
57 | of this software and associated documentation files (the "Software"), to deal
58 | in the Software without restriction, including without limitation the rights
59 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
60 | copies of the Software, and to permit persons to whom the Software is
61 | furnished to do so, subject to the following conditions:
62 |
63 | The above copyright notice and this permission notice shall be included in
64 | all copies or substantial portions of the Software.
65 |
66 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
67 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
68 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
69 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
70 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
71 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
72 | THE SOFTWARE.
73 |
74 |
75 | @octokit/core
76 | MIT
77 | The MIT License
78 |
79 | Copyright (c) 2019 Octokit contributors
80 |
81 | Permission is hereby granted, free of charge, to any person obtaining a copy
82 | of this software and associated documentation files (the "Software"), to deal
83 | in the Software without restriction, including without limitation the rights
84 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
85 | copies of the Software, and to permit persons to whom the Software is
86 | furnished to do so, subject to the following conditions:
87 |
88 | The above copyright notice and this permission notice shall be included in
89 | all copies or substantial portions of the Software.
90 |
91 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
92 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
93 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
94 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
95 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
96 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
97 | THE SOFTWARE.
98 |
99 |
100 | @octokit/endpoint
101 | MIT
102 | The MIT License
103 |
104 | Copyright (c) 2018 Octokit contributors
105 |
106 | Permission is hereby granted, free of charge, to any person obtaining a copy
107 | of this software and associated documentation files (the "Software"), to deal
108 | in the Software without restriction, including without limitation the rights
109 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
110 | copies of the Software, and to permit persons to whom the Software is
111 | furnished to do so, subject to the following conditions:
112 |
113 | The above copyright notice and this permission notice shall be included in
114 | all copies or substantial portions of the Software.
115 |
116 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
117 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
118 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
119 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
120 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
121 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
122 | THE SOFTWARE.
123 |
124 |
125 | @octokit/graphql
126 | MIT
127 | The MIT License
128 |
129 | Copyright (c) 2018 Octokit contributors
130 |
131 | Permission is hereby granted, free of charge, to any person obtaining a copy
132 | of this software and associated documentation files (the "Software"), to deal
133 | in the Software without restriction, including without limitation the rights
134 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
135 | copies of the Software, and to permit persons to whom the Software is
136 | furnished to do so, subject to the following conditions:
137 |
138 | The above copyright notice and this permission notice shall be included in
139 | all copies or substantial portions of the Software.
140 |
141 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
142 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
143 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
144 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
145 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
146 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
147 | THE SOFTWARE.
148 |
149 |
150 | @octokit/plugin-paginate-rest
151 | MIT
152 | MIT License Copyright (c) 2019 Octokit contributors
153 |
154 | 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:
155 |
156 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
157 |
158 | 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.
159 |
160 |
161 | @octokit/plugin-rest-endpoint-methods
162 | MIT
163 | MIT License Copyright (c) 2019 Octokit contributors
164 |
165 | 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:
166 |
167 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
168 |
169 | 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.
170 |
171 |
172 | @octokit/request
173 | MIT
174 | The MIT License
175 |
176 | Copyright (c) 2018 Octokit contributors
177 |
178 | Permission is hereby granted, free of charge, to any person obtaining a copy
179 | of this software and associated documentation files (the "Software"), to deal
180 | in the Software without restriction, including without limitation the rights
181 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
182 | copies of the Software, and to permit persons to whom the Software is
183 | furnished to do so, subject to the following conditions:
184 |
185 | The above copyright notice and this permission notice shall be included in
186 | all copies or substantial portions of the Software.
187 |
188 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
189 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
190 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
191 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
192 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
193 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
194 | THE SOFTWARE.
195 |
196 |
197 | @octokit/request-error
198 | MIT
199 | The MIT License
200 |
201 | Copyright (c) 2019 Octokit contributors
202 |
203 | Permission is hereby granted, free of charge, to any person obtaining a copy
204 | of this software and associated documentation files (the "Software"), to deal
205 | in the Software without restriction, including without limitation the rights
206 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
207 | copies of the Software, and to permit persons to whom the Software is
208 | furnished to do so, subject to the following conditions:
209 |
210 | The above copyright notice and this permission notice shall be included in
211 | all copies or substantial portions of the Software.
212 |
213 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
214 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
215 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
216 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
217 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
218 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
219 | THE SOFTWARE.
220 |
221 |
222 | @vercel/ncc
223 | MIT
224 | Copyright 2018 ZEIT, Inc.
225 |
226 | 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:
227 |
228 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
229 |
230 | 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.
231 |
232 | axios
233 | MIT
234 | Copyright (c) 2014-present Matt Zabriskie
235 |
236 | Permission is hereby granted, free of charge, to any person obtaining a copy
237 | of this software and associated documentation files (the "Software"), to deal
238 | in the Software without restriction, including without limitation the rights
239 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
240 | copies of the Software, and to permit persons to whom the Software is
241 | furnished to do so, subject to the following conditions:
242 |
243 | The above copyright notice and this permission notice shall be included in
244 | all copies or substantial portions of the Software.
245 |
246 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
247 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
248 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
249 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
250 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
251 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
252 | THE SOFTWARE.
253 |
254 |
255 | axios-retry
256 | Apache-2.0
257 | Copyright 2019 Softonic International S.A.
258 |
259 | Licensed under the Apache License, Version 2.0 (the "License");
260 | you may not use this file except in compliance with the License.
261 | You may obtain a copy of the License at
262 |
263 | http://www.apache.org/licenses/LICENSE-2.0
264 |
265 | Unless required by applicable law or agreed to in writing, software
266 | distributed under the License is distributed on an "AS IS" BASIS,
267 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
268 | See the License for the specific language governing permissions and
269 | limitations under the License.
270 |
271 | before-after-hook
272 | Apache-2.0
273 | Apache License
274 | Version 2.0, January 2004
275 | http://www.apache.org/licenses/
276 |
277 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
278 |
279 | 1. Definitions.
280 |
281 | "License" shall mean the terms and conditions for use, reproduction,
282 | and distribution as defined by Sections 1 through 9 of this document.
283 |
284 | "Licensor" shall mean the copyright owner or entity authorized by
285 | the copyright owner that is granting the License.
286 |
287 | "Legal Entity" shall mean the union of the acting entity and all
288 | other entities that control, are controlled by, or are under common
289 | control with that entity. For the purposes of this definition,
290 | "control" means (i) the power, direct or indirect, to cause the
291 | direction or management of such entity, whether by contract or
292 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
293 | outstanding shares, or (iii) beneficial ownership of such entity.
294 |
295 | "You" (or "Your") shall mean an individual or Legal Entity
296 | exercising permissions granted by this License.
297 |
298 | "Source" form shall mean the preferred form for making modifications,
299 | including but not limited to software source code, documentation
300 | source, and configuration files.
301 |
302 | "Object" form shall mean any form resulting from mechanical
303 | transformation or translation of a Source form, including but
304 | not limited to compiled object code, generated documentation,
305 | and conversions to other media types.
306 |
307 | "Work" shall mean the work of authorship, whether in Source or
308 | Object form, made available under the License, as indicated by a
309 | copyright notice that is included in or attached to the work
310 | (an example is provided in the Appendix below).
311 |
312 | "Derivative Works" shall mean any work, whether in Source or Object
313 | form, that is based on (or derived from) the Work and for which the
314 | editorial revisions, annotations, elaborations, or other modifications
315 | represent, as a whole, an original work of authorship. For the purposes
316 | of this License, Derivative Works shall not include works that remain
317 | separable from, or merely link (or bind by name) to the interfaces of,
318 | the Work and Derivative Works thereof.
319 |
320 | "Contribution" shall mean any work of authorship, including
321 | the original version of the Work and any modifications or additions
322 | to that Work or Derivative Works thereof, that is intentionally
323 | submitted to Licensor for inclusion in the Work by the copyright owner
324 | or by an individual or Legal Entity authorized to submit on behalf of
325 | the copyright owner. For the purposes of this definition, "submitted"
326 | means any form of electronic, verbal, or written communication sent
327 | to the Licensor or its representatives, including but not limited to
328 | communication on electronic mailing lists, source code control systems,
329 | and issue tracking systems that are managed by, or on behalf of, the
330 | Licensor for the purpose of discussing and improving the Work, but
331 | excluding communication that is conspicuously marked or otherwise
332 | designated in writing by the copyright owner as "Not a Contribution."
333 |
334 | "Contributor" shall mean Licensor and any individual or Legal Entity
335 | on behalf of whom a Contribution has been received by Licensor and
336 | subsequently incorporated within the Work.
337 |
338 | 2. Grant of Copyright License. Subject to the terms and conditions of
339 | this License, each Contributor hereby grants to You a perpetual,
340 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
341 | copyright license to reproduce, prepare Derivative Works of,
342 | publicly display, publicly perform, sublicense, and distribute the
343 | Work and such Derivative Works in Source or Object form.
344 |
345 | 3. Grant of Patent License. Subject to the terms and conditions of
346 | this License, each Contributor hereby grants to You a perpetual,
347 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
348 | (except as stated in this section) patent license to make, have made,
349 | use, offer to sell, sell, import, and otherwise transfer the Work,
350 | where such license applies only to those patent claims licensable
351 | by such Contributor that are necessarily infringed by their
352 | Contribution(s) alone or by combination of their Contribution(s)
353 | with the Work to which such Contribution(s) was submitted. If You
354 | institute patent litigation against any entity (including a
355 | cross-claim or counterclaim in a lawsuit) alleging that the Work
356 | or a Contribution incorporated within the Work constitutes direct
357 | or contributory patent infringement, then any patent licenses
358 | granted to You under this License for that Work shall terminate
359 | as of the date such litigation is filed.
360 |
361 | 4. Redistribution. You may reproduce and distribute copies of the
362 | Work or Derivative Works thereof in any medium, with or without
363 | modifications, and in Source or Object form, provided that You
364 | meet the following conditions:
365 |
366 | (a) You must give any other recipients of the Work or
367 | Derivative Works a copy of this License; and
368 |
369 | (b) You must cause any modified files to carry prominent notices
370 | stating that You changed the files; and
371 |
372 | (c) You must retain, in the Source form of any Derivative Works
373 | that You distribute, all copyright, patent, trademark, and
374 | attribution notices from the Source form of the Work,
375 | excluding those notices that do not pertain to any part of
376 | the Derivative Works; and
377 |
378 | (d) If the Work includes a "NOTICE" text file as part of its
379 | distribution, then any Derivative Works that You distribute must
380 | include a readable copy of the attribution notices contained
381 | within such NOTICE file, excluding those notices that do not
382 | pertain to any part of the Derivative Works, in at least one
383 | of the following places: within a NOTICE text file distributed
384 | as part of the Derivative Works; within the Source form or
385 | documentation, if provided along with the Derivative Works; or,
386 | within a display generated by the Derivative Works, if and
387 | wherever such third-party notices normally appear. The contents
388 | of the NOTICE file are for informational purposes only and
389 | do not modify the License. You may add Your own attribution
390 | notices within Derivative Works that You distribute, alongside
391 | or as an addendum to the NOTICE text from the Work, provided
392 | that such additional attribution notices cannot be construed
393 | as modifying the License.
394 |
395 | You may add Your own copyright statement to Your modifications and
396 | may provide additional or different license terms and conditions
397 | for use, reproduction, or distribution of Your modifications, or
398 | for any such Derivative Works as a whole, provided Your use,
399 | reproduction, and distribution of the Work otherwise complies with
400 | the conditions stated in this License.
401 |
402 | 5. Submission of Contributions. Unless You explicitly state otherwise,
403 | any Contribution intentionally submitted for inclusion in the Work
404 | by You to the Licensor shall be under the terms and conditions of
405 | this License, without any additional terms or conditions.
406 | Notwithstanding the above, nothing herein shall supersede or modify
407 | the terms of any separate license agreement you may have executed
408 | with Licensor regarding such Contributions.
409 |
410 | 6. Trademarks. This License does not grant permission to use the trade
411 | names, trademarks, service marks, or product names of the Licensor,
412 | except as required for reasonable and customary use in describing the
413 | origin of the Work and reproducing the content of the NOTICE file.
414 |
415 | 7. Disclaimer of Warranty. Unless required by applicable law or
416 | agreed to in writing, Licensor provides the Work (and each
417 | Contributor provides its Contributions) on an "AS IS" BASIS,
418 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
419 | implied, including, without limitation, any warranties or conditions
420 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
421 | PARTICULAR PURPOSE. You are solely responsible for determining the
422 | appropriateness of using or redistributing the Work and assume any
423 | risks associated with Your exercise of permissions under this License.
424 |
425 | 8. Limitation of Liability. In no event and under no legal theory,
426 | whether in tort (including negligence), contract, or otherwise,
427 | unless required by applicable law (such as deliberate and grossly
428 | negligent acts) or agreed to in writing, shall any Contributor be
429 | liable to You for damages, including any direct, indirect, special,
430 | incidental, or consequential damages of any character arising as a
431 | result of this License or out of the use or inability to use the
432 | Work (including but not limited to damages for loss of goodwill,
433 | work stoppage, computer failure or malfunction, or any and all
434 | other commercial damages or losses), even if such Contributor
435 | has been advised of the possibility of such damages.
436 |
437 | 9. Accepting Warranty or Additional Liability. While redistributing
438 | the Work or Derivative Works thereof, You may choose to offer,
439 | and charge a fee for, acceptance of support, warranty, indemnity,
440 | or other liability obligations and/or rights consistent with this
441 | License. However, in accepting such obligations, You may act only
442 | on Your own behalf and on Your sole responsibility, not on behalf
443 | of any other Contributor, and only if You agree to indemnify,
444 | defend, and hold each Contributor harmless for any liability
445 | incurred by, or claims asserted against, such Contributor by reason
446 | of your accepting any such warranty or additional liability.
447 |
448 | END OF TERMS AND CONDITIONS
449 |
450 | APPENDIX: How to apply the Apache License to your work.
451 |
452 | To apply the Apache License to your work, attach the following
453 | boilerplate notice, with the fields enclosed by brackets "{}"
454 | replaced with your own identifying information. (Don't include
455 | the brackets!) The text should be enclosed in the appropriate
456 | comment syntax for the file format. We also recommend that a
457 | file or class name and description of purpose be included on the
458 | same "printed page" as the copyright notice for easier
459 | identification within third-party archives.
460 |
461 | Copyright 2018 Gregor Martynus and other contributors.
462 |
463 | Licensed under the Apache License, Version 2.0 (the "License");
464 | you may not use this file except in compliance with the License.
465 | You may obtain a copy of the License at
466 |
467 | http://www.apache.org/licenses/LICENSE-2.0
468 |
469 | Unless required by applicable law or agreed to in writing, software
470 | distributed under the License is distributed on an "AS IS" BASIS,
471 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
472 | See the License for the specific language governing permissions and
473 | limitations under the License.
474 |
475 |
476 | debug
477 | MIT
478 | (The MIT License)
479 |
480 | Copyright (c) 2014 TJ Holowaychuk
481 |
482 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
483 | and associated documentation files (the 'Software'), to deal in the Software without restriction,
484 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
485 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
486 | subject to the following conditions:
487 |
488 | The above copyright notice and this permission notice shall be included in all copies or substantial
489 | portions of the Software.
490 |
491 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
492 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
493 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
494 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
495 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
496 |
497 |
498 |
499 | deprecation
500 | ISC
501 | The ISC License
502 |
503 | Copyright (c) Gregor Martynus and contributors
504 |
505 | Permission to use, copy, modify, and/or distribute this software for any
506 | purpose with or without fee is hereby granted, provided that the above
507 | copyright notice and this permission notice appear in all copies.
508 |
509 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
510 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
511 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
512 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
513 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
514 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
515 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
516 |
517 |
518 | follow-redirects
519 | MIT
520 | Copyright 2014–present Olivier Lalonde , James Talmage , Ruben Verborgh
521 |
522 | Permission is hereby granted, free of charge, to any person obtaining a copy of
523 | this software and associated documentation files (the "Software"), to deal in
524 | the Software without restriction, including without limitation the rights to
525 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
526 | of the Software, and to permit persons to whom the Software is furnished to do
527 | so, subject to the following conditions:
528 |
529 | The above copyright notice and this permission notice shall be included in all
530 | copies or substantial portions of the Software.
531 |
532 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
533 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
534 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
535 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
536 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
537 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
538 |
539 |
540 | has-flag
541 | MIT
542 | MIT License
543 |
544 | Copyright (c) Sindre Sorhus (sindresorhus.com)
545 |
546 | 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:
547 |
548 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
549 |
550 | 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.
551 |
552 |
553 | is-plain-object
554 | MIT
555 | The MIT License (MIT)
556 |
557 | Copyright (c) 2014-2017, Jon Schlinkert.
558 |
559 | Permission is hereby granted, free of charge, to any person obtaining a copy
560 | of this software and associated documentation files (the "Software"), to deal
561 | in the Software without restriction, including without limitation the rights
562 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
563 | copies of the Software, and to permit persons to whom the Software is
564 | furnished to do so, subject to the following conditions:
565 |
566 | The above copyright notice and this permission notice shall be included in
567 | all copies or substantial portions of the Software.
568 |
569 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
570 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
571 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
572 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
573 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
574 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
575 | THE SOFTWARE.
576 |
577 |
578 | is-retry-allowed
579 | MIT
580 | The MIT License (MIT)
581 |
582 | Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop)
583 |
584 | Permission is hereby granted, free of charge, to any person obtaining a copy
585 | of this software and associated documentation files (the "Software"), to deal
586 | in the Software without restriction, including without limitation the rights
587 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
588 | copies of the Software, and to permit persons to whom the Software is
589 | furnished to do so, subject to the following conditions:
590 |
591 | The above copyright notice and this permission notice shall be included in
592 | all copies or substantial portions of the Software.
593 |
594 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
595 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
596 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
597 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
598 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
599 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
600 | THE SOFTWARE.
601 |
602 |
603 | ms
604 | MIT
605 | The MIT License (MIT)
606 |
607 | Copyright (c) 2016 Zeit, Inc.
608 |
609 | Permission is hereby granted, free of charge, to any person obtaining a copy
610 | of this software and associated documentation files (the "Software"), to deal
611 | in the Software without restriction, including without limitation the rights
612 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
613 | copies of the Software, and to permit persons to whom the Software is
614 | furnished to do so, subject to the following conditions:
615 |
616 | The above copyright notice and this permission notice shall be included in all
617 | copies or substantial portions of the Software.
618 |
619 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
620 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
621 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
622 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
623 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
624 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
625 | SOFTWARE.
626 |
627 |
628 | node-fetch
629 | MIT
630 | The MIT License (MIT)
631 |
632 | Copyright (c) 2016 David Frank
633 |
634 | Permission is hereby granted, free of charge, to any person obtaining a copy
635 | of this software and associated documentation files (the "Software"), to deal
636 | in the Software without restriction, including without limitation the rights
637 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
638 | copies of the Software, and to permit persons to whom the Software is
639 | furnished to do so, subject to the following conditions:
640 |
641 | The above copyright notice and this permission notice shall be included in all
642 | copies or substantial portions of the Software.
643 |
644 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
645 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
646 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
647 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
648 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
649 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
650 | SOFTWARE.
651 |
652 |
653 |
654 | once
655 | ISC
656 | The ISC License
657 |
658 | Copyright (c) Isaac Z. Schlueter and Contributors
659 |
660 | Permission to use, copy, modify, and/or distribute this software for any
661 | purpose with or without fee is hereby granted, provided that the above
662 | copyright notice and this permission notice appear in all copies.
663 |
664 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
665 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
666 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
667 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
668 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
669 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
670 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
671 |
672 |
673 | supports-color
674 | MIT
675 | MIT License
676 |
677 | Copyright (c) Sindre Sorhus (sindresorhus.com)
678 |
679 | 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:
680 |
681 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
682 |
683 | 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.
684 |
685 |
686 | tr46
687 | MIT
688 |
689 | tunnel
690 | MIT
691 | The MIT License (MIT)
692 |
693 | Copyright (c) 2012 Koichi Kobayashi
694 |
695 | Permission is hereby granted, free of charge, to any person obtaining a copy
696 | of this software and associated documentation files (the "Software"), to deal
697 | in the Software without restriction, including without limitation the rights
698 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
699 | copies of the Software, and to permit persons to whom the Software is
700 | furnished to do so, subject to the following conditions:
701 |
702 | The above copyright notice and this permission notice shall be included in
703 | all copies or substantial portions of the Software.
704 |
705 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
706 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
707 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
708 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
709 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
710 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
711 | THE SOFTWARE.
712 |
713 |
714 | universal-user-agent
715 | ISC
716 | # [ISC License](https://spdx.org/licenses/ISC)
717 |
718 | Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m)
719 |
720 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
721 |
722 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
723 |
724 |
725 | uuid
726 | MIT
727 | The MIT License (MIT)
728 |
729 | Copyright (c) 2010-2020 Robert Kieffer and other contributors
730 |
731 | 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:
732 |
733 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
734 |
735 | 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.
736 |
737 |
738 | webidl-conversions
739 | BSD-2-Clause
740 | # The BSD 2-Clause License
741 |
742 | Copyright (c) 2014, Domenic Denicola
743 | All rights reserved.
744 |
745 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
746 |
747 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
748 |
749 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
750 |
751 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
752 |
753 |
754 | whatwg-url
755 | MIT
756 | The MIT License (MIT)
757 |
758 | Copyright (c) 2015–2016 Sebastian Mayr
759 |
760 | Permission is hereby granted, free of charge, to any person obtaining a copy
761 | of this software and associated documentation files (the "Software"), to deal
762 | in the Software without restriction, including without limitation the rights
763 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
764 | copies of the Software, and to permit persons to whom the Software is
765 | furnished to do so, subject to the following conditions:
766 |
767 | The above copyright notice and this permission notice shall be included in
768 | all copies or substantial portions of the Software.
769 |
770 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
771 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
772 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
773 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
774 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
775 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
776 | THE SOFTWARE.
777 |
778 |
779 | wrappy
780 | ISC
781 | The ISC License
782 |
783 | Copyright (c) Isaac Z. Schlueter and Contributors
784 |
785 | Permission to use, copy, modify, and/or distribute this software for any
786 | purpose with or without fee is hereby granted, provided that the above
787 | copyright notice and this permission notice appear in all copies.
788 |
789 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
790 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
791 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
792 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
793 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
794 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
795 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
796 |
--------------------------------------------------------------------------------
/dist/sourcemap-register.js:
--------------------------------------------------------------------------------
1 | (()=>{var e={650:e=>{var r=Object.prototype.toString;var n=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},274:(e,r,n)=>{var t=n(339);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(190);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}},680:(e,r,n)=>{var t=n(339);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.H=MappingList},758:(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(339);var i=n(345);var a=n(274).I;var u=n(449);var s=n(758).U;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"){d.push(v)}}}s(m,o.compareByGeneratedPositionsDeflated);this.__generatedMappings=m;s(d,o.compareByOriginalPositions);this.__originalMappings=d};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(449);var o=n(339);var i=n(274).I;var a=n(680).H;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 h=0,d=g.length;h0){if(!o.compareByGeneratedPositionsInflated(c,g[h-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.h=SourceMapGenerator},351:(e,r,n)=>{var t;var o=n(591).h;var i=n(339);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},997:(e,r,n)=>{n(591).h;r.SourceMapConsumer=n(952).SourceMapConsumer;n(351)},284:(e,r,n)=>{e=n.nmd(e);var t=n(997).SourceMapConsumer;var o=n(17);var i;try{i=n(147);if(!i.existsSync||!i.readFileSync){i=null}}catch(e){}var a=n(650);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 h=[];var d=[];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=h.slice(0);var _=d.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){h.length=0}h.unshift(r.retrieveFile)}if(r.retrieveSourceMap){if(r.overrideRetrieveSourceMap){d.length=0}d.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(){h.length=0;d.length=0;h=S.slice(0);d=_.slice(0);v=handlerExec(d);m=handlerExec(h)}},147:e=>{"use strict";e.exports=require("fs")},17: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__(284).install()})();module.exports=n})();
--------------------------------------------------------------------------------
/example-workflow-file.yaml:
--------------------------------------------------------------------------------
1 | on:
2 | pull_request:
3 | types: [opened, reopened]
4 |
5 | jobs:
6 | create-asana-attachment-job:
7 | runs-on: ubuntu-latest
8 | name: Create pull request attachments on Asana tasks
9 | steps:
10 | - name: Create pull request attachments
11 | uses: Asana/create-app-attachment-github-action@latest
12 | id: postAttachment
13 | with:
14 | asana-secret: ${{ secrets.ASANA_SECRET }}
15 | - name: Log output status
16 | run: echo "Status is ${{ steps.postAttachment.outputs.status }}"
17 |
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | clearMocks: true,
3 | moduleFileExtensions: ["js", "ts"],
4 | testMatch: ["**/*.test.ts"],
5 | transform: {
6 | "^.+\\.ts$": "ts-jest",
7 | },
8 | verbose: true,
9 | };
10 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-app-attachment-github-action",
3 | "version": "1.0.0",
4 | "description": "This action allows you to post your Pull Request as an attachment to the Asana task.",
5 | "main": "src/index.ts",
6 | "scripts": {
7 | "prepare": "husky install",
8 | "build": "tsc",
9 | "test": "jest",
10 | "lint": "eslint src/**/*.ts",
11 | "package": "ncc build --source-map --license licenses.txt",
12 | "test:coverage": "jest --collectCoverage=true"
13 | },
14 | "repository": {
15 | "type": "git",
16 | "url": "git+https://github.com/Asana/create-app-attachment-github-action.git"
17 | },
18 | "keywords": [],
19 | "author": "Asana",
20 | "license": "MIT",
21 | "bugs": {
22 | "url": "https://github.com/Asana/create-app-attachment-github-action/issues"
23 | },
24 | "homepage": "https://github.com/Asana/create-app-attachment-github-action#readme",
25 | "dependencies": {
26 | "@actions/core": "^1.10.0",
27 | "@actions/github": "^5.0.0",
28 | "axios": "^0.21.4",
29 | "axios-retry": "^3.1.9"
30 | },
31 | "devDependencies": {
32 | "@types/jest": "^27.0.1",
33 | "@vercel/ncc": "^0.38.1",
34 | "eslint": "^7.32.0",
35 | "eslint-plugin-github": "^4.2.0",
36 | "eslint-plugin-jest": "^24.4.0",
37 | "husky": "^7.0.2",
38 | "jest": "^27.2.3",
39 | "prettier": "^2.4.1",
40 | "ts-jest": "^27.0.5",
41 | "typescript": "^4.4.2"
42 | }
43 | }
--------------------------------------------------------------------------------
/src/constants/errors.ts:
--------------------------------------------------------------------------------
1 | export const WRONG_TRIGGER =
2 | "Only pull_request, pull_request_target, pull_request_review and pull_request_review_comment triggers are supported";
3 | export const BOTH_PROJECT_LISTS_ARE_NOT_EMPTY =
4 | "Forbidden to specify allowed and blocked lists at the same time";
5 |
--------------------------------------------------------------------------------
/src/constants/inputs.ts:
--------------------------------------------------------------------------------
1 | export const ASANA_SECRET = "asana-secret";
2 | export const ALLOWED_PROJECTS = "allowed-projects";
3 | export const BLOCKED_PROJECTS = "blocked-projects";
4 |
--------------------------------------------------------------------------------
/src/constants/requests.ts:
--------------------------------------------------------------------------------
1 | export const BASE_URL = "https://github.integrations.asana.plus/custom/v1";
2 | export const ACTION_URL = "actions/widget";
3 | export const RETRIES = 3;
4 | export const RETRY_DELAY = 1000;
5 |
--------------------------------------------------------------------------------
/src/constants/triggers.ts:
--------------------------------------------------------------------------------
1 | export const allowed = [
2 | "pull_request",
3 | "pull_request_target",
4 | "pull_request_review",
5 | "pull_request_review_comment",
6 | ];
7 |
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | import { setFailed, setOutput } from "@actions/core";
2 | import { context } from "@actions/github";
3 | import axios from "./requests/axios";
4 | import * as utils from "./utils";
5 | import * as INPUTS from "./constants/inputs";
6 | import * as REQUESTS from "./constants/requests";
7 |
8 | const allowedProjects = utils.getProjectsFromInput(INPUTS.ALLOWED_PROJECTS);
9 | const blockedProjects = utils.getProjectsFromInput(INPUTS.BLOCKED_PROJECTS);
10 |
11 | const run = async () => {
12 | try {
13 | utils.validateTrigger(context.eventName);
14 | utils.validateProjectLists(allowedProjects, blockedProjects);
15 |
16 | const result = await axios.post(REQUESTS.ACTION_URL, {
17 | allowedProjects,
18 | blockedProjects,
19 | pullRequestDescription: context.payload.pull_request?.body,
20 | pullRequestName: context.payload.pull_request?.title,
21 | pullRequestNumber: context.payload.pull_request?.number,
22 | pullRequestURL: context.payload.pull_request?.html_url,
23 | });
24 |
25 | console.log(result.data);
26 | setOutput("status", result.status);
27 | } catch (error) {
28 | if (utils.isAxiosError(error)) console.log(error.response?.data || "Unknown error");
29 | if (error instanceof Error) setFailed(error.message);
30 | else setFailed("Unknown error")
31 | }
32 | };
33 |
34 | run();
35 |
--------------------------------------------------------------------------------
/src/requests/axios.ts:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import axiosRetry from "axios-retry";
3 | import { getInput } from "@actions/core";
4 | import { ASANA_SECRET } from "../constants/inputs";
5 | import * as REQUESTS from "../constants/requests";
6 |
7 | const axiosInstance = axios.create({
8 | baseURL: REQUESTS.BASE_URL,
9 | headers: {
10 | Authorization: `Bearer ${getInput(ASANA_SECRET)}`,
11 | },
12 | });
13 |
14 | axiosRetry(axiosInstance, {
15 | retries: REQUESTS.RETRIES,
16 | retryDelay: (retryCount) => retryCount * REQUESTS.RETRY_DELAY,
17 | retryCondition: (error) => {
18 | const status = error?.response?.status;
19 | if (!status) return true;
20 | return String(status).startsWith("50");
21 | },
22 | });
23 |
24 | export default axiosInstance;
25 |
--------------------------------------------------------------------------------
/src/utils/index.test.ts:
--------------------------------------------------------------------------------
1 | import * as utils from "./index";
2 | import * as ERRORS from "../constants/errors";
3 | import * as core from "@actions/core";
4 | import { ALLOWED_PROJECTS, BLOCKED_PROJECTS } from "../constants/inputs";
5 |
6 | test("getProjectsFromInput should return array of project gids", () => {
7 | jest.spyOn(core, "getInput").mockImplementation((type: string) => {
8 | switch (type) {
9 | case ALLOWED_PROJECTS:
10 | return "1\n2\n3";
11 | case BLOCKED_PROJECTS:
12 | return "";
13 | default:
14 | return "";
15 | }
16 | });
17 |
18 | expect(utils.getProjectsFromInput(ALLOWED_PROJECTS)).toEqual(["1", "2", "3"]);
19 | expect(utils.getProjectsFromInput(BLOCKED_PROJECTS)).toEqual([]);
20 | });
21 |
22 | describe("validateTrigger", () => {
23 | test("should throw an error if wrong eventType was provided", () => {
24 | expect(() => utils.validateTrigger("push")).toThrow(ERRORS.WRONG_TRIGGER);
25 | });
26 |
27 | test("should not throw an error if wrong eventType was provided", () => {
28 | expect(() => utils.validateTrigger("pull_request")).not.toThrow();
29 | expect(() => utils.validateTrigger("pull_request_target")).not.toThrow();
30 | expect(() => utils.validateTrigger("pull_request_review")).not.toThrow();
31 | expect(() =>
32 | utils.validateTrigger("pull_request_review_comment")
33 | ).not.toThrow();
34 | });
35 | });
36 |
37 | describe("validateProjectLists", () => {
38 | test("should throw an error if both projects lists are not empty", () => {
39 | expect(() => utils.validateProjectLists(["1"], ["1"])).toThrow(
40 | ERRORS.BOTH_PROJECT_LISTS_ARE_NOT_EMPTY
41 | );
42 | });
43 | test("should not throw an error if only one projects list is not empty", () => {
44 | expect(() => utils.validateProjectLists(["1"], [])).not.toThrow();
45 | expect(() => utils.validateProjectLists([], ["1"])).not.toThrow();
46 | });
47 | });
48 |
--------------------------------------------------------------------------------
/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | import { AxiosError } from "axios";
2 | import { getInput } from "@actions/core";
3 | import * as ERRORS from "../constants/errors";
4 | import * as TRIGGERS from "../constants/triggers";
5 |
6 | export const getProjectsFromInput = (inputName: string): String[] => {
7 | const projects = getInput(inputName);
8 | if (!projects) return [];
9 |
10 | return projects.split("\n").map((gid) => `${gid}`);
11 | };
12 |
13 | export const validateTrigger = (eventName: string) => {
14 | if (!TRIGGERS.allowed.includes(eventName))
15 | throw new Error(ERRORS.WRONG_TRIGGER);
16 | };
17 |
18 | export const validateProjectLists = (
19 | allowedProjects: String[],
20 | blockedProjects: String[]
21 | ) => {
22 | if (allowedProjects.length > 0 && blockedProjects.length > 0)
23 | throw new Error(ERRORS.BOTH_PROJECT_LISTS_ARE_NOT_EMPTY);
24 | };
25 |
26 | export const isAxiosError = (e: any): e is AxiosError => e.isAxiosError;
27 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es6",
4 | "module": "commonjs",
5 | "outDir": "./lib",
6 | "rootDir": "./src",
7 | "strict": true,
8 | "noImplicitAny": true,
9 | "esModuleInterop": true,
10 | "moduleResolution": "Node"
11 | },
12 | "exclude": ["node_modules", "**/*.test.ts"]
13 | }
14 |
--------------------------------------------------------------------------------